From 03c14ca4561592214b616fdd46cf87e556d60343 Mon Sep 17 00:00:00 2001 From: wf-jenkins Date: Fri, 15 Mar 2024 08:16:19 -0700 Subject: [PATCH] Autogenerated Update v2.219.6. --- .swagger-codegen/config.json | 2 +- .swagger-codegen/config.jsone | 2 +- README.md | 3 +- docs/IngestionSpyApi.md | 54 +++++++++ setup.py | 2 +- wavefront_api_client/api/ingestion_spy_api.py | 104 ++++++++++++++++++ wavefront_api_client/api_client.py | 2 +- wavefront_api_client/configuration.py | 2 +- ...esponse_container_set_business_function.py | 2 +- 9 files changed, 166 insertions(+), 7 deletions(-) diff --git a/.swagger-codegen/config.json b/.swagger-codegen/config.json index 5b7327a9..2891ac86 100644 --- a/.swagger-codegen/config.json +++ b/.swagger-codegen/config.json @@ -3,5 +3,5 @@ "gitUserId": "wavefrontHQ", "packageName": "wavefront_api_client", "packageUrl": "https://github.com/wavefrontHQ/python-client", - "packageVersion": "2.218.0" + "packageVersion": "2.219.6" } diff --git a/.swagger-codegen/config.jsone b/.swagger-codegen/config.jsone index e0217151..5b7327a9 100644 --- a/.swagger-codegen/config.jsone +++ b/.swagger-codegen/config.jsone @@ -3,5 +3,5 @@ "gitUserId": "wavefrontHQ", "packageName": "wavefront_api_client", "packageUrl": "https://github.com/wavefrontHQ/python-client", - "packageVersion": "2.219.2" + "packageVersion": "2.218.0" } diff --git a/README.md b/README.md index c98a082f..7455348c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: v2 -- Package version: 2.218.0 +- Package version: 2.219.6 - Build package: io.swagger.codegen.languages.PythonClientCodegen ## Requirements. @@ -206,6 +206,7 @@ Class | Method | HTTP request | Description *ExternalLinkApi* | [**get_external_link**](docs/ExternalLinkApi.md#get_external_link) | **GET** /api/v2/extlink/{id} | Get a specific external link *ExternalLinkApi* | [**update_external_link**](docs/ExternalLinkApi.md#update_external_link) | **PUT** /api/v2/extlink/{id} | Update a specific external link *IngestionSpyApi* | [**spy_on_delta_counters**](docs/IngestionSpyApi.md#spy_on_delta_counters) | **GET** /api/spy/deltas | Gets new delta counters that are added to existing time series. +*IngestionSpyApi* | [**spy_on_ephemeral_points**](docs/IngestionSpyApi.md#spy_on_ephemeral_points) | **GET** /api/spy/ephemeral | Gets a sampling of new ephemeral metric data points that are added to existing time series. *IngestionSpyApi* | [**spy_on_histograms**](docs/IngestionSpyApi.md#spy_on_histograms) | **GET** /api/spy/histograms | Gets new histograms that are added to existing time series. *IngestionSpyApi* | [**spy_on_id_creations**](docs/IngestionSpyApi.md#spy_on_id_creations) | **GET** /api/spy/ids | Gets newly allocated IDs that correspond to new metric names, source names, point tags, or span tags. A new ID generally indicates that a new time series has been introduced. *IngestionSpyApi* | [**spy_on_points**](docs/IngestionSpyApi.md#spy_on_points) | **GET** /api/spy/points | Gets a sampling of new metric data points that are added to existing time series. diff --git a/docs/IngestionSpyApi.md b/docs/IngestionSpyApi.md index d88ad743..d63cbde2 100644 --- a/docs/IngestionSpyApi.md +++ b/docs/IngestionSpyApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://YOUR_INSTANCE.wavefront.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**spy_on_delta_counters**](IngestionSpyApi.md#spy_on_delta_counters) | **GET** /api/spy/deltas | Gets new delta counters that are added to existing time series. +[**spy_on_ephemeral_points**](IngestionSpyApi.md#spy_on_ephemeral_points) | **GET** /api/spy/ephemeral | Gets a sampling of new ephemeral metric data points that are added to existing time series. [**spy_on_histograms**](IngestionSpyApi.md#spy_on_histograms) | **GET** /api/spy/histograms | Gets new histograms that are added to existing time series. [**spy_on_id_creations**](IngestionSpyApi.md#spy_on_id_creations) | **GET** /api/spy/ids | Gets newly allocated IDs that correspond to new metric names, source names, point tags, or span tags. A new ID generally indicates that a new time series has been introduced. [**spy_on_points**](IngestionSpyApi.md#spy_on_points) | **GET** /api/spy/points | Gets a sampling of new metric data points that are added to existing time series. @@ -64,6 +65,59 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **spy_on_ephemeral_points** +> spy_on_ephemeral_points(metric=metric, host=host, point_tag_key=point_tag_key, sampling=sampling) + +Gets a sampling of new ephemeral metric data points that are added to existing time series. + +Try it Out button won't work in this case, as it's a streaming API. Endpoint: https://.wavefront.com/api/spy/ephemeral. Details usage can be find at: https://docs.wavefront.com/wavefront_monitoring_spy.html#get-ingested-metric-points-with-spy + +### Example +```python +from __future__ import print_function +import time +import wavefront_api_client +from wavefront_api_client.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = wavefront_api_client.IngestionSpyApi() +metric = 'metric_example' # str | List a point only if its metric name starts with the specified case-sensitive prefix. E.g., metric=Cust matches metrics named Customer, Customers, Customer.alerts, but not customer. (optional) +host = 'host_example' # str | List a point only if its source name starts with the specified case-sensitive prefix. (optional) +point_tag_key = ['point_tag_key_example'] # list[str] | List a point only if it has the specified point tag key. Add this parameter multiple times to specify multiple point tags, e.g., pointTagKey=env&pointTagKey=datacenter put env in the first line and datacenter in the second line as values (optional) +sampling = 0.01 # float | goes from 0 to 1 with 0.01 being 1% (optional) (default to 0.01) + +try: + # Gets a sampling of new ephemeral metric data points that are added to existing time series. + api_instance.spy_on_ephemeral_points(metric=metric, host=host, point_tag_key=point_tag_key, sampling=sampling) +except ApiException as e: + print("Exception when calling IngestionSpyApi->spy_on_ephemeral_points: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metric** | **str**| List a point only if its metric name starts with the specified case-sensitive prefix. E.g., metric=Cust matches metrics named Customer, Customers, Customer.alerts, but not customer. | [optional] + **host** | **str**| List a point only if its source name starts with the specified case-sensitive prefix. | [optional] + **point_tag_key** | [**list[str]**](str.md)| List a point only if it has the specified point tag key. Add this parameter multiple times to specify multiple point tags, e.g., pointTagKey=env&pointTagKey=datacenter put env in the first line and datacenter in the second line as values | [optional] + **sampling** | **float**| goes from 0 to 1 with 0.01 being 1% | [optional] [default to 0.01] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **spy_on_histograms** > spy_on_histograms(histogram=histogram, host=host, histogram_tag_key=histogram_tag_key, sampling=sampling) diff --git a/setup.py b/setup.py index c5157d40..b41313d9 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "wavefront-api-client" -VERSION = "2.218.0" +VERSION = "2.219.6" # To install the library, run the following # # python setup.py install diff --git a/wavefront_api_client/api/ingestion_spy_api.py b/wavefront_api_client/api/ingestion_spy_api.py index be5a112c..0a410661 100644 --- a/wavefront_api_client/api/ingestion_spy_api.py +++ b/wavefront_api_client/api/ingestion_spy_api.py @@ -137,6 +137,110 @@ def spy_on_delta_counters_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def spy_on_ephemeral_points(self, **kwargs): # noqa: E501 + """Gets a sampling of new ephemeral metric data points that are added to existing time series. # noqa: E501 + + Try it Out button won't work in this case, as it's a streaming API. Endpoint: https://.wavefront.com/api/spy/ephemeral. Details usage can be find at: https://docs.wavefront.com/wavefront_monitoring_spy.html#get-ingested-metric-points-with-spy # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.spy_on_ephemeral_points(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str metric: List a point only if its metric name starts with the specified case-sensitive prefix. E.g., metric=Cust matches metrics named Customer, Customers, Customer.alerts, but not customer. + :param str host: List a point only if its source name starts with the specified case-sensitive prefix. + :param list[str] point_tag_key: List a point only if it has the specified point tag key. Add this parameter multiple times to specify multiple point tags, e.g., pointTagKey=env&pointTagKey=datacenter put env in the first line and datacenter in the second line as values + :param float sampling: goes from 0 to 1 with 0.01 being 1% + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.spy_on_ephemeral_points_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.spy_on_ephemeral_points_with_http_info(**kwargs) # noqa: E501 + return data + + def spy_on_ephemeral_points_with_http_info(self, **kwargs): # noqa: E501 + """Gets a sampling of new ephemeral metric data points that are added to existing time series. # noqa: E501 + + Try it Out button won't work in this case, as it's a streaming API. Endpoint: https://.wavefront.com/api/spy/ephemeral. Details usage can be find at: https://docs.wavefront.com/wavefront_monitoring_spy.html#get-ingested-metric-points-with-spy # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.spy_on_ephemeral_points_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str metric: List a point only if its metric name starts with the specified case-sensitive prefix. E.g., metric=Cust matches metrics named Customer, Customers, Customer.alerts, but not customer. + :param str host: List a point only if its source name starts with the specified case-sensitive prefix. + :param list[str] point_tag_key: List a point only if it has the specified point tag key. Add this parameter multiple times to specify multiple point tags, e.g., pointTagKey=env&pointTagKey=datacenter put env in the first line and datacenter in the second line as values + :param float sampling: goes from 0 to 1 with 0.01 being 1% + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['metric', 'host', 'point_tag_key', 'sampling'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method spy_on_ephemeral_points" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'metric' in params: + query_params.append(('metric', params['metric'])) # noqa: E501 + if 'host' in params: + query_params.append(('host', params['host'])) # noqa: E501 + if 'point_tag_key' in params: + query_params.append(('pointTagKey', params['point_tag_key'])) # noqa: E501 + collection_formats['pointTagKey'] = 'multi' # noqa: E501 + if 'sampling' in params: + query_params.append(('sampling', params['sampling'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/spy/ephemeral', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def spy_on_histograms(self, **kwargs): # noqa: E501 """Gets new histograms that are added to existing time series. # noqa: E501 diff --git a/wavefront_api_client/api_client.py b/wavefront_api_client/api_client.py index 006de784..369cd65f 100644 --- a/wavefront_api_client/api_client.py +++ b/wavefront_api_client/api_client.py @@ -74,7 +74,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/2.218.0/python' + self.user_agent = 'Swagger-Codegen/2.219.6/python' self.client_side_validation = configuration.client_side_validation def __del__(self): diff --git a/wavefront_api_client/configuration.py b/wavefront_api_client/configuration.py index 97b5b9f8..c4291bff 100644 --- a/wavefront_api_client/configuration.py +++ b/wavefront_api_client/configuration.py @@ -251,5 +251,5 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: v2\n"\ - "SDK Package Version: 2.218.0".\ + "SDK Package Version: 2.219.6".\ format(env=sys.platform, pyversion=sys.version) diff --git a/wavefront_api_client/models/response_container_set_business_function.py b/wavefront_api_client/models/response_container_set_business_function.py index 19b87be9..5c3697d3 100644 --- a/wavefront_api_client/models/response_container_set_business_function.py +++ b/wavefront_api_client/models/response_container_set_business_function.py @@ -100,7 +100,7 @@ def response(self, response): :param response: The response of this ResponseContainerSetBusinessFunction. # noqa: E501 :type: list[str] """ - allowed_values = ["VIEW_MONITORED_APPLICATION_SERVICE", "VIEW_MONITORED_CLUSTER", "VIEW_MONITORED_CLUSTER_TAGS", "VIEW_DASHBOARDS", "VIEW_DASHBOARDS_TAGS", "VIEW_METRIC_TIMESERIES", "VIEW_HOSTS", "VIEW_HOST_TAGS", "VIEW_AGENT_TAGS", "VIEW_EVENTS", "VIEW_EVENT_TAGS", "VIEW_ALERTS", "VIEW_ALERT_TAGS", "VIEW_REGISTERED_QUERIES", "VIEW_REGISTERED_QUERY_TAGS", "VIEW_MAINTENANCE_WINDOWS", "VIEW_NOTIFICANTS", "VIEW_CUSTOM_METRICS", "VIEW_TARGETS", "VIEW_AGENTS", "VIEW_SSH_CONFIGS", "VIEW_EXTERNAL_SERVICES", "VIEW_EXTERNAL_SERVICES_TAGS", "VIEW_EXTERNAL_LINKS", "VIEW_EXTERNAL_LINK_DIGESTS", "VIEW_EXTERNAL_LINK_TAGS", "VIEW_LOGS", "VIEW_SLOW_QUERY_PAGE", "VIEW_SAVED_SEARCHES", "VIEW_MY_MESSAGES", "VIEW_APPLICATIONS", "VIEW_ANOMALY", "SPY_ON_POINTS", "SPY_ON_ID_CREATIONS", "SPY_UNUSED_METRICS", "VIEW_SAML_SSO_SETTINGS", "VIEW_INGESTION_POLICY", "VIEW_CLUSTER_INFO", "VIEW_QUERY_FEDERATION", "MODIFY_MONITORED_APPLICATION_SERVICE", "MODIFY_MONITORED_CLUSTER", "MODIFY_MONITORED_CLUSTER_TAGS", "MODIFY_PRIVATE_TAGS", "MODIFY_CUSTOM_METRICS", "MODIFY_DASHBOARDS", "MODIFY_EVENTS", "MODIFY_EVENT_TAGS", "MODIFY_AGENTS", "MODIFY_AGENT_TAGS", "MODIFY_HOSTS", "MODIFY_HOST_TAGS", "MODIFY_MACHINES", "MODIFY_SSH_CONFIGS", "MODIFY_ALERTS", "MODIFY_ALERT_TAGS", "MODIFY_REGISTERED_QUERIES", "MODIFY_REGISTERED_QUERY_TAGS", "MODIFY_MAINTENANCE_WINDOWS", "MODIFY_NOTIFICANTS", "MODIFY_DASHBOARD_TAGS", "MODIFY_TARGETS", "MODIFY_EXTERNAL_SERVICES", "MODIFY_EXTERNAL_SERVICES_TAGS", "CREATE_EMBEDDED_CHARTS", "MODIFY_METRIC_VISIBILITY", "MODIFY_EXTERNAL_LINKS", "MODIFY_EXTERNAL_LINK_TAGS", "MODIFY_SAVED_SEARCHES", "MODIFY_SAVED_TRACES_SEARCH", "MODIFY_OWN_ONBOARDING_STATE", "MODIFY_APPLICATIONS", "INGESTION_POLICY_MANAGEMENT", "SECURITY_POLICY_MANAGEMENT", "MODIFY_SAML_SSO_SETTINGS", "METRIC_INGESTION", "METRIC_INGESTION_LISTENER", "LOGIN", "LOGOUT", "CHANGE_PASSWORD", "SEND_FORGOTTEN_PASSWORD_EMAILS", "CHANGE_USER_PREFERENCE", "CREATE_TOKEN", "REVOKE_ALL_SESSIONS", "REVOKE_ALL_TOKENS", "REVOKE_TOKEN", "GET_TOKENS", "GET_ALL_ACCOUNTS", "GET_ALL_USERS", "GET_ALL_SERVICE_ACCOUNTS", "ADMINISTER_GROUPS", "DELETE_ACCOUNT", "INVITE_USER", "ADMINISTER_SERVICE_ACCOUNTS", "NO_REAUTH_INVITE_USER", "ADMINISTER_USER_GROUPS", "ADMINISTER_ALL_TOKENS", "ADMINISTER_CUSTOMER_PREFERENCES", "ROLES_MANAGEMENT", "VIEW_CUSTOMERS", "MODIFY_CUSTOMER", "DELETE_CUSTOMER", "SEND_UI_METRICS", "UPGRADE_CUSTOMER", "TOKEN"] # noqa: E501 + allowed_values = ["VIEW_MONITORED_APPLICATION_SERVICE", "VIEW_MONITORED_CLUSTER", "VIEW_MONITORED_CLUSTER_TAGS", "VIEW_DASHBOARDS", "VIEW_DASHBOARDS_TAGS", "VIEW_METRIC_TIMESERIES", "VIEW_EPHEMERAL_METRIC_TIMESERIES", "VIEW_HOSTS", "VIEW_HOST_TAGS", "VIEW_AGENT_TAGS", "VIEW_EVENTS", "VIEW_EVENT_TAGS", "VIEW_ALERTS", "VIEW_ALERT_TAGS", "VIEW_REGISTERED_QUERIES", "VIEW_REGISTERED_QUERY_TAGS", "VIEW_MAINTENANCE_WINDOWS", "VIEW_NOTIFICANTS", "VIEW_CUSTOM_METRICS", "VIEW_TARGETS", "VIEW_AGENTS", "VIEW_SSH_CONFIGS", "VIEW_EXTERNAL_SERVICES", "VIEW_EXTERNAL_SERVICES_TAGS", "VIEW_EXTERNAL_LINKS", "VIEW_EXTERNAL_LINK_DIGESTS", "VIEW_EXTERNAL_LINK_TAGS", "VIEW_LOGS", "VIEW_SLOW_QUERY_PAGE", "VIEW_SAVED_SEARCHES", "VIEW_MY_MESSAGES", "VIEW_APPLICATIONS", "VIEW_ANOMALY", "SPY_ON_POINTS", "SPY_ON_ID_CREATIONS", "SPY_UNUSED_METRICS", "VIEW_SAML_SSO_SETTINGS", "VIEW_INGESTION_POLICY", "VIEW_CLUSTER_INFO", "VIEW_QUERY_FEDERATION", "MODIFY_MONITORED_APPLICATION_SERVICE", "MODIFY_MONITORED_CLUSTER", "MODIFY_MONITORED_CLUSTER_TAGS", "MODIFY_PRIVATE_TAGS", "MODIFY_CUSTOM_METRICS", "MODIFY_DASHBOARDS", "MODIFY_EVENTS", "MODIFY_EVENT_TAGS", "MODIFY_AGENTS", "MODIFY_AGENT_TAGS", "MODIFY_HOSTS", "MODIFY_HOST_TAGS", "MODIFY_MACHINES", "MODIFY_SSH_CONFIGS", "MODIFY_ALERTS", "MODIFY_ALERT_TAGS", "MODIFY_REGISTERED_QUERIES", "MODIFY_REGISTERED_QUERY_TAGS", "MODIFY_MAINTENANCE_WINDOWS", "MODIFY_NOTIFICANTS", "MODIFY_DASHBOARD_TAGS", "MODIFY_TARGETS", "MODIFY_EXTERNAL_SERVICES", "MODIFY_EXTERNAL_SERVICES_TAGS", "CREATE_EMBEDDED_CHARTS", "MODIFY_METRIC_VISIBILITY", "MODIFY_METRIC_TYPE", "MODIFY_EXTERNAL_LINKS", "MODIFY_EXTERNAL_LINK_TAGS", "MODIFY_SAVED_SEARCHES", "MODIFY_SAVED_TRACES_SEARCH", "MODIFY_OWN_ONBOARDING_STATE", "MODIFY_APPLICATIONS", "INGESTION_POLICY_MANAGEMENT", "SECURITY_POLICY_MANAGEMENT", "MODIFY_SAML_SSO_SETTINGS", "METRIC_INGESTION", "METRIC_INGESTION_LISTENER", "LOGIN", "LOGOUT", "CHANGE_PASSWORD", "SEND_FORGOTTEN_PASSWORD_EMAILS", "CHANGE_USER_PREFERENCE", "CREATE_TOKEN", "REVOKE_ALL_SESSIONS", "REVOKE_ALL_TOKENS", "REVOKE_TOKEN", "GET_TOKENS", "GET_ALL_ACCOUNTS", "GET_ALL_USERS", "GET_ALL_SERVICE_ACCOUNTS", "ADMINISTER_GROUPS", "DELETE_ACCOUNT", "INVITE_USER", "ADMINISTER_SERVICE_ACCOUNTS", "NO_REAUTH_INVITE_USER", "ADMINISTER_USER_GROUPS", "ADMINISTER_ALL_TOKENS", "ADMINISTER_CUSTOMER_PREFERENCES", "ROLES_MANAGEMENT", "VIEW_CUSTOMERS", "MODIFY_CUSTOMER", "DELETE_CUSTOMER", "SEND_UI_METRICS", "UPGRADE_CUSTOMER", "TOKEN"] # noqa: E501 if (self._configuration.client_side_validation and not set(response).issubset(set(allowed_values))): # noqa: E501 raise ValueError(