From 4bb0a77a87896a5ab9af188d314c736ad31d29d8 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 3 Aug 2020 03:27:44 +0000 Subject: [PATCH] Generated from 055fa77ec0e8b87b4fda8c92cdda5348b34fdaaa Fix output-folder for go SDK in timeseriesinsight --- .../azure-mgmt-timeseriesinsights/README.md | 31 +- .../_time_series_insights_client.py | 2 +- .../timeseriesinsights/models/__init__.py | 57 +- .../mgmt/timeseriesinsights/models/_models.py | 1157 ++++++++-------- .../timeseriesinsights/models/_models_py3.py | 1179 +++++++++-------- .../_time_series_insights_client_enums.py | 2 - .../operations/_access_policies_operations.py | 4 +- .../operations/_environments_operations.py | 21 +- .../operations/_event_sources_operations.py | 4 +- .../operations/_operations.py | 4 +- .../_reference_data_sets_operations.py | 4 +- .../azure-mgmt-timeseriesinsights/setup.py | 4 +- 12 files changed, 1267 insertions(+), 1202 deletions(-) diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/README.md b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/README.md index 468ee76aec0e..3cb8f6e5cf7f 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/README.md +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/README.md @@ -1,30 +1,21 @@ -## Microsoft Azure SDK for Python - -This is the Microsoft Azure TimeSeriesInsights Management Client -Library. - -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). +# Microsoft Azure SDK for Python +This is the Microsoft Azure TimeSeriesInsights Management Client Library. This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. - -For a more complete set of Azure libraries, see the -[azure](https://pypi.python.org/pypi/azure) bundle package. -## Usage +# Usage -For code examples, see [TimeSeriesInsights -Management](https://docs.microsoft.com/python/api/overview/azure/timeseriesinsights) +For code examples, see [TimeSeriesInsights Management](https://docs.microsoft.com/python/api/overview/azure/timeseriesinsights) on docs.microsoft.com. -## Provide Feedback -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-timeseriesinsights%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-timeseriesinsights%2FREADME.png) diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/_time_series_insights_client.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/_time_series_insights_client.py index 4eafa141d255..f345bae62215 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/_time_series_insights_client.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/_time_series_insights_client.py @@ -53,7 +53,7 @@ def __init__( super(TimeSeriesInsightsClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-08-15-preview' + self.api_version = '2020-05-15' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/__init__.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/__init__.py index 5e36e3b855ad..bbc9517f8626 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/__init__.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/__init__.py @@ -33,6 +33,15 @@ from ._models_py3 import EventSourceMutableProperties from ._models_py3 import EventSourceResource from ._models_py3 import EventSourceUpdateParameters + from ._models_py3 import Gen1EnvironmentCreateOrUpdateParameters + from ._models_py3 import Gen1EnvironmentResource + from ._models_py3 import Gen1EnvironmentUpdateParameters + from ._models_py3 import Gen2EnvironmentCreateOrUpdateParameters + from ._models_py3 import Gen2EnvironmentResource + from ._models_py3 import Gen2EnvironmentUpdateParameters + from ._models_py3 import Gen2StorageConfigurationInput + from ._models_py3 import Gen2StorageConfigurationMutableProperties + from ._models_py3 import Gen2StorageConfigurationOutput from ._models_py3 import IngressEnvironmentStatus from ._models_py3 import IoTHubEventSourceCommonProperties from ._models_py3 import IoTHubEventSourceCreateOrUpdateParameters @@ -40,12 +49,6 @@ from ._models_py3 import IoTHubEventSourceUpdateParameters from ._models_py3 import LocalTimestamp from ._models_py3 import LocalTimestampTimeZoneOffset - from ._models_py3 import LongTermEnvironmentCreateOrUpdateParameters - from ._models_py3 import LongTermEnvironmentResource - from ._models_py3 import LongTermEnvironmentUpdateParameters - from ._models_py3 import LongTermStorageConfigurationInput - from ._models_py3 import LongTermStorageConfigurationMutableProperties - from ._models_py3 import LongTermStorageConfigurationOutput from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import ReferenceDataSetCreateOrUpdateParameters @@ -56,12 +59,10 @@ from ._models_py3 import Resource from ._models_py3 import ResourceProperties from ._models_py3 import Sku - from ._models_py3 import StandardEnvironmentCreateOrUpdateParameters - from ._models_py3 import StandardEnvironmentResource - from ._models_py3 import StandardEnvironmentUpdateParameters from ._models_py3 import TimeSeriesIdProperty from ._models_py3 import TrackedResource from ._models_py3 import WarmStorageEnvironmentStatus + from ._models_py3 import WarmStoreConfigurationProperties except (SyntaxError, ImportError): from ._models import AccessPolicyCreateOrUpdateParameters from ._models import AccessPolicyListResponse @@ -86,6 +87,15 @@ from ._models import EventSourceMutableProperties from ._models import EventSourceResource from ._models import EventSourceUpdateParameters + from ._models import Gen1EnvironmentCreateOrUpdateParameters + from ._models import Gen1EnvironmentResource + from ._models import Gen1EnvironmentUpdateParameters + from ._models import Gen2EnvironmentCreateOrUpdateParameters + from ._models import Gen2EnvironmentResource + from ._models import Gen2EnvironmentUpdateParameters + from ._models import Gen2StorageConfigurationInput + from ._models import Gen2StorageConfigurationMutableProperties + from ._models import Gen2StorageConfigurationOutput from ._models import IngressEnvironmentStatus from ._models import IoTHubEventSourceCommonProperties from ._models import IoTHubEventSourceCreateOrUpdateParameters @@ -93,12 +103,6 @@ from ._models import IoTHubEventSourceUpdateParameters from ._models import LocalTimestamp from ._models import LocalTimestampTimeZoneOffset - from ._models import LongTermEnvironmentCreateOrUpdateParameters - from ._models import LongTermEnvironmentResource - from ._models import LongTermEnvironmentUpdateParameters - from ._models import LongTermStorageConfigurationInput - from ._models import LongTermStorageConfigurationMutableProperties - from ._models import LongTermStorageConfigurationOutput from ._models import Operation from ._models import OperationDisplay from ._models import ReferenceDataSetCreateOrUpdateParameters @@ -109,12 +113,10 @@ from ._models import Resource from ._models import ResourceProperties from ._models import Sku - from ._models import StandardEnvironmentCreateOrUpdateParameters - from ._models import StandardEnvironmentResource - from ._models import StandardEnvironmentUpdateParameters from ._models import TimeSeriesIdProperty from ._models import TrackedResource from ._models import WarmStorageEnvironmentStatus + from ._models import WarmStoreConfigurationProperties from ._paged_models import OperationPaged from ._time_series_insights_client_enums import ( ProvisioningState, @@ -153,6 +155,15 @@ 'EventSourceMutableProperties', 'EventSourceResource', 'EventSourceUpdateParameters', + 'Gen1EnvironmentCreateOrUpdateParameters', + 'Gen1EnvironmentResource', + 'Gen1EnvironmentUpdateParameters', + 'Gen2EnvironmentCreateOrUpdateParameters', + 'Gen2EnvironmentResource', + 'Gen2EnvironmentUpdateParameters', + 'Gen2StorageConfigurationInput', + 'Gen2StorageConfigurationMutableProperties', + 'Gen2StorageConfigurationOutput', 'IngressEnvironmentStatus', 'IoTHubEventSourceCommonProperties', 'IoTHubEventSourceCreateOrUpdateParameters', @@ -160,12 +171,6 @@ 'IoTHubEventSourceUpdateParameters', 'LocalTimestamp', 'LocalTimestampTimeZoneOffset', - 'LongTermEnvironmentCreateOrUpdateParameters', - 'LongTermEnvironmentResource', - 'LongTermEnvironmentUpdateParameters', - 'LongTermStorageConfigurationInput', - 'LongTermStorageConfigurationMutableProperties', - 'LongTermStorageConfigurationOutput', 'Operation', 'OperationDisplay', 'ReferenceDataSetCreateOrUpdateParameters', @@ -176,12 +181,10 @@ 'Resource', 'ResourceProperties', 'Sku', - 'StandardEnvironmentCreateOrUpdateParameters', - 'StandardEnvironmentResource', - 'StandardEnvironmentUpdateParameters', 'TimeSeriesIdProperty', 'TrackedResource', 'WarmStorageEnvironmentStatus', + 'WarmStoreConfigurationProperties', 'OperationPaged', 'ProvisioningState', 'SkuName', diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_models.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_models.py index 2b70d8ff066d..a5bc3378eccb 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_models.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_models.py @@ -360,8 +360,8 @@ class EnvironmentCreateOrUpdateParameters(CreateOrUpdateTrackedResourcePropertie """Parameters supplied to the CreateOrUpdate Environment operation. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StandardEnvironmentCreateOrUpdateParameters, - LongTermEnvironmentCreateOrUpdateParameters + sub-classes are: Gen1EnvironmentCreateOrUpdateParameters, + Gen2EnvironmentCreateOrUpdateParameters All required parameters must be populated in order to send to Azure. @@ -370,9 +370,8 @@ class EnvironmentCreateOrUpdateParameters(CreateOrUpdateTrackedResourcePropertie :param tags: Key-value pairs of additional properties for the resource. :type tags: dict[str, str] :param sku: Required. The sku determines the type of environment, either - standard (S1 or S2) or long-term (L1). For standard environments the sku - determines the capacity of the environment, the ingress rate, and the - billing rate. + Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku determines the + capacity of the environment, the ingress rate, and the billing rate. :type sku: ~azure.mgmt.timeseriesinsights.models.Sku :param kind: Required. Constant filled by server. :type kind: str @@ -392,7 +391,7 @@ class EnvironmentCreateOrUpdateParameters(CreateOrUpdateTrackedResourcePropertie } _subtype_map = { - 'kind': {'Standard': 'StandardEnvironmentCreateOrUpdateParameters', 'LongTerm': 'LongTermEnvironmentCreateOrUpdateParameters'} + 'kind': {'Gen1': 'Gen1EnvironmentCreateOrUpdateParameters', 'Gen2': 'Gen2EnvironmentCreateOrUpdateParameters'} } def __init__(self, **kwargs): @@ -465,7 +464,7 @@ class EnvironmentResource(TrackedResource): top level Azure Time Series Insights resource. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StandardEnvironmentResource, LongTermEnvironmentResource + sub-classes are: Gen1EnvironmentResource, Gen2EnvironmentResource Variables are only populated by the server, and will be ignored when sending a request. @@ -483,9 +482,8 @@ class EnvironmentResource(TrackedResource): :param tags: Resource tags :type tags: dict[str, str] :param sku: Required. The sku determines the type of environment, either - standard (S1 or S2) or long-term (L1). For standard environments the sku - determines the capacity of the environment, the ingress rate, and the - billing rate. + Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku determines the + capacity of the environment, the ingress rate, and the billing rate. :type sku: ~azure.mgmt.timeseriesinsights.models.Sku :param kind: Required. Constant filled by server. :type kind: str @@ -511,7 +509,7 @@ class EnvironmentResource(TrackedResource): } _subtype_map = { - 'kind': {'Standard': 'StandardEnvironmentResource', 'LongTerm': 'LongTermEnvironmentResource'} + 'kind': {'Gen1': 'Gen1EnvironmentResource', 'Gen2': 'Gen2EnvironmentResource'} } def __init__(self, **kwargs): @@ -709,6 +707,13 @@ class EventSourceCreateOrUpdateParameters(CreateOrUpdateTrackedResourcePropertie :type location: str :param tags: Key-value pairs of additional properties for the resource. :type tags: dict[str, str] + :param local_timestamp: An object that represents the local timestamp + property. It contains the format of local timestamp that needs to be used + and the corresponding timezone offset information. If a value isn't + specified for localTimestamp, or if null, then the local timestamp will + not be ingressed with the events. + :type local_timestamp: + ~azure.mgmt.timeseriesinsights.models.LocalTimestamp :param kind: Required. Constant filled by server. :type kind: str """ @@ -721,6 +726,7 @@ class EventSourceCreateOrUpdateParameters(CreateOrUpdateTrackedResourcePropertie _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'local_timestamp': {'key': 'localTimestamp', 'type': 'LocalTimestamp'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -730,6 +736,7 @@ class EventSourceCreateOrUpdateParameters(CreateOrUpdateTrackedResourcePropertie def __init__(self, **kwargs): super(EventSourceCreateOrUpdateParameters, self).__init__(**kwargs) + self.local_timestamp = kwargs.get('local_timestamp', None) self.kind = None self.kind = 'EventSourceCreateOrUpdateParameters' @@ -747,6 +754,13 @@ class EventHubEventSourceCreateOrUpdateParameters(EventSourceCreateOrUpdateParam :type location: str :param tags: Key-value pairs of additional properties for the resource. :type tags: dict[str, str] + :param local_timestamp: An object that represents the local timestamp + property. It contains the format of local timestamp that needs to be used + and the corresponding timezone offset information. If a value isn't + specified for localTimestamp, or if null, then the local timestamp will + not be ingressed with the events. + :type local_timestamp: + ~azure.mgmt.timeseriesinsights.models.LocalTimestamp :param kind: Required. Constant filled by server. :type kind: str :param provisioning_state: Provisioning state of the resource. Possible @@ -797,6 +811,7 @@ class EventHubEventSourceCreateOrUpdateParameters(EventSourceCreateOrUpdateParam _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'local_timestamp': {'key': 'localTimestamp', 'type': 'LocalTimestamp'}, 'kind': {'key': 'kind', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, @@ -868,7 +883,7 @@ class EventSourceResource(TrackedResource): } _subtype_map = { - 'kind': {'Microsoft.EventHub': 'EventHubEventSourceResource', 'Microsoft.IotHub': 'IoTHubEventSourceResource'} + 'kind': {'Microsoft.EventHub': 'EventHubEventSourceResource', 'Microsoft.IoTHub': 'IoTHubEventSourceResource'} } def __init__(self, **kwargs): @@ -1072,96 +1087,9 @@ def __init__(self, **kwargs): self.local_timestamp = kwargs.get('local_timestamp', None) -class IngressEnvironmentStatus(Model): - """An object that represents the status of ingress on an environment. - - :param state: This string represents the state of ingress operations on an - environment. It can be "Disabled", "Ready", "Running", "Paused" or - "Unknown". Possible values include: 'Disabled', 'Ready', 'Running', - 'Paused', 'Unknown' - :type state: str or ~azure.mgmt.timeseriesinsights.models.IngressState - :param state_details: An object that contains the details about an - environment's state. - :type state_details: - ~azure.mgmt.timeseriesinsights.models.EnvironmentStateDetails - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'state_details': {'key': 'stateDetails', 'type': 'EnvironmentStateDetails'}, - } - - def __init__(self, **kwargs): - super(IngressEnvironmentStatus, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.state_details = kwargs.get('state_details', None) - - -class IoTHubEventSourceCommonProperties(AzureEventSourceProperties): - """Properties of the IoTHub event source. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param provisioning_state: Provisioning state of the resource. Possible - values include: 'Accepted', 'Creating', 'Updating', 'Succeeded', 'Failed', - 'Deleting' - :type provisioning_state: str or - ~azure.mgmt.timeseriesinsights.models.ProvisioningState - :ivar creation_time: The time the resource was created. - :vartype creation_time: datetime - :param timestamp_property_name: The event property that will be used as - the event source's timestamp. If a value isn't specified for - timestampPropertyName, or if null or empty-string is specified, the event - creation time will be used. - :type timestamp_property_name: str - :param event_source_resource_id: Required. The resource id of the event - source in Azure Resource Manager. - :type event_source_resource_id: str - :param iot_hub_name: Required. The name of the iot hub. - :type iot_hub_name: str - :param consumer_group_name: Required. The name of the iot hub's consumer - group that holds the partitions from which events will be read. - :type consumer_group_name: str - :param key_name: Required. The name of the Shared Access Policy key that - grants the Time Series Insights service access to the iot hub. This shared - access policy key must grant 'service connect' permissions to the iot hub. - :type key_name: str - """ - - _validation = { - 'creation_time': {'readonly': True}, - 'event_source_resource_id': {'required': True}, - 'iot_hub_name': {'required': True}, - 'consumer_group_name': {'required': True}, - 'key_name': {'required': True}, - } - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'timestamp_property_name': {'key': 'timestampPropertyName', 'type': 'str'}, - 'event_source_resource_id': {'key': 'eventSourceResourceId', 'type': 'str'}, - 'iot_hub_name': {'key': 'iotHubName', 'type': 'str'}, - 'consumer_group_name': {'key': 'consumerGroupName', 'type': 'str'}, - 'key_name': {'key': 'keyName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IoTHubEventSourceCommonProperties, self).__init__(**kwargs) - self.iot_hub_name = kwargs.get('iot_hub_name', None) - self.consumer_group_name = kwargs.get('consumer_group_name', None) - self.key_name = kwargs.get('key_name', None) - - -class IoTHubEventSourceCreateOrUpdateParameters(EventSourceCreateOrUpdateParameters): - """Parameters supplied to the Create or Update Event Source operation for an - IoTHub event source. - - Variables are only populated by the server, and will be ignored when - sending a request. +class Gen1EnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParameters): + """Parameters supplied to the Create or Update Environment operation for a + Gen1 environment. All required parameters must be populated in order to send to Azure. @@ -1169,78 +1097,61 @@ class IoTHubEventSourceCreateOrUpdateParameters(EventSourceCreateOrUpdateParamet :type location: str :param tags: Key-value pairs of additional properties for the resource. :type tags: dict[str, str] + :param sku: Required. The sku determines the type of environment, either + Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku determines the + capacity of the environment, the ingress rate, and the billing rate. + :type sku: ~azure.mgmt.timeseriesinsights.models.Sku :param kind: Required. Constant filled by server. :type kind: str - :param provisioning_state: Provisioning state of the resource. Possible - values include: 'Accepted', 'Creating', 'Updating', 'Succeeded', 'Failed', - 'Deleting' - :type provisioning_state: str or - ~azure.mgmt.timeseriesinsights.models.ProvisioningState - :ivar creation_time: The time the resource was created. - :vartype creation_time: datetime - :param timestamp_property_name: The event property that will be used as - the event source's timestamp. If a value isn't specified for - timestampPropertyName, or if null or empty-string is specified, the event - creation time will be used. - :type timestamp_property_name: str - :param event_source_resource_id: Required. The resource id of the event - source in Azure Resource Manager. - :type event_source_resource_id: str - :param iot_hub_name: Required. The name of the iot hub. - :type iot_hub_name: str - :param consumer_group_name: Required. The name of the iot hub's consumer - group that holds the partitions from which events will be read. - :type consumer_group_name: str - :param key_name: Required. The name of the Shared Access Policy key that - grants the Time Series Insights service access to the iot hub. This shared - access policy key must grant 'service connect' permissions to the iot hub. - :type key_name: str - :param shared_access_key: Required. The value of the Shared Access Policy - key that grants the Time Series Insights service read access to the iot - hub. This property is not shown in event source responses. - :type shared_access_key: str + :param data_retention_time: Required. ISO8601 timespan specifying the + minimum number of days the environment's events will be available for + query. + :type data_retention_time: timedelta + :param storage_limit_exceeded_behavior: The behavior the Time Series + Insights service should take when the environment's capacity has been + exceeded. If "PauseIngress" is specified, new events will not be read from + the event source. If "PurgeOldData" is specified, new events will continue + to be read and old events will be deleted from the environment. The + default behavior is PurgeOldData. Possible values include: 'PurgeOldData', + 'PauseIngress' + :type storage_limit_exceeded_behavior: str or + ~azure.mgmt.timeseriesinsights.models.StorageLimitExceededBehavior + :param partition_key_properties: The list of event properties which will + be used to partition data in the environment. Currently, only a single + partition key property is supported. + :type partition_key_properties: + list[~azure.mgmt.timeseriesinsights.models.TimeSeriesIdProperty] """ _validation = { 'location': {'required': True}, + 'sku': {'required': True}, 'kind': {'required': True}, - 'creation_time': {'readonly': True}, - 'event_source_resource_id': {'required': True}, - 'iot_hub_name': {'required': True}, - 'consumer_group_name': {'required': True}, - 'key_name': {'required': True}, - 'shared_access_key': {'required': True}, + 'data_retention_time': {'required': True}, } _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, - 'event_source_resource_id': {'key': 'properties.eventSourceResourceId', 'type': 'str'}, - 'iot_hub_name': {'key': 'properties.iotHubName', 'type': 'str'}, - 'consumer_group_name': {'key': 'properties.consumerGroupName', 'type': 'str'}, - 'key_name': {'key': 'properties.keyName', 'type': 'str'}, - 'shared_access_key': {'key': 'properties.sharedAccessKey', 'type': 'str'}, + 'data_retention_time': {'key': 'properties.dataRetentionTime', 'type': 'duration'}, + 'storage_limit_exceeded_behavior': {'key': 'properties.storageLimitExceededBehavior', 'type': 'str'}, + 'partition_key_properties': {'key': 'properties.partitionKeyProperties', 'type': '[TimeSeriesIdProperty]'}, } def __init__(self, **kwargs): - super(IoTHubEventSourceCreateOrUpdateParameters, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.creation_time = None - self.timestamp_property_name = kwargs.get('timestamp_property_name', None) - self.event_source_resource_id = kwargs.get('event_source_resource_id', None) - self.iot_hub_name = kwargs.get('iot_hub_name', None) - self.consumer_group_name = kwargs.get('consumer_group_name', None) - self.key_name = kwargs.get('key_name', None) - self.shared_access_key = kwargs.get('shared_access_key', None) - self.kind = 'Microsoft.IoTHub' + super(Gen1EnvironmentCreateOrUpdateParameters, self).__init__(**kwargs) + self.data_retention_time = kwargs.get('data_retention_time', None) + self.storage_limit_exceeded_behavior = kwargs.get('storage_limit_exceeded_behavior', None) + self.partition_key_properties = kwargs.get('partition_key_properties', None) + self.kind = 'Gen1' -class IoTHubEventSourceResource(EventSourceResource): - """An event source that receives its data from an Azure IoTHub. +class Gen1EnvironmentResource(EnvironmentResource): + """An environment is a set of time-series data available for query, and is the + top level Azure Time Series Insights resource. Gen1 environments have data + retention limits. Variables are only populated by the server, and will be ignored when sending a request. @@ -1257,8 +1168,41 @@ class IoTHubEventSourceResource(EventSourceResource): :type location: str :param tags: Resource tags :type tags: dict[str, str] + :param sku: Required. The sku determines the type of environment, either + Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku determines the + capacity of the environment, the ingress rate, and the billing rate. + :type sku: ~azure.mgmt.timeseriesinsights.models.Sku :param kind: Required. Constant filled by server. :type kind: str + :param data_retention_time: Required. ISO8601 timespan specifying the + minimum number of days the environment's events will be available for + query. + :type data_retention_time: timedelta + :param storage_limit_exceeded_behavior: The behavior the Time Series + Insights service should take when the environment's capacity has been + exceeded. If "PauseIngress" is specified, new events will not be read from + the event source. If "PurgeOldData" is specified, new events will continue + to be read and old events will be deleted from the environment. The + default behavior is PurgeOldData. Possible values include: 'PurgeOldData', + 'PauseIngress' + :type storage_limit_exceeded_behavior: str or + ~azure.mgmt.timeseriesinsights.models.StorageLimitExceededBehavior + :param partition_key_properties: The list of event properties which will + be used to partition data in the environment. Currently, only a single + partition key property is supported. + :type partition_key_properties: + list[~azure.mgmt.timeseriesinsights.models.TimeSeriesIdProperty] + :ivar data_access_id: An id used to access the environment data, e.g. to + query the environment's events or upload reference data for the + environment. + :vartype data_access_id: str + :ivar data_access_fqdn: The fully qualified domain name used to access the + environment data, e.g. to query the environment's events or upload + reference data for the environment. + :vartype data_access_fqdn: str + :param status: An object that represents the status of the environment, + and its internal state in the Time Series Insights service. + :type status: ~azure.mgmt.timeseriesinsights.models.EnvironmentStatus :param provisioning_state: Provisioning state of the resource. Possible values include: 'Accepted', 'Creating', 'Updating', 'Succeeded', 'Failed', 'Deleting' @@ -1266,23 +1210,6 @@ class IoTHubEventSourceResource(EventSourceResource): ~azure.mgmt.timeseriesinsights.models.ProvisioningState :ivar creation_time: The time the resource was created. :vartype creation_time: datetime - :param timestamp_property_name: The event property that will be used as - the event source's timestamp. If a value isn't specified for - timestampPropertyName, or if null or empty-string is specified, the event - creation time will be used. - :type timestamp_property_name: str - :param event_source_resource_id: Required. The resource id of the event - source in Azure Resource Manager. - :type event_source_resource_id: str - :param iot_hub_name: Required. The name of the iot hub. - :type iot_hub_name: str - :param consumer_group_name: Required. The name of the iot hub's consumer - group that holds the partitions from which events will be read. - :type consumer_group_name: str - :param key_name: Required. The name of the Shared Access Policy key that - grants the Time Series Insights service access to the iot hub. This shared - access policy key must grant 'service connect' permissions to the iot hub. - :type key_name: str """ _validation = { @@ -1290,12 +1217,12 @@ class IoTHubEventSourceResource(EventSourceResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'sku': {'required': True}, 'kind': {'required': True}, + 'data_retention_time': {'required': True}, + 'data_access_id': {'readonly': True}, + 'data_access_fqdn': {'readonly': True}, 'creation_time': {'readonly': True}, - 'event_source_resource_id': {'required': True}, - 'iot_hub_name': {'required': True}, - 'consumer_group_name': {'required': True}, - 'key_name': {'required': True}, } _attribute_map = { @@ -1304,122 +1231,70 @@ class IoTHubEventSourceResource(EventSourceResource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, + 'data_retention_time': {'key': 'properties.dataRetentionTime', 'type': 'duration'}, + 'storage_limit_exceeded_behavior': {'key': 'properties.storageLimitExceededBehavior', 'type': 'str'}, + 'partition_key_properties': {'key': 'properties.partitionKeyProperties', 'type': '[TimeSeriesIdProperty]'}, + 'data_access_id': {'key': 'properties.dataAccessId', 'type': 'str'}, + 'data_access_fqdn': {'key': 'properties.dataAccessFqdn', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'EnvironmentStatus'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, - 'event_source_resource_id': {'key': 'properties.eventSourceResourceId', 'type': 'str'}, - 'iot_hub_name': {'key': 'properties.iotHubName', 'type': 'str'}, - 'consumer_group_name': {'key': 'properties.consumerGroupName', 'type': 'str'}, - 'key_name': {'key': 'properties.keyName', 'type': 'str'}, } def __init__(self, **kwargs): - super(IoTHubEventSourceResource, self).__init__(**kwargs) + super(Gen1EnvironmentResource, self).__init__(**kwargs) + self.data_retention_time = kwargs.get('data_retention_time', None) + self.storage_limit_exceeded_behavior = kwargs.get('storage_limit_exceeded_behavior', None) + self.partition_key_properties = kwargs.get('partition_key_properties', None) + self.data_access_id = None + self.data_access_fqdn = None + self.status = kwargs.get('status', None) self.provisioning_state = kwargs.get('provisioning_state', None) self.creation_time = None - self.timestamp_property_name = kwargs.get('timestamp_property_name', None) - self.event_source_resource_id = kwargs.get('event_source_resource_id', None) - self.iot_hub_name = kwargs.get('iot_hub_name', None) - self.consumer_group_name = kwargs.get('consumer_group_name', None) - self.key_name = kwargs.get('key_name', None) - self.kind = 'Microsoft.IotHub' + self.kind = 'Gen1' -class IoTHubEventSourceUpdateParameters(EventSourceUpdateParameters): - """Parameters supplied to the Update Event Source operation to update an - IoTHub event source. +class Gen1EnvironmentUpdateParameters(EnvironmentUpdateParameters): + """Parameters supplied to the Update Environment operation to update a Gen1 + environment. - :param tags: Key-value pairs of additional properties for the event - source. + :param tags: Key-value pairs of additional properties for the environment. :type tags: dict[str, str] - :param timestamp_property_name: The event property that will be used as - the event source's timestamp. If a value isn't specified for - timestampPropertyName, or if null or empty-string is specified, the event - creation time will be used. - :type timestamp_property_name: str - :param local_timestamp: An object that represents the local timestamp - property. It contains the format of local timestamp that needs to be used - and the corresponding timezone offset information. If a value isn't - specified for localTimestamp, or if null, then the local timestamp will - not be ingressed with the events. - :type local_timestamp: - ~azure.mgmt.timeseriesinsights.models.LocalTimestamp - :param shared_access_key: The value of the shared access key that grants - the Time Series Insights service read access to the iot hub. This property - is not shown in event source responses. - :type shared_access_key: str + :param sku: The sku of the environment. + :type sku: ~azure.mgmt.timeseriesinsights.models.Sku + :param data_retention_time: ISO8601 timespan specifying the minimum number + of days the environment's events will be available for query. + :type data_retention_time: timedelta + :param storage_limit_exceeded_behavior: The behavior the Time Series + Insights service should take when the environment's capacity has been + exceeded. If "PauseIngress" is specified, new events will not be read from + the event source. If "PurgeOldData" is specified, new events will continue + to be read and old events will be deleted from the environment. The + default behavior is PurgeOldData. Possible values include: 'PurgeOldData', + 'PauseIngress' + :type storage_limit_exceeded_behavior: str or + ~azure.mgmt.timeseriesinsights.models.StorageLimitExceededBehavior """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, - 'local_timestamp': {'key': 'properties.localTimestamp', 'type': 'LocalTimestamp'}, - 'shared_access_key': {'key': 'properties.sharedAccessKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IoTHubEventSourceUpdateParameters, self).__init__(**kwargs) - self.timestamp_property_name = kwargs.get('timestamp_property_name', None) - self.local_timestamp = kwargs.get('local_timestamp', None) - self.shared_access_key = kwargs.get('shared_access_key', None) - - -class LocalTimestamp(Model): - """An object that represents the local timestamp property. It contains the - format of local timestamp that needs to be used and the corresponding - timezone offset information. If a value isn't specified for localTimestamp, - or if null, then the local timestamp will not be ingressed with the events. - - :param format: An enum that represents the format of the local timestamp - property that needs to be set. Possible values include: 'Embedded', - 'Iana', 'TimeSpan' - :type format: str or - ~azure.mgmt.timeseriesinsights.models.LocalTimestampFormat - :param time_zone_offset: An object that represents the offset information - for the local timestamp format specified. Should not be specified for - LocalTimestampFormat - Embedded. - :type time_zone_offset: - ~azure.mgmt.timeseriesinsights.models.LocalTimestampTimeZoneOffset - """ - - _attribute_map = { - 'format': {'key': 'format', 'type': 'str'}, - 'time_zone_offset': {'key': 'timeZoneOffset', 'type': 'LocalTimestampTimeZoneOffset'}, - } - - def __init__(self, **kwargs): - super(LocalTimestamp, self).__init__(**kwargs) - self.format = kwargs.get('format', None) - self.time_zone_offset = kwargs.get('time_zone_offset', None) - - -class LocalTimestampTimeZoneOffset(Model): - """An object that represents the offset information for the local timestamp - format specified. Should not be specified for LocalTimestampFormat - - Embedded. - - :param property_name: The event property that will be contain the offset - information to calculate the local timestamp. When the - LocalTimestampFormat is Iana, the property name will contain the name of - the column which contains IANA Timezone Name (eg: Americas/Los Angeles). - When LocalTimestampFormat is Timespan, it contains the name of property - which contains values representing the offset (eg: P1D or 1.00:00:00) - :type property_name: str - """ - - _attribute_map = { - 'property_name': {'key': 'propertyName', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'data_retention_time': {'key': 'properties.dataRetentionTime', 'type': 'duration'}, + 'storage_limit_exceeded_behavior': {'key': 'properties.storageLimitExceededBehavior', 'type': 'str'}, } def __init__(self, **kwargs): - super(LocalTimestampTimeZoneOffset, self).__init__(**kwargs) - self.property_name = kwargs.get('property_name', None) + super(Gen1EnvironmentUpdateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.data_retention_time = kwargs.get('data_retention_time', None) + self.storage_limit_exceeded_behavior = kwargs.get('storage_limit_exceeded_behavior', None) -class LongTermEnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParameters): +class Gen2EnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParameters): """Parameters supplied to the Create or Update Environment operation for a - long-term environment. + Gen2 environment. All required parameters must be populated in order to send to Azure. @@ -1428,9 +1303,8 @@ class LongTermEnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParam :param tags: Key-value pairs of additional properties for the resource. :type tags: dict[str, str] :param sku: Required. The sku determines the type of environment, either - standard (S1 or S2) or long-term (L1). For standard environments the sku - determines the capacity of the environment, the ingress rate, and the - billing rate. + Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku determines the + capacity of the environment, the ingress rate, and the billing rate. :type sku: ~azure.mgmt.timeseriesinsights.models.Sku :param kind: Required. Constant filled by server. :type kind: str @@ -1443,11 +1317,12 @@ class LongTermEnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParam connect to the customer storage account that is used to store the environment's data. :type storage_configuration: - ~azure.mgmt.timeseriesinsights.models.LongTermStorageConfigurationInput - :param data_retention: Required. ISO8601 timespan specifying the number of - days the environment's events will be available for query from the warm - store. - :type data_retention: timedelta + ~azure.mgmt.timeseriesinsights.models.Gen2StorageConfigurationInput + :param warm_store_configuration: The warm store configuration provides the + details to create a warm store cache that will retain a copy of the + environment's data available for faster query. + :type warm_store_configuration: + ~azure.mgmt.timeseriesinsights.models.WarmStoreConfigurationProperties """ _validation = { @@ -1456,7 +1331,6 @@ class LongTermEnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParam 'kind': {'required': True}, 'time_series_id_properties': {'required': True}, 'storage_configuration': {'required': True}, - 'data_retention': {'required': True}, } _attribute_map = { @@ -1465,21 +1339,21 @@ class LongTermEnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParam 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'time_series_id_properties': {'key': 'properties.timeSeriesIdProperties', 'type': '[TimeSeriesIdProperty]'}, - 'storage_configuration': {'key': 'properties.storageConfiguration', 'type': 'LongTermStorageConfigurationInput'}, - 'data_retention': {'key': 'properties.warmStoreConfiguration.dataRetention', 'type': 'duration'}, + 'storage_configuration': {'key': 'properties.storageConfiguration', 'type': 'Gen2StorageConfigurationInput'}, + 'warm_store_configuration': {'key': 'properties.warmStoreConfiguration', 'type': 'WarmStoreConfigurationProperties'}, } def __init__(self, **kwargs): - super(LongTermEnvironmentCreateOrUpdateParameters, self).__init__(**kwargs) + super(Gen2EnvironmentCreateOrUpdateParameters, self).__init__(**kwargs) self.time_series_id_properties = kwargs.get('time_series_id_properties', None) self.storage_configuration = kwargs.get('storage_configuration', None) - self.data_retention = kwargs.get('data_retention', None) - self.kind = 'LongTerm' + self.warm_store_configuration = kwargs.get('warm_store_configuration', None) + self.kind = 'Gen2' -class LongTermEnvironmentResource(EnvironmentResource): +class Gen2EnvironmentResource(EnvironmentResource): """An environment is a set of time-series data available for query, and is the - top level Azure Time Series Insights resource. LongTerm environments do not + top level Azure Time Series Insights resource. Gen2 environments do not have set data retention limits. Variables are only populated by the server, and will be ignored when @@ -1498,9 +1372,8 @@ class LongTermEnvironmentResource(EnvironmentResource): :param tags: Resource tags :type tags: dict[str, str] :param sku: Required. The sku determines the type of environment, either - standard (S1 or S2) or long-term (L1). For standard environments the sku - determines the capacity of the environment, the ingress rate, and the - billing rate. + Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku determines the + capacity of the environment, the ingress rate, and the billing rate. :type sku: ~azure.mgmt.timeseriesinsights.models.Sku :param kind: Required. Constant filled by server. :type kind: str @@ -1531,11 +1404,12 @@ class LongTermEnvironmentResource(EnvironmentResource): connect to the customer storage account that is used to store the environment's data. :type storage_configuration: - ~azure.mgmt.timeseriesinsights.models.LongTermStorageConfigurationOutput - :param data_retention: Required. ISO8601 timespan specifying the number of - days the environment's events will be available for query from the warm - store. - :type data_retention: timedelta + ~azure.mgmt.timeseriesinsights.models.Gen2StorageConfigurationOutput + :param warm_store_configuration: The warm store configuration provides the + details to create a warm store cache that will retain a copy of the + environment's data available for faster query. + :type warm_store_configuration: + ~azure.mgmt.timeseriesinsights.models.WarmStoreConfigurationProperties """ _validation = { @@ -1550,7 +1424,6 @@ class LongTermEnvironmentResource(EnvironmentResource): 'creation_time': {'readonly': True}, 'time_series_id_properties': {'required': True}, 'storage_configuration': {'required': True}, - 'data_retention': {'required': True}, } _attribute_map = { @@ -1567,12 +1440,12 @@ class LongTermEnvironmentResource(EnvironmentResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 'time_series_id_properties': {'key': 'properties.timeSeriesIdProperties', 'type': '[TimeSeriesIdProperty]'}, - 'storage_configuration': {'key': 'properties.storageConfiguration', 'type': 'LongTermStorageConfigurationOutput'}, - 'data_retention': {'key': 'properties.warmStoreConfiguration.dataRetention', 'type': 'duration'}, + 'storage_configuration': {'key': 'properties.storageConfiguration', 'type': 'Gen2StorageConfigurationOutput'}, + 'warm_store_configuration': {'key': 'properties.warmStoreConfiguration', 'type': 'WarmStoreConfigurationProperties'}, } def __init__(self, **kwargs): - super(LongTermEnvironmentResource, self).__init__(**kwargs) + super(Gen2EnvironmentResource, self).__init__(**kwargs) self.data_access_id = None self.data_access_fqdn = None self.status = kwargs.get('status', None) @@ -1580,15 +1453,13 @@ def __init__(self, **kwargs): self.creation_time = None self.time_series_id_properties = kwargs.get('time_series_id_properties', None) self.storage_configuration = kwargs.get('storage_configuration', None) - self.data_retention = kwargs.get('data_retention', None) - self.kind = 'LongTerm' - + self.warm_store_configuration = kwargs.get('warm_store_configuration', None) + self.kind = 'Gen2' -class LongTermEnvironmentUpdateParameters(EnvironmentUpdateParameters): - """Parameters supplied to the Update Environment operation to update a - long-term environment. - All required parameters must be populated in order to send to Azure. +class Gen2EnvironmentUpdateParameters(EnvironmentUpdateParameters): + """Parameters supplied to the Update Environment operation to update a Gen2 + environment. :param tags: Key-value pairs of additional properties for the environment. :type tags: dict[str, str] @@ -1597,30 +1468,27 @@ class LongTermEnvironmentUpdateParameters(EnvironmentUpdateParameters): to the customer storage account that is used to store the environment's data. :type storage_configuration: - ~azure.mgmt.timeseriesinsights.models.LongTermStorageConfigurationMutableProperties - :param data_retention: Required. ISO8601 timespan specifying the number of - days the environment's events will be available for query from the warm - store. - :type data_retention: timedelta + ~azure.mgmt.timeseriesinsights.models.Gen2StorageConfigurationMutableProperties + :param warm_store_configuration: The warm store configuration provides the + details to create a warm store cache that will retain a copy of the + environment's data available for faster query. + :type warm_store_configuration: + ~azure.mgmt.timeseriesinsights.models.WarmStoreConfigurationProperties """ - _validation = { - 'data_retention': {'required': True}, - } - _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'storage_configuration': {'key': 'properties.storageConfiguration', 'type': 'LongTermStorageConfigurationMutableProperties'}, - 'data_retention': {'key': 'properties.warmStoreConfiguration.dataRetention', 'type': 'duration'}, + 'storage_configuration': {'key': 'properties.storageConfiguration', 'type': 'Gen2StorageConfigurationMutableProperties'}, + 'warm_store_configuration': {'key': 'properties.warmStoreConfiguration', 'type': 'WarmStoreConfigurationProperties'}, } def __init__(self, **kwargs): - super(LongTermEnvironmentUpdateParameters, self).__init__(**kwargs) + super(Gen2EnvironmentUpdateParameters, self).__init__(**kwargs) self.storage_configuration = kwargs.get('storage_configuration', None) - self.data_retention = kwargs.get('data_retention', None) + self.warm_store_configuration = kwargs.get('warm_store_configuration', None) -class LongTermStorageConfigurationInput(Model): +class Gen2StorageConfigurationInput(Model): """The storage configuration provides the connection details that allows the Time Series Insights service to connect to the customer storage account that is used to store the environment's data. @@ -1628,7 +1496,7 @@ class LongTermStorageConfigurationInput(Model): All required parameters must be populated in order to send to Azure. :param account_name: Required. The name of the storage account that will - hold the environment's long term data. + hold the environment's Gen2 data. :type account_name: str :param management_key: Required. The value of the management key that grants the Time Series Insights service write access to the storage @@ -1647,12 +1515,12 @@ class LongTermStorageConfigurationInput(Model): } def __init__(self, **kwargs): - super(LongTermStorageConfigurationInput, self).__init__(**kwargs) + super(Gen2StorageConfigurationInput, self).__init__(**kwargs) self.account_name = kwargs.get('account_name', None) self.management_key = kwargs.get('management_key', None) -class LongTermStorageConfigurationMutableProperties(Model): +class Gen2StorageConfigurationMutableProperties(Model): """The storage configuration provides the connection details that allows the Time Series Insights service to connect to the customer storage account that is used to store the environment's data. @@ -1665,41 +1533,393 @@ class LongTermStorageConfigurationMutableProperties(Model): :type management_key: str """ - _validation = { - 'management_key': {'required': True}, - } + _validation = { + 'management_key': {'required': True}, + } + + _attribute_map = { + 'management_key': {'key': 'managementKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Gen2StorageConfigurationMutableProperties, self).__init__(**kwargs) + self.management_key = kwargs.get('management_key', None) + + +class Gen2StorageConfigurationOutput(Model): + """The storage configuration provides the non-secret connection details about + the customer storage account that is used to store the environment's data. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. The name of the storage account that will + hold the environment's Gen2 data. + :type account_name: str + """ + + _validation = { + 'account_name': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Gen2StorageConfigurationOutput, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + + +class IngressEnvironmentStatus(Model): + """An object that represents the status of ingress on an environment. + + :param state: This string represents the state of ingress operations on an + environment. It can be "Disabled", "Ready", "Running", "Paused" or + "Unknown". Possible values include: 'Disabled', 'Ready', 'Running', + 'Paused', 'Unknown' + :type state: str or ~azure.mgmt.timeseriesinsights.models.IngressState + :param state_details: An object that contains the details about an + environment's state. + :type state_details: + ~azure.mgmt.timeseriesinsights.models.EnvironmentStateDetails + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'state_details': {'key': 'stateDetails', 'type': 'EnvironmentStateDetails'}, + } + + def __init__(self, **kwargs): + super(IngressEnvironmentStatus, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.state_details = kwargs.get('state_details', None) + + +class IoTHubEventSourceCommonProperties(AzureEventSourceProperties): + """Properties of the IoTHub event source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param provisioning_state: Provisioning state of the resource. Possible + values include: 'Accepted', 'Creating', 'Updating', 'Succeeded', 'Failed', + 'Deleting' + :type provisioning_state: str or + ~azure.mgmt.timeseriesinsights.models.ProvisioningState + :ivar creation_time: The time the resource was created. + :vartype creation_time: datetime + :param timestamp_property_name: The event property that will be used as + the event source's timestamp. If a value isn't specified for + timestampPropertyName, or if null or empty-string is specified, the event + creation time will be used. + :type timestamp_property_name: str + :param event_source_resource_id: Required. The resource id of the event + source in Azure Resource Manager. + :type event_source_resource_id: str + :param iot_hub_name: Required. The name of the iot hub. + :type iot_hub_name: str + :param consumer_group_name: Required. The name of the iot hub's consumer + group that holds the partitions from which events will be read. + :type consumer_group_name: str + :param key_name: Required. The name of the Shared Access Policy key that + grants the Time Series Insights service access to the iot hub. This shared + access policy key must grant 'service connect' permissions to the iot hub. + :type key_name: str + """ + + _validation = { + 'creation_time': {'readonly': True}, + 'event_source_resource_id': {'required': True}, + 'iot_hub_name': {'required': True}, + 'consumer_group_name': {'required': True}, + 'key_name': {'required': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, + 'timestamp_property_name': {'key': 'timestampPropertyName', 'type': 'str'}, + 'event_source_resource_id': {'key': 'eventSourceResourceId', 'type': 'str'}, + 'iot_hub_name': {'key': 'iotHubName', 'type': 'str'}, + 'consumer_group_name': {'key': 'consumerGroupName', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTHubEventSourceCommonProperties, self).__init__(**kwargs) + self.iot_hub_name = kwargs.get('iot_hub_name', None) + self.consumer_group_name = kwargs.get('consumer_group_name', None) + self.key_name = kwargs.get('key_name', None) + + +class IoTHubEventSourceCreateOrUpdateParameters(EventSourceCreateOrUpdateParameters): + """Parameters supplied to the Create or Update Event Source operation for an + IoTHub event source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. + :type location: str + :param tags: Key-value pairs of additional properties for the resource. + :type tags: dict[str, str] + :param local_timestamp: An object that represents the local timestamp + property. It contains the format of local timestamp that needs to be used + and the corresponding timezone offset information. If a value isn't + specified for localTimestamp, or if null, then the local timestamp will + not be ingressed with the events. + :type local_timestamp: + ~azure.mgmt.timeseriesinsights.models.LocalTimestamp + :param kind: Required. Constant filled by server. + :type kind: str + :param provisioning_state: Provisioning state of the resource. Possible + values include: 'Accepted', 'Creating', 'Updating', 'Succeeded', 'Failed', + 'Deleting' + :type provisioning_state: str or + ~azure.mgmt.timeseriesinsights.models.ProvisioningState + :ivar creation_time: The time the resource was created. + :vartype creation_time: datetime + :param timestamp_property_name: The event property that will be used as + the event source's timestamp. If a value isn't specified for + timestampPropertyName, or if null or empty-string is specified, the event + creation time will be used. + :type timestamp_property_name: str + :param event_source_resource_id: Required. The resource id of the event + source in Azure Resource Manager. + :type event_source_resource_id: str + :param iot_hub_name: Required. The name of the iot hub. + :type iot_hub_name: str + :param consumer_group_name: Required. The name of the iot hub's consumer + group that holds the partitions from which events will be read. + :type consumer_group_name: str + :param key_name: Required. The name of the Shared Access Policy key that + grants the Time Series Insights service access to the iot hub. This shared + access policy key must grant 'service connect' permissions to the iot hub. + :type key_name: str + :param shared_access_key: Required. The value of the Shared Access Policy + key that grants the Time Series Insights service read access to the iot + hub. This property is not shown in event source responses. + :type shared_access_key: str + """ + + _validation = { + 'location': {'required': True}, + 'kind': {'required': True}, + 'creation_time': {'readonly': True}, + 'event_source_resource_id': {'required': True}, + 'iot_hub_name': {'required': True}, + 'consumer_group_name': {'required': True}, + 'key_name': {'required': True}, + 'shared_access_key': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'local_timestamp': {'key': 'localTimestamp', 'type': 'LocalTimestamp'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, + 'event_source_resource_id': {'key': 'properties.eventSourceResourceId', 'type': 'str'}, + 'iot_hub_name': {'key': 'properties.iotHubName', 'type': 'str'}, + 'consumer_group_name': {'key': 'properties.consumerGroupName', 'type': 'str'}, + 'key_name': {'key': 'properties.keyName', 'type': 'str'}, + 'shared_access_key': {'key': 'properties.sharedAccessKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTHubEventSourceCreateOrUpdateParameters, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.creation_time = None + self.timestamp_property_name = kwargs.get('timestamp_property_name', None) + self.event_source_resource_id = kwargs.get('event_source_resource_id', None) + self.iot_hub_name = kwargs.get('iot_hub_name', None) + self.consumer_group_name = kwargs.get('consumer_group_name', None) + self.key_name = kwargs.get('key_name', None) + self.shared_access_key = kwargs.get('shared_access_key', None) + self.kind = 'Microsoft.IoTHub' + + +class IoTHubEventSourceResource(EventSourceResource): + """An event source that receives its data from an Azure IoTHub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str + :param provisioning_state: Provisioning state of the resource. Possible + values include: 'Accepted', 'Creating', 'Updating', 'Succeeded', 'Failed', + 'Deleting' + :type provisioning_state: str or + ~azure.mgmt.timeseriesinsights.models.ProvisioningState + :ivar creation_time: The time the resource was created. + :vartype creation_time: datetime + :param timestamp_property_name: The event property that will be used as + the event source's timestamp. If a value isn't specified for + timestampPropertyName, or if null or empty-string is specified, the event + creation time will be used. + :type timestamp_property_name: str + :param event_source_resource_id: Required. The resource id of the event + source in Azure Resource Manager. + :type event_source_resource_id: str + :param iot_hub_name: Required. The name of the iot hub. + :type iot_hub_name: str + :param consumer_group_name: Required. The name of the iot hub's consumer + group that holds the partitions from which events will be read. + :type consumer_group_name: str + :param key_name: Required. The name of the Shared Access Policy key that + grants the Time Series Insights service access to the iot hub. This shared + access policy key must grant 'service connect' permissions to the iot hub. + :type key_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'required': True}, + 'creation_time': {'readonly': True}, + 'event_source_resource_id': {'required': True}, + 'iot_hub_name': {'required': True}, + 'consumer_group_name': {'required': True}, + 'key_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, + 'event_source_resource_id': {'key': 'properties.eventSourceResourceId', 'type': 'str'}, + 'iot_hub_name': {'key': 'properties.iotHubName', 'type': 'str'}, + 'consumer_group_name': {'key': 'properties.consumerGroupName', 'type': 'str'}, + 'key_name': {'key': 'properties.keyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTHubEventSourceResource, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.creation_time = None + self.timestamp_property_name = kwargs.get('timestamp_property_name', None) + self.event_source_resource_id = kwargs.get('event_source_resource_id', None) + self.iot_hub_name = kwargs.get('iot_hub_name', None) + self.consumer_group_name = kwargs.get('consumer_group_name', None) + self.key_name = kwargs.get('key_name', None) + self.kind = 'Microsoft.IoTHub' + + +class IoTHubEventSourceUpdateParameters(EventSourceUpdateParameters): + """Parameters supplied to the Update Event Source operation to update an + IoTHub event source. + + :param tags: Key-value pairs of additional properties for the event + source. + :type tags: dict[str, str] + :param timestamp_property_name: The event property that will be used as + the event source's timestamp. If a value isn't specified for + timestampPropertyName, or if null or empty-string is specified, the event + creation time will be used. + :type timestamp_property_name: str + :param local_timestamp: An object that represents the local timestamp + property. It contains the format of local timestamp that needs to be used + and the corresponding timezone offset information. If a value isn't + specified for localTimestamp, or if null, then the local timestamp will + not be ingressed with the events. + :type local_timestamp: + ~azure.mgmt.timeseriesinsights.models.LocalTimestamp + :param shared_access_key: The value of the shared access key that grants + the Time Series Insights service read access to the iot hub. This property + is not shown in event source responses. + :type shared_access_key: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, + 'local_timestamp': {'key': 'properties.localTimestamp', 'type': 'LocalTimestamp'}, + 'shared_access_key': {'key': 'properties.sharedAccessKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTHubEventSourceUpdateParameters, self).__init__(**kwargs) + self.timestamp_property_name = kwargs.get('timestamp_property_name', None) + self.local_timestamp = kwargs.get('local_timestamp', None) + self.shared_access_key = kwargs.get('shared_access_key', None) + + +class LocalTimestamp(Model): + """An object that represents the local timestamp property. It contains the + format of local timestamp that needs to be used and the corresponding + timezone offset information. If a value isn't specified for localTimestamp, + or if null, then the local timestamp will not be ingressed with the events. + + :param format: An enum that represents the format of the local timestamp + property that needs to be set. Possible values include: 'Embedded' + :type format: str or + ~azure.mgmt.timeseriesinsights.models.LocalTimestampFormat + :param time_zone_offset: An object that represents the offset information + for the local timestamp format specified. Should not be specified for + LocalTimestampFormat - Embedded. + :type time_zone_offset: + ~azure.mgmt.timeseriesinsights.models.LocalTimestampTimeZoneOffset + """ _attribute_map = { - 'management_key': {'key': 'managementKey', 'type': 'str'}, + 'format': {'key': 'format', 'type': 'str'}, + 'time_zone_offset': {'key': 'timeZoneOffset', 'type': 'LocalTimestampTimeZoneOffset'}, } def __init__(self, **kwargs): - super(LongTermStorageConfigurationMutableProperties, self).__init__(**kwargs) - self.management_key = kwargs.get('management_key', None) - + super(LocalTimestamp, self).__init__(**kwargs) + self.format = kwargs.get('format', None) + self.time_zone_offset = kwargs.get('time_zone_offset', None) -class LongTermStorageConfigurationOutput(Model): - """The storage configuration provides the non-secret connection details about - the customer storage account that is used to store the environment's data. - All required parameters must be populated in order to send to Azure. +class LocalTimestampTimeZoneOffset(Model): + """An object that represents the offset information for the local timestamp + format specified. Should not be specified for LocalTimestampFormat - + Embedded. - :param account_name: Required. The name of the storage account that will - hold the environment's long term data. - :type account_name: str + :param property_name: The event property that will be contain the offset + information to calculate the local timestamp. When the + LocalTimestampFormat is Iana, the property name will contain the name of + the column which contains IANA Timezone Name (eg: Americas/Los Angeles). + When LocalTimestampFormat is Timespan, it contains the name of property + which contains values representing the offset (eg: P1D or 1.00:00:00) + :type property_name: str """ - _validation = { - 'account_name': {'required': True}, - } - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, + 'property_name': {'key': 'propertyName', 'type': 'str'}, } def __init__(self, **kwargs): - super(LongTermStorageConfigurationOutput, self).__init__(**kwargs) - self.account_name = kwargs.get('account_name', None) + super(LocalTimestampTimeZoneOffset, self).__init__(**kwargs) + self.property_name = kwargs.get('property_name', None) class Operation(Model): @@ -1942,18 +2162,18 @@ def __init__(self, **kwargs): class Sku(Model): - """The sku determines the type of environment, either standard (S1 or S2) or - long-term (L1). For standard environments the sku determines the capacity - of the environment, the ingress rate, and the billing rate. + """The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 + (L1). For Gen1 environments the sku determines the capacity of the + environment, the ingress rate, and the billing rate. All required parameters must be populated in order to send to Azure. :param name: Required. The name of this SKU. Possible values include: 'S1', 'S2', 'P1', 'L1' :type name: str or ~azure.mgmt.timeseriesinsights.models.SkuName - :param capacity: Required. The capacity of the sku. For standard - environments, this value can be changed to support scale out of - environments after they have been created. + :param capacity: Required. The capacity of the sku. For Gen1 environments, + this value can be changed to support scale out of environments after they + have been created. :type capacity: int """ @@ -1973,217 +2193,6 @@ def __init__(self, **kwargs): self.capacity = kwargs.get('capacity', None) -class StandardEnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParameters): - """Parameters supplied to the Create or Update Environment operation for a - standard environment. - - All required parameters must be populated in order to send to Azure. - - :param location: Required. The location of the resource. - :type location: str - :param tags: Key-value pairs of additional properties for the resource. - :type tags: dict[str, str] - :param sku: Required. The sku determines the type of environment, either - standard (S1 or S2) or long-term (L1). For standard environments the sku - determines the capacity of the environment, the ingress rate, and the - billing rate. - :type sku: ~azure.mgmt.timeseriesinsights.models.Sku - :param kind: Required. Constant filled by server. - :type kind: str - :param data_retention_time: Required. ISO8601 timespan specifying the - minimum number of days the environment's events will be available for - query. - :type data_retention_time: timedelta - :param storage_limit_exceeded_behavior: The behavior the Time Series - Insights service should take when the environment's capacity has been - exceeded. If "PauseIngress" is specified, new events will not be read from - the event source. If "PurgeOldData" is specified, new events will continue - to be read and old events will be deleted from the environment. The - default behavior is PurgeOldData. Possible values include: 'PurgeOldData', - 'PauseIngress' - :type storage_limit_exceeded_behavior: str or - ~azure.mgmt.timeseriesinsights.models.StorageLimitExceededBehavior - :param partition_key_properties: The list of event properties which will - be used to partition data in the environment. - :type partition_key_properties: - list[~azure.mgmt.timeseriesinsights.models.TimeSeriesIdProperty] - """ - - _validation = { - 'location': {'required': True}, - 'sku': {'required': True}, - 'kind': {'required': True}, - 'data_retention_time': {'required': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'data_retention_time': {'key': 'properties.dataRetentionTime', 'type': 'duration'}, - 'storage_limit_exceeded_behavior': {'key': 'properties.storageLimitExceededBehavior', 'type': 'str'}, - 'partition_key_properties': {'key': 'properties.partitionKeyProperties', 'type': '[TimeSeriesIdProperty]'}, - } - - def __init__(self, **kwargs): - super(StandardEnvironmentCreateOrUpdateParameters, self).__init__(**kwargs) - self.data_retention_time = kwargs.get('data_retention_time', None) - self.storage_limit_exceeded_behavior = kwargs.get('storage_limit_exceeded_behavior', None) - self.partition_key_properties = kwargs.get('partition_key_properties', None) - self.kind = 'Standard' - - -class StandardEnvironmentResource(EnvironmentResource): - """An environment is a set of time-series data available for query, and is the - top level Azure Time Series Insights resource. Standard environments have - data retention limits. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: Required. The sku determines the type of environment, either - standard (S1 or S2) or long-term (L1). For standard environments the sku - determines the capacity of the environment, the ingress rate, and the - billing rate. - :type sku: ~azure.mgmt.timeseriesinsights.models.Sku - :param kind: Required. Constant filled by server. - :type kind: str - :param data_retention_time: Required. ISO8601 timespan specifying the - minimum number of days the environment's events will be available for - query. - :type data_retention_time: timedelta - :param storage_limit_exceeded_behavior: The behavior the Time Series - Insights service should take when the environment's capacity has been - exceeded. If "PauseIngress" is specified, new events will not be read from - the event source. If "PurgeOldData" is specified, new events will continue - to be read and old events will be deleted from the environment. The - default behavior is PurgeOldData. Possible values include: 'PurgeOldData', - 'PauseIngress' - :type storage_limit_exceeded_behavior: str or - ~azure.mgmt.timeseriesinsights.models.StorageLimitExceededBehavior - :param partition_key_properties: The list of event properties which will - be used to partition data in the environment. - :type partition_key_properties: - list[~azure.mgmt.timeseriesinsights.models.TimeSeriesIdProperty] - :ivar data_access_id: An id used to access the environment data, e.g. to - query the environment's events or upload reference data for the - environment. - :vartype data_access_id: str - :ivar data_access_fqdn: The fully qualified domain name used to access the - environment data, e.g. to query the environment's events or upload - reference data for the environment. - :vartype data_access_fqdn: str - :param status: An object that represents the status of the environment, - and its internal state in the Time Series Insights service. - :type status: ~azure.mgmt.timeseriesinsights.models.EnvironmentStatus - :param provisioning_state: Provisioning state of the resource. Possible - values include: 'Accepted', 'Creating', 'Updating', 'Succeeded', 'Failed', - 'Deleting' - :type provisioning_state: str or - ~azure.mgmt.timeseriesinsights.models.ProvisioningState - :ivar creation_time: The time the resource was created. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'sku': {'required': True}, - 'kind': {'required': True}, - 'data_retention_time': {'required': True}, - 'data_access_id': {'readonly': True}, - 'data_access_fqdn': {'readonly': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'data_retention_time': {'key': 'properties.dataRetentionTime', 'type': 'duration'}, - 'storage_limit_exceeded_behavior': {'key': 'properties.storageLimitExceededBehavior', 'type': 'str'}, - 'partition_key_properties': {'key': 'properties.partitionKeyProperties', 'type': '[TimeSeriesIdProperty]'}, - 'data_access_id': {'key': 'properties.dataAccessId', 'type': 'str'}, - 'data_access_fqdn': {'key': 'properties.dataAccessFqdn', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'EnvironmentStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(StandardEnvironmentResource, self).__init__(**kwargs) - self.data_retention_time = kwargs.get('data_retention_time', None) - self.storage_limit_exceeded_behavior = kwargs.get('storage_limit_exceeded_behavior', None) - self.partition_key_properties = kwargs.get('partition_key_properties', None) - self.data_access_id = None - self.data_access_fqdn = None - self.status = kwargs.get('status', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.creation_time = None - self.kind = 'Standard' - - -class StandardEnvironmentUpdateParameters(EnvironmentUpdateParameters): - """Parameters supplied to the Update Environment operation to update a - standard environment. - - :param tags: Key-value pairs of additional properties for the environment. - :type tags: dict[str, str] - :param sku: The sku of the environment. - :type sku: ~azure.mgmt.timeseriesinsights.models.Sku - :param data_retention_time: ISO8601 timespan specifying the minimum number - of days the environment's events will be available for query. - :type data_retention_time: timedelta - :param storage_limit_exceeded_behavior: The behavior the Time Series - Insights service should take when the environment's capacity has been - exceeded. If "PauseIngress" is specified, new events will not be read from - the event source. If "PurgeOldData" is specified, new events will continue - to be read and old events will be deleted from the environment. The - default behavior is PurgeOldData. Possible values include: 'PurgeOldData', - 'PauseIngress' - :type storage_limit_exceeded_behavior: str or - ~azure.mgmt.timeseriesinsights.models.StorageLimitExceededBehavior - :param partition_key_properties: The list of event properties which will - be used to partition data in the environment. - :type partition_key_properties: - list[~azure.mgmt.timeseriesinsights.models.TimeSeriesIdProperty] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'data_retention_time': {'key': 'properties.dataRetentionTime', 'type': 'duration'}, - 'storage_limit_exceeded_behavior': {'key': 'properties.storageLimitExceededBehavior', 'type': 'str'}, - 'partition_key_properties': {'key': 'properties.partitionKeyProperties', 'type': '[TimeSeriesIdProperty]'}, - } - - def __init__(self, **kwargs): - super(StandardEnvironmentUpdateParameters, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.data_retention_time = kwargs.get('data_retention_time', None) - self.storage_limit_exceeded_behavior = kwargs.get('storage_limit_exceeded_behavior', None) - self.partition_key_properties = kwargs.get('partition_key_properties', None) - - class TimeSeriesIdProperty(Model): """The structure of the property that a time series id can have. An environment can have multiple such properties. @@ -2239,3 +2248,29 @@ def __init__(self, **kwargs): self.state = kwargs.get('state', None) self.current_count = kwargs.get('current_count', None) self.max_count = kwargs.get('max_count', None) + + +class WarmStoreConfigurationProperties(Model): + """The warm store configuration provides the details to create a warm store + cache that will retain a copy of the environment's data available for + faster query. + + All required parameters must be populated in order to send to Azure. + + :param data_retention: Required. ISO8601 timespan specifying the number of + days the environment's events will be available for query from the warm + store. + :type data_retention: timedelta + """ + + _validation = { + 'data_retention': {'required': True}, + } + + _attribute_map = { + 'data_retention': {'key': 'dataRetention', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(WarmStoreConfigurationProperties, self).__init__(**kwargs) + self.data_retention = kwargs.get('data_retention', None) diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_models_py3.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_models_py3.py index 647a977fc067..44c53bba237d 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_models_py3.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_models_py3.py @@ -360,8 +360,8 @@ class EnvironmentCreateOrUpdateParameters(CreateOrUpdateTrackedResourcePropertie """Parameters supplied to the CreateOrUpdate Environment operation. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StandardEnvironmentCreateOrUpdateParameters, - LongTermEnvironmentCreateOrUpdateParameters + sub-classes are: Gen1EnvironmentCreateOrUpdateParameters, + Gen2EnvironmentCreateOrUpdateParameters All required parameters must be populated in order to send to Azure. @@ -370,9 +370,8 @@ class EnvironmentCreateOrUpdateParameters(CreateOrUpdateTrackedResourcePropertie :param tags: Key-value pairs of additional properties for the resource. :type tags: dict[str, str] :param sku: Required. The sku determines the type of environment, either - standard (S1 or S2) or long-term (L1). For standard environments the sku - determines the capacity of the environment, the ingress rate, and the - billing rate. + Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku determines the + capacity of the environment, the ingress rate, and the billing rate. :type sku: ~azure.mgmt.timeseriesinsights.models.Sku :param kind: Required. Constant filled by server. :type kind: str @@ -392,7 +391,7 @@ class EnvironmentCreateOrUpdateParameters(CreateOrUpdateTrackedResourcePropertie } _subtype_map = { - 'kind': {'Standard': 'StandardEnvironmentCreateOrUpdateParameters', 'LongTerm': 'LongTermEnvironmentCreateOrUpdateParameters'} + 'kind': {'Gen1': 'Gen1EnvironmentCreateOrUpdateParameters', 'Gen2': 'Gen2EnvironmentCreateOrUpdateParameters'} } def __init__(self, *, location: str, sku, tags=None, **kwargs) -> None: @@ -465,7 +464,7 @@ class EnvironmentResource(TrackedResource): top level Azure Time Series Insights resource. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StandardEnvironmentResource, LongTermEnvironmentResource + sub-classes are: Gen1EnvironmentResource, Gen2EnvironmentResource Variables are only populated by the server, and will be ignored when sending a request. @@ -483,9 +482,8 @@ class EnvironmentResource(TrackedResource): :param tags: Resource tags :type tags: dict[str, str] :param sku: Required. The sku determines the type of environment, either - standard (S1 or S2) or long-term (L1). For standard environments the sku - determines the capacity of the environment, the ingress rate, and the - billing rate. + Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku determines the + capacity of the environment, the ingress rate, and the billing rate. :type sku: ~azure.mgmt.timeseriesinsights.models.Sku :param kind: Required. Constant filled by server. :type kind: str @@ -511,7 +509,7 @@ class EnvironmentResource(TrackedResource): } _subtype_map = { - 'kind': {'Standard': 'StandardEnvironmentResource', 'LongTerm': 'LongTermEnvironmentResource'} + 'kind': {'Gen1': 'Gen1EnvironmentResource', 'Gen2': 'Gen2EnvironmentResource'} } def __init__(self, *, location: str, sku, tags=None, **kwargs) -> None: @@ -709,6 +707,13 @@ class EventSourceCreateOrUpdateParameters(CreateOrUpdateTrackedResourcePropertie :type location: str :param tags: Key-value pairs of additional properties for the resource. :type tags: dict[str, str] + :param local_timestamp: An object that represents the local timestamp + property. It contains the format of local timestamp that needs to be used + and the corresponding timezone offset information. If a value isn't + specified for localTimestamp, or if null, then the local timestamp will + not be ingressed with the events. + :type local_timestamp: + ~azure.mgmt.timeseriesinsights.models.LocalTimestamp :param kind: Required. Constant filled by server. :type kind: str """ @@ -721,6 +726,7 @@ class EventSourceCreateOrUpdateParameters(CreateOrUpdateTrackedResourcePropertie _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'local_timestamp': {'key': 'localTimestamp', 'type': 'LocalTimestamp'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -728,8 +734,9 @@ class EventSourceCreateOrUpdateParameters(CreateOrUpdateTrackedResourcePropertie 'kind': {'Microsoft.EventHub': 'EventHubEventSourceCreateOrUpdateParameters', 'Microsoft.IoTHub': 'IoTHubEventSourceCreateOrUpdateParameters'} } - def __init__(self, *, location: str, tags=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, local_timestamp=None, **kwargs) -> None: super(EventSourceCreateOrUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.local_timestamp = local_timestamp self.kind = None self.kind = 'EventSourceCreateOrUpdateParameters' @@ -747,6 +754,13 @@ class EventHubEventSourceCreateOrUpdateParameters(EventSourceCreateOrUpdateParam :type location: str :param tags: Key-value pairs of additional properties for the resource. :type tags: dict[str, str] + :param local_timestamp: An object that represents the local timestamp + property. It contains the format of local timestamp that needs to be used + and the corresponding timezone offset information. If a value isn't + specified for localTimestamp, or if null, then the local timestamp will + not be ingressed with the events. + :type local_timestamp: + ~azure.mgmt.timeseriesinsights.models.LocalTimestamp :param kind: Required. Constant filled by server. :type kind: str :param provisioning_state: Provisioning state of the resource. Possible @@ -797,6 +811,7 @@ class EventHubEventSourceCreateOrUpdateParameters(EventSourceCreateOrUpdateParam _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'local_timestamp': {'key': 'localTimestamp', 'type': 'LocalTimestamp'}, 'kind': {'key': 'kind', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, @@ -809,8 +824,8 @@ class EventHubEventSourceCreateOrUpdateParameters(EventSourceCreateOrUpdateParam 'shared_access_key': {'key': 'properties.sharedAccessKey', 'type': 'str'}, } - def __init__(self, *, location: str, event_source_resource_id: str, service_bus_namespace: str, event_hub_name: str, consumer_group_name: str, key_name: str, shared_access_key: str, tags=None, provisioning_state=None, timestamp_property_name: str=None, **kwargs) -> None: - super(EventHubEventSourceCreateOrUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + def __init__(self, *, location: str, event_source_resource_id: str, service_bus_namespace: str, event_hub_name: str, consumer_group_name: str, key_name: str, shared_access_key: str, tags=None, local_timestamp=None, provisioning_state=None, timestamp_property_name: str=None, **kwargs) -> None: + super(EventHubEventSourceCreateOrUpdateParameters, self).__init__(location=location, tags=tags, local_timestamp=local_timestamp, **kwargs) self.provisioning_state = provisioning_state self.creation_time = None self.timestamp_property_name = timestamp_property_name @@ -868,7 +883,7 @@ class EventSourceResource(TrackedResource): } _subtype_map = { - 'kind': {'Microsoft.EventHub': 'EventHubEventSourceResource', 'Microsoft.IotHub': 'IoTHubEventSourceResource'} + 'kind': {'Microsoft.EventHub': 'EventHubEventSourceResource', 'Microsoft.IoTHub': 'IoTHubEventSourceResource'} } def __init__(self, *, location: str, tags=None, **kwargs) -> None: @@ -1072,96 +1087,9 @@ def __init__(self, *, timestamp_property_name: str=None, local_timestamp=None, * self.local_timestamp = local_timestamp -class IngressEnvironmentStatus(Model): - """An object that represents the status of ingress on an environment. - - :param state: This string represents the state of ingress operations on an - environment. It can be "Disabled", "Ready", "Running", "Paused" or - "Unknown". Possible values include: 'Disabled', 'Ready', 'Running', - 'Paused', 'Unknown' - :type state: str or ~azure.mgmt.timeseriesinsights.models.IngressState - :param state_details: An object that contains the details about an - environment's state. - :type state_details: - ~azure.mgmt.timeseriesinsights.models.EnvironmentStateDetails - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'state_details': {'key': 'stateDetails', 'type': 'EnvironmentStateDetails'}, - } - - def __init__(self, *, state=None, state_details=None, **kwargs) -> None: - super(IngressEnvironmentStatus, self).__init__(**kwargs) - self.state = state - self.state_details = state_details - - -class IoTHubEventSourceCommonProperties(AzureEventSourceProperties): - """Properties of the IoTHub event source. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param provisioning_state: Provisioning state of the resource. Possible - values include: 'Accepted', 'Creating', 'Updating', 'Succeeded', 'Failed', - 'Deleting' - :type provisioning_state: str or - ~azure.mgmt.timeseriesinsights.models.ProvisioningState - :ivar creation_time: The time the resource was created. - :vartype creation_time: datetime - :param timestamp_property_name: The event property that will be used as - the event source's timestamp. If a value isn't specified for - timestampPropertyName, or if null or empty-string is specified, the event - creation time will be used. - :type timestamp_property_name: str - :param event_source_resource_id: Required. The resource id of the event - source in Azure Resource Manager. - :type event_source_resource_id: str - :param iot_hub_name: Required. The name of the iot hub. - :type iot_hub_name: str - :param consumer_group_name: Required. The name of the iot hub's consumer - group that holds the partitions from which events will be read. - :type consumer_group_name: str - :param key_name: Required. The name of the Shared Access Policy key that - grants the Time Series Insights service access to the iot hub. This shared - access policy key must grant 'service connect' permissions to the iot hub. - :type key_name: str - """ - - _validation = { - 'creation_time': {'readonly': True}, - 'event_source_resource_id': {'required': True}, - 'iot_hub_name': {'required': True}, - 'consumer_group_name': {'required': True}, - 'key_name': {'required': True}, - } - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'timestamp_property_name': {'key': 'timestampPropertyName', 'type': 'str'}, - 'event_source_resource_id': {'key': 'eventSourceResourceId', 'type': 'str'}, - 'iot_hub_name': {'key': 'iotHubName', 'type': 'str'}, - 'consumer_group_name': {'key': 'consumerGroupName', 'type': 'str'}, - 'key_name': {'key': 'keyName', 'type': 'str'}, - } - - def __init__(self, *, event_source_resource_id: str, iot_hub_name: str, consumer_group_name: str, key_name: str, provisioning_state=None, timestamp_property_name: str=None, **kwargs) -> None: - super(IoTHubEventSourceCommonProperties, self).__init__(provisioning_state=provisioning_state, timestamp_property_name=timestamp_property_name, event_source_resource_id=event_source_resource_id, **kwargs) - self.iot_hub_name = iot_hub_name - self.consumer_group_name = consumer_group_name - self.key_name = key_name - - -class IoTHubEventSourceCreateOrUpdateParameters(EventSourceCreateOrUpdateParameters): - """Parameters supplied to the Create or Update Event Source operation for an - IoTHub event source. - - Variables are only populated by the server, and will be ignored when - sending a request. +class Gen1EnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParameters): + """Parameters supplied to the Create or Update Environment operation for a + Gen1 environment. All required parameters must be populated in order to send to Azure. @@ -1169,78 +1097,61 @@ class IoTHubEventSourceCreateOrUpdateParameters(EventSourceCreateOrUpdateParamet :type location: str :param tags: Key-value pairs of additional properties for the resource. :type tags: dict[str, str] + :param sku: Required. The sku determines the type of environment, either + Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku determines the + capacity of the environment, the ingress rate, and the billing rate. + :type sku: ~azure.mgmt.timeseriesinsights.models.Sku :param kind: Required. Constant filled by server. :type kind: str - :param provisioning_state: Provisioning state of the resource. Possible - values include: 'Accepted', 'Creating', 'Updating', 'Succeeded', 'Failed', - 'Deleting' - :type provisioning_state: str or - ~azure.mgmt.timeseriesinsights.models.ProvisioningState - :ivar creation_time: The time the resource was created. - :vartype creation_time: datetime - :param timestamp_property_name: The event property that will be used as - the event source's timestamp. If a value isn't specified for - timestampPropertyName, or if null or empty-string is specified, the event - creation time will be used. - :type timestamp_property_name: str - :param event_source_resource_id: Required. The resource id of the event - source in Azure Resource Manager. - :type event_source_resource_id: str - :param iot_hub_name: Required. The name of the iot hub. - :type iot_hub_name: str - :param consumer_group_name: Required. The name of the iot hub's consumer - group that holds the partitions from which events will be read. - :type consumer_group_name: str - :param key_name: Required. The name of the Shared Access Policy key that - grants the Time Series Insights service access to the iot hub. This shared - access policy key must grant 'service connect' permissions to the iot hub. - :type key_name: str - :param shared_access_key: Required. The value of the Shared Access Policy - key that grants the Time Series Insights service read access to the iot - hub. This property is not shown in event source responses. - :type shared_access_key: str + :param data_retention_time: Required. ISO8601 timespan specifying the + minimum number of days the environment's events will be available for + query. + :type data_retention_time: timedelta + :param storage_limit_exceeded_behavior: The behavior the Time Series + Insights service should take when the environment's capacity has been + exceeded. If "PauseIngress" is specified, new events will not be read from + the event source. If "PurgeOldData" is specified, new events will continue + to be read and old events will be deleted from the environment. The + default behavior is PurgeOldData. Possible values include: 'PurgeOldData', + 'PauseIngress' + :type storage_limit_exceeded_behavior: str or + ~azure.mgmt.timeseriesinsights.models.StorageLimitExceededBehavior + :param partition_key_properties: The list of event properties which will + be used to partition data in the environment. Currently, only a single + partition key property is supported. + :type partition_key_properties: + list[~azure.mgmt.timeseriesinsights.models.TimeSeriesIdProperty] """ _validation = { 'location': {'required': True}, + 'sku': {'required': True}, 'kind': {'required': True}, - 'creation_time': {'readonly': True}, - 'event_source_resource_id': {'required': True}, - 'iot_hub_name': {'required': True}, - 'consumer_group_name': {'required': True}, - 'key_name': {'required': True}, - 'shared_access_key': {'required': True}, + 'data_retention_time': {'required': True}, } _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, - 'event_source_resource_id': {'key': 'properties.eventSourceResourceId', 'type': 'str'}, - 'iot_hub_name': {'key': 'properties.iotHubName', 'type': 'str'}, - 'consumer_group_name': {'key': 'properties.consumerGroupName', 'type': 'str'}, - 'key_name': {'key': 'properties.keyName', 'type': 'str'}, - 'shared_access_key': {'key': 'properties.sharedAccessKey', 'type': 'str'}, + 'data_retention_time': {'key': 'properties.dataRetentionTime', 'type': 'duration'}, + 'storage_limit_exceeded_behavior': {'key': 'properties.storageLimitExceededBehavior', 'type': 'str'}, + 'partition_key_properties': {'key': 'properties.partitionKeyProperties', 'type': '[TimeSeriesIdProperty]'}, } - def __init__(self, *, location: str, event_source_resource_id: str, iot_hub_name: str, consumer_group_name: str, key_name: str, shared_access_key: str, tags=None, provisioning_state=None, timestamp_property_name: str=None, **kwargs) -> None: - super(IoTHubEventSourceCreateOrUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = provisioning_state - self.creation_time = None - self.timestamp_property_name = timestamp_property_name - self.event_source_resource_id = event_source_resource_id - self.iot_hub_name = iot_hub_name - self.consumer_group_name = consumer_group_name - self.key_name = key_name - self.shared_access_key = shared_access_key - self.kind = 'Microsoft.IoTHub' + def __init__(self, *, location: str, sku, data_retention_time, tags=None, storage_limit_exceeded_behavior=None, partition_key_properties=None, **kwargs) -> None: + super(Gen1EnvironmentCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.data_retention_time = data_retention_time + self.storage_limit_exceeded_behavior = storage_limit_exceeded_behavior + self.partition_key_properties = partition_key_properties + self.kind = 'Gen1' -class IoTHubEventSourceResource(EventSourceResource): - """An event source that receives its data from an Azure IoTHub. +class Gen1EnvironmentResource(EnvironmentResource): + """An environment is a set of time-series data available for query, and is the + top level Azure Time Series Insights resource. Gen1 environments have data + retention limits. Variables are only populated by the server, and will be ignored when sending a request. @@ -1257,8 +1168,41 @@ class IoTHubEventSourceResource(EventSourceResource): :type location: str :param tags: Resource tags :type tags: dict[str, str] + :param sku: Required. The sku determines the type of environment, either + Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku determines the + capacity of the environment, the ingress rate, and the billing rate. + :type sku: ~azure.mgmt.timeseriesinsights.models.Sku :param kind: Required. Constant filled by server. :type kind: str + :param data_retention_time: Required. ISO8601 timespan specifying the + minimum number of days the environment's events will be available for + query. + :type data_retention_time: timedelta + :param storage_limit_exceeded_behavior: The behavior the Time Series + Insights service should take when the environment's capacity has been + exceeded. If "PauseIngress" is specified, new events will not be read from + the event source. If "PurgeOldData" is specified, new events will continue + to be read and old events will be deleted from the environment. The + default behavior is PurgeOldData. Possible values include: 'PurgeOldData', + 'PauseIngress' + :type storage_limit_exceeded_behavior: str or + ~azure.mgmt.timeseriesinsights.models.StorageLimitExceededBehavior + :param partition_key_properties: The list of event properties which will + be used to partition data in the environment. Currently, only a single + partition key property is supported. + :type partition_key_properties: + list[~azure.mgmt.timeseriesinsights.models.TimeSeriesIdProperty] + :ivar data_access_id: An id used to access the environment data, e.g. to + query the environment's events or upload reference data for the + environment. + :vartype data_access_id: str + :ivar data_access_fqdn: The fully qualified domain name used to access the + environment data, e.g. to query the environment's events or upload + reference data for the environment. + :vartype data_access_fqdn: str + :param status: An object that represents the status of the environment, + and its internal state in the Time Series Insights service. + :type status: ~azure.mgmt.timeseriesinsights.models.EnvironmentStatus :param provisioning_state: Provisioning state of the resource. Possible values include: 'Accepted', 'Creating', 'Updating', 'Succeeded', 'Failed', 'Deleting' @@ -1266,23 +1210,6 @@ class IoTHubEventSourceResource(EventSourceResource): ~azure.mgmt.timeseriesinsights.models.ProvisioningState :ivar creation_time: The time the resource was created. :vartype creation_time: datetime - :param timestamp_property_name: The event property that will be used as - the event source's timestamp. If a value isn't specified for - timestampPropertyName, or if null or empty-string is specified, the event - creation time will be used. - :type timestamp_property_name: str - :param event_source_resource_id: Required. The resource id of the event - source in Azure Resource Manager. - :type event_source_resource_id: str - :param iot_hub_name: Required. The name of the iot hub. - :type iot_hub_name: str - :param consumer_group_name: Required. The name of the iot hub's consumer - group that holds the partitions from which events will be read. - :type consumer_group_name: str - :param key_name: Required. The name of the Shared Access Policy key that - grants the Time Series Insights service access to the iot hub. This shared - access policy key must grant 'service connect' permissions to the iot hub. - :type key_name: str """ _validation = { @@ -1290,12 +1217,12 @@ class IoTHubEventSourceResource(EventSourceResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'sku': {'required': True}, 'kind': {'required': True}, + 'data_retention_time': {'required': True}, + 'data_access_id': {'readonly': True}, + 'data_access_fqdn': {'readonly': True}, 'creation_time': {'readonly': True}, - 'event_source_resource_id': {'required': True}, - 'iot_hub_name': {'required': True}, - 'consumer_group_name': {'required': True}, - 'key_name': {'required': True}, } _attribute_map = { @@ -1304,122 +1231,70 @@ class IoTHubEventSourceResource(EventSourceResource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, + 'data_retention_time': {'key': 'properties.dataRetentionTime', 'type': 'duration'}, + 'storage_limit_exceeded_behavior': {'key': 'properties.storageLimitExceededBehavior', 'type': 'str'}, + 'partition_key_properties': {'key': 'properties.partitionKeyProperties', 'type': '[TimeSeriesIdProperty]'}, + 'data_access_id': {'key': 'properties.dataAccessId', 'type': 'str'}, + 'data_access_fqdn': {'key': 'properties.dataAccessFqdn', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'EnvironmentStatus'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, - 'event_source_resource_id': {'key': 'properties.eventSourceResourceId', 'type': 'str'}, - 'iot_hub_name': {'key': 'properties.iotHubName', 'type': 'str'}, - 'consumer_group_name': {'key': 'properties.consumerGroupName', 'type': 'str'}, - 'key_name': {'key': 'properties.keyName', 'type': 'str'}, } - def __init__(self, *, location: str, event_source_resource_id: str, iot_hub_name: str, consumer_group_name: str, key_name: str, tags=None, provisioning_state=None, timestamp_property_name: str=None, **kwargs) -> None: - super(IoTHubEventSourceResource, self).__init__(location=location, tags=tags, **kwargs) + def __init__(self, *, location: str, sku, data_retention_time, tags=None, storage_limit_exceeded_behavior=None, partition_key_properties=None, status=None, provisioning_state=None, **kwargs) -> None: + super(Gen1EnvironmentResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.data_retention_time = data_retention_time + self.storage_limit_exceeded_behavior = storage_limit_exceeded_behavior + self.partition_key_properties = partition_key_properties + self.data_access_id = None + self.data_access_fqdn = None + self.status = status self.provisioning_state = provisioning_state self.creation_time = None - self.timestamp_property_name = timestamp_property_name - self.event_source_resource_id = event_source_resource_id - self.iot_hub_name = iot_hub_name - self.consumer_group_name = consumer_group_name - self.key_name = key_name - self.kind = 'Microsoft.IotHub' + self.kind = 'Gen1' -class IoTHubEventSourceUpdateParameters(EventSourceUpdateParameters): - """Parameters supplied to the Update Event Source operation to update an - IoTHub event source. +class Gen1EnvironmentUpdateParameters(EnvironmentUpdateParameters): + """Parameters supplied to the Update Environment operation to update a Gen1 + environment. - :param tags: Key-value pairs of additional properties for the event - source. + :param tags: Key-value pairs of additional properties for the environment. :type tags: dict[str, str] - :param timestamp_property_name: The event property that will be used as - the event source's timestamp. If a value isn't specified for - timestampPropertyName, or if null or empty-string is specified, the event - creation time will be used. - :type timestamp_property_name: str - :param local_timestamp: An object that represents the local timestamp - property. It contains the format of local timestamp that needs to be used - and the corresponding timezone offset information. If a value isn't - specified for localTimestamp, or if null, then the local timestamp will - not be ingressed with the events. - :type local_timestamp: - ~azure.mgmt.timeseriesinsights.models.LocalTimestamp - :param shared_access_key: The value of the shared access key that grants - the Time Series Insights service read access to the iot hub. This property - is not shown in event source responses. - :type shared_access_key: str + :param sku: The sku of the environment. + :type sku: ~azure.mgmt.timeseriesinsights.models.Sku + :param data_retention_time: ISO8601 timespan specifying the minimum number + of days the environment's events will be available for query. + :type data_retention_time: timedelta + :param storage_limit_exceeded_behavior: The behavior the Time Series + Insights service should take when the environment's capacity has been + exceeded. If "PauseIngress" is specified, new events will not be read from + the event source. If "PurgeOldData" is specified, new events will continue + to be read and old events will be deleted from the environment. The + default behavior is PurgeOldData. Possible values include: 'PurgeOldData', + 'PauseIngress' + :type storage_limit_exceeded_behavior: str or + ~azure.mgmt.timeseriesinsights.models.StorageLimitExceededBehavior """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, - 'local_timestamp': {'key': 'properties.localTimestamp', 'type': 'LocalTimestamp'}, - 'shared_access_key': {'key': 'properties.sharedAccessKey', 'type': 'str'}, - } - - def __init__(self, *, tags=None, timestamp_property_name: str=None, local_timestamp=None, shared_access_key: str=None, **kwargs) -> None: - super(IoTHubEventSourceUpdateParameters, self).__init__(tags=tags, **kwargs) - self.timestamp_property_name = timestamp_property_name - self.local_timestamp = local_timestamp - self.shared_access_key = shared_access_key - - -class LocalTimestamp(Model): - """An object that represents the local timestamp property. It contains the - format of local timestamp that needs to be used and the corresponding - timezone offset information. If a value isn't specified for localTimestamp, - or if null, then the local timestamp will not be ingressed with the events. - - :param format: An enum that represents the format of the local timestamp - property that needs to be set. Possible values include: 'Embedded', - 'Iana', 'TimeSpan' - :type format: str or - ~azure.mgmt.timeseriesinsights.models.LocalTimestampFormat - :param time_zone_offset: An object that represents the offset information - for the local timestamp format specified. Should not be specified for - LocalTimestampFormat - Embedded. - :type time_zone_offset: - ~azure.mgmt.timeseriesinsights.models.LocalTimestampTimeZoneOffset - """ - - _attribute_map = { - 'format': {'key': 'format', 'type': 'str'}, - 'time_zone_offset': {'key': 'timeZoneOffset', 'type': 'LocalTimestampTimeZoneOffset'}, - } - - def __init__(self, *, format=None, time_zone_offset=None, **kwargs) -> None: - super(LocalTimestamp, self).__init__(**kwargs) - self.format = format - self.time_zone_offset = time_zone_offset - - -class LocalTimestampTimeZoneOffset(Model): - """An object that represents the offset information for the local timestamp - format specified. Should not be specified for LocalTimestampFormat - - Embedded. - - :param property_name: The event property that will be contain the offset - information to calculate the local timestamp. When the - LocalTimestampFormat is Iana, the property name will contain the name of - the column which contains IANA Timezone Name (eg: Americas/Los Angeles). - When LocalTimestampFormat is Timespan, it contains the name of property - which contains values representing the offset (eg: P1D or 1.00:00:00) - :type property_name: str - """ - - _attribute_map = { - 'property_name': {'key': 'propertyName', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'data_retention_time': {'key': 'properties.dataRetentionTime', 'type': 'duration'}, + 'storage_limit_exceeded_behavior': {'key': 'properties.storageLimitExceededBehavior', 'type': 'str'}, } - def __init__(self, *, property_name: str=None, **kwargs) -> None: - super(LocalTimestampTimeZoneOffset, self).__init__(**kwargs) - self.property_name = property_name + def __init__(self, *, tags=None, sku=None, data_retention_time=None, storage_limit_exceeded_behavior=None, **kwargs) -> None: + super(Gen1EnvironmentUpdateParameters, self).__init__(tags=tags, **kwargs) + self.sku = sku + self.data_retention_time = data_retention_time + self.storage_limit_exceeded_behavior = storage_limit_exceeded_behavior -class LongTermEnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParameters): +class Gen2EnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParameters): """Parameters supplied to the Create or Update Environment operation for a - long-term environment. + Gen2 environment. All required parameters must be populated in order to send to Azure. @@ -1428,9 +1303,8 @@ class LongTermEnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParam :param tags: Key-value pairs of additional properties for the resource. :type tags: dict[str, str] :param sku: Required. The sku determines the type of environment, either - standard (S1 or S2) or long-term (L1). For standard environments the sku - determines the capacity of the environment, the ingress rate, and the - billing rate. + Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku determines the + capacity of the environment, the ingress rate, and the billing rate. :type sku: ~azure.mgmt.timeseriesinsights.models.Sku :param kind: Required. Constant filled by server. :type kind: str @@ -1443,11 +1317,12 @@ class LongTermEnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParam connect to the customer storage account that is used to store the environment's data. :type storage_configuration: - ~azure.mgmt.timeseriesinsights.models.LongTermStorageConfigurationInput - :param data_retention: Required. ISO8601 timespan specifying the number of - days the environment's events will be available for query from the warm - store. - :type data_retention: timedelta + ~azure.mgmt.timeseriesinsights.models.Gen2StorageConfigurationInput + :param warm_store_configuration: The warm store configuration provides the + details to create a warm store cache that will retain a copy of the + environment's data available for faster query. + :type warm_store_configuration: + ~azure.mgmt.timeseriesinsights.models.WarmStoreConfigurationProperties """ _validation = { @@ -1456,7 +1331,6 @@ class LongTermEnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParam 'kind': {'required': True}, 'time_series_id_properties': {'required': True}, 'storage_configuration': {'required': True}, - 'data_retention': {'required': True}, } _attribute_map = { @@ -1465,21 +1339,21 @@ class LongTermEnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParam 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'time_series_id_properties': {'key': 'properties.timeSeriesIdProperties', 'type': '[TimeSeriesIdProperty]'}, - 'storage_configuration': {'key': 'properties.storageConfiguration', 'type': 'LongTermStorageConfigurationInput'}, - 'data_retention': {'key': 'properties.warmStoreConfiguration.dataRetention', 'type': 'duration'}, + 'storage_configuration': {'key': 'properties.storageConfiguration', 'type': 'Gen2StorageConfigurationInput'}, + 'warm_store_configuration': {'key': 'properties.warmStoreConfiguration', 'type': 'WarmStoreConfigurationProperties'}, } - def __init__(self, *, location: str, sku, time_series_id_properties, storage_configuration, data_retention, tags=None, **kwargs) -> None: - super(LongTermEnvironmentCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + def __init__(self, *, location: str, sku, time_series_id_properties, storage_configuration, tags=None, warm_store_configuration=None, **kwargs) -> None: + super(Gen2EnvironmentCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku, **kwargs) self.time_series_id_properties = time_series_id_properties self.storage_configuration = storage_configuration - self.data_retention = data_retention - self.kind = 'LongTerm' + self.warm_store_configuration = warm_store_configuration + self.kind = 'Gen2' -class LongTermEnvironmentResource(EnvironmentResource): +class Gen2EnvironmentResource(EnvironmentResource): """An environment is a set of time-series data available for query, and is the - top level Azure Time Series Insights resource. LongTerm environments do not + top level Azure Time Series Insights resource. Gen2 environments do not have set data retention limits. Variables are only populated by the server, and will be ignored when @@ -1498,9 +1372,8 @@ class LongTermEnvironmentResource(EnvironmentResource): :param tags: Resource tags :type tags: dict[str, str] :param sku: Required. The sku determines the type of environment, either - standard (S1 or S2) or long-term (L1). For standard environments the sku - determines the capacity of the environment, the ingress rate, and the - billing rate. + Gen1 (S1 or S2) or Gen2 (L1). For Gen1 environments the sku determines the + capacity of the environment, the ingress rate, and the billing rate. :type sku: ~azure.mgmt.timeseriesinsights.models.Sku :param kind: Required. Constant filled by server. :type kind: str @@ -1531,11 +1404,12 @@ class LongTermEnvironmentResource(EnvironmentResource): connect to the customer storage account that is used to store the environment's data. :type storage_configuration: - ~azure.mgmt.timeseriesinsights.models.LongTermStorageConfigurationOutput - :param data_retention: Required. ISO8601 timespan specifying the number of - days the environment's events will be available for query from the warm - store. - :type data_retention: timedelta + ~azure.mgmt.timeseriesinsights.models.Gen2StorageConfigurationOutput + :param warm_store_configuration: The warm store configuration provides the + details to create a warm store cache that will retain a copy of the + environment's data available for faster query. + :type warm_store_configuration: + ~azure.mgmt.timeseriesinsights.models.WarmStoreConfigurationProperties """ _validation = { @@ -1550,7 +1424,6 @@ class LongTermEnvironmentResource(EnvironmentResource): 'creation_time': {'readonly': True}, 'time_series_id_properties': {'required': True}, 'storage_configuration': {'required': True}, - 'data_retention': {'required': True}, } _attribute_map = { @@ -1567,12 +1440,12 @@ class LongTermEnvironmentResource(EnvironmentResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 'time_series_id_properties': {'key': 'properties.timeSeriesIdProperties', 'type': '[TimeSeriesIdProperty]'}, - 'storage_configuration': {'key': 'properties.storageConfiguration', 'type': 'LongTermStorageConfigurationOutput'}, - 'data_retention': {'key': 'properties.warmStoreConfiguration.dataRetention', 'type': 'duration'}, + 'storage_configuration': {'key': 'properties.storageConfiguration', 'type': 'Gen2StorageConfigurationOutput'}, + 'warm_store_configuration': {'key': 'properties.warmStoreConfiguration', 'type': 'WarmStoreConfigurationProperties'}, } - def __init__(self, *, location: str, sku, time_series_id_properties, storage_configuration, data_retention, tags=None, status=None, provisioning_state=None, **kwargs) -> None: - super(LongTermEnvironmentResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + def __init__(self, *, location: str, sku, time_series_id_properties, storage_configuration, tags=None, status=None, provisioning_state=None, warm_store_configuration=None, **kwargs) -> None: + super(Gen2EnvironmentResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) self.data_access_id = None self.data_access_fqdn = None self.status = status @@ -1580,15 +1453,13 @@ def __init__(self, *, location: str, sku, time_series_id_properties, storage_con self.creation_time = None self.time_series_id_properties = time_series_id_properties self.storage_configuration = storage_configuration - self.data_retention = data_retention - self.kind = 'LongTerm' + self.warm_store_configuration = warm_store_configuration + self.kind = 'Gen2' -class LongTermEnvironmentUpdateParameters(EnvironmentUpdateParameters): - """Parameters supplied to the Update Environment operation to update a - long-term environment. - - All required parameters must be populated in order to send to Azure. +class Gen2EnvironmentUpdateParameters(EnvironmentUpdateParameters): + """Parameters supplied to the Update Environment operation to update a Gen2 + environment. :param tags: Key-value pairs of additional properties for the environment. :type tags: dict[str, str] @@ -1597,30 +1468,27 @@ class LongTermEnvironmentUpdateParameters(EnvironmentUpdateParameters): to the customer storage account that is used to store the environment's data. :type storage_configuration: - ~azure.mgmt.timeseriesinsights.models.LongTermStorageConfigurationMutableProperties - :param data_retention: Required. ISO8601 timespan specifying the number of - days the environment's events will be available for query from the warm - store. - :type data_retention: timedelta + ~azure.mgmt.timeseriesinsights.models.Gen2StorageConfigurationMutableProperties + :param warm_store_configuration: The warm store configuration provides the + details to create a warm store cache that will retain a copy of the + environment's data available for faster query. + :type warm_store_configuration: + ~azure.mgmt.timeseriesinsights.models.WarmStoreConfigurationProperties """ - _validation = { - 'data_retention': {'required': True}, - } - _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'storage_configuration': {'key': 'properties.storageConfiguration', 'type': 'LongTermStorageConfigurationMutableProperties'}, - 'data_retention': {'key': 'properties.warmStoreConfiguration.dataRetention', 'type': 'duration'}, + 'storage_configuration': {'key': 'properties.storageConfiguration', 'type': 'Gen2StorageConfigurationMutableProperties'}, + 'warm_store_configuration': {'key': 'properties.warmStoreConfiguration', 'type': 'WarmStoreConfigurationProperties'}, } - def __init__(self, *, data_retention, tags=None, storage_configuration=None, **kwargs) -> None: - super(LongTermEnvironmentUpdateParameters, self).__init__(tags=tags, **kwargs) + def __init__(self, *, tags=None, storage_configuration=None, warm_store_configuration=None, **kwargs) -> None: + super(Gen2EnvironmentUpdateParameters, self).__init__(tags=tags, **kwargs) self.storage_configuration = storage_configuration - self.data_retention = data_retention + self.warm_store_configuration = warm_store_configuration -class LongTermStorageConfigurationInput(Model): +class Gen2StorageConfigurationInput(Model): """The storage configuration provides the connection details that allows the Time Series Insights service to connect to the customer storage account that is used to store the environment's data. @@ -1628,7 +1496,7 @@ class LongTermStorageConfigurationInput(Model): All required parameters must be populated in order to send to Azure. :param account_name: Required. The name of the storage account that will - hold the environment's long term data. + hold the environment's Gen2 data. :type account_name: str :param management_key: Required. The value of the management key that grants the Time Series Insights service write access to the storage @@ -1647,12 +1515,12 @@ class LongTermStorageConfigurationInput(Model): } def __init__(self, *, account_name: str, management_key: str, **kwargs) -> None: - super(LongTermStorageConfigurationInput, self).__init__(**kwargs) + super(Gen2StorageConfigurationInput, self).__init__(**kwargs) self.account_name = account_name self.management_key = management_key -class LongTermStorageConfigurationMutableProperties(Model): +class Gen2StorageConfigurationMutableProperties(Model): """The storage configuration provides the connection details that allows the Time Series Insights service to connect to the customer storage account that is used to store the environment's data. @@ -1665,41 +1533,393 @@ class LongTermStorageConfigurationMutableProperties(Model): :type management_key: str """ - _validation = { - 'management_key': {'required': True}, - } + _validation = { + 'management_key': {'required': True}, + } + + _attribute_map = { + 'management_key': {'key': 'managementKey', 'type': 'str'}, + } + + def __init__(self, *, management_key: str, **kwargs) -> None: + super(Gen2StorageConfigurationMutableProperties, self).__init__(**kwargs) + self.management_key = management_key + + +class Gen2StorageConfigurationOutput(Model): + """The storage configuration provides the non-secret connection details about + the customer storage account that is used to store the environment's data. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. The name of the storage account that will + hold the environment's Gen2 data. + :type account_name: str + """ + + _validation = { + 'account_name': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + } + + def __init__(self, *, account_name: str, **kwargs) -> None: + super(Gen2StorageConfigurationOutput, self).__init__(**kwargs) + self.account_name = account_name + + +class IngressEnvironmentStatus(Model): + """An object that represents the status of ingress on an environment. + + :param state: This string represents the state of ingress operations on an + environment. It can be "Disabled", "Ready", "Running", "Paused" or + "Unknown". Possible values include: 'Disabled', 'Ready', 'Running', + 'Paused', 'Unknown' + :type state: str or ~azure.mgmt.timeseriesinsights.models.IngressState + :param state_details: An object that contains the details about an + environment's state. + :type state_details: + ~azure.mgmt.timeseriesinsights.models.EnvironmentStateDetails + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'state_details': {'key': 'stateDetails', 'type': 'EnvironmentStateDetails'}, + } + + def __init__(self, *, state=None, state_details=None, **kwargs) -> None: + super(IngressEnvironmentStatus, self).__init__(**kwargs) + self.state = state + self.state_details = state_details + + +class IoTHubEventSourceCommonProperties(AzureEventSourceProperties): + """Properties of the IoTHub event source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param provisioning_state: Provisioning state of the resource. Possible + values include: 'Accepted', 'Creating', 'Updating', 'Succeeded', 'Failed', + 'Deleting' + :type provisioning_state: str or + ~azure.mgmt.timeseriesinsights.models.ProvisioningState + :ivar creation_time: The time the resource was created. + :vartype creation_time: datetime + :param timestamp_property_name: The event property that will be used as + the event source's timestamp. If a value isn't specified for + timestampPropertyName, or if null or empty-string is specified, the event + creation time will be used. + :type timestamp_property_name: str + :param event_source_resource_id: Required. The resource id of the event + source in Azure Resource Manager. + :type event_source_resource_id: str + :param iot_hub_name: Required. The name of the iot hub. + :type iot_hub_name: str + :param consumer_group_name: Required. The name of the iot hub's consumer + group that holds the partitions from which events will be read. + :type consumer_group_name: str + :param key_name: Required. The name of the Shared Access Policy key that + grants the Time Series Insights service access to the iot hub. This shared + access policy key must grant 'service connect' permissions to the iot hub. + :type key_name: str + """ + + _validation = { + 'creation_time': {'readonly': True}, + 'event_source_resource_id': {'required': True}, + 'iot_hub_name': {'required': True}, + 'consumer_group_name': {'required': True}, + 'key_name': {'required': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, + 'timestamp_property_name': {'key': 'timestampPropertyName', 'type': 'str'}, + 'event_source_resource_id': {'key': 'eventSourceResourceId', 'type': 'str'}, + 'iot_hub_name': {'key': 'iotHubName', 'type': 'str'}, + 'consumer_group_name': {'key': 'consumerGroupName', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, *, event_source_resource_id: str, iot_hub_name: str, consumer_group_name: str, key_name: str, provisioning_state=None, timestamp_property_name: str=None, **kwargs) -> None: + super(IoTHubEventSourceCommonProperties, self).__init__(provisioning_state=provisioning_state, timestamp_property_name=timestamp_property_name, event_source_resource_id=event_source_resource_id, **kwargs) + self.iot_hub_name = iot_hub_name + self.consumer_group_name = consumer_group_name + self.key_name = key_name + + +class IoTHubEventSourceCreateOrUpdateParameters(EventSourceCreateOrUpdateParameters): + """Parameters supplied to the Create or Update Event Source operation for an + IoTHub event source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. + :type location: str + :param tags: Key-value pairs of additional properties for the resource. + :type tags: dict[str, str] + :param local_timestamp: An object that represents the local timestamp + property. It contains the format of local timestamp that needs to be used + and the corresponding timezone offset information. If a value isn't + specified for localTimestamp, or if null, then the local timestamp will + not be ingressed with the events. + :type local_timestamp: + ~azure.mgmt.timeseriesinsights.models.LocalTimestamp + :param kind: Required. Constant filled by server. + :type kind: str + :param provisioning_state: Provisioning state of the resource. Possible + values include: 'Accepted', 'Creating', 'Updating', 'Succeeded', 'Failed', + 'Deleting' + :type provisioning_state: str or + ~azure.mgmt.timeseriesinsights.models.ProvisioningState + :ivar creation_time: The time the resource was created. + :vartype creation_time: datetime + :param timestamp_property_name: The event property that will be used as + the event source's timestamp. If a value isn't specified for + timestampPropertyName, or if null or empty-string is specified, the event + creation time will be used. + :type timestamp_property_name: str + :param event_source_resource_id: Required. The resource id of the event + source in Azure Resource Manager. + :type event_source_resource_id: str + :param iot_hub_name: Required. The name of the iot hub. + :type iot_hub_name: str + :param consumer_group_name: Required. The name of the iot hub's consumer + group that holds the partitions from which events will be read. + :type consumer_group_name: str + :param key_name: Required. The name of the Shared Access Policy key that + grants the Time Series Insights service access to the iot hub. This shared + access policy key must grant 'service connect' permissions to the iot hub. + :type key_name: str + :param shared_access_key: Required. The value of the Shared Access Policy + key that grants the Time Series Insights service read access to the iot + hub. This property is not shown in event source responses. + :type shared_access_key: str + """ + + _validation = { + 'location': {'required': True}, + 'kind': {'required': True}, + 'creation_time': {'readonly': True}, + 'event_source_resource_id': {'required': True}, + 'iot_hub_name': {'required': True}, + 'consumer_group_name': {'required': True}, + 'key_name': {'required': True}, + 'shared_access_key': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'local_timestamp': {'key': 'localTimestamp', 'type': 'LocalTimestamp'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, + 'event_source_resource_id': {'key': 'properties.eventSourceResourceId', 'type': 'str'}, + 'iot_hub_name': {'key': 'properties.iotHubName', 'type': 'str'}, + 'consumer_group_name': {'key': 'properties.consumerGroupName', 'type': 'str'}, + 'key_name': {'key': 'properties.keyName', 'type': 'str'}, + 'shared_access_key': {'key': 'properties.sharedAccessKey', 'type': 'str'}, + } + + def __init__(self, *, location: str, event_source_resource_id: str, iot_hub_name: str, consumer_group_name: str, key_name: str, shared_access_key: str, tags=None, local_timestamp=None, provisioning_state=None, timestamp_property_name: str=None, **kwargs) -> None: + super(IoTHubEventSourceCreateOrUpdateParameters, self).__init__(location=location, tags=tags, local_timestamp=local_timestamp, **kwargs) + self.provisioning_state = provisioning_state + self.creation_time = None + self.timestamp_property_name = timestamp_property_name + self.event_source_resource_id = event_source_resource_id + self.iot_hub_name = iot_hub_name + self.consumer_group_name = consumer_group_name + self.key_name = key_name + self.shared_access_key = shared_access_key + self.kind = 'Microsoft.IoTHub' + + +class IoTHubEventSourceResource(EventSourceResource): + """An event source that receives its data from an Azure IoTHub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str + :param provisioning_state: Provisioning state of the resource. Possible + values include: 'Accepted', 'Creating', 'Updating', 'Succeeded', 'Failed', + 'Deleting' + :type provisioning_state: str or + ~azure.mgmt.timeseriesinsights.models.ProvisioningState + :ivar creation_time: The time the resource was created. + :vartype creation_time: datetime + :param timestamp_property_name: The event property that will be used as + the event source's timestamp. If a value isn't specified for + timestampPropertyName, or if null or empty-string is specified, the event + creation time will be used. + :type timestamp_property_name: str + :param event_source_resource_id: Required. The resource id of the event + source in Azure Resource Manager. + :type event_source_resource_id: str + :param iot_hub_name: Required. The name of the iot hub. + :type iot_hub_name: str + :param consumer_group_name: Required. The name of the iot hub's consumer + group that holds the partitions from which events will be read. + :type consumer_group_name: str + :param key_name: Required. The name of the Shared Access Policy key that + grants the Time Series Insights service access to the iot hub. This shared + access policy key must grant 'service connect' permissions to the iot hub. + :type key_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'required': True}, + 'creation_time': {'readonly': True}, + 'event_source_resource_id': {'required': True}, + 'iot_hub_name': {'required': True}, + 'consumer_group_name': {'required': True}, + 'key_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, + 'event_source_resource_id': {'key': 'properties.eventSourceResourceId', 'type': 'str'}, + 'iot_hub_name': {'key': 'properties.iotHubName', 'type': 'str'}, + 'consumer_group_name': {'key': 'properties.consumerGroupName', 'type': 'str'}, + 'key_name': {'key': 'properties.keyName', 'type': 'str'}, + } + + def __init__(self, *, location: str, event_source_resource_id: str, iot_hub_name: str, consumer_group_name: str, key_name: str, tags=None, provisioning_state=None, timestamp_property_name: str=None, **kwargs) -> None: + super(IoTHubEventSourceResource, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = provisioning_state + self.creation_time = None + self.timestamp_property_name = timestamp_property_name + self.event_source_resource_id = event_source_resource_id + self.iot_hub_name = iot_hub_name + self.consumer_group_name = consumer_group_name + self.key_name = key_name + self.kind = 'Microsoft.IoTHub' + + +class IoTHubEventSourceUpdateParameters(EventSourceUpdateParameters): + """Parameters supplied to the Update Event Source operation to update an + IoTHub event source. + + :param tags: Key-value pairs of additional properties for the event + source. + :type tags: dict[str, str] + :param timestamp_property_name: The event property that will be used as + the event source's timestamp. If a value isn't specified for + timestampPropertyName, or if null or empty-string is specified, the event + creation time will be used. + :type timestamp_property_name: str + :param local_timestamp: An object that represents the local timestamp + property. It contains the format of local timestamp that needs to be used + and the corresponding timezone offset information. If a value isn't + specified for localTimestamp, or if null, then the local timestamp will + not be ingressed with the events. + :type local_timestamp: + ~azure.mgmt.timeseriesinsights.models.LocalTimestamp + :param shared_access_key: The value of the shared access key that grants + the Time Series Insights service read access to the iot hub. This property + is not shown in event source responses. + :type shared_access_key: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, + 'local_timestamp': {'key': 'properties.localTimestamp', 'type': 'LocalTimestamp'}, + 'shared_access_key': {'key': 'properties.sharedAccessKey', 'type': 'str'}, + } + + def __init__(self, *, tags=None, timestamp_property_name: str=None, local_timestamp=None, shared_access_key: str=None, **kwargs) -> None: + super(IoTHubEventSourceUpdateParameters, self).__init__(tags=tags, **kwargs) + self.timestamp_property_name = timestamp_property_name + self.local_timestamp = local_timestamp + self.shared_access_key = shared_access_key + + +class LocalTimestamp(Model): + """An object that represents the local timestamp property. It contains the + format of local timestamp that needs to be used and the corresponding + timezone offset information. If a value isn't specified for localTimestamp, + or if null, then the local timestamp will not be ingressed with the events. + + :param format: An enum that represents the format of the local timestamp + property that needs to be set. Possible values include: 'Embedded' + :type format: str or + ~azure.mgmt.timeseriesinsights.models.LocalTimestampFormat + :param time_zone_offset: An object that represents the offset information + for the local timestamp format specified. Should not be specified for + LocalTimestampFormat - Embedded. + :type time_zone_offset: + ~azure.mgmt.timeseriesinsights.models.LocalTimestampTimeZoneOffset + """ _attribute_map = { - 'management_key': {'key': 'managementKey', 'type': 'str'}, + 'format': {'key': 'format', 'type': 'str'}, + 'time_zone_offset': {'key': 'timeZoneOffset', 'type': 'LocalTimestampTimeZoneOffset'}, } - def __init__(self, *, management_key: str, **kwargs) -> None: - super(LongTermStorageConfigurationMutableProperties, self).__init__(**kwargs) - self.management_key = management_key - + def __init__(self, *, format=None, time_zone_offset=None, **kwargs) -> None: + super(LocalTimestamp, self).__init__(**kwargs) + self.format = format + self.time_zone_offset = time_zone_offset -class LongTermStorageConfigurationOutput(Model): - """The storage configuration provides the non-secret connection details about - the customer storage account that is used to store the environment's data. - All required parameters must be populated in order to send to Azure. +class LocalTimestampTimeZoneOffset(Model): + """An object that represents the offset information for the local timestamp + format specified. Should not be specified for LocalTimestampFormat - + Embedded. - :param account_name: Required. The name of the storage account that will - hold the environment's long term data. - :type account_name: str + :param property_name: The event property that will be contain the offset + information to calculate the local timestamp. When the + LocalTimestampFormat is Iana, the property name will contain the name of + the column which contains IANA Timezone Name (eg: Americas/Los Angeles). + When LocalTimestampFormat is Timespan, it contains the name of property + which contains values representing the offset (eg: P1D or 1.00:00:00) + :type property_name: str """ - _validation = { - 'account_name': {'required': True}, - } - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, + 'property_name': {'key': 'propertyName', 'type': 'str'}, } - def __init__(self, *, account_name: str, **kwargs) -> None: - super(LongTermStorageConfigurationOutput, self).__init__(**kwargs) - self.account_name = account_name + def __init__(self, *, property_name: str=None, **kwargs) -> None: + super(LocalTimestampTimeZoneOffset, self).__init__(**kwargs) + self.property_name = property_name class Operation(Model): @@ -1942,18 +2162,18 @@ def __init__(self, *, tags=None, **kwargs) -> None: class Sku(Model): - """The sku determines the type of environment, either standard (S1 or S2) or - long-term (L1). For standard environments the sku determines the capacity - of the environment, the ingress rate, and the billing rate. + """The sku determines the type of environment, either Gen1 (S1 or S2) or Gen2 + (L1). For Gen1 environments the sku determines the capacity of the + environment, the ingress rate, and the billing rate. All required parameters must be populated in order to send to Azure. :param name: Required. The name of this SKU. Possible values include: 'S1', 'S2', 'P1', 'L1' :type name: str or ~azure.mgmt.timeseriesinsights.models.SkuName - :param capacity: Required. The capacity of the sku. For standard - environments, this value can be changed to support scale out of - environments after they have been created. + :param capacity: Required. The capacity of the sku. For Gen1 environments, + this value can be changed to support scale out of environments after they + have been created. :type capacity: int """ @@ -1973,217 +2193,6 @@ def __init__(self, *, name, capacity: int, **kwargs) -> None: self.capacity = capacity -class StandardEnvironmentCreateOrUpdateParameters(EnvironmentCreateOrUpdateParameters): - """Parameters supplied to the Create or Update Environment operation for a - standard environment. - - All required parameters must be populated in order to send to Azure. - - :param location: Required. The location of the resource. - :type location: str - :param tags: Key-value pairs of additional properties for the resource. - :type tags: dict[str, str] - :param sku: Required. The sku determines the type of environment, either - standard (S1 or S2) or long-term (L1). For standard environments the sku - determines the capacity of the environment, the ingress rate, and the - billing rate. - :type sku: ~azure.mgmt.timeseriesinsights.models.Sku - :param kind: Required. Constant filled by server. - :type kind: str - :param data_retention_time: Required. ISO8601 timespan specifying the - minimum number of days the environment's events will be available for - query. - :type data_retention_time: timedelta - :param storage_limit_exceeded_behavior: The behavior the Time Series - Insights service should take when the environment's capacity has been - exceeded. If "PauseIngress" is specified, new events will not be read from - the event source. If "PurgeOldData" is specified, new events will continue - to be read and old events will be deleted from the environment. The - default behavior is PurgeOldData. Possible values include: 'PurgeOldData', - 'PauseIngress' - :type storage_limit_exceeded_behavior: str or - ~azure.mgmt.timeseriesinsights.models.StorageLimitExceededBehavior - :param partition_key_properties: The list of event properties which will - be used to partition data in the environment. - :type partition_key_properties: - list[~azure.mgmt.timeseriesinsights.models.TimeSeriesIdProperty] - """ - - _validation = { - 'location': {'required': True}, - 'sku': {'required': True}, - 'kind': {'required': True}, - 'data_retention_time': {'required': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'data_retention_time': {'key': 'properties.dataRetentionTime', 'type': 'duration'}, - 'storage_limit_exceeded_behavior': {'key': 'properties.storageLimitExceededBehavior', 'type': 'str'}, - 'partition_key_properties': {'key': 'properties.partitionKeyProperties', 'type': '[TimeSeriesIdProperty]'}, - } - - def __init__(self, *, location: str, sku, data_retention_time, tags=None, storage_limit_exceeded_behavior=None, partition_key_properties=None, **kwargs) -> None: - super(StandardEnvironmentCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku, **kwargs) - self.data_retention_time = data_retention_time - self.storage_limit_exceeded_behavior = storage_limit_exceeded_behavior - self.partition_key_properties = partition_key_properties - self.kind = 'Standard' - - -class StandardEnvironmentResource(EnvironmentResource): - """An environment is a set of time-series data available for query, and is the - top level Azure Time Series Insights resource. Standard environments have - data retention limits. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: Required. The sku determines the type of environment, either - standard (S1 or S2) or long-term (L1). For standard environments the sku - determines the capacity of the environment, the ingress rate, and the - billing rate. - :type sku: ~azure.mgmt.timeseriesinsights.models.Sku - :param kind: Required. Constant filled by server. - :type kind: str - :param data_retention_time: Required. ISO8601 timespan specifying the - minimum number of days the environment's events will be available for - query. - :type data_retention_time: timedelta - :param storage_limit_exceeded_behavior: The behavior the Time Series - Insights service should take when the environment's capacity has been - exceeded. If "PauseIngress" is specified, new events will not be read from - the event source. If "PurgeOldData" is specified, new events will continue - to be read and old events will be deleted from the environment. The - default behavior is PurgeOldData. Possible values include: 'PurgeOldData', - 'PauseIngress' - :type storage_limit_exceeded_behavior: str or - ~azure.mgmt.timeseriesinsights.models.StorageLimitExceededBehavior - :param partition_key_properties: The list of event properties which will - be used to partition data in the environment. - :type partition_key_properties: - list[~azure.mgmt.timeseriesinsights.models.TimeSeriesIdProperty] - :ivar data_access_id: An id used to access the environment data, e.g. to - query the environment's events or upload reference data for the - environment. - :vartype data_access_id: str - :ivar data_access_fqdn: The fully qualified domain name used to access the - environment data, e.g. to query the environment's events or upload - reference data for the environment. - :vartype data_access_fqdn: str - :param status: An object that represents the status of the environment, - and its internal state in the Time Series Insights service. - :type status: ~azure.mgmt.timeseriesinsights.models.EnvironmentStatus - :param provisioning_state: Provisioning state of the resource. Possible - values include: 'Accepted', 'Creating', 'Updating', 'Succeeded', 'Failed', - 'Deleting' - :type provisioning_state: str or - ~azure.mgmt.timeseriesinsights.models.ProvisioningState - :ivar creation_time: The time the resource was created. - :vartype creation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'sku': {'required': True}, - 'kind': {'required': True}, - 'data_retention_time': {'required': True}, - 'data_access_id': {'readonly': True}, - 'data_access_fqdn': {'readonly': True}, - 'creation_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'data_retention_time': {'key': 'properties.dataRetentionTime', 'type': 'duration'}, - 'storage_limit_exceeded_behavior': {'key': 'properties.storageLimitExceededBehavior', 'type': 'str'}, - 'partition_key_properties': {'key': 'properties.partitionKeyProperties', 'type': '[TimeSeriesIdProperty]'}, - 'data_access_id': {'key': 'properties.dataAccessId', 'type': 'str'}, - 'data_access_fqdn': {'key': 'properties.dataAccessFqdn', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'EnvironmentStatus'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, location: str, sku, data_retention_time, tags=None, storage_limit_exceeded_behavior=None, partition_key_properties=None, status=None, provisioning_state=None, **kwargs) -> None: - super(StandardEnvironmentResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) - self.data_retention_time = data_retention_time - self.storage_limit_exceeded_behavior = storage_limit_exceeded_behavior - self.partition_key_properties = partition_key_properties - self.data_access_id = None - self.data_access_fqdn = None - self.status = status - self.provisioning_state = provisioning_state - self.creation_time = None - self.kind = 'Standard' - - -class StandardEnvironmentUpdateParameters(EnvironmentUpdateParameters): - """Parameters supplied to the Update Environment operation to update a - standard environment. - - :param tags: Key-value pairs of additional properties for the environment. - :type tags: dict[str, str] - :param sku: The sku of the environment. - :type sku: ~azure.mgmt.timeseriesinsights.models.Sku - :param data_retention_time: ISO8601 timespan specifying the minimum number - of days the environment's events will be available for query. - :type data_retention_time: timedelta - :param storage_limit_exceeded_behavior: The behavior the Time Series - Insights service should take when the environment's capacity has been - exceeded. If "PauseIngress" is specified, new events will not be read from - the event source. If "PurgeOldData" is specified, new events will continue - to be read and old events will be deleted from the environment. The - default behavior is PurgeOldData. Possible values include: 'PurgeOldData', - 'PauseIngress' - :type storage_limit_exceeded_behavior: str or - ~azure.mgmt.timeseriesinsights.models.StorageLimitExceededBehavior - :param partition_key_properties: The list of event properties which will - be used to partition data in the environment. - :type partition_key_properties: - list[~azure.mgmt.timeseriesinsights.models.TimeSeriesIdProperty] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'data_retention_time': {'key': 'properties.dataRetentionTime', 'type': 'duration'}, - 'storage_limit_exceeded_behavior': {'key': 'properties.storageLimitExceededBehavior', 'type': 'str'}, - 'partition_key_properties': {'key': 'properties.partitionKeyProperties', 'type': '[TimeSeriesIdProperty]'}, - } - - def __init__(self, *, tags=None, sku=None, data_retention_time=None, storage_limit_exceeded_behavior=None, partition_key_properties=None, **kwargs) -> None: - super(StandardEnvironmentUpdateParameters, self).__init__(tags=tags, **kwargs) - self.sku = sku - self.data_retention_time = data_retention_time - self.storage_limit_exceeded_behavior = storage_limit_exceeded_behavior - self.partition_key_properties = partition_key_properties - - class TimeSeriesIdProperty(Model): """The structure of the property that a time series id can have. An environment can have multiple such properties. @@ -2239,3 +2248,29 @@ def __init__(self, *, state=None, current_count: int=None, max_count: int=None, self.state = state self.current_count = current_count self.max_count = max_count + + +class WarmStoreConfigurationProperties(Model): + """The warm store configuration provides the details to create a warm store + cache that will retain a copy of the environment's data available for + faster query. + + All required parameters must be populated in order to send to Azure. + + :param data_retention: Required. ISO8601 timespan specifying the number of + days the environment's events will be available for query from the warm + store. + :type data_retention: timedelta + """ + + _validation = { + 'data_retention': {'required': True}, + } + + _attribute_map = { + 'data_retention': {'key': 'dataRetention', 'type': 'duration'}, + } + + def __init__(self, *, data_retention, **kwargs) -> None: + super(WarmStoreConfigurationProperties, self).__init__(**kwargs) + self.data_retention = data_retention diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_time_series_insights_client_enums.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_time_series_insights_client_enums.py index 361e35e738e3..dd3d704d750d 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_time_series_insights_client_enums.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_time_series_insights_client_enums.py @@ -60,8 +60,6 @@ class WarmStoragePropertiesState(str, Enum): class LocalTimestampFormat(str, Enum): embedded = "Embedded" - iana = "Iana" - time_span = "TimeSpan" class ReferenceDataKeyPropertyType(str, Enum): diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_access_policies_operations.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_access_policies_operations.py index fb0b9da8c2b2..88111bc468e9 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_access_policies_operations.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_access_policies_operations.py @@ -25,7 +25,7 @@ class AccessPoliciesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-08-15-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-05-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-15-preview" + self.api_version = "2020-05-15" self.config = config diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_environments_operations.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_environments_operations.py index 356b06d6fdd6..6f5111749dc5 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_environments_operations.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_environments_operations.py @@ -27,7 +27,7 @@ class EnvironmentsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-08-15-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-05-15". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-15-preview" + self.api_version = "2020-05-15" self.config = config @@ -216,7 +216,9 @@ def get( def _update_initial( - self, resource_group_name, environment_name, standard_environment_update_parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, environment_name, tags=None, custom_headers=None, raw=False, **operation_config): + environment_update_parameters = models.EnvironmentUpdateParameters(tags=tags) + # Construct URL url = self.update.metadata['url'] path_format_arguments = { @@ -242,7 +244,7 @@ def _update_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(standard_environment_update_parameters, 'StandardEnvironmentUpdateParameters') + body_content = self._serialize.body(environment_update_parameters, 'EnvironmentUpdateParameters') # Construct and send request request = self._client.patch(url, query_parameters, header_parameters, body_content) @@ -265,7 +267,7 @@ def _update_initial( return deserialized def update( - self, resource_group_name, environment_name, standard_environment_update_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, environment_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates the environment with the specified name in the specified subscription and resource group. @@ -274,10 +276,9 @@ def update( :param environment_name: The name of the Time Series Insights environment associated with the specified resource group. :type environment_name: str - :param standard_environment_update_parameters: Request object that - contains the updated information for the environment. - :type standard_environment_update_parameters: - ~azure.mgmt.timeseriesinsights.models.StandardEnvironmentUpdateParameters + :param tags: Key-value pairs of additional properties for the + environment. + :type tags: dict[str, str] :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -294,7 +295,7 @@ def update( raw_result = self._update_initial( resource_group_name=resource_group_name, environment_name=environment_name, - standard_environment_update_parameters=standard_environment_update_parameters, + tags=tags, custom_headers=custom_headers, raw=True, **operation_config diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_event_sources_operations.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_event_sources_operations.py index 0be5c64de6f1..380357012cc9 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_event_sources_operations.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_event_sources_operations.py @@ -25,7 +25,7 @@ class EventSourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-08-15-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-05-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-15-preview" + self.api_version = "2020-05-15" self.config = config diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_operations.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_operations.py index dcd7df980bea..990bb24881ca 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_operations.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-08-15-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-05-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-15-preview" + self.api_version = "2020-05-15" self.config = config diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_reference_data_sets_operations.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_reference_data_sets_operations.py index f1d46529b72f..cb99a60d7748 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_reference_data_sets_operations.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_reference_data_sets_operations.py @@ -25,7 +25,7 @@ class ReferenceDataSetsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-08-15-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-05-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-15-preview" + self.api_version = "2020-05-15" self.config = config diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/setup.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/setup.py index 2565b1a74e08..952f08f5869b 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/setup.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)