diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/MANIFEST.in b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/MANIFEST.in +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/_meta.json b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/_meta.json new file mode 100644 index 000000000000..ec1846146305 --- /dev/null +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "a1c8d09613ff091ab368db1ed1746f08e151185b", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/timeseriesinsights/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/timeseriesinsights/resource-manager/readme.md" +} \ No newline at end of file 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..572a5f5b768a 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, @@ -123,6 +125,7 @@ PropertyType, IngressState, WarmStoragePropertiesState, + IngressStartAtType, LocalTimestampFormat, ReferenceDataKeyPropertyType, DataStringComparisonBehavior, @@ -153,6 +156,15 @@ 'EventSourceMutableProperties', 'EventSourceResource', 'EventSourceUpdateParameters', + 'Gen1EnvironmentCreateOrUpdateParameters', + 'Gen1EnvironmentResource', + 'Gen1EnvironmentUpdateParameters', + 'Gen2EnvironmentCreateOrUpdateParameters', + 'Gen2EnvironmentResource', + 'Gen2EnvironmentUpdateParameters', + 'Gen2StorageConfigurationInput', + 'Gen2StorageConfigurationMutableProperties', + 'Gen2StorageConfigurationOutput', 'IngressEnvironmentStatus', 'IoTHubEventSourceCommonProperties', 'IoTHubEventSourceCreateOrUpdateParameters', @@ -160,12 +172,6 @@ 'IoTHubEventSourceUpdateParameters', 'LocalTimestamp', 'LocalTimestampTimeZoneOffset', - 'LongTermEnvironmentCreateOrUpdateParameters', - 'LongTermEnvironmentResource', - 'LongTermEnvironmentUpdateParameters', - 'LongTermStorageConfigurationInput', - 'LongTermStorageConfigurationMutableProperties', - 'LongTermStorageConfigurationOutput', 'Operation', 'OperationDisplay', 'ReferenceDataSetCreateOrUpdateParameters', @@ -176,12 +182,10 @@ 'Resource', 'ResourceProperties', 'Sku', - 'StandardEnvironmentCreateOrUpdateParameters', - 'StandardEnvironmentResource', - 'StandardEnvironmentUpdateParameters', 'TimeSeriesIdProperty', 'TrackedResource', 'WarmStorageEnvironmentStatus', + 'WarmStoreConfigurationProperties', 'OperationPaged', 'ProvisioningState', 'SkuName', @@ -189,6 +193,7 @@ 'PropertyType', 'IngressState', 'WarmStoragePropertiesState', + 'IngressStartAtType', 'LocalTimestampFormat', 'ReferenceDataKeyPropertyType', 'DataStringComparisonBehavior', 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..08050b4cdbdc 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 @@ -208,6 +208,16 @@ class EventSourceCommonProperties(ResourceProperties): timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. :type timestamp_property_name: str + :param type: The type of the ingressStartAt, It can be + "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". + Possible values include: 'EarliestAvailable', 'EventSourceCreationTime', + 'CustomEnqueuedTime' + :type type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: str """ _validation = { @@ -218,11 +228,15 @@ class EventSourceCommonProperties(ResourceProperties): 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, 'timestamp_property_name': {'key': 'timestampPropertyName', 'type': 'str'}, + 'type': {'key': 'ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'ingressStartAt.time', 'type': 'str'}, } def __init__(self, **kwargs): super(EventSourceCommonProperties, self).__init__(**kwargs) self.timestamp_property_name = kwargs.get('timestamp_property_name', None) + self.type = kwargs.get('type', None) + self.time = kwargs.get('time', None) class AzureEventSourceProperties(EventSourceCommonProperties): @@ -246,6 +260,16 @@ class AzureEventSourceProperties(EventSourceCommonProperties): timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. :type timestamp_property_name: str + :param type: The type of the ingressStartAt, It can be + "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". + Possible values include: 'EarliestAvailable', 'EventSourceCreationTime', + 'CustomEnqueuedTime' + :type type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: str :param event_source_resource_id: Required. The resource id of the event source in Azure Resource Manager. :type event_source_resource_id: str @@ -260,6 +284,8 @@ class AzureEventSourceProperties(EventSourceCommonProperties): 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, 'timestamp_property_name': {'key': 'timestampPropertyName', 'type': 'str'}, + 'type': {'key': 'ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'ingressStartAt.time', 'type': 'str'}, 'event_source_resource_id': {'key': 'eventSourceResourceId', 'type': 'str'}, } @@ -360,8 +386,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 +396,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 +417,7 @@ class EnvironmentCreateOrUpdateParameters(CreateOrUpdateTrackedResourcePropertie } _subtype_map = { - 'kind': {'Standard': 'StandardEnvironmentCreateOrUpdateParameters', 'LongTerm': 'LongTermEnvironmentCreateOrUpdateParameters'} + 'kind': {'Gen1': 'Gen1EnvironmentCreateOrUpdateParameters', 'Gen2': 'Gen2EnvironmentCreateOrUpdateParameters'} } def __init__(self, **kwargs): @@ -465,7 +490,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 +508,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 +535,7 @@ class EnvironmentResource(TrackedResource): } _subtype_map = { - 'kind': {'Standard': 'StandardEnvironmentResource', 'LongTerm': 'LongTermEnvironmentResource'} + 'kind': {'Gen1': 'Gen1EnvironmentResource', 'Gen2': 'Gen2EnvironmentResource'} } def __init__(self, **kwargs): @@ -618,17 +642,35 @@ def __init__(self, **kwargs): class EnvironmentUpdateParameters(Model): """Parameters supplied to the Update Environment operation. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Gen1EnvironmentUpdateParameters, + Gen2EnvironmentUpdateParameters + + All required parameters must be populated in order to send to Azure. + :param tags: Key-value pairs of additional properties for the environment. :type tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str """ + _validation = { + 'kind': {'required': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Gen1': 'Gen1EnvironmentUpdateParameters', 'Gen2': 'Gen2EnvironmentUpdateParameters'} } def __init__(self, **kwargs): super(EnvironmentUpdateParameters, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) + self.kind = None class EventHubEventSourceCommonProperties(AzureEventSourceProperties): @@ -651,6 +693,16 @@ class EventHubEventSourceCommonProperties(AzureEventSourceProperties): timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. :type timestamp_property_name: str + :param type: The type of the ingressStartAt, It can be + "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". + Possible values include: 'EarliestAvailable', 'EventSourceCreationTime', + 'CustomEnqueuedTime' + :type type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: str :param event_source_resource_id: Required. The resource id of the event source in Azure Resource Manager. :type event_source_resource_id: str @@ -681,6 +733,8 @@ class EventHubEventSourceCommonProperties(AzureEventSourceProperties): 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, 'timestamp_property_name': {'key': 'timestampPropertyName', 'type': 'str'}, + 'type': {'key': 'ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'ingressStartAt.time', 'type': 'str'}, 'event_source_resource_id': {'key': 'eventSourceResourceId', 'type': 'str'}, 'service_bus_namespace': {'key': 'serviceBusNamespace', 'type': 'str'}, 'event_hub_name': {'key': 'eventHubName', 'type': 'str'}, @@ -709,6 +763,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 +782,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 +792,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 +810,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 @@ -761,6 +831,16 @@ class EventHubEventSourceCreateOrUpdateParameters(EventSourceCreateOrUpdateParam timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. :type timestamp_property_name: str + :param type: The type of the ingressStartAt, It can be + "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". + Possible values include: 'EarliestAvailable', 'EventSourceCreationTime', + 'CustomEnqueuedTime' + :type type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: str :param event_source_resource_id: Required. The resource id of the event source in Azure Resource Manager. :type event_source_resource_id: str @@ -797,10 +877,13 @@ 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'}, 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, + 'type': {'key': 'properties.ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'properties.ingressStartAt.time', 'type': 'str'}, 'event_source_resource_id': {'key': 'properties.eventSourceResourceId', 'type': 'str'}, 'service_bus_namespace': {'key': 'properties.serviceBusNamespace', 'type': 'str'}, 'event_hub_name': {'key': 'properties.eventHubName', 'type': 'str'}, @@ -814,6 +897,8 @@ def __init__(self, **kwargs): self.provisioning_state = kwargs.get('provisioning_state', None) self.creation_time = None self.timestamp_property_name = kwargs.get('timestamp_property_name', None) + self.type = kwargs.get('type', None) + self.time = kwargs.get('time', None) self.event_source_resource_id = kwargs.get('event_source_resource_id', None) self.service_bus_namespace = kwargs.get('service_bus_namespace', None) self.event_hub_name = kwargs.get('event_hub_name', None) @@ -868,7 +953,7 @@ class EventSourceResource(TrackedResource): } _subtype_map = { - 'kind': {'Microsoft.EventHub': 'EventHubEventSourceResource', 'Microsoft.IotHub': 'IoTHubEventSourceResource'} + 'kind': {'Microsoft.EventHub': 'EventHubEventSourceResource', 'Microsoft.IoTHub': 'IoTHubEventSourceResource'} } def __init__(self, **kwargs): @@ -909,6 +994,16 @@ class EventHubEventSourceResource(EventSourceResource): timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. :type timestamp_property_name: str + :param event_hub_event_source_resource_type: The type of the + ingressStartAt, It can be "EarliestAvailable", "EventSourceCreationTime", + "CustomEnqueuedTime". Possible values include: 'EarliestAvailable', + 'EventSourceCreationTime', 'CustomEnqueuedTime' + :type event_hub_event_source_resource_type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: str :param event_source_resource_id: Required. The resource id of the event source in Azure Resource Manager. :type event_source_resource_id: str @@ -950,6 +1045,8 @@ class EventHubEventSourceResource(EventSourceResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, + 'event_hub_event_source_resource_type': {'key': 'properties.ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'properties.ingressStartAt.time', 'type': 'str'}, 'event_source_resource_id': {'key': 'properties.eventSourceResourceId', 'type': 'str'}, 'service_bus_namespace': {'key': 'properties.serviceBusNamespace', 'type': 'str'}, 'event_hub_name': {'key': 'properties.eventHubName', 'type': 'str'}, @@ -962,6 +1059,8 @@ def __init__(self, **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_hub_event_source_resource_type = kwargs.get('event_hub_event_source_resource_type', None) + self.time = kwargs.get('time', None) self.event_source_resource_id = kwargs.get('event_source_resource_id', None) self.service_bus_namespace = kwargs.get('service_bus_namespace', None) self.event_hub_name = kwargs.get('event_hub_name', None) @@ -973,27 +1072,49 @@ def __init__(self, **kwargs): class EventSourceUpdateParameters(Model): """Parameters supplied to the Update Event Source operation. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EventHubEventSourceUpdateParameters, + IoTHubEventSourceUpdateParameters + + All required parameters must be populated in order to send to Azure. + :param tags: Key-value pairs of additional properties for the event source. :type tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str """ + _validation = { + 'kind': {'required': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Microsoft.EventHub': 'EventHubEventSourceUpdateParameters', 'Microsoft.IoTHub': 'IoTHubEventSourceUpdateParameters'} } def __init__(self, **kwargs): super(EventSourceUpdateParameters, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) + self.kind = None class EventHubEventSourceUpdateParameters(EventSourceUpdateParameters): """Parameters supplied to the Update Event Source operation to update an EventHub event source. + All required parameters must be populated in order to send to Azure. + :param tags: Key-value pairs of additional properties for the event source. :type tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: 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 @@ -1012,8 +1133,13 @@ class EventHubEventSourceUpdateParameters(EventSourceUpdateParameters): :type shared_access_key: str """ + _validation = { + 'kind': {'required': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', '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'}, @@ -1024,6 +1150,7 @@ def __init__(self, **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) + self.kind = 'Microsoft.EventHub' class EventSourceListResponse(Model): @@ -1072,96 +1199,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 +1209,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,32 +1280,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 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 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 """ _validation = { @@ -1290,12 +1322,11 @@ class IoTHubEventSourceResource(EventSourceResource): 'name': {'readonly': True}, 'type': {'readonly': True}, '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}, + 'data_retention_time': {'required': True}, + 'data_access_id': {'readonly': True}, + 'data_access_fqdn': {'readonly': True}, } _attribute_map = { @@ -1304,122 +1335,76 @@ 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'}, - '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'}, + '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'}, } 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'}, - } + 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.kind = 'Gen1' - 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 Gen1EnvironmentUpdateParameters(EnvironmentUpdateParameters): + """Parameters supplied to the Update Environment operation to update a Gen1 + environment. -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. + All required parameters must be populated in order to send to Azure. - :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 + :param tags: Key-value pairs of additional properties for the environment. + :type tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: 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 = { - 'format': {'key': 'format', 'type': 'str'}, - 'time_zone_offset': {'key': 'timeZoneOffset', 'type': 'LocalTimestampTimeZoneOffset'}, + _validation = { + 'kind': {'required': True}, } - 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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', '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) + self.kind = 'Gen1' -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 +1413,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 +1427,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 +1441,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 +1449,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,12 +1482,18 @@ 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 + :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 :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. @@ -1515,13 +1505,6 @@ class LongTermEnvironmentResource(EnvironmentResource): :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 :param time_series_id_properties: Required. The list of event properties which will be used to define the environment's time series id. :type time_series_id_properties: @@ -1531,11 +1514,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 = { @@ -1545,12 +1529,11 @@ class LongTermEnvironmentResource(EnvironmentResource): 'location': {'required': True}, 'sku': {'required': True}, 'kind': {'required': True}, + 'creation_time': {'readonly': True}, 'data_access_id': {'readonly': True}, 'data_access_fqdn': {'readonly': True}, - 'creation_time': {'readonly': True}, 'time_series_id_properties': {'required': True}, 'storage_configuration': {'required': True}, - 'data_retention': {'required': True}, } _attribute_map = { @@ -1561,66 +1544,71 @@ class LongTermEnvironmentResource(EnvironmentResource): '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'}, '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'}, '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.provisioning_state = kwargs.get('provisioning_state', None) + self.creation_time = 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.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. +class Gen2EnvironmentUpdateParameters(EnvironmentUpdateParameters): + """Parameters supplied to the Update Environment operation to update a Gen2 + environment. All required parameters must be populated in order to send to Azure. :param tags: Key-value pairs of additional properties for the environment. :type tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str :param storage_configuration: 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. :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}, + 'kind': {'required': True}, } _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'storage_configuration': {'key': 'properties.storageConfiguration', 'type': 'LongTermStorageConfigurationMutableProperties'}, - 'data_retention': {'key': 'properties.warmStoreConfiguration.dataRetention', 'type': 'duration'}, + 'kind': {'key': 'kind', 'type': 'str'}, + '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) + self.kind = 'Gen2' -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 +1616,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 +1635,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 +1653,443 @@ 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 type: The type of the ingressStartAt, It can be + "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". + Possible values include: 'EarliestAvailable', 'EventSourceCreationTime', + 'CustomEnqueuedTime' + :type type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: 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'}, + 'type': {'key': 'ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'ingressStartAt.time', '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 type: The type of the ingressStartAt, It can be + "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". + Possible values include: 'EarliestAvailable', 'EventSourceCreationTime', + 'CustomEnqueuedTime' + :type type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: 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'}, + 'type': {'key': 'properties.ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'properties.ingressStartAt.time', '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.type = kwargs.get('type', None) + self.time = kwargs.get('time', 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 io_thub_event_source_resource_type: The type of the ingressStartAt, + It can be "EarliestAvailable", "EventSourceCreationTime", + "CustomEnqueuedTime". Possible values include: 'EarliestAvailable', + 'EventSourceCreationTime', 'CustomEnqueuedTime' + :type io_thub_event_source_resource_type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: 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'}, + 'io_thub_event_source_resource_type': {'key': 'properties.ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'properties.ingressStartAt.time', '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.io_thub_event_source_resource_type = kwargs.get('io_thub_event_source_resource_type', None) + self.time = kwargs.get('time', 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. + + All required parameters must be populated in order to send to Azure. + + :param tags: Key-value pairs of additional properties for the event + source. + :type tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: 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 + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', '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) + self.kind = 'Microsoft.IoTHub' + + +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 +2332,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 +2363,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 +2418,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..57e4f0d9f2ad 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 @@ -208,6 +208,16 @@ class EventSourceCommonProperties(ResourceProperties): timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. :type timestamp_property_name: str + :param type: The type of the ingressStartAt, It can be + "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". + Possible values include: 'EarliestAvailable', 'EventSourceCreationTime', + 'CustomEnqueuedTime' + :type type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: str """ _validation = { @@ -218,11 +228,15 @@ class EventSourceCommonProperties(ResourceProperties): 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, 'timestamp_property_name': {'key': 'timestampPropertyName', 'type': 'str'}, + 'type': {'key': 'ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'ingressStartAt.time', 'type': 'str'}, } - def __init__(self, *, provisioning_state=None, timestamp_property_name: str=None, **kwargs) -> None: + def __init__(self, *, provisioning_state=None, timestamp_property_name: str=None, type=None, time: str=None, **kwargs) -> None: super(EventSourceCommonProperties, self).__init__(provisioning_state=provisioning_state, **kwargs) self.timestamp_property_name = timestamp_property_name + self.type = type + self.time = time class AzureEventSourceProperties(EventSourceCommonProperties): @@ -246,6 +260,16 @@ class AzureEventSourceProperties(EventSourceCommonProperties): timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. :type timestamp_property_name: str + :param type: The type of the ingressStartAt, It can be + "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". + Possible values include: 'EarliestAvailable', 'EventSourceCreationTime', + 'CustomEnqueuedTime' + :type type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: str :param event_source_resource_id: Required. The resource id of the event source in Azure Resource Manager. :type event_source_resource_id: str @@ -260,11 +284,13 @@ class AzureEventSourceProperties(EventSourceCommonProperties): 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, 'timestamp_property_name': {'key': 'timestampPropertyName', 'type': 'str'}, + 'type': {'key': 'ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'ingressStartAt.time', 'type': 'str'}, 'event_source_resource_id': {'key': 'eventSourceResourceId', 'type': 'str'}, } - def __init__(self, *, event_source_resource_id: str, provisioning_state=None, timestamp_property_name: str=None, **kwargs) -> None: - super(AzureEventSourceProperties, self).__init__(provisioning_state=provisioning_state, timestamp_property_name=timestamp_property_name, **kwargs) + def __init__(self, *, event_source_resource_id: str, provisioning_state=None, timestamp_property_name: str=None, type=None, time: str=None, **kwargs) -> None: + super(AzureEventSourceProperties, self).__init__(provisioning_state=provisioning_state, timestamp_property_name=timestamp_property_name, type=type, time=time, **kwargs) self.event_source_resource_id = event_source_resource_id @@ -360,8 +386,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 +396,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 +417,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 +490,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 +508,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 +535,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: @@ -618,17 +642,35 @@ def __init__(self, *, ingress=None, warm_storage=None, **kwargs) -> None: class EnvironmentUpdateParameters(Model): """Parameters supplied to the Update Environment operation. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Gen1EnvironmentUpdateParameters, + Gen2EnvironmentUpdateParameters + + All required parameters must be populated in order to send to Azure. + :param tags: Key-value pairs of additional properties for the environment. :type tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str """ + _validation = { + 'kind': {'required': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Gen1': 'Gen1EnvironmentUpdateParameters', 'Gen2': 'Gen2EnvironmentUpdateParameters'} } def __init__(self, *, tags=None, **kwargs) -> None: super(EnvironmentUpdateParameters, self).__init__(**kwargs) self.tags = tags + self.kind = None class EventHubEventSourceCommonProperties(AzureEventSourceProperties): @@ -651,6 +693,16 @@ class EventHubEventSourceCommonProperties(AzureEventSourceProperties): timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. :type timestamp_property_name: str + :param type: The type of the ingressStartAt, It can be + "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". + Possible values include: 'EarliestAvailable', 'EventSourceCreationTime', + 'CustomEnqueuedTime' + :type type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: str :param event_source_resource_id: Required. The resource id of the event source in Azure Resource Manager. :type event_source_resource_id: str @@ -681,6 +733,8 @@ class EventHubEventSourceCommonProperties(AzureEventSourceProperties): 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, 'timestamp_property_name': {'key': 'timestampPropertyName', 'type': 'str'}, + 'type': {'key': 'ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'ingressStartAt.time', 'type': 'str'}, 'event_source_resource_id': {'key': 'eventSourceResourceId', 'type': 'str'}, 'service_bus_namespace': {'key': 'serviceBusNamespace', 'type': 'str'}, 'event_hub_name': {'key': 'eventHubName', 'type': 'str'}, @@ -688,8 +742,8 @@ class EventHubEventSourceCommonProperties(AzureEventSourceProperties): 'key_name': {'key': 'keyName', 'type': 'str'}, } - def __init__(self, *, event_source_resource_id: str, service_bus_namespace: str, event_hub_name: str, consumer_group_name: str, key_name: str, provisioning_state=None, timestamp_property_name: str=None, **kwargs) -> None: - super(EventHubEventSourceCommonProperties, self).__init__(provisioning_state=provisioning_state, timestamp_property_name=timestamp_property_name, event_source_resource_id=event_source_resource_id, **kwargs) + def __init__(self, *, event_source_resource_id: str, service_bus_namespace: str, event_hub_name: str, consumer_group_name: str, key_name: str, provisioning_state=None, timestamp_property_name: str=None, type=None, time: str=None, **kwargs) -> None: + super(EventHubEventSourceCommonProperties, self).__init__(provisioning_state=provisioning_state, timestamp_property_name=timestamp_property_name, type=type, time=time, event_source_resource_id=event_source_resource_id, **kwargs) self.service_bus_namespace = service_bus_namespace self.event_hub_name = event_hub_name self.consumer_group_name = consumer_group_name @@ -709,6 +763,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 +782,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 +790,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 +810,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 @@ -761,6 +831,16 @@ class EventHubEventSourceCreateOrUpdateParameters(EventSourceCreateOrUpdateParam timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. :type timestamp_property_name: str + :param type: The type of the ingressStartAt, It can be + "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". + Possible values include: 'EarliestAvailable', 'EventSourceCreationTime', + 'CustomEnqueuedTime' + :type type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: str :param event_source_resource_id: Required. The resource id of the event source in Azure Resource Manager. :type event_source_resource_id: str @@ -797,10 +877,13 @@ 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'}, 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, + 'type': {'key': 'properties.ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'properties.ingressStartAt.time', 'type': 'str'}, 'event_source_resource_id': {'key': 'properties.eventSourceResourceId', 'type': 'str'}, 'service_bus_namespace': {'key': 'properties.serviceBusNamespace', 'type': 'str'}, 'event_hub_name': {'key': 'properties.eventHubName', 'type': 'str'}, @@ -809,11 +892,13 @@ 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, type=None, time: 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 + self.type = type + self.time = time self.event_source_resource_id = event_source_resource_id self.service_bus_namespace = service_bus_namespace self.event_hub_name = event_hub_name @@ -868,7 +953,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: @@ -909,6 +994,16 @@ class EventHubEventSourceResource(EventSourceResource): timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. :type timestamp_property_name: str + :param event_hub_event_source_resource_type: The type of the + ingressStartAt, It can be "EarliestAvailable", "EventSourceCreationTime", + "CustomEnqueuedTime". Possible values include: 'EarliestAvailable', + 'EventSourceCreationTime', 'CustomEnqueuedTime' + :type event_hub_event_source_resource_type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: str :param event_source_resource_id: Required. The resource id of the event source in Azure Resource Manager. :type event_source_resource_id: str @@ -950,6 +1045,8 @@ class EventHubEventSourceResource(EventSourceResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 'timestamp_property_name': {'key': 'properties.timestampPropertyName', 'type': 'str'}, + 'event_hub_event_source_resource_type': {'key': 'properties.ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'properties.ingressStartAt.time', 'type': 'str'}, 'event_source_resource_id': {'key': 'properties.eventSourceResourceId', 'type': 'str'}, 'service_bus_namespace': {'key': 'properties.serviceBusNamespace', 'type': 'str'}, 'event_hub_name': {'key': 'properties.eventHubName', 'type': 'str'}, @@ -957,11 +1054,13 @@ class EventHubEventSourceResource(EventSourceResource): 'key_name': {'key': 'properties.keyName', '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, tags=None, provisioning_state=None, timestamp_property_name: str=None, **kwargs) -> None: + 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, tags=None, provisioning_state=None, timestamp_property_name: str=None, event_hub_event_source_resource_type=None, time: str=None, **kwargs) -> None: super(EventHubEventSourceResource, 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_hub_event_source_resource_type = event_hub_event_source_resource_type + self.time = time self.event_source_resource_id = event_source_resource_id self.service_bus_namespace = service_bus_namespace self.event_hub_name = event_hub_name @@ -973,27 +1072,49 @@ def __init__(self, *, location: str, event_source_resource_id: str, service_bus_ class EventSourceUpdateParameters(Model): """Parameters supplied to the Update Event Source operation. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EventHubEventSourceUpdateParameters, + IoTHubEventSourceUpdateParameters + + All required parameters must be populated in order to send to Azure. + :param tags: Key-value pairs of additional properties for the event source. :type tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str """ + _validation = { + 'kind': {'required': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Microsoft.EventHub': 'EventHubEventSourceUpdateParameters', 'Microsoft.IoTHub': 'IoTHubEventSourceUpdateParameters'} } def __init__(self, *, tags=None, **kwargs) -> None: super(EventSourceUpdateParameters, self).__init__(**kwargs) self.tags = tags + self.kind = None class EventHubEventSourceUpdateParameters(EventSourceUpdateParameters): """Parameters supplied to the Update Event Source operation to update an EventHub event source. + All required parameters must be populated in order to send to Azure. + :param tags: Key-value pairs of additional properties for the event source. :type tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: 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 @@ -1012,8 +1133,13 @@ class EventHubEventSourceUpdateParameters(EventSourceUpdateParameters): :type shared_access_key: str """ + _validation = { + 'kind': {'required': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', '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'}, @@ -1024,6 +1150,7 @@ def __init__(self, *, tags=None, timestamp_property_name: str=None, local_timest self.timestamp_property_name = timestamp_property_name self.local_timestamp = local_timestamp self.shared_access_key = shared_access_key + self.kind = 'Microsoft.EventHub' class EventSourceListResponse(Model): @@ -1072,96 +1199,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 +1209,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,32 +1280,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 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 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 """ _validation = { @@ -1290,12 +1322,11 @@ class IoTHubEventSourceResource(EventSourceResource): 'name': {'readonly': True}, 'type': {'readonly': True}, '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}, + 'data_retention_time': {'required': True}, + 'data_access_id': {'readonly': True}, + 'data_access_fqdn': {'readonly': True}, } _attribute_map = { @@ -1304,122 +1335,76 @@ 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'}, - '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'}, + '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'}, } - 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, *, location: str, sku, data_retention_time, tags=None, storage_limit_exceeded_behavior=None, partition_key_properties=None, status=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.kind = 'Gen1' - 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 Gen1EnvironmentUpdateParameters(EnvironmentUpdateParameters): + """Parameters supplied to the Update Environment operation to update a Gen1 + environment. -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. + All required parameters must be populated in order to send to Azure. - :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 + :param tags: Key-value pairs of additional properties for the environment. + :type tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: 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 = { - 'format': {'key': 'format', 'type': 'str'}, - 'time_zone_offset': {'key': 'timeZoneOffset', 'type': 'LocalTimestampTimeZoneOffset'}, + _validation = { + 'kind': {'required': True}, } - 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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', '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 + self.kind = 'Gen1' -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 +1413,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 +1427,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 +1441,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 +1449,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,12 +1482,18 @@ 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 + :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 :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. @@ -1515,13 +1505,6 @@ class LongTermEnvironmentResource(EnvironmentResource): :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 :param time_series_id_properties: Required. The list of event properties which will be used to define the environment's time series id. :type time_series_id_properties: @@ -1531,11 +1514,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 = { @@ -1545,12 +1529,11 @@ class LongTermEnvironmentResource(EnvironmentResource): 'location': {'required': True}, 'sku': {'required': True}, 'kind': {'required': True}, + 'creation_time': {'readonly': True}, 'data_access_id': {'readonly': True}, 'data_access_fqdn': {'readonly': True}, - 'creation_time': {'readonly': True}, 'time_series_id_properties': {'required': True}, 'storage_configuration': {'required': True}, - 'data_retention': {'required': True}, } _attribute_map = { @@ -1561,66 +1544,71 @@ class LongTermEnvironmentResource(EnvironmentResource): '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'}, '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'}, '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, provisioning_state=None, status=None, warm_store_configuration=None, **kwargs) -> None: + super(Gen2EnvironmentResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.provisioning_state = provisioning_state + self.creation_time = None self.data_access_id = None self.data_access_fqdn = None self.status = status - self.provisioning_state = provisioning_state - 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. +class Gen2EnvironmentUpdateParameters(EnvironmentUpdateParameters): + """Parameters supplied to the Update Environment operation to update a Gen2 + environment. All required parameters must be populated in order to send to Azure. :param tags: Key-value pairs of additional properties for the environment. :type tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str :param storage_configuration: 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. :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}, + 'kind': {'required': True}, } _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'storage_configuration': {'key': 'properties.storageConfiguration', 'type': 'LongTermStorageConfigurationMutableProperties'}, - 'data_retention': {'key': 'properties.warmStoreConfiguration.dataRetention', 'type': 'duration'}, + 'kind': {'key': 'kind', 'type': 'str'}, + '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 + self.kind = 'Gen2' -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 +1616,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 +1635,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 +1653,443 @@ 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 type: The type of the ingressStartAt, It can be + "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". + Possible values include: 'EarliestAvailable', 'EventSourceCreationTime', + 'CustomEnqueuedTime' + :type type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: 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'}, + 'type': {'key': 'ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'ingressStartAt.time', '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, type=None, time: str=None, **kwargs) -> None: + super(IoTHubEventSourceCommonProperties, self).__init__(provisioning_state=provisioning_state, timestamp_property_name=timestamp_property_name, type=type, time=time, 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 type: The type of the ingressStartAt, It can be + "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". + Possible values include: 'EarliestAvailable', 'EventSourceCreationTime', + 'CustomEnqueuedTime' + :type type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: 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'}, + 'type': {'key': 'properties.ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'properties.ingressStartAt.time', '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, type=None, time: 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.type = type + self.time = time + 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 io_thub_event_source_resource_type: The type of the ingressStartAt, + It can be "EarliestAvailable", "EventSourceCreationTime", + "CustomEnqueuedTime". Possible values include: 'EarliestAvailable', + 'EventSourceCreationTime', 'CustomEnqueuedTime' + :type io_thub_event_source_resource_type: str or + ~azure.mgmt.timeseriesinsights.models.IngressStartAtType + :param time: ISO8601 UTC datetime with seconds precision (milliseconds are + optional), specifying the date and time that will be the starting point + for Events to be consumed. + :type time: 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'}, + 'io_thub_event_source_resource_type': {'key': 'properties.ingressStartAt.type', 'type': 'str'}, + 'time': {'key': 'properties.ingressStartAt.time', '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, io_thub_event_source_resource_type=None, time: 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.io_thub_event_source_resource_type = io_thub_event_source_resource_type + self.time = time + 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. + + All required parameters must be populated in order to send to Azure. + + :param tags: Key-value pairs of additional properties for the event + source. + :type tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: 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 + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', '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 + self.kind = 'Microsoft.IoTHub' + + +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 +2332,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 +2363,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 +2418,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..1df7eaa1011d 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 @@ -57,11 +57,16 @@ class WarmStoragePropertiesState(str, Enum): unknown = "Unknown" +class IngressStartAtType(str, Enum): + + earliest_available = "EarliestAvailable" + event_source_creation_time = "EventSourceCreationTime" + custom_enqueued_time = "CustomEnqueuedTime" + + 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..aedc25621c23 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,7 @@ 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, environment_update_parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.update.metadata['url'] path_format_arguments = { @@ -242,7 +242,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 +265,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, environment_update_parameters, 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 +274,10 @@ 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 environment_update_parameters: Request object that contains the + updated information for the environment. + :type environment_update_parameters: + ~azure.mgmt.timeseriesinsights.models.EnvironmentUpdateParameters :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 +294,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, + environment_update_parameters=environment_update_parameters, 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..150e124411e7 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 @@ -181,7 +181,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}/eventSources/{eventSourceName}'} def update( - self, resource_group_name, environment_name, event_source_name, tags=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, environment_name, event_source_name, event_source_update_parameters, custom_headers=None, raw=False, **operation_config): """Updates the event source with the specified name in the specified subscription, resource group, and environment. @@ -193,9 +193,10 @@ def update( :param event_source_name: The name of the Time Series Insights event source associated with the specified environment. :type event_source_name: str - :param tags: Key-value pairs of additional properties for the event - source. - :type tags: dict[str, str] + :param event_source_update_parameters: Request object that contains + the updated information for the event source. + :type event_source_update_parameters: + ~azure.mgmt.timeseriesinsights.models.EventSourceUpdateParameters :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -206,8 +207,6 @@ def update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - event_source_update_parameters = models.EventSourceUpdateParameters(tags=tags) - # Construct URL url = self.update.metadata['url'] path_format_arguments = { 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