@@ -24,10 +24,10 @@ class MonitorGroup(Group):
24
24
25
25
def dashboards (self , * filters ):
26
26
"""
27
- Returns a list of dashboards on your account.
27
+ Returns a list of dashboards on your account.
28
28
29
29
.. note:: This endpoint is in beta. This will only function if base_url is set to `https://api.linode.com/v4beta`.
30
-
30
+
31
31
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-dashboards-all
32
32
33
33
:param filters: Any number of filters to apply to this query.
@@ -39,14 +39,12 @@ def dashboards(self, *filters):
39
39
"""
40
40
return self .client ._get_and_filter (Dashboard , * filters )
41
41
42
-
43
-
44
42
def dashboards_by_service (self , service_type : str , * filters ):
45
43
"""
46
- Returns a dashboards on your account based on the service passed.
44
+ Returns a dashboards on your account based on the service passed.
47
45
48
46
.. note:: This endpoint is in beta. This will only function if base_url is set to `https://api.linode.com/v4beta`.
49
-
47
+
50
48
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-dashboards
51
49
52
50
:param filters: Any number of filters to apply to this query.
@@ -56,20 +54,19 @@ def dashboards_by_service(self, service_type: str, *filters):
56
54
:returns: A Dashboards filtered by Service Type.
57
55
:rtype: PaginatedList of the Dashboards
58
56
"""
59
-
57
+
60
58
return self .client ._get_and_filter (
61
59
DashboardByService ,
62
60
* filters ,
63
61
endpoint = f"/monitor/services/{ service_type } /dashboards" ,
64
62
)
65
63
66
-
67
64
def supported_services (self , * filters ):
68
65
"""
69
- Returns a list of services supported by ACLP.
66
+ Returns a list of services supported by ACLP.
70
67
71
68
.. note:: This endpoint is in beta. This will only function if base_url is set to `https://api.linode.com/v4beta`.
72
-
69
+
73
70
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-monitor-services
74
71
75
72
:param filters: Any number of filters to apply to this query.
@@ -82,54 +79,54 @@ def supported_services(self, *filters):
82
79
83
80
return self .client ._get_and_filter (MonitorServiceSupported , * filters )
84
81
85
- def details_by_service (self , service_type : str ,* filters ):
82
+ def details_by_service (self , service_type : str , * filters ):
86
83
"""
87
- Returns a details about a particular service.
84
+ Returns a details about a particular service.
88
85
89
86
.. note:: This endpoint is in beta. This will only function if base_url is set to `https://api.linode.com/v4beta`.
90
-
87
+
91
88
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-monitor-services-for-service-type
92
89
93
90
:param filters: Any number of filters to apply to this query.
94
91
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
95
92
for more details on filtering.
96
93
97
94
:returns: Details about a Supported Services
98
- :rtype: PaginatedList of the Service
95
+ :rtype: PaginatedList of the Service
99
96
"""
100
97
return self .client ._get_and_filter (
101
98
ServiceDetails ,
102
99
* filters ,
103
100
endpoint = f"/monitor/services/{ service_type } " ,
104
101
)
105
-
106
- def metric_definitions (self , service_type : str ,* filters ):
102
+
103
+ def metric_definitions (self , service_type : str , * filters ):
107
104
"""
108
- Returns metrics for a specific service type.
105
+ Returns metrics for a specific service type.
109
106
110
107
.. note:: This endpoint is in beta. This will only function if base_url is set to `https://api.linode.com/v4beta`.
111
-
108
+
112
109
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-monitor-information
113
110
114
111
:param filters: Any number of filters to apply to this query.
115
112
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
116
113
for more details on filtering.
117
114
118
115
:returns: Returns a List of metrics for a service
119
- :rtype: PaginatedList of metrics
116
+ :rtype: PaginatedList of metrics
120
117
"""
121
118
return self .client ._get_and_filter (
122
119
MetricDefinition ,
123
120
* filters ,
124
121
endpoint = f"/monitor/services/{ service_type } /metric-definitions" ,
125
122
)
126
-
123
+
127
124
def create_token (self , service_type : str , entity_ids : list , * filters ):
128
125
"""
129
- Returns a JWE Token for a specific service type.
126
+ Returns a JWE Token for a specific service type.
130
127
131
128
.. note:: This endpoint is in beta. This will only function if base_url is set to `https://api.linode.com/v4beta`.
132
-
129
+
133
130
API Documentation: https://techdocs.akamai.com/linode-api/reference/post-get-token
134
131
:param filters: Any number of filters to apply to this query.
135
132
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
@@ -141,20 +138,12 @@ def create_token(self, service_type: str, entity_ids: list, *filters):
141
138
142
139
params = {"entity_ids" : entity_ids }
143
140
144
- result = self .client .post (f"/monitor/services/{ service_type } /token" , data = params )
141
+ result = self .client .post (
142
+ f"/monitor/services/{ service_type } /token" , data = params
143
+ )
145
144
146
145
if "token" not in result :
147
146
raise UnexpectedResponseError (
148
147
"Unexpected response when creating token!" , json = result
149
148
)
150
149
return CreateToken (self .client , result ["token" ], result )
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
0 commit comments