forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathendpoint.py
More file actions
100 lines (92 loc) · 4.86 KB
/
endpoint.py
File metadata and controls
100 lines (92 loc) · 4.86 KB
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
# 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 .proxy_resource import ProxyResource
class Endpoint(ProxyResource):
"""Class representing a Traffic Manager endpoint.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Network/trafficmanagerProfiles.
:vartype type: str
:param target_resource_id: The Azure Resource URI of the of the endpoint.
Not applicable to endpoints of type 'ExternalEndpoints'.
:type target_resource_id: str
:param target: The fully-qualified DNS name of the endpoint. Traffic
Manager returns this value in DNS responses to direct traffic to this
endpoint.
:type target: str
:param endpoint_status: The status of the endpoint. If the endpoint is
Enabled, it is probed for endpoint health and is included in the traffic
routing method. Possible values include: 'Enabled', 'Disabled'
:type endpoint_status: str or
~azure.mgmt.trafficmanager.models.EndpointStatus
:param weight: The weight of this endpoint when using the 'Weighted'
traffic routing method. Possible values are from 1 to 1000.
:type weight: long
:param priority: The priority of this endpoint when using the ‘Priority’
traffic routing method. Possible values are from 1 to 1000, lower values
represent higher priority. This is an optional parameter. If specified,
it must be specified on all endpoints, and no two endpoints can share the
same priority value.
:type priority: long
:param endpoint_location: Specifies the location of the external or nested
endpoints when using the ‘Performance’ traffic routing method.
:type endpoint_location: str
:param endpoint_monitor_status: The monitoring status of the endpoint.
Possible values include: 'CheckingEndpoint', 'Online', 'Degraded',
'Disabled', 'Inactive', 'Stopped'
:type endpoint_monitor_status: str or
~azure.mgmt.trafficmanager.models.EndpointMonitorStatus
:param min_child_endpoints: The minimum number of endpoints that must be
available in the child profile in order for the parent profile to be
considered available. Only applicable to endpoint of type
'NestedEndpoints'.
:type min_child_endpoints: long
:param geo_mapping: The list of countries/regions mapped to this endpoint
when using the ‘Geographic’ traffic routing method. Please consult Traffic
Manager Geographic documentation for a full list of accepted values.
:type geo_mapping: list[str]
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'},
'target': {'key': 'properties.target', 'type': 'str'},
'endpoint_status': {'key': 'properties.endpointStatus', 'type': 'str'},
'weight': {'key': 'properties.weight', 'type': 'long'},
'priority': {'key': 'properties.priority', 'type': 'long'},
'endpoint_location': {'key': 'properties.endpointLocation', 'type': 'str'},
'endpoint_monitor_status': {'key': 'properties.endpointMonitorStatus', 'type': 'str'},
'min_child_endpoints': {'key': 'properties.minChildEndpoints', 'type': 'long'},
'geo_mapping': {'key': 'properties.geoMapping', 'type': '[str]'},
}
def __init__(self, target_resource_id=None, target=None, endpoint_status=None, weight=None, priority=None, endpoint_location=None, endpoint_monitor_status=None, min_child_endpoints=None, geo_mapping=None):
super(Endpoint, self).__init__()
self.target_resource_id = target_resource_id
self.target = target
self.endpoint_status = endpoint_status
self.weight = weight
self.priority = priority
self.endpoint_location = endpoint_location
self.endpoint_monitor_status = endpoint_monitor_status
self.min_child_endpoints = min_child_endpoints
self.geo_mapping = geo_mapping