Skip to content

Commit

Permalink
CodeGen from PR 13548 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
TimeSeriesInsingts t2 config (Azure#13548)

* TimeSeriesInsingts t2 config

* timeseriesinsights readme.python change
  • Loading branch information
SDKAuto committed Mar 24, 2021
1 parent 8f691b2 commit 9d4c6bc
Show file tree
Hide file tree
Showing 14 changed files with 273 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
# --------------------------------------------------------------------------

from ._time_series_insights_client import TimeSeriesInsightsClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['TimeSeriesInsightsClient']

try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy

from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential

VERSION = "unknown"

class TimeSeriesInsightsClientConfiguration(Configuration):
"""Configuration for TimeSeriesInsightsClient.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"chosen_version": "2020-05-15",
"total_api_version_list": ["2020-05-15"],
"client": {
"name": "TimeSeriesInsightsClient",
"filename": "_time_series_insights_client",
"description": "Time Series Insights client.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": false
},
"global_parameters": {
"sync": {
"credential": {
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "Azure Subscription ID.",
"docstring_type": "str",
"required": true
}
},
"async": {
"credential": {
"signature": "credential, # type: \"AsyncTokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "Azure Subscription ID.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_id"
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null
},
"operation_groups": {
"operations": "Operations",
"environments": "EnvironmentsOperations",
"event_sources": "EventSourcesOperations",
"reference_data_sets": "ReferenceDataSetsOperations",
"access_policies": "AccessPoliciesOperations"
},
"operation_mixins": {
},
"sync_imports": "None",
"async_imports": "None"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy

from .._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

VERSION = "unknown"

class TimeSeriesInsightsClientConfiguration(Configuration):
"""Configuration for TimeSeriesInsightsClient.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union
from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union
import warnings

from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
Expand Down Expand Up @@ -184,8 +184,7 @@ async def update(
resource_group_name: str,
environment_name: str,
access_policy_name: str,
description: Optional[str] = None,
roles: Optional[List[Union[str, "_models.AccessPolicyRole"]]] = None,
access_policy_update_parameters: "_models.AccessPolicyUpdateParameters",
**kwargs
) -> "_models.AccessPolicyResource":
"""Updates the access policy with the specified name in the specified subscription, resource
Expand All @@ -199,10 +198,9 @@ async def update(
:param access_policy_name: The name of the Time Series Insights access policy associated with
the specified environment.
:type access_policy_name: str
:param description: An description of the access policy.
:type description: str
:param roles: The list of roles the principal is assigned on the environment.
:type roles: list[str or ~azure.mgmt.timeseriesinsights.models.AccessPolicyRole]
:param access_policy_update_parameters: Request object that contains the updated information
for the access policy.
:type access_policy_update_parameters: ~azure.mgmt.timeseriesinsights.models.AccessPolicyUpdateParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:return: AccessPolicyResource, or the result of cls(response)
:rtype: ~azure.mgmt.timeseriesinsights.models.AccessPolicyResource
Expand All @@ -213,8 +211,6 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))

_access_policy_update_parameters = _models.AccessPolicyUpdateParameters(description=description, roles=roles)
api_version = "2020-05-15"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
Expand All @@ -239,7 +235,7 @@ async def update(
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(_access_policy_update_parameters, 'AccessPolicyUpdateParameters')
body_content = self._serialize.body(access_policy_update_parameters, 'AccessPolicyUpdateParameters')
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,16 +240,14 @@ async def _update_initial(
self,
resource_group_name: str,
environment_name: str,
tags: Optional[Dict[str, str]] = None,
environment_update_parameters: "_models.EnvironmentUpdateParameters",
**kwargs
) -> "_models.EnvironmentResource":
cls = kwargs.pop('cls', None) # type: ClsType["_models.EnvironmentResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))

_environment_update_parameters = _models.EnvironmentUpdateParameters(tags=tags)
api_version = "2020-05-15"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
Expand All @@ -273,7 +271,7 @@ async def _update_initial(
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(_environment_update_parameters, 'EnvironmentUpdateParameters')
body_content = self._serialize.body(environment_update_parameters, 'EnvironmentUpdateParameters')
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
Expand All @@ -295,7 +293,7 @@ async def begin_update(
self,
resource_group_name: str,
environment_name: str,
tags: Optional[Dict[str, str]] = None,
environment_update_parameters: "_models.EnvironmentUpdateParameters",
**kwargs
) -> AsyncLROPoller["_models.EnvironmentResource"]:
"""Updates the environment with the specified name in the specified subscription and resource
Expand All @@ -306,8 +304,9 @@ async def begin_update(
:param environment_name: The name of the Time Series Insights environment associated with the
specified resource group.
:type environment_name: str
:param tags: Key-value pairs of additional properties for the environment.
:type tags: dict[str, str]
:param environment_update_parameters: Request object that contains the updated information for
the environment.
:type environment_update_parameters: ~azure.mgmt.timeseriesinsights.models.EnvironmentUpdateParameters
: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: True for ARMPolling, False for no polling, or a
Expand All @@ -329,7 +328,7 @@ async def begin_update(
raw_result = await self._update_initial(
resource_group_name=resource_group_name,
environment_name=environment_name,
tags=tags,
environment_update_parameters=environment_update_parameters,
cls=lambda x,y,z: x,
**kwargs
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ async def update(
resource_group_name: str,
environment_name: str,
event_source_name: str,
tags: Optional[Dict[str, str]] = None,
event_source_update_parameters: "_models.EventSourceUpdateParameters",
**kwargs
) -> "_models.EventSourceResource":
"""Updates the event source with the specified name in the specified subscription, resource group,
Expand All @@ -198,8 +198,9 @@ async def update(
:param event_source_name: The name of the Time Series Insights event source associated with the
specified environment.
:type event_source_name: str
:param tags: Key-value pairs of additional properties for the event source.
:type tags: dict[str, str]
:param event_source_update_parameters: Request object that contains the updated information for
the event source.
:type event_source_update_parameters: ~azure.mgmt.timeseriesinsights.models.EventSourceUpdateParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:return: EventSourceResource, or the result of cls(response)
:rtype: ~azure.mgmt.timeseriesinsights.models.EventSourceResource
Expand All @@ -210,8 +211,6 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))

_event_source_update_parameters = _models.EventSourceUpdateParameters(tags=tags)
api_version = "2020-05-15"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
Expand All @@ -236,7 +235,7 @@ async def update(
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(_event_source_update_parameters, 'EventSourceUpdateParameters')
body_content = self._serialize.body(event_source_update_parameters, 'EventSourceUpdateParameters')
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ async def update(
resource_group_name: str,
environment_name: str,
reference_data_set_name: str,
tags: Optional[Dict[str, str]] = None,
reference_data_set_update_parameters: "_models.ReferenceDataSetUpdateParameters",
**kwargs
) -> "_models.ReferenceDataSetResource":
"""Updates the reference data set with the specified name in the specified subscription, resource
Expand All @@ -198,8 +198,9 @@ async def update(
:param reference_data_set_name: The name of the Time Series Insights reference data set
associated with the specified environment.
:type reference_data_set_name: str
:param tags: Key-value pairs of additional properties for the reference data set.
:type tags: dict[str, str]
:param reference_data_set_update_parameters: Request object that contains the updated
information for the reference data set.
:type reference_data_set_update_parameters: ~azure.mgmt.timeseriesinsights.models.ReferenceDataSetUpdateParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ReferenceDataSetResource, or the result of cls(response)
:rtype: ~azure.mgmt.timeseriesinsights.models.ReferenceDataSetResource
Expand All @@ -210,8 +211,6 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))

_reference_data_set_update_parameters = _models.ReferenceDataSetUpdateParameters(tags=tags)
api_version = "2020-05-15"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
Expand All @@ -236,7 +235,7 @@ async def update(
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(_reference_data_set_update_parameters, 'ReferenceDataSetUpdateParameters')
body_content = self._serialize.body(reference_data_set_update_parameters, 'ReferenceDataSetUpdateParameters')
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
Expand Down
Loading

0 comments on commit 9d4c6bc

Please sign in to comment.