Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
name:
Name of the service bus namespace.
relay_name:
Name of the service bus relay in this namespace.
metric:
name of a supported metric
rollup:
name of a supported rollup
filter_expression:
filter, for instance "$filter=Timestamp gt datetime'2014-10-01T00:00:00Z'"
'''
response = self._perform_get(
self._get_get_metrics_data_relay_path(name, relay_name, metric, rollup, filter_expresssion),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
partial(
_ServiceBusManagementXmlSerializer.xml_to_metrics,
object_type=MetricValues
)
This operation gets rollup data for Service Bus metrics queue.
Rollup data includes the time granularity for the telemetry aggregation as well as
the retention settings for each time granularity.
name:
Name of the service bus namespace.
queue_name:
Name of the service bus queue in this namespace.
metric:
name of a supported metric
'''
response = self._perform_get(
self._get_get_metrics_rollup_queue_path(name, queue_name, metric),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
partial(
_ServiceBusManagementXmlSerializer.xml_to_metrics,
object_type=MetricRollups
)
This operation gets rollup data for Service Bus metrics notification hub.
Rollup data includes the time granularity for the telemetry aggregation as well as
the retention settings for each time granularity.
name:
Name of the service bus namespace.
hub_name:
Name of the service bus notification hub in this namespace.
metric:
name of a supported metric
'''
response = self._perform_get(
self._get_get_metrics_rollup_hub_path(name, hub_name, metric),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
partial(
_ServiceBusManagementXmlSerializer.xml_to_metrics,
object_type=MetricRollups
)
def get_supported_metrics_topic(self, name, topic_name):
'''
Retrieves the list of supported metrics for this namespace and topic
name:
Name of the service bus namespace.
topic_name:
Name of the service bus queue in this namespace.
'''
response = self._perform_get(
self._get_get_supported_metrics_topic_path(name, topic_name),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
partial(
_ServiceBusManagementXmlSerializer.xml_to_metrics,
object_type=MetricProperties
)
name:
Name of the service bus namespace.
topic_name:
Name of the service bus queue in this namespace.
metric:
name of a supported metric
rollup:
name of a supported rollup
filter_expression:
filter, for instance "$filter=Timestamp gt datetime'2014-10-01T00:00:00Z'"
'''
response = self._perform_get(
self._get_get_metrics_data_topic_path(name, topic_name, metric, rollup, filter_expresssion),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
partial(
_ServiceBusManagementXmlSerializer.xml_to_metrics,
object_type=MetricValues
)
def get_supported_metrics_relay(self, name, relay_name):
'''
Retrieves the list of supported metrics for this namespace and relay
name:
Name of the service bus namespace.
relay_name:
Name of the service bus relay in this namespace.
'''
response = self._perform_get(
self._get_get_supported_metrics_relay_path(name, relay_name),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
partial(
_ServiceBusManagementXmlSerializer.xml_to_metrics,
object_type=MetricProperties
)
name:
Name of the service bus namespace.
hub_name:
Name of the service bus notification hub in this namespace.
metric:
name of a supported metric
rollup:
name of a supported rollup
filter_expression:
filter, for instance "$filter=Timestamp gt datetime'2014-10-01T00:00:00Z'"
'''
response = self._perform_get(
self._get_get_metrics_data_hub_path(name, hub_name, metric, rollup, filter_expresssion),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
partial(
_ServiceBusManagementXmlSerializer.xml_to_metrics,
object_type=MetricValues
)
def get_regions(self):
'''
Get list of available service bus regions.
'''
response = self._perform_get(
self._get_path('services/serviceBus/Regions/', None),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
_ServiceBusManagementXmlSerializer.xml_to_region)
def get_supported_metrics_queue(self, name, queue_name):
'''
Retrieves the list of supported metrics for this namespace and queue
name:
Name of the service bus namespace.
queue_name:
Name of the service bus queue in this namespace.
'''
response = self._perform_get(
self._get_get_supported_metrics_queue_path(name, queue_name),
None)
return _MinidomXmlToObject.convert_response_to_feeds(
response,
partial(
_ServiceBusManagementXmlSerializer.xml_to_metrics,
object_type=MetricProperties
)