diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py index fbe07e66cddc..826978d02732 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py @@ -53,7 +53,7 @@ def __init__( super(IotHubClient, 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 = '2019-03-22-preview' + self.api_version = '2019-03-22' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py index 855c564865d3..f8f8179d170c 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py @@ -19,7 +19,6 @@ from ._models_py3 import CertificateWithNonceDescription from ._models_py3 import CloudToDeviceProperties from ._models_py3 import EndpointHealthData - from ._models_py3 import EnrichmentProperties from ._models_py3 import ErrorDetails, ErrorDetailsException from ._models_py3 import EventHubConsumerGroupInfo from ._models_py3 import EventHubProperties @@ -33,7 +32,6 @@ from ._models_py3 import IotHubLocationDescription from ._models_py3 import IotHubNameAvailabilityInfo from ._models_py3 import IotHubProperties - from ._models_py3 import IotHubPropertiesDeviceStreams from ._models_py3 import IotHubQuotaMetricInfo from ._models_py3 import IotHubSkuDescription from ._models_py3 import IotHubSkuInfo @@ -80,7 +78,6 @@ from ._models import CertificateWithNonceDescription from ._models import CloudToDeviceProperties from ._models import EndpointHealthData - from ._models import EnrichmentProperties from ._models import ErrorDetails, ErrorDetailsException from ._models import EventHubConsumerGroupInfo from ._models import EventHubProperties @@ -94,7 +91,6 @@ from ._models import IotHubLocationDescription from ._models import IotHubNameAvailabilityInfo from ._models import IotHubProperties - from ._models import IotHubPropertiesDeviceStreams from ._models import IotHubQuotaMetricInfo from ._models import IotHubSkuDescription from ._models import IotHubSkuInfo @@ -166,7 +162,6 @@ 'CertificateWithNonceDescription', 'CloudToDeviceProperties', 'EndpointHealthData', - 'EnrichmentProperties', 'ErrorDetails', 'ErrorDetailsException', 'EventHubConsumerGroupInfo', 'EventHubProperties', @@ -180,7 +175,6 @@ 'IotHubLocationDescription', 'IotHubNameAvailabilityInfo', 'IotHubProperties', - 'IotHubPropertiesDeviceStreams', 'IotHubQuotaMetricInfo', 'IotHubSkuDescription', 'IotHubSkuInfo', diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py index 19da905a3803..1fc6535253fa 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py @@ -330,40 +330,6 @@ def __init__(self, **kwargs): self.health_status = kwargs.get('health_status', None) -class EnrichmentProperties(Model): - """The properties of an enrichment that your IoT hub applies to messages - delivered to endpoints. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key or name for the enrichment property. - :type key: str - :param value: Required. The value for the enrichment property. - :type value: str - :param endpoint_names: Required. The list of endpoints for which the - enrichment is applied to the message. - :type endpoint_names: list[str] - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - 'endpoint_names': {'required': True, 'min_items': 1}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(EnrichmentProperties, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - self.endpoint_names = kwargs.get('endpoint_names', None) - - class ErrorDetails(Model): """Error details. @@ -811,9 +777,12 @@ class IotHubLocationDescription(Model): """Public representation of one of the locations where a resource is provisioned. - :param location: Azure Geo Regions + :param location: The name of the Azure region :type location: str - :param role: Specific Role assigned to this location. Possible values + :param role: The role of the region, can be either primary or secondary. + The primary region is where the IoT hub is currently provisioned. The + secondary region is the the Azure disaster recovery (DR) paired region and + also the region where the IoT hub can failover to. Possible values include: 'primary', 'secondary' :type role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType """ @@ -909,9 +878,6 @@ class IotHubProperties(Model): :type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties :param comments: IoT hub comments. :type comments: str - :param device_streams: The device streams properties of iothub. - :type device_streams: - ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams :param features: The capabilities and features enabled for the IoT hub. Possible values include: 'None', 'DeviceManagement' :type features: str or ~azure.mgmt.iothub.models.Capabilities @@ -940,7 +906,6 @@ class IotHubProperties(Model): 'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'}, 'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'}, 'comments': {'key': 'comments', 'type': 'str'}, - 'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'}, 'features': {'key': 'features', 'type': 'str'}, 'locations': {'key': 'locations', 'type': '[IotHubLocationDescription]'}, } @@ -959,27 +924,10 @@ def __init__(self, **kwargs): self.enable_file_upload_notifications = kwargs.get('enable_file_upload_notifications', None) self.cloud_to_device = kwargs.get('cloud_to_device', None) self.comments = kwargs.get('comments', None) - self.device_streams = kwargs.get('device_streams', None) self.features = kwargs.get('features', None) self.locations = None -class IotHubPropertiesDeviceStreams(Model): - """The device streams properties of iothub. - - :param streaming_endpoints: List of Device Streams Endpoints. - :type streaming_endpoints: list[str] - """ - - _attribute_map = { - 'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs) - self.streaming_endpoints = kwargs.get('streaming_endpoints', None) - - class IotHubQuotaMetricInfo(Model): """Quota metrics properties. @@ -1615,17 +1563,12 @@ class RoutingProperties(Model): set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint. :type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties - :param enrichments: The list of user-provided enrichments that the IoT hub - applies to messages to be delivered to built-in and custom endpoints. See: - https://aka.ms/iotmsgenrich - :type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] """ _attribute_map = { 'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'}, 'routes': {'key': 'routes', 'type': '[RouteProperties]'}, 'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'}, - 'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'}, } def __init__(self, **kwargs): @@ -1633,7 +1576,6 @@ def __init__(self, **kwargs): self.endpoints = kwargs.get('endpoints', None) self.routes = kwargs.get('routes', None) self.fallback_route = kwargs.get('fallback_route', None) - self.enrichments = kwargs.get('enrichments', None) class RoutingServiceBusQueueEndpointProperties(Model): diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py index 7de261f3b8b3..d7b91821a091 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py @@ -330,40 +330,6 @@ def __init__(self, *, endpoint_id: str=None, health_status=None, **kwargs) -> No self.health_status = health_status -class EnrichmentProperties(Model): - """The properties of an enrichment that your IoT hub applies to messages - delivered to endpoints. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key or name for the enrichment property. - :type key: str - :param value: Required. The value for the enrichment property. - :type value: str - :param endpoint_names: Required. The list of endpoints for which the - enrichment is applied to the message. - :type endpoint_names: list[str] - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - 'endpoint_names': {'required': True, 'min_items': 1}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - } - - def __init__(self, *, key: str, value: str, endpoint_names, **kwargs) -> None: - super(EnrichmentProperties, self).__init__(**kwargs) - self.key = key - self.value = value - self.endpoint_names = endpoint_names - - class ErrorDetails(Model): """Error details. @@ -811,9 +777,12 @@ class IotHubLocationDescription(Model): """Public representation of one of the locations where a resource is provisioned. - :param location: Azure Geo Regions + :param location: The name of the Azure region :type location: str - :param role: Specific Role assigned to this location. Possible values + :param role: The role of the region, can be either primary or secondary. + The primary region is where the IoT hub is currently provisioned. The + secondary region is the the Azure disaster recovery (DR) paired region and + also the region where the IoT hub can failover to. Possible values include: 'primary', 'secondary' :type role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType """ @@ -909,9 +878,6 @@ class IotHubProperties(Model): :type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties :param comments: IoT hub comments. :type comments: str - :param device_streams: The device streams properties of iothub. - :type device_streams: - ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams :param features: The capabilities and features enabled for the IoT hub. Possible values include: 'None', 'DeviceManagement' :type features: str or ~azure.mgmt.iothub.models.Capabilities @@ -940,12 +906,11 @@ class IotHubProperties(Model): 'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'}, 'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'}, 'comments': {'key': 'comments', 'type': 'str'}, - 'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'}, 'features': {'key': 'features', 'type': 'str'}, 'locations': {'key': 'locations', 'type': '[IotHubLocationDescription]'}, } - def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_hub_endpoints=None, routing=None, storage_endpoints=None, messaging_endpoints=None, enable_file_upload_notifications: bool=None, cloud_to_device=None, comments: str=None, device_streams=None, features=None, **kwargs) -> None: + def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_hub_endpoints=None, routing=None, storage_endpoints=None, messaging_endpoints=None, enable_file_upload_notifications: bool=None, cloud_to_device=None, comments: str=None, features=None, **kwargs) -> None: super(IotHubProperties, self).__init__(**kwargs) self.authorization_policies = authorization_policies self.ip_filter_rules = ip_filter_rules @@ -959,27 +924,10 @@ def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_h self.enable_file_upload_notifications = enable_file_upload_notifications self.cloud_to_device = cloud_to_device self.comments = comments - self.device_streams = device_streams self.features = features self.locations = None -class IotHubPropertiesDeviceStreams(Model): - """The device streams properties of iothub. - - :param streaming_endpoints: List of Device Streams Endpoints. - :type streaming_endpoints: list[str] - """ - - _attribute_map = { - 'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'}, - } - - def __init__(self, *, streaming_endpoints=None, **kwargs) -> None: - super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs) - self.streaming_endpoints = streaming_endpoints - - class IotHubQuotaMetricInfo(Model): """Quota metrics properties. @@ -1615,25 +1563,19 @@ class RoutingProperties(Model): set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint. :type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties - :param enrichments: The list of user-provided enrichments that the IoT hub - applies to messages to be delivered to built-in and custom endpoints. See: - https://aka.ms/iotmsgenrich - :type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] """ _attribute_map = { 'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'}, 'routes': {'key': 'routes', 'type': '[RouteProperties]'}, 'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'}, - 'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'}, } - def __init__(self, *, endpoints=None, routes=None, fallback_route=None, enrichments=None, **kwargs) -> None: + def __init__(self, *, endpoints=None, routes=None, fallback_route=None, **kwargs) -> None: super(RoutingProperties, self).__init__(**kwargs) self.endpoints = endpoints self.routes = routes self.fallback_route = fallback_route - self.enrichments = enrichments class RoutingServiceBusQueueEndpointProperties(Model): diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py index aaade9ffcdee..2b2ff5b719a8 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py @@ -24,7 +24,7 @@ class CertificatesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". + :ivar api_version: The version of the API. Constant value: "2019-03-22". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-22-preview" + self.api_version = "2019-03-22" self.config = config diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py index 30830c6175c9..15c9943c0027 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py @@ -26,7 +26,7 @@ class IotHubOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". + :ivar api_version: The version of the API. Constant value: "2019-03-22". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-22-preview" + self.api_version = "2019-03-22" self.config = config @@ -84,13 +84,15 @@ def _manual_failover_initial( def manual_failover( self, iot_hub_name, resource_group_name, failover_region, custom_headers=None, raw=False, polling=True, **operation_config): - """Manual Failover Fail over. + """Manually initiate a failover for the IoT Hub to its secondary region. - Perform manual fail over of given hub. + Manually initiate a failover for the IoT Hub to its secondary region. + To learn more, see https://aka.ms/manualfailover. - :param iot_hub_name: IotHub to fail over + :param iot_hub_name: Name of the IoT hub to failover :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to + :param resource_group_name: Name of the resource group containing the + IoT hub resource :type resource_group_name: str :param failover_region: Region the hub will be failed over to :type failover_region: str diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py index 631ec6479d81..18a11b52b985 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py @@ -27,7 +27,7 @@ class IotHubResourceOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". + :ivar api_version: The version of the API. Constant value: "2019-03-22". """ 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 = "2019-03-22-preview" + self.api_version = "2019-03-22" self.config = config diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py index e05cdc550f92..86b6ce5e5c84 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py @@ -24,7 +24,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: The version of the API. Constant value: "2019-03-22-preview". + :ivar api_version: The version of the API. Constant value: "2019-03-22". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-22-preview" + self.api_version = "2019-03-22" self.config = config diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py index fe5f959b5b3c..2f9ce741aa34 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py @@ -24,7 +24,7 @@ class ResourceProviderCommonOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". + :ivar api_version: The version of the API. Constant value: "2019-03-22". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-22-preview" + self.api_version = "2019-03-22" self.config = config