From 8f4f7860e299b0296d015217f54d94a09da223cb Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 19 Jun 2019 02:25:59 +0000 Subject: [PATCH] Generated from 3b14442f6c54c0afa220c129b4e14346dd59e9b5 add x-ms-examples for Autoscale --- .../azure/mgmt/hdinsight/models/__init__.py | 17 +++ .../_hd_insight_management_client_enums.py | 11 ++ .../azure/mgmt/hdinsight/models/_models.py | 111 +++++++++++++++++ .../mgmt/hdinsight/models/_models_py3.py | 113 +++++++++++++++++- 4 files changed, 251 insertions(+), 1 deletion(-) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py index abd6f1bbe0d7..a7f320ffa021 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py @@ -14,6 +14,11 @@ from ._models_py3 import ApplicationGetEndpoint from ._models_py3 import ApplicationGetHttpsEndpoint from ._models_py3 import ApplicationProperties + from ._models_py3 import Autoscale + from ._models_py3 import AutoscaleCapacity + from ._models_py3 import AutoscaleRecurrence + from ._models_py3 import AutoscaleSchedule + from ._models_py3 import AutoscaleTimeAndCapacity from ._models_py3 import Cluster from ._models_py3 import ClusterConfigurations from ._models_py3 import ClusterCreateParametersExtended @@ -69,6 +74,11 @@ from ._models import ApplicationGetEndpoint from ._models import ApplicationGetHttpsEndpoint from ._models import ApplicationProperties + from ._models import Autoscale + from ._models import AutoscaleCapacity + from ._models import AutoscaleRecurrence + from ._models import AutoscaleSchedule + from ._models import AutoscaleTimeAndCapacity from ._models import Cluster from ._models import ClusterConfigurations from ._models import ClusterCreateParametersExtended @@ -125,6 +135,7 @@ from ._paged_models import RuntimeScriptActionDetailPaged from ._hd_insight_management_client_enums import ( DirectoryType, + DaysOfWeek, OSType, Tier, JsonWebKeyEncryptionAlgorithm, @@ -138,6 +149,11 @@ 'ApplicationGetEndpoint', 'ApplicationGetHttpsEndpoint', 'ApplicationProperties', + 'Autoscale', + 'AutoscaleCapacity', + 'AutoscaleRecurrence', + 'AutoscaleSchedule', + 'AutoscaleTimeAndCapacity', 'Cluster', 'ClusterConfigurations', 'ClusterCreateParametersExtended', @@ -193,6 +209,7 @@ 'RuntimeScriptActionDetailPaged', 'OperationPaged', 'DirectoryType', + 'DaysOfWeek', 'OSType', 'Tier', 'JsonWebKeyEncryptionAlgorithm', diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py index 34fee1d526d2..d58b9dad7770 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py @@ -17,6 +17,17 @@ class DirectoryType(str, Enum): active_directory = "ActiveDirectory" +class DaysOfWeek(str, Enum): + + monday = "Monday" + tuesday = "Tuesday" + wednesday = "Wednesday" + thursday = "Thursday" + friday = "Friday" + saturday = "Saturday" + sunday = "Sunday" + + class OSType(str, Enum): windows = "Windows" diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py index 4ce307e3c6ea..aac7483fc73c 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py @@ -250,6 +250,113 @@ def __init__(self, **kwargs): self.marketplace_identifier = None +class Autoscale(Model): + """The autoscale request parameters. + + :param capacity: Parameters for load-based autoscale + :type capacity: ~azure.mgmt.hdinsight.models.AutoscaleCapacity + :param recurrence: Parameters for schedule-based autoscale + :type recurrence: ~azure.mgmt.hdinsight.models.AutoscaleRecurrence + """ + + _attribute_map = { + 'capacity': {'key': 'capacity', 'type': 'AutoscaleCapacity'}, + 'recurrence': {'key': 'recurrence', 'type': 'AutoscaleRecurrence'}, + } + + def __init__(self, **kwargs): + super(Autoscale, self).__init__(**kwargs) + self.capacity = kwargs.get('capacity', None) + self.recurrence = kwargs.get('recurrence', None) + + +class AutoscaleCapacity(Model): + """The load-based autoscale request parameters. + + :param min_instance_count: The minimum instance count of the cluster + :type min_instance_count: int + :param max_instance_count: The maximum instance count of the cluster + :type max_instance_count: int + """ + + _attribute_map = { + 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, + 'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AutoscaleCapacity, self).__init__(**kwargs) + self.min_instance_count = kwargs.get('min_instance_count', None) + self.max_instance_count = kwargs.get('max_instance_count', None) + + +class AutoscaleRecurrence(Model): + """Schedule-based autoscale request parameters. + + :param time_zone: The time zone for the autoscale schedule times + :type time_zone: str + :param schedule: Array of schedule-based autoscale rules + :type schedule: list[~azure.mgmt.hdinsight.models.AutoscaleSchedule] + """ + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': '[AutoscaleSchedule]'}, + } + + def __init__(self, **kwargs): + super(AutoscaleRecurrence, self).__init__(**kwargs) + self.time_zone = kwargs.get('time_zone', None) + self.schedule = kwargs.get('schedule', None) + + +class AutoscaleSchedule(Model): + """Parameters for a schedule-based autoscale rule, consisting of an array of + days + a time and capacity. + + :param days: Days of the week for a schedule-based autoscale rule + :type days: list[str or ~azure.mgmt.hdinsight.models.DaysOfWeek] + :param time_and_capacity: Time and capacity for a schedule-based autoscale + rule + :type time_and_capacity: + ~azure.mgmt.hdinsight.models.AutoscaleTimeAndCapacity + """ + + _attribute_map = { + 'days': {'key': 'days', 'type': '[DaysOfWeek]'}, + 'time_and_capacity': {'key': 'timeAndCapacity', 'type': 'AutoscaleTimeAndCapacity'}, + } + + def __init__(self, **kwargs): + super(AutoscaleSchedule, self).__init__(**kwargs) + self.days = kwargs.get('days', None) + self.time_and_capacity = kwargs.get('time_and_capacity', None) + + +class AutoscaleTimeAndCapacity(Model): + """Time and capacity request parameters. + + :param time: 24-hour time in the form xx:xx + :type time: str + :param min_instance_count: The minimum instance count of the cluster + :type min_instance_count: int + :param max_instance_count: The maximum instance count of the cluster + :type max_instance_count: int + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, + 'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AutoscaleTimeAndCapacity, self).__init__(**kwargs) + self.time = kwargs.get('time', None) + self.min_instance_count = kwargs.get('min_instance_count', None) + self.max_instance_count = kwargs.get('max_instance_count', None) + + class CloudError(Model): """CloudError. """ @@ -1188,6 +1295,8 @@ class Role(Model): :type min_instance_count: int :param target_instance_count: The instance count of the cluster. :type target_instance_count: int + :param autoscale_configuration: The autoscale configurations. + :type autoscale_configuration: ~azure.mgmt.hdinsight.models.Autoscale :param hardware_profile: The hardware profile. :type hardware_profile: ~azure.mgmt.hdinsight.models.HardwareProfile :param os_profile: The operating system profile. @@ -1206,6 +1315,7 @@ class Role(Model): 'name': {'key': 'name', 'type': 'str'}, 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, 'target_instance_count': {'key': 'targetInstanceCount', 'type': 'int'}, + 'autoscale_configuration': {'key': 'autoscale', 'type': 'Autoscale'}, 'hardware_profile': {'key': 'hardwareProfile', 'type': 'HardwareProfile'}, 'os_profile': {'key': 'osProfile', 'type': 'OsProfile'}, 'virtual_network_profile': {'key': 'virtualNetworkProfile', 'type': 'VirtualNetworkProfile'}, @@ -1218,6 +1328,7 @@ def __init__(self, **kwargs): self.name = kwargs.get('name', None) self.min_instance_count = kwargs.get('min_instance_count', None) self.target_instance_count = kwargs.get('target_instance_count', None) + self.autoscale_configuration = kwargs.get('autoscale_configuration', None) self.hardware_profile = kwargs.get('hardware_profile', None) self.os_profile = kwargs.get('os_profile', None) self.virtual_network_profile = kwargs.get('virtual_network_profile', None) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py index bf2f96b1f39b..226d163ea01f 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py @@ -250,6 +250,113 @@ def __init__(self, *, compute_profile=None, install_script_actions=None, uninsta self.marketplace_identifier = None +class Autoscale(Model): + """The autoscale request parameters. + + :param capacity: Parameters for load-based autoscale + :type capacity: ~azure.mgmt.hdinsight.models.AutoscaleCapacity + :param recurrence: Parameters for schedule-based autoscale + :type recurrence: ~azure.mgmt.hdinsight.models.AutoscaleRecurrence + """ + + _attribute_map = { + 'capacity': {'key': 'capacity', 'type': 'AutoscaleCapacity'}, + 'recurrence': {'key': 'recurrence', 'type': 'AutoscaleRecurrence'}, + } + + def __init__(self, *, capacity=None, recurrence=None, **kwargs) -> None: + super(Autoscale, self).__init__(**kwargs) + self.capacity = capacity + self.recurrence = recurrence + + +class AutoscaleCapacity(Model): + """The load-based autoscale request parameters. + + :param min_instance_count: The minimum instance count of the cluster + :type min_instance_count: int + :param max_instance_count: The maximum instance count of the cluster + :type max_instance_count: int + """ + + _attribute_map = { + 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, + 'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'}, + } + + def __init__(self, *, min_instance_count: int=None, max_instance_count: int=None, **kwargs) -> None: + super(AutoscaleCapacity, self).__init__(**kwargs) + self.min_instance_count = min_instance_count + self.max_instance_count = max_instance_count + + +class AutoscaleRecurrence(Model): + """Schedule-based autoscale request parameters. + + :param time_zone: The time zone for the autoscale schedule times + :type time_zone: str + :param schedule: Array of schedule-based autoscale rules + :type schedule: list[~azure.mgmt.hdinsight.models.AutoscaleSchedule] + """ + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': '[AutoscaleSchedule]'}, + } + + def __init__(self, *, time_zone: str=None, schedule=None, **kwargs) -> None: + super(AutoscaleRecurrence, self).__init__(**kwargs) + self.time_zone = time_zone + self.schedule = schedule + + +class AutoscaleSchedule(Model): + """Parameters for a schedule-based autoscale rule, consisting of an array of + days + a time and capacity. + + :param days: Days of the week for a schedule-based autoscale rule + :type days: list[str or ~azure.mgmt.hdinsight.models.DaysOfWeek] + :param time_and_capacity: Time and capacity for a schedule-based autoscale + rule + :type time_and_capacity: + ~azure.mgmt.hdinsight.models.AutoscaleTimeAndCapacity + """ + + _attribute_map = { + 'days': {'key': 'days', 'type': '[DaysOfWeek]'}, + 'time_and_capacity': {'key': 'timeAndCapacity', 'type': 'AutoscaleTimeAndCapacity'}, + } + + def __init__(self, *, days=None, time_and_capacity=None, **kwargs) -> None: + super(AutoscaleSchedule, self).__init__(**kwargs) + self.days = days + self.time_and_capacity = time_and_capacity + + +class AutoscaleTimeAndCapacity(Model): + """Time and capacity request parameters. + + :param time: 24-hour time in the form xx:xx + :type time: str + :param min_instance_count: The minimum instance count of the cluster + :type min_instance_count: int + :param max_instance_count: The maximum instance count of the cluster + :type max_instance_count: int + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, + 'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'}, + } + + def __init__(self, *, time: str=None, min_instance_count: int=None, max_instance_count: int=None, **kwargs) -> None: + super(AutoscaleTimeAndCapacity, self).__init__(**kwargs) + self.time = time + self.min_instance_count = min_instance_count + self.max_instance_count = max_instance_count + + class CloudError(Model): """CloudError. """ @@ -1188,6 +1295,8 @@ class Role(Model): :type min_instance_count: int :param target_instance_count: The instance count of the cluster. :type target_instance_count: int + :param autoscale_configuration: The autoscale configurations. + :type autoscale_configuration: ~azure.mgmt.hdinsight.models.Autoscale :param hardware_profile: The hardware profile. :type hardware_profile: ~azure.mgmt.hdinsight.models.HardwareProfile :param os_profile: The operating system profile. @@ -1206,6 +1315,7 @@ class Role(Model): 'name': {'key': 'name', 'type': 'str'}, 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, 'target_instance_count': {'key': 'targetInstanceCount', 'type': 'int'}, + 'autoscale_configuration': {'key': 'autoscale', 'type': 'Autoscale'}, 'hardware_profile': {'key': 'hardwareProfile', 'type': 'HardwareProfile'}, 'os_profile': {'key': 'osProfile', 'type': 'OsProfile'}, 'virtual_network_profile': {'key': 'virtualNetworkProfile', 'type': 'VirtualNetworkProfile'}, @@ -1213,11 +1323,12 @@ class Role(Model): 'script_actions': {'key': 'scriptActions', 'type': '[ScriptAction]'}, } - def __init__(self, *, name: str=None, min_instance_count: int=None, target_instance_count: int=None, hardware_profile=None, os_profile=None, virtual_network_profile=None, data_disks_groups=None, script_actions=None, **kwargs) -> None: + def __init__(self, *, name: str=None, min_instance_count: int=None, target_instance_count: int=None, autoscale_configuration=None, hardware_profile=None, os_profile=None, virtual_network_profile=None, data_disks_groups=None, script_actions=None, **kwargs) -> None: super(Role, self).__init__(**kwargs) self.name = name self.min_instance_count = min_instance_count self.target_instance_count = target_instance_count + self.autoscale_configuration = autoscale_configuration self.hardware_profile = hardware_profile self.os_profile = os_profile self.virtual_network_profile = virtual_network_profile