diff --git a/azure-mgmt-signalr/HISTORY.rst b/azure-mgmt-signalr/HISTORY.rst index e2b8d8d1fcca..e0f1b31e6063 100644 --- a/azure-mgmt-signalr/HISTORY.rst +++ b/azure-mgmt-signalr/HISTORY.rst @@ -3,6 +3,17 @@ Release History =============== +0.1.1 (2018-09-04) +++++++++++++++++++ + +**Features** + +- Model SignalRKeys has a new parameter secondary_connection_string +- Model SignalRKeys has a new parameter primary_connection_string +- Model MetricSpecification has a new parameter dimensions +- Model SignalRResource has a new parameter version +- Added operation group UsagesOperations + 0.1.0 (2018-05-07) ++++++++++++++++++ diff --git a/azure-mgmt-signalr/README.rst b/azure-mgmt-signalr/README.rst index 400691184145..0af26cf550d7 100644 --- a/azure-mgmt-signalr/README.rst +++ b/azure-mgmt-signalr/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure SignalR Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,7 +37,7 @@ Usage ===== For code examples, see `SignalR -`__ +`__ on docs.microsoft.com. diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py index 6605edb1e93e..9ba920b7ea83 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py @@ -11,6 +11,7 @@ try: from .operation_display_py3 import OperationDisplay + from .dimension_py3 import Dimension from .metric_specification_py3 import MetricSpecification from .service_specification_py3 import ServiceSpecification from .operation_properties_py3 import OperationProperties @@ -26,8 +27,11 @@ from .regenerate_key_parameters_py3 import RegenerateKeyParameters from .signal_rcreate_parameters_py3 import SignalRCreateParameters from .signal_rupdate_parameters_py3 import SignalRUpdateParameters + from .signal_rusage_name_py3 import SignalRUsageName + from .signal_rusage_py3 import SignalRUsage except (SyntaxError, ImportError): from .operation_display import OperationDisplay + from .dimension import Dimension from .metric_specification import MetricSpecification from .service_specification import ServiceSpecification from .operation_properties import OperationProperties @@ -43,8 +47,11 @@ from .regenerate_key_parameters import RegenerateKeyParameters from .signal_rcreate_parameters import SignalRCreateParameters from .signal_rupdate_parameters import SignalRUpdateParameters + from .signal_rusage_name import SignalRUsageName + from .signal_rusage import SignalRUsage from .operation_paged import OperationPaged from .signal_rresource_paged import SignalRResourcePaged +from .signal_rusage_paged import SignalRUsagePaged from .signal_rmanagement_client_enums import ( SignalRSkuTier, ProvisioningState, @@ -53,6 +60,7 @@ __all__ = [ 'OperationDisplay', + 'Dimension', 'MetricSpecification', 'ServiceSpecification', 'OperationProperties', @@ -68,8 +76,11 @@ 'RegenerateKeyParameters', 'SignalRCreateParameters', 'SignalRUpdateParameters', + 'SignalRUsageName', + 'SignalRUsage', 'OperationPaged', 'SignalRResourcePaged', + 'SignalRUsagePaged', 'SignalRSkuTier', 'ProvisioningState', 'KeyType', diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension.py new file mode 100644 index 000000000000..b85f606bcf94 --- /dev/null +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Dimension(Model): + """Specifications of the Dimension of metrics. + + :param name: The public facing name of the dimension. + :type name: str + :param display_name: Localized friendly display name of the dimension. + :type display_name: str + :param internal_name: Name of the dimension as it appears in MDM. + :type internal_name: str + :param to_be_exported_for_shoebox: A Boolean flag indicating whether this + dimension should be included for the shoebox export scenario. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'internal_name': {'key': 'internalName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(Dimension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.internal_name = kwargs.get('internal_name', None) + self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension_py3.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension_py3.py new file mode 100644 index 000000000000..52390cd419c7 --- /dev/null +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Dimension(Model): + """Specifications of the Dimension of metrics. + + :param name: The public facing name of the dimension. + :type name: str + :param display_name: Localized friendly display name of the dimension. + :type display_name: str + :param internal_name: Name of the dimension as it appears in MDM. + :type internal_name: str + :param to_be_exported_for_shoebox: A Boolean flag indicating whether this + dimension should be included for the shoebox export scenario. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'internal_name': {'key': 'internalName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + super(Dimension, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.internal_name = internal_name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification.py index c54739236aef..1e36394f1aef 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification.py @@ -36,6 +36,8 @@ class MetricSpecification(Model): :param category: The name of the metric category that the metric belongs to. A metric can only belong to a single category. :type category: str + :param dimensions: The dimensions of the metrics. + :type dimensions: list[~azure.mgmt.signalr.models.Dimension] """ _attribute_map = { @@ -46,6 +48,7 @@ class MetricSpecification(Model): 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'str'}, 'category': {'key': 'category', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, } def __init__(self, **kwargs): @@ -57,3 +60,4 @@ def __init__(self, **kwargs): self.aggregation_type = kwargs.get('aggregation_type', None) self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) self.category = kwargs.get('category', None) + self.dimensions = kwargs.get('dimensions', None) diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification_py3.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification_py3.py index 21cc1d12a2e1..7ac715b718ca 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification_py3.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification_py3.py @@ -36,6 +36,8 @@ class MetricSpecification(Model): :param category: The name of the metric category that the metric belongs to. A metric can only belong to a single category. :type category: str + :param dimensions: The dimensions of the metrics. + :type dimensions: list[~azure.mgmt.signalr.models.Dimension] """ _attribute_map = { @@ -46,9 +48,10 @@ class MetricSpecification(Model): 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'str'}, 'category': {'key': 'category', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, } - def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, fill_gap_with_zero: str=None, category: str=None, **kwargs) -> None: + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, fill_gap_with_zero: str=None, category: str=None, dimensions=None, **kwargs) -> None: super(MetricSpecification, self).__init__(**kwargs) self.name = name self.display_name = display_name @@ -57,3 +60,4 @@ def __init__(self, *, name: str=None, display_name: str=None, display_descriptio self.aggregation_type = aggregation_type self.fill_gap_with_zero = fill_gap_with_zero self.category = category + self.dimensions = dimensions diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku.py index 18cebb3dcfa9..40cd5e688ad4 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku.py @@ -20,8 +20,9 @@ class ResourceSku(Model): :param name: Required. The name of the SKU. This is typically a letter + number code, such as A0 or P3. Required (if sku is specified) :type name: str - :param tier: The tier of this particular SKU. Optional. Possible values - include: 'Free', 'Basic', 'Premium' + :param tier: Optional tier of this particular SKU. `Basic` is deprecated, + use `Standard` instead for Basic tier. Possible values include: 'Free', + 'Basic', 'Standard', 'Premium' :type tier: str or ~azure.mgmt.signalr.models.SignalRSkuTier :param size: Optional, string. When the name field is the combination of tier and some other value, this would be the standalone code. diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku_py3.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku_py3.py index fb2ead5223c3..1c0da513ec89 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku_py3.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku_py3.py @@ -20,8 +20,9 @@ class ResourceSku(Model): :param name: Required. The name of the SKU. This is typically a letter + number code, such as A0 or P3. Required (if sku is specified) :type name: str - :param tier: The tier of this particular SKU. Optional. Possible values - include: 'Free', 'Basic', 'Premium' + :param tier: Optional tier of this particular SKU. `Basic` is deprecated, + use `Standard` instead for Basic tier. Possible values include: 'Free', + 'Basic', 'Standard', 'Premium' :type tier: str or ~azure.mgmt.signalr.models.SignalRSkuTier :param size: Optional, string. When the name field is the combination of tier and some other value, this would be the standalone code. diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters_py3.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters_py3.py index f58bd64a8877..23a3a44488cc 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters_py3.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .signal_rupdate_parameters import SignalRUpdateParameters +from .signal_rupdate_parameters_py3 import SignalRUpdateParameters class SignalRCreateParameters(SignalRUpdateParameters): diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys.py index 8549853cbc44..ff01c2aa4aeb 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys.py @@ -19,14 +19,24 @@ class SignalRKeys(Model): :type primary_key: str :param secondary_key: The secondary access key. :type secondary_key: str + :param primary_connection_string: SignalR connection string constructed + via the primaryKey + :type primary_connection_string: str + :param secondary_connection_string: SignalR connection string constructed + via the secondaryKey + :type secondary_connection_string: str """ _attribute_map = { 'primary_key': {'key': 'primaryKey', 'type': 'str'}, 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, + 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, } def __init__(self, **kwargs): super(SignalRKeys, self).__init__(**kwargs) self.primary_key = kwargs.get('primary_key', None) self.secondary_key = kwargs.get('secondary_key', None) + self.primary_connection_string = kwargs.get('primary_connection_string', None) + self.secondary_connection_string = kwargs.get('secondary_connection_string', None) diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys_py3.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys_py3.py index 2ca3ca658857..77c5768eff41 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys_py3.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys_py3.py @@ -19,14 +19,24 @@ class SignalRKeys(Model): :type primary_key: str :param secondary_key: The secondary access key. :type secondary_key: str + :param primary_connection_string: SignalR connection string constructed + via the primaryKey + :type primary_connection_string: str + :param secondary_connection_string: SignalR connection string constructed + via the secondaryKey + :type secondary_connection_string: str """ _attribute_map = { 'primary_key': {'key': 'primaryKey', 'type': 'str'}, 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, + 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, } - def __init__(self, *, primary_key: str=None, secondary_key: str=None, **kwargs) -> None: + def __init__(self, *, primary_key: str=None, secondary_key: str=None, primary_connection_string: str=None, secondary_connection_string: str=None, **kwargs) -> None: super(SignalRKeys, self).__init__(**kwargs) self.primary_key = primary_key self.secondary_key = secondary_key + self.primary_connection_string = primary_connection_string + self.secondary_connection_string = secondary_connection_string diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rmanagement_client_enums.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rmanagement_client_enums.py index 7869b8dbfc8d..c4c1cddbb84f 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rmanagement_client_enums.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rmanagement_client_enums.py @@ -16,6 +16,7 @@ class SignalRSkuTier(str, Enum): free = "Free" basic = "Basic" + standard = "Standard" premium = "Premium" diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource.py index 45edb88c3d00..ee02e4f61971 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource.py @@ -54,6 +54,9 @@ class SignalRResource(TrackedResource): :ivar server_port: The publicly accessibly port of the SignalR service which is designed for customer server side usage. :vartype server_port: int + :param version: Version of the SignalR resource. Probably you need the + same or higher version of client SDKs. + :type version: str """ _validation = { @@ -80,6 +83,7 @@ class SignalRResource(TrackedResource): 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'public_port': {'key': 'properties.publicPort', 'type': 'int'}, 'server_port': {'key': 'properties.serverPort', 'type': 'int'}, + 'version': {'key': 'properties.version', 'type': 'str'}, } def __init__(self, **kwargs): @@ -91,3 +95,4 @@ def __init__(self, **kwargs): self.host_name = None self.public_port = None self.server_port = None + self.version = kwargs.get('version', None) diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_py3.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_py3.py index 4356b4f06b84..ba2dc5009058 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_py3.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .tracked_resource import TrackedResource +from .tracked_resource_py3 import TrackedResource class SignalRResource(TrackedResource): @@ -54,6 +54,9 @@ class SignalRResource(TrackedResource): :ivar server_port: The publicly accessibly port of the SignalR service which is designed for customer server side usage. :vartype server_port: int + :param version: Version of the SignalR resource. Probably you need the + same or higher version of client SDKs. + :type version: str """ _validation = { @@ -80,9 +83,10 @@ class SignalRResource(TrackedResource): 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'public_port': {'key': 'properties.publicPort', 'type': 'int'}, 'server_port': {'key': 'properties.serverPort', 'type': 'int'}, + 'version': {'key': 'properties.version', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, sku=None, host_name_prefix: str=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, sku=None, host_name_prefix: str=None, version: str=None, **kwargs) -> None: super(SignalRResource, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku self.host_name_prefix = host_name_prefix @@ -91,3 +95,4 @@ def __init__(self, *, location: str=None, tags=None, sku=None, host_name_prefix: self.host_name = None self.public_port = None self.server_port = None + self.version = version diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage.py new file mode 100644 index 000000000000..c745ce0603eb --- /dev/null +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SignalRUsage(Model): + """Object that describes a specific usage of SignalR resources. + + :param id: Fully qualified ARM resource id + :type id: str + :param current_value: Current value for the usage quota. + :type current_value: long + :param limit: The maximum permitted value for the usage quota. If there is + no limit, this value will be -1. + :type limit: long + :param name: Localizable String object containing the name and a localized + value. + :type name: ~azure.mgmt.signalr.models.SignalRUsageName + :param unit: Representing the units of the usage quota. Possible values + are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. + :type unit: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'SignalRUsageName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SignalRUsage, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + self.unit = kwargs.get('unit', None) diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name.py new file mode 100644 index 000000000000..cf1ec8c37174 --- /dev/null +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SignalRUsageName(Model): + """Localizable String object containing the name and a localized value. + + :param value: The indentifier of the usage. + :type value: str + :param localized_value: Localized name of the usage. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SignalRUsageName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name_py3.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name_py3.py new file mode 100644 index 000000000000..abaff5948d3e --- /dev/null +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SignalRUsageName(Model): + """Localizable String object containing the name and a localized value. + + :param value: The indentifier of the usage. + :type value: str + :param localized_value: Localized name of the usage. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(SignalRUsageName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_paged.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_paged.py new file mode 100644 index 000000000000..08faca32802b --- /dev/null +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class SignalRUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`SignalRUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SignalRUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(SignalRUsagePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_py3.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_py3.py new file mode 100644 index 000000000000..2c46b4a391de --- /dev/null +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SignalRUsage(Model): + """Object that describes a specific usage of SignalR resources. + + :param id: Fully qualified ARM resource id + :type id: str + :param current_value: Current value for the usage quota. + :type current_value: long + :param limit: The maximum permitted value for the usage quota. If there is + no limit, this value will be -1. + :type limit: long + :param name: Localizable String object containing the name and a localized + value. + :type name: ~azure.mgmt.signalr.models.SignalRUsageName + :param unit: Representing the units of the usage quota. Possible values + are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. + :type unit: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'SignalRUsageName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, current_value: int=None, limit: int=None, name=None, unit: str=None, **kwargs) -> None: + super(SignalRUsage, self).__init__(**kwargs) + self.id = id + self.current_value = current_value + self.limit = limit + self.name = name + self.unit = unit diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource_py3.py b/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource_py3.py index 066145840c5e..80a6019f0f16 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource_py3.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class TrackedResource(Resource): diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/operations/__init__.py b/azure-mgmt-signalr/azure/mgmt/signalr/operations/__init__.py index 6eacbb8c5db5..31c21decde4f 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/operations/__init__.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/operations/__init__.py @@ -11,8 +11,10 @@ from .operations import Operations from .signal_roperations import SignalROperations +from .usages_operations import UsagesOperations __all__ = [ 'Operations', 'SignalROperations', + 'UsagesOperations', ] diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/operations/operations.py b/azure-mgmt-signalr/azure/mgmt/signalr/operations/operations.py index e04d3eee4058..8adcd84fc537 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/operations/operations.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/operations/operations.py @@ -68,7 +68,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -77,9 +77,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/operations/signal_roperations.py b/azure-mgmt-signalr/azure/mgmt/signalr/operations/signal_roperations.py index 07d6c59a6292..8fe0c450a4c2 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/operations/signal_roperations.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/operations/signal_roperations.py @@ -79,6 +79,7 @@ def check_name_availability( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -94,9 +95,8 @@ def check_name_availability( body_content = None # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -149,7 +149,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -158,9 +158,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -219,7 +218,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -228,9 +227,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -285,7 +283,7 @@ def list_keys( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -294,8 +292,8 @@ def list_keys( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -336,6 +334,7 @@ def _regenerate_key_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -351,9 +350,8 @@ def _regenerate_key_initial( body_content = None # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [201]: exp = CloudError(response) @@ -461,7 +459,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -470,8 +468,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -508,6 +506,7 @@ def _create_or_update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -523,9 +522,8 @@ def _create_or_update_initial( body_content = None # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [201, 202]: exp = CloudError(response) @@ -613,7 +611,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -622,8 +619,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202, 204]: exp = CloudError(response) @@ -695,6 +692,7 @@ def _update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -710,9 +708,8 @@ def _update_initial( body_content = None # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/operations/usages_operations.py b/azure-mgmt-signalr/azure/mgmt/signalr/operations/usages_operations.py new file mode 100644 index 000000000000..adf39bc94d68 --- /dev/null +++ b/azure-mgmt-signalr/azure/mgmt/signalr/operations/usages_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsagesOperations(object): + """UsagesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-01-preview" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """List usage quotas for Azure SignalR service by location. + + :param location: the location like "eastus" + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SignalRUsage + :rtype: + ~azure.mgmt.signalr.models.SignalRUsagePaged[~azure.mgmt.signalr.models.SignalRUsage] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.SignalRUsagePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.SignalRUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/usages'} diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/signal_rmanagement_client.py b/azure-mgmt-signalr/azure/mgmt/signalr/signal_rmanagement_client.py index 166b6bff533e..fa1600676c3a 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/signal_rmanagement_client.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/signal_rmanagement_client.py @@ -15,6 +15,7 @@ from .version import VERSION from .operations.operations import Operations from .operations.signal_roperations import SignalROperations +from .operations.usages_operations import UsagesOperations from . import models @@ -62,6 +63,8 @@ class SignalRManagementClient(SDKClient): :vartype operations: azure.mgmt.signalr.operations.Operations :ivar signal_r: SignalR operations :vartype signal_r: azure.mgmt.signalr.operations.SignalROperations + :ivar usages: Usages operations + :vartype usages: azure.mgmt.signalr.operations.UsagesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -88,3 +91,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.signal_r = SignalROperations( self._client, self.config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-signalr/azure/mgmt/signalr/version.py b/azure-mgmt-signalr/azure/mgmt/signalr/version.py index e0ec669828cb..e7efe25ea7e0 100644 --- a/azure-mgmt-signalr/azure/mgmt/signalr/version.py +++ b/azure-mgmt-signalr/azure/mgmt/signalr/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "0.1.1" diff --git a/azure-mgmt-signalr/sdk_packaging.toml b/azure-mgmt-signalr/sdk_packaging.toml new file mode 100644 index 000000000000..5793b05a276d --- /dev/null +++ b/azure-mgmt-signalr/sdk_packaging.toml @@ -0,0 +1,6 @@ +[packaging] +package_name = "azure-mgmt-signalr" +package_pprint_name = "SignalR" +package_doc_id = "" +is_stable = false +is_arm = true diff --git a/azure-mgmt-signalr/setup.py b/azure-mgmt-signalr/setup.py index 9c5946249c46..26d7dc636996 100644 --- a/azure-mgmt-signalr/setup.py +++ b/azure-mgmt-signalr/setup.py @@ -72,12 +72,14 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'License :: OSI Approved :: MIT License', ], zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure>=0.4.27,<2.0.0', + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass