File: auto_scale_configuration.py

package info (click to toggle)
python-azure 20201208%2Bgit-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,437,920 kB
  • sloc: python: 4,287,452; javascript: 269; makefile: 198; sh: 187; xml: 106
file content (53 lines) | stat: -rw-r--r-- 2,220 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# 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 AutoScaleConfiguration(Model):
    """AutoScale configuration properties.

    :param status: If auto-scale is enabled for all services. Each service can
     turn it off individually. Possible values include: 'Enabled', 'Disabled'.
     Default value: "Disabled" .
    :type status: str or ~azure.mgmt.machinelearningcompute.models.Status
    :param min_replicas: The minimum number of replicas for each service.
     Default value: 1 .
    :type min_replicas: int
    :param max_replicas: The maximum number of replicas for each service.
     Default value: 100 .
    :type max_replicas: int
    :param target_utilization: The target utilization.
    :type target_utilization: float
    :param refresh_period_in_seconds: Refresh period in seconds.
    :type refresh_period_in_seconds: int
    """

    _validation = {
        'min_replicas': {'minimum': 1},
        'max_replicas': {'minimum': 1},
    }

    _attribute_map = {
        'status': {'key': 'status', 'type': 'str'},
        'min_replicas': {'key': 'minReplicas', 'type': 'int'},
        'max_replicas': {'key': 'maxReplicas', 'type': 'int'},
        'target_utilization': {'key': 'targetUtilization', 'type': 'float'},
        'refresh_period_in_seconds': {'key': 'refreshPeriodInSeconds', 'type': 'int'},
    }

    def __init__(self, status="Disabled", min_replicas=1, max_replicas=100, target_utilization=None, refresh_period_in_seconds=None):
        super(AutoScaleConfiguration, self).__init__()
        self.status = status
        self.min_replicas = min_replicas
        self.max_replicas = max_replicas
        self.target_utilization = target_utilization
        self.refresh_period_in_seconds = refresh_period_in_seconds