File: operationalization_cluster.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 (113 lines) | stat: -rw-r--r-- 5,524 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# 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 .resource import Resource


class OperationalizationCluster(Resource):
    """Instance of an Azure ML Operationalization Cluster resource.

    Variables are only populated by the server, and will be ignored when
    sending a request.

    :ivar id: Specifies the resource ID.
    :vartype id: str
    :ivar name: Specifies the name of the resource.
    :vartype name: str
    :param location: Specifies the location of the resource.
    :type location: str
    :ivar type: Specifies the type of the resource.
    :vartype type: str
    :param tags: Contains resource tags defined as key/value pairs.
    :type tags: dict[str, str]
    :param description: The description of the cluster.
    :type description: str
    :ivar created_on: The date and time when the cluster was created.
    :vartype created_on: datetime
    :ivar modified_on: The date and time when the cluster was last modified.
    :vartype modified_on: datetime
    :ivar provisioning_state: The provision state of the cluster. Valid values
     are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible
     values include: 'Unknown', 'Updating', 'Creating', 'Deleting',
     'Succeeded', 'Failed', 'Canceled'
    :vartype provisioning_state: str or
     ~azure.mgmt.machinelearningcompute.models.OperationStatus
    :ivar provisioning_errors: List of provisioning errors reported by the
     resource provider.
    :vartype provisioning_errors:
     list[~azure.mgmt.machinelearningcompute.models.ErrorResponseWrapper]
    :param cluster_type: The cluster type. Possible values include: 'ACS',
     'Local'
    :type cluster_type: str or
     ~azure.mgmt.machinelearningcompute.models.ClusterType
    :param storage_account: Storage Account properties.
    :type storage_account:
     ~azure.mgmt.machinelearningcompute.models.StorageAccountProperties
    :param container_registry: Container Registry properties.
    :type container_registry:
     ~azure.mgmt.machinelearningcompute.models.ContainerRegistryProperties
    :param container_service: Parameters for the Azure Container Service
     cluster.
    :type container_service:
     ~azure.mgmt.machinelearningcompute.models.AcsClusterProperties
    :param app_insights: AppInsights configuration.
    :type app_insights:
     ~azure.mgmt.machinelearningcompute.models.AppInsightsProperties
    :param global_service_configuration: Contains global configuration for the
     web services in the cluster.
    :type global_service_configuration:
     ~azure.mgmt.machinelearningcompute.models.GlobalServiceConfiguration
    """

    _validation = {
        'id': {'readonly': True},
        'name': {'readonly': True},
        'location': {'required': True},
        'type': {'readonly': True},
        'created_on': {'readonly': True},
        'modified_on': {'readonly': True},
        'provisioning_state': {'readonly': True},
        'provisioning_errors': {'readonly': True},
        'cluster_type': {'required': True},
    }

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'location': {'key': 'location', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'tags': {'key': 'tags', 'type': '{str}'},
        'description': {'key': 'properties.description', 'type': 'str'},
        'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'},
        'modified_on': {'key': 'properties.modifiedOn', 'type': 'iso-8601'},
        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
        'provisioning_errors': {'key': 'properties.provisioningErrors', 'type': '[ErrorResponseWrapper]'},
        'cluster_type': {'key': 'properties.clusterType', 'type': 'str'},
        'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'},
        'container_registry': {'key': 'properties.containerRegistry', 'type': 'ContainerRegistryProperties'},
        'container_service': {'key': 'properties.containerService', 'type': 'AcsClusterProperties'},
        'app_insights': {'key': 'properties.appInsights', 'type': 'AppInsightsProperties'},
        'global_service_configuration': {'key': 'properties.globalServiceConfiguration', 'type': 'GlobalServiceConfiguration'},
    }

    def __init__(self, location, cluster_type, tags=None, description=None, storage_account=None, container_registry=None, container_service=None, app_insights=None, global_service_configuration=None):
        super(OperationalizationCluster, self).__init__(location=location, tags=tags)
        self.description = description
        self.created_on = None
        self.modified_on = None
        self.provisioning_state = None
        self.provisioning_errors = None
        self.cluster_type = cluster_type
        self.storage_account = storage_account
        self.container_registry = container_registry
        self.container_service = container_service
        self.app_insights = app_insights
        self.global_service_configuration = global_service_configuration