diff --git a/.generator/src/generator/formatter.py b/.generator/src/generator/formatter.py index 6d60a7c13c..f8f5666393 100644 --- a/.generator/src/generator/formatter.py +++ b/.generator/src/generator/formatter.py @@ -96,7 +96,7 @@ def header(self, text, level, raw=None): def docstring(text): - return m2r2.convert(text.replace("\\n", "\\\\n"), renderer=CustomRenderer())[1:-1].replace("\\ ", " ").replace("\\`", "\\\\`") + return m2r2.convert(text.replace("\\n", "\\\\n"), renderer=CustomRenderer())[1:-1].replace("\\ ", " ").replace("\\`", "\\\\`").replace("\n\n\n", "\n\n") def _merge_imports(a, b): diff --git a/.generator/src/generator/templates/api.j2 b/.generator/src/generator/templates/api.j2 index ed3c279dbc..55d5d63d80 100644 --- a/.generator/src/generator/templates/api.j2 +++ b/.generator/src/generator/templates/api.j2 @@ -3,6 +3,7 @@ from __future__ import annotations import collections from typing import Any, Dict, List, Union +import warnings from {{ package }}.api_client import ApiClient, Endpoint as _Endpoint from {{ package }}.model_utils import ( @@ -141,7 +142,7 @@ class {{ classname }}: {%- for path, method, operation in operations|sort(attribute="2.operationId") %} {%- set returnType = operation|return_type %} def {{ operation.operationId|safe_snake_case }}(self, {% for name, parameter in operation|parameters if parameter.required %}{{name|attribute_name}}: {{ get_type_for_parameter(parameter, typing=True) }}, {% endfor %}{% for name, parameter in operation|parameters if not parameter.required %}{% if loop.first %}*, {% endif %}{{name|attribute_name}}: Union[{{ get_type_for_parameter(parameter, typing=True) }}, UnsetType]=unset, {% endfor %}) -> {% if returnType %}{{ returnType.replace("[", "List[") }}{% else %}None{% endif %}: - """{{ operation.summary|indent(8) }}. + """{{ operation.summary|indent(8) }}.{% if operation.deprecated %} **Deprecated**.{% endif %} {% if operation.description %} {{ operation.description|docstring|indent(8) }} {% endif %} @@ -168,6 +169,9 @@ class {{ classname }}: kwargs["{{ name|attribute_name }}"] = {{ name|attribute_name }} {%- endif %} {% endfor %} +{%- if operation.deprecated %} + warnings.warn("{{ operation.operationId|safe_snake_case }} is deprecated", DeprecationWarning, stacklevel=2) +{%- endif %} return self._{{ operation.operationId|safe_snake_case }}_endpoint.call_with_http_info(**kwargs) {%- if operation["x-pagination"] %} {%- set pagination = operation["x-pagination"] %} diff --git a/.generator/src/generator/templates/model_generic.j2 b/.generator/src/generator/templates/model_generic.j2 index 1d60596318..d92a59d0e5 100644 --- a/.generator/src/generator/templates/model_generic.j2 +++ b/.generator/src/generator/templates/model_generic.j2 @@ -107,7 +107,7 @@ class {{ name }}(ModelNormal): {{ model.description|docstring|indent(8) }} {%- for attr, definition in model.get("properties", {}).items() %} {# keep new line #} - :param {{ attr|attribute_name }}: {{ definition.description|docstring|indent(12) }} + :param {{ attr|attribute_name }}: {{ definition.description|docstring|indent(12) }}{% if definition.deprecated %} **Deprecated**.{% endif %} :type {{ attr|attribute_name }}: {{ get_type_for_attribute(model, attr, current_name=name) }}{% if definition.nullable %}, none_type{% endif %}{% if attr not in model.get("required", []) %}, optional{% endif %} {%- endfor %} """ diff --git a/src/datadog_api_client/v1/api/aws_logs_integration_api.py b/src/datadog_api_client/v1/api/aws_logs_integration_api.py index c119c74d10..af48ffa751 100644 --- a/src/datadog_api_client/v1/api/aws_logs_integration_api.py +++ b/src/datadog_api_client/v1/api/aws_logs_integration_api.py @@ -175,7 +175,6 @@ def check_aws_logs_lambda_async( is the same as for Enable an AWS service log collection. Subsequent requests will always repeat the above, so this endpoint can be polled intermittently instead of blocking. - * Returns a status of 'created' when it's checking if the Lambda exists in the account. * Returns a status of 'waiting' while checking. * Returns a status of 'checked and ok' if the Lambda exists. @@ -201,7 +200,6 @@ def check_aws_logs_services_async( Done async, so can be repeatedly polled in a non-blocking fashion until the async request completes. - * Returns a status of ``created`` when it's checking if the permissions exists in the AWS account. * Returns a status of ``waiting`` while checking. diff --git a/src/datadog_api_client/v1/api/events_api.py b/src/datadog_api_client/v1/api/events_api.py index 0c6309fdba..7710d99d27 100644 --- a/src/datadog_api_client/v1/api/events_api.py +++ b/src/datadog_api_client/v1/api/events_api.py @@ -196,7 +196,6 @@ def list_events( **Notes** : - * If the event you’re querying contains markdown formatting of any kind, you may see characters such as ``%`` , ``\\`` , ``n`` in your output. diff --git a/src/datadog_api_client/v1/api/logs_api.py b/src/datadog_api_client/v1/api/logs_api.py index 2645c60149..e23ea0a43b 100644 --- a/src/datadog_api_client/v1/api/logs_api.py +++ b/src/datadog_api_client/v1/api/logs_api.py @@ -4,6 +4,7 @@ from __future__ import annotations from typing import Any, Dict, Union +import warnings from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint from datadog_api_client.model_utils import ( @@ -158,18 +159,16 @@ def submit_log( content_encoding: Union[ContentEncoding, UnsetType] = unset, ddtags: Union[str, UnsetType] = unset, ) -> dict: - """Send logs. + """Send logs. **Deprecated**. Send your logs to your Datadog platform over HTTP. Limits per HTTP request are: - * Maximum content size per payload (uncompressed): 5MB * Maximum size for a single log: 1MB * Maximum array size if sending multiple logs in an array: 1000 entries Any log exceeding 1MB is accepted and truncated by Datadog: - * For a single log request, the API truncates the log at 1MB and returns a 2xx. * For a multi-logs request, the API processes all logs, truncates only logs larger than 1MB, and returns a 2xx. @@ -178,7 +177,6 @@ def submit_log( The status codes answered by the HTTP API are: - * 200: OK * 400: Bad request (likely an issue in the payload formatting) * 403: Permission issue (likely using an invalid API Key) @@ -202,4 +200,5 @@ def submit_log( kwargs["body"] = body + warnings.warn("submit_log is deprecated", DeprecationWarning, stacklevel=2) return self._submit_log_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v1/api/logs_pipelines_api.py b/src/datadog_api_client/v1/api/logs_pipelines_api.py index 4e71849b25..e07725248b 100644 --- a/src/datadog_api_client/v1/api/logs_pipelines_api.py +++ b/src/datadog_api_client/v1/api/logs_pipelines_api.py @@ -16,7 +16,6 @@ class LogsPipelinesApi: Pipelines and processors operate on incoming logs, parsing and transforming them into structured attributes for easier querying. - * See the `pipelines configuration page `_ for a list of the pipelines and processors currently configured in web UI. diff --git a/src/datadog_api_client/v1/api/metrics_api.py b/src/datadog_api_client/v1/api/metrics_api.py index f2aaa7604c..1052e62626 100644 --- a/src/datadog_api_client/v1/api/metrics_api.py +++ b/src/datadog_api_client/v1/api/metrics_api.py @@ -25,7 +25,6 @@ class MetricsApi: """ The metrics endpoint allows you to: - * Post metrics data so it can be graphed on Datadog’s dashboards * Query metrics from any time period * Modify tag configurations for metrics @@ -374,7 +373,6 @@ def submit_metrics( If you’re submitting metrics directly to the Datadog API without using DogStatsD, expect: - * 64 bits for the timestamp * 64 bits for the value * 40 bytes for the metric names diff --git a/src/datadog_api_client/v1/api/monitors_api.py b/src/datadog_api_client/v1/api/monitors_api.py index 5918dcdc22..6bd28a3c84 100644 --- a/src/datadog_api_client/v1/api/monitors_api.py +++ b/src/datadog_api_client/v1/api/monitors_api.py @@ -382,7 +382,6 @@ def create_monitor( The type of monitor chosen from: - * anomaly: ``query alert`` * APM: ``query alert`` or ``trace-analytics alert`` * composite: ``composite`` @@ -410,7 +409,6 @@ def create_monitor( Example: ``time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator #`` - * ``time_aggr`` : avg, sum, max, min, change, or pct_change * ``time_window`` : ``last_#m`` (with ``#`` between 1 and 10080 depending on the monitor type) or ``last_#h`` (with ``#`` between 1 and 168 depending on the monitor type) or ``last_1d`` , or ``last_1w`` * ``space_aggr`` : avg, sum, min, or max @@ -422,7 +420,6 @@ def create_monitor( If you are using the ``_change_`` or ``_pct_change_`` time aggregator, instead use ``change_aggr(time_aggr(time_window), timeshift):space_aggr:metric{tags} [by {key}] operator #`` with: - * ``change_aggr`` change, pct_change * ``time_aggr`` avg, sum, max, min `Learn more `_ * ``time_window`` last_#m (between 1 and 2880 depending on the monitor type), last_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or 2) @@ -435,7 +432,6 @@ def create_monitor( Example: ``"check".over(tags).last(count).by(group).count_by_status()`` - * ``check`` name of the check, for example ``datadog.agent.up`` * ``tags`` one or more quoted tags (comma-separated), or "*". for example: ``.over("env:prod", "role:db")`` ; ``over`` cannot be blank. * ``count`` must be at greater than or equal to your max threshold (defined in the ``options`` ). It is limited to 100. @@ -447,7 +443,6 @@ def create_monitor( Example: ``events('sources:nagios status:error,warning priority:normal tags: "string query"').rollup("count").last("1h")"`` - * ``event`` , the event query string: * ``string_query`` free text query to match against event title and text. * ``sources`` event sources (comma-separated). @@ -465,7 +460,6 @@ def create_monitor( Example: ``events(query).rollup(rollup_method[, measure]).last(time_window) operator #`` - * ``query`` The search query - following the `Log search syntax `_. * ``rollup_method`` The stats roll-up method - supports ``count`` , ``avg`` and ``cardinality``. * ``measure`` For ``avg`` and cardinality ``rollup_method`` - specify the measure or the facet name you want to use. @@ -477,7 +471,6 @@ def create_monitor( Example: ``processes(search).over(tags).rollup('count').last(timeframe) operator #`` - * ``search`` free text search string for querying processes. Matching processes match results on the `Live Processes `_ page. * ``tags`` one or more tags (comma-separated) @@ -489,7 +482,6 @@ def create_monitor( Example: ``logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #`` - * ``query`` The search query - following the `Log search syntax `_. * ``index_name`` For multi-index organizations, the log index in which the request is performed. * ``rollup_method`` The stats roll-up method - supports ``count`` , ``avg`` and ``cardinality``. @@ -502,7 +494,6 @@ def create_monitor( Example: ``12345 && 67890`` , where ``12345`` and ``67890`` are the IDs of non-composite monitors - * ``name`` [ *required* , *default* = **dynamic, based on query** ]: The name of the alert. * ``message`` [ *required* , *default* = **dynamic, based on query** ]: A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same '@username' notation as events. @@ -514,7 +505,6 @@ def create_monitor( Example: ``error_budget("slo_id").over("time_window") operator #`` - * ``slo_id`` : The alphanumeric SLO ID of the SLO you are configuring the alert for. * `time_window`: The time window of the SLO target you wish to alert on. Valid options: ``7d`` , ``30d`` , ``90d``. * ``operator`` : ``>=`` or ``>`` @@ -523,7 +513,6 @@ def create_monitor( Example: ``audits(query).rollup(rollup_method[, measure]).last(time_window) operator #`` - * ``query`` The search query - following the `Log search syntax `_. * ``rollup_method`` The stats roll-up method - supports ``count`` , ``avg`` and ``cardinality``. * ``measure`` For ``avg`` and cardinality ``rollup_method`` - specify the measure or the facet name you want to use. @@ -537,7 +526,6 @@ def create_monitor( Example: ``ci-pipelines(query).rollup(rollup_method[, measure]).last(time_window) operator #`` - * ``query`` The search query - following the `Log search syntax `_. * ``rollup_method`` The stats roll-up method - supports ``count`` , ``avg`` , and ``cardinality``. * ``measure`` For ``avg`` and cardinality ``rollup_method`` - specify the measure or the facet name you want to use. @@ -551,7 +539,6 @@ def create_monitor( Example: ``ci-tests(query).rollup(rollup_method[, measure]).last(time_window) operator #`` - * ``query`` The search query - following the `Log search syntax `_. * ``rollup_method`` The stats roll-up method - supports ``count`` , ``avg`` , and ``cardinality``. * ``measure`` For ``avg`` and cardinality ``rollup_method`` - specify the measure or the facet name you want to use. @@ -566,7 +553,6 @@ def create_monitor( Example(RUM): ``error-tracking-rum(query).rollup(rollup_method[, measure]).last(time_window) operator #`` Example(APM Traces): ``error-tracking-traces(query).rollup(rollup_method[, measure]).last(time_window) operator #`` - * ``query`` The search query - following the `Log search syntax `_. * ``rollup_method`` The stats roll-up method - supports ``count`` , ``avg`` , and ``cardinality``. * ``measure`` For ``avg`` and cardinality ``rollup_method`` - specify the measure or the facet name you want to use. @@ -719,7 +705,6 @@ def search_monitor_groups( :type per_page: int, optional :param sort: String for sort order, composed of field and sort order separate by a comma, for example ``name,asc``. Supported sort directions: ``asc`` , ``desc``. Supported fields: - * ``name`` * ``status`` * ``tags`` @@ -765,7 +750,6 @@ def search_monitors( :type per_page: int, optional :param sort: String for sort order, composed of field and sort order separate by a comma, for example ``name,asc``. Supported sort directions: ``asc`` , ``desc``. Supported fields: - * ``name`` * ``status`` * ``tags`` diff --git a/src/datadog_api_client/v1/api/organizations_api.py b/src/datadog_api_client/v1/api/organizations_api.py index bd4c77b1a2..c6b37f207d 100644 --- a/src/datadog_api_client/v1/api/organizations_api.py +++ b/src/datadog_api_client/v1/api/organizations_api.py @@ -275,7 +275,6 @@ def upload_idp_for_org( There are a couple of options for updating the Identity Provider (IdP) metadata from your SAML IdP. - * **Multipart Form-Data** : Post the IdP metadata file using a form post. diff --git a/src/datadog_api_client/v1/api/service_checks_api.py b/src/datadog_api_client/v1/api/service_checks_api.py index 47351ec35b..3b84f51697 100644 --- a/src/datadog_api_client/v1/api/service_checks_api.py +++ b/src/datadog_api_client/v1/api/service_checks_api.py @@ -18,7 +18,6 @@ class ServiceChecksApi: are limited for checks with a Critical or Warning status, they are dropped for checks with an OK status. - * `Read more about Service Check monitors. `_ * `Read more about Process Check monitors. `_ * `Read more about Network Check monitors. `_ @@ -63,7 +62,6 @@ def submit_service_check( **Notes** : - * A valid API key is required. * Service checks can be submitted up to 10 minutes in the past. diff --git a/src/datadog_api_client/v1/api/usage_metering_api.py b/src/datadog_api_client/v1/api/usage_metering_api.py index 8f3ed33d78..6d6dfd1608 100644 --- a/src/datadog_api_client/v1/api/usage_metering_api.py +++ b/src/datadog_api_client/v1/api/usage_metering_api.py @@ -4,6 +4,7 @@ from __future__ import annotations from typing import Any, Dict, List, Union +import warnings from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint from datadog_api_client.model_utils import ( @@ -1346,7 +1347,7 @@ def get_daily_custom_reports( sort_dir: Union[UsageSortDirection, UnsetType] = unset, sort: Union[UsageSort, UnsetType] = unset, ) -> UsageCustomReportsResponse: - """Get the list of available daily custom reports. + """Get the list of available daily custom reports. **Deprecated**. Get daily custom reports. **Note:** This endpoint will be fully deprecated on December 1, 2022. @@ -1375,6 +1376,7 @@ def get_daily_custom_reports( if sort is not unset: kwargs["sort"] = sort + warnings.warn("get_daily_custom_reports is deprecated", DeprecationWarning, stacklevel=2) return self._get_daily_custom_reports_endpoint.call_with_http_info(**kwargs) def get_hourly_usage_attribution( @@ -1501,7 +1503,7 @@ def get_monthly_custom_reports( sort_dir: Union[UsageSortDirection, UnsetType] = unset, sort: Union[UsageSort, UnsetType] = unset, ) -> UsageCustomReportsResponse: - """Get the list of available monthly custom reports. + """Get the list of available monthly custom reports. **Deprecated**. Get monthly custom reports. **Note:** This endpoint will be fully deprecated on December 1, 2022. @@ -1530,6 +1532,7 @@ def get_monthly_custom_reports( if sort is not unset: kwargs["sort"] = sort + warnings.warn("get_monthly_custom_reports is deprecated", DeprecationWarning, stacklevel=2) return self._get_monthly_custom_reports_endpoint.call_with_http_info(**kwargs) def get_monthly_usage_attribution( @@ -1612,7 +1615,7 @@ def get_specified_daily_custom_reports( self, report_id: str, ) -> UsageSpecifiedCustomReportsResponse: - """Get specified daily custom reports. + """Get specified daily custom reports. **Deprecated**. Get specified daily custom reports. **Note:** This endpoint will be fully deprecated on December 1, 2022. @@ -1625,13 +1628,14 @@ def get_specified_daily_custom_reports( kwargs: Dict[str, Any] = {} kwargs["report_id"] = report_id + warnings.warn("get_specified_daily_custom_reports is deprecated", DeprecationWarning, stacklevel=2) return self._get_specified_daily_custom_reports_endpoint.call_with_http_info(**kwargs) def get_specified_monthly_custom_reports( self, report_id: str, ) -> UsageSpecifiedCustomReportsResponse: - """Get specified monthly custom reports. + """Get specified monthly custom reports. **Deprecated**. Get specified monthly custom reports. **Note:** This endpoint will be fully deprecated on December 1, 2022. @@ -1644,6 +1648,7 @@ def get_specified_monthly_custom_reports( kwargs: Dict[str, Any] = {} kwargs["report_id"] = report_id + warnings.warn("get_specified_monthly_custom_reports is deprecated", DeprecationWarning, stacklevel=2) return self._get_specified_monthly_custom_reports_endpoint.call_with_http_info(**kwargs) def get_usage_analyzed_logs( @@ -1684,7 +1689,7 @@ def get_usage_attribution( offset: Union[int, UnsetType] = unset, limit: Union[int, UnsetType] = unset, ) -> UsageAttributionResponse: - """Get usage attribution. + """Get usage attribution. **Deprecated**. Get usage attribution. **Note:** This endpoint will be fully deprecated on December 1, 2022. @@ -1732,6 +1737,7 @@ def get_usage_attribution( if limit is not unset: kwargs["limit"] = limit + warnings.warn("get_usage_attribution is deprecated", DeprecationWarning, stacklevel=2) return self._get_usage_attribution_endpoint.call_with_http_info(**kwargs) def get_usage_audit_logs( @@ -2338,7 +2344,7 @@ def get_usage_synthetics( *, end_hr: Union[datetime, UnsetType] = unset, ) -> UsageSyntheticsResponse: - """Get hourly usage for synthetics checks. + """Get hourly usage for synthetics checks. **Deprecated**. Get hourly usage for `synthetics checks `_. **Note:** hourly usage data for all products is now available in the `Get hourly usage by product family API `_. Refer to `Migrating from the V1 Hourly Usage APIs to V2 `_ for the associated migration guide. @@ -2355,6 +2361,7 @@ def get_usage_synthetics( if end_hr is not unset: kwargs["end_hr"] = end_hr + warnings.warn("get_usage_synthetics is deprecated", DeprecationWarning, stacklevel=2) return self._get_usage_synthetics_endpoint.call_with_http_info(**kwargs) def get_usage_synthetics_api( diff --git a/src/datadog_api_client/v1/model/dashboard.py b/src/datadog_api_client/v1/model/dashboard.py index b8195ecff6..7468ae6790 100644 --- a/src/datadog_api_client/v1/model/dashboard.py +++ b/src/datadog_api_client/v1/model/dashboard.py @@ -86,7 +86,7 @@ def __init__(self_, layout_type, title, widgets, *args, **kwargs): :param id: ID of the dashboard. :type id: str, optional - :param is_read_only: Whether this dashboard is read-only. If True, only the author and admins can make changes to it. Prefer using ``restricted_roles`` to manage write authorization. + :param is_read_only: Whether this dashboard is read-only. If True, only the author and admins can make changes to it. Prefer using ``restricted_roles`` to manage write authorization. **Deprecated**. :type is_read_only: bool, optional :param layout_type: Layout type of the dashboard. diff --git a/src/datadog_api_client/v1/model/dashboard_template_variable.py b/src/datadog_api_client/v1/model/dashboard_template_variable.py index 64115ca979..18bfdc0ea0 100644 --- a/src/datadog_api_client/v1/model/dashboard_template_variable.py +++ b/src/datadog_api_client/v1/model/dashboard_template_variable.py @@ -36,7 +36,7 @@ def __init__(self_, name, *args, **kwargs): :param available_values: The list of values that the template variable drop-down is limited to. :type available_values: [str], none_type, optional - :param default: (deprecated) The default value for the template variable on dashboard load. Cannot be used in conjunction with ``defaults``. + :param default: (deprecated) The default value for the template variable on dashboard load. Cannot be used in conjunction with ``defaults``. **Deprecated**. :type default: str, none_type, optional :param defaults: One or many default values for template variables on load. If more than one default is specified, they will be unioned together with ``OR``. Cannot be used in conjunction with ``default``. diff --git a/src/datadog_api_client/v1/model/dashboard_template_variable_preset_value.py b/src/datadog_api_client/v1/model/dashboard_template_variable_preset_value.py index 75210a724a..4471f946a6 100644 --- a/src/datadog_api_client/v1/model/dashboard_template_variable_preset_value.py +++ b/src/datadog_api_client/v1/model/dashboard_template_variable_preset_value.py @@ -37,7 +37,7 @@ def __init__(self_, *args, **kwargs): :param name: The name of the variable. :type name: str, optional - :param value: (deprecated) The value of the template variable within the saved view. Cannot be used in conjunction with ``values``. + :param value: (deprecated) The value of the template variable within the saved view. Cannot be used in conjunction with ``values``. **Deprecated**. :type value: str, optional :param values: One or many template variable values within the saved view, which will be unioned together using ``OR`` if more than one is specified. Cannot be used in conjunction with ``value``. diff --git a/src/datadog_api_client/v1/model/distribution_widget_definition.py b/src/datadog_api_client/v1/model/distribution_widget_definition.py index f2d00b8238..59f1ad21dd 100644 --- a/src/datadog_api_client/v1/model/distribution_widget_definition.py +++ b/src/datadog_api_client/v1/model/distribution_widget_definition.py @@ -61,7 +61,7 @@ def __init__(self_, requests, type, *args, **kwargs): aggregated across one or several tags, such as hosts. Unlike the heat map, a distribution graph’s x-axis is quantity rather than time. - :param legend_size: (Deprecated) The widget legend was replaced by a tooltip and sidebar. + :param legend_size: (Deprecated) The widget legend was replaced by a tooltip and sidebar. **Deprecated**. :type legend_size: str, optional :param markers: List of markers. @@ -73,7 +73,7 @@ def __init__(self_, requests, type, *args, **kwargs): to learn how to build the ``REQUEST_SCHEMA``. :type requests: [DistributionWidgetRequest] - :param show_legend: (Deprecated) The widget legend was replaced by a tooltip and sidebar. + :param show_legend: (Deprecated) The widget legend was replaced by a tooltip and sidebar. **Deprecated**. :type show_legend: bool, optional :param time: Time setting for the widget. diff --git a/src/datadog_api_client/v1/model/log_stream_widget_definition.py b/src/datadog_api_client/v1/model/log_stream_widget_definition.py index 87b98e08e1..c2aaa04d1b 100644 --- a/src/datadog_api_client/v1/model/log_stream_widget_definition.py +++ b/src/datadog_api_client/v1/model/log_stream_widget_definition.py @@ -60,7 +60,7 @@ def __init__(self_, type, *args, **kwargs): :param indexes: An array of index names to query in the stream. Use [] to query all indexes at once. :type indexes: [str], optional - :param logset: ID of the log set to use. + :param logset: ID of the log set to use. **Deprecated**. :type logset: str, optional :param message_display: Amount of log lines to display diff --git a/src/datadog_api_client/v1/model/logs_arithmetic_processor.py b/src/datadog_api_client/v1/model/logs_arithmetic_processor.py index d77607485e..2d9142932c 100644 --- a/src/datadog_api_client/v1/model/logs_arithmetic_processor.py +++ b/src/datadog_api_client/v1/model/logs_arithmetic_processor.py @@ -49,7 +49,6 @@ def __init__(self_, expression, target, type, *args, **kwargs): *Notes* : - * The operator ``-`` needs to be space split in the formula as it can also be contained in attribute names. * If the target attribute already exists, it is overwritten by the result of the formula. * Results are rounded up to the 9th decimal. For example, if the result of the formula is ``0.1234567891`` , diff --git a/src/datadog_api_client/v1/model/logs_category_processor.py b/src/datadog_api_client/v1/model/logs_category_processor.py index 053ee547f8..ae41d2458e 100644 --- a/src/datadog_api_client/v1/model/logs_category_processor.py +++ b/src/datadog_api_client/v1/model/logs_category_processor.py @@ -39,7 +39,6 @@ def __init__(self_, categories, target, type, *args, **kwargs): **Notes** : - * The syntax of the query is the one of Logs Explorer search bar. The query can be done on any log attribute or tag, whether it is a facet or not. Wildcards can also be used inside your query. diff --git a/src/datadog_api_client/v1/model/logs_date_remapper.py b/src/datadog_api_client/v1/model/logs_date_remapper.py index 65082f9149..be974b3c6d 100644 --- a/src/datadog_api_client/v1/model/logs_date_remapper.py +++ b/src/datadog_api_client/v1/model/logs_date_remapper.py @@ -32,7 +32,6 @@ def __init__(self_, sources, type, *args, **kwargs): """ As Datadog receives logs, it timestamps them using the value(s) from any of these default attributes. - * ``timestamp`` * ``date`` * ``_timestamp`` diff --git a/src/datadog_api_client/v1/model/logs_status_remapper.py b/src/datadog_api_client/v1/model/logs_status_remapper.py index 1bc5459388..2964cce9a5 100644 --- a/src/datadog_api_client/v1/model/logs_status_remapper.py +++ b/src/datadog_api_client/v1/model/logs_status_remapper.py @@ -34,7 +34,6 @@ def __init__(self_, sources, type, *args, **kwargs): Each incoming status value is mapped as follows. - * Integers from 0 to 7 map to the Syslog severity standards * Strings beginning with ``emerg`` or f (case-insensitive) map to ``emerg`` (0) * Strings beginning with ``a`` (case-insensitive) map to ``alert`` (1) diff --git a/src/datadog_api_client/v1/model/logs_string_builder_processor.py b/src/datadog_api_client/v1/model/logs_string_builder_processor.py index 2db7800790..af93486179 100644 --- a/src/datadog_api_client/v1/model/logs_string_builder_processor.py +++ b/src/datadog_api_client/v1/model/logs_string_builder_processor.py @@ -42,7 +42,6 @@ def __init__(self_, target, template, type, *args, **kwargs): **Notes** : - * The processor only accepts attributes with values or an array of values in the blocks. * If an attribute cannot be used (object or array of object), it is replaced by an empty string or the entire operation is skipped depending on your selection. diff --git a/src/datadog_api_client/v1/model/logs_trace_remapper.py b/src/datadog_api_client/v1/model/logs_trace_remapper.py index 291bd5278b..18d863846d 100644 --- a/src/datadog_api_client/v1/model/logs_trace_remapper.py +++ b/src/datadog_api_client/v1/model/logs_trace_remapper.py @@ -32,7 +32,6 @@ def __init__(self_, type, *args, **kwargs): """ There are two ways to improve correlation between application traces and logs. - #. Follow the documentation on `how to inject a trace ID in the application logs `_ and by default log integrations take care of all the rest of the setup. diff --git a/src/datadog_api_client/v1/model/monitor_options.py b/src/datadog_api_client/v1/model/monitor_options.py index 607898f05b..644901f71e 100644 --- a/src/datadog_api_client/v1/model/monitor_options.py +++ b/src/datadog_api_client/v1/model/monitor_options.py @@ -108,7 +108,7 @@ def __init__(self_, *args, **kwargs): :param aggregation: Type of aggregation performed in the monitor query. :type aggregation: MonitorOptionsAggregation, optional - :param device_ids: IDs of the device the Synthetics monitor is running on. + :param device_ids: IDs of the device the Synthetics monitor is running on. **Deprecated**. :type device_ids: [MonitorDeviceID], optional :param enable_logs_sample: Whether or not to send a log sample when the log monitor triggers. @@ -138,12 +138,11 @@ def __init__(self_, *args, **kwargs): **Examples** - * If ``True`` , ``[Triggered on {host:h1}] Monitor Title`` * If ``False`` , ``[Triggered] Monitor Title`` :type include_tags: bool, optional - :param locked: Whether or not the monitor is locked (only editable by creator and admins). Use ``restricted_roles`` instead. + :param locked: Whether or not the monitor is locked (only editable by creator and admins). Use ``restricted_roles`` instead. **Deprecated**. :type locked: bool, optional :param min_failure_duration: How long the test should be in failure before alerting (integer, number of seconds, max 7200). @@ -165,7 +164,7 @@ def __init__(self_, *args, **kwargs): to fully start before starting the evaluation of monitor results. Should be a non negative integer. - Use new_group_delay instead. + Use new_group_delay instead. **Deprecated**. :type new_host_delay: int, none_type, optional :param no_data_timeframe: The number of minutes before a monitor notifies after data stops reporting. @@ -201,10 +200,10 @@ def __init__(self_, *args, **kwargs): otherwise some evaluations are skipped. Default is false. :type require_full_window: bool, optional - :param silenced: Information about the downtime applied to the monitor. + :param silenced: Information about the downtime applied to the monitor. **Deprecated**. :type silenced: {str: (int, none_type,)}, optional - :param synthetics_check_id: ID of the corresponding Synthetic check. + :param synthetics_check_id: ID of the corresponding Synthetic check. **Deprecated**. :type synthetics_check_id: str, none_type, optional :param threshold_windows: Alerting time window options. diff --git a/src/datadog_api_client/v1/model/monitor_summary_widget_definition.py b/src/datadog_api_client/v1/model/monitor_summary_widget_definition.py index dc5c54832a..c56f244660 100644 --- a/src/datadog_api_client/v1/model/monitor_summary_widget_definition.py +++ b/src/datadog_api_client/v1/model/monitor_summary_widget_definition.py @@ -62,7 +62,7 @@ def __init__(self_, query, type, *args, **kwargs): :param color_preference: Which color to use on the widget. :type color_preference: WidgetColorPreference, optional - :param count: The number of monitors to display. + :param count: The number of monitors to display. **Deprecated**. :type count: int, optional :param display_format: What to display on the widget. @@ -83,7 +83,7 @@ def __init__(self_, query, type, *args, **kwargs): :param sort: Widget sorting methods. :type sort: WidgetMonitorSummarySort, optional - :param start: The start of the list. Typically 0. + :param start: The start of the list. Typically 0. **Deprecated**. :type start: int, optional :param summary_type: Which summary type should be used. diff --git a/src/datadog_api_client/v1/model/organization.py b/src/datadog_api_client/v1/model/organization.py index 1aa239e443..963f2099c3 100644 --- a/src/datadog_api_client/v1/model/organization.py +++ b/src/datadog_api_client/v1/model/organization.py @@ -51,7 +51,7 @@ def __init__(self_, *args, **kwargs): """ Create, edit, and manage organizations. - :param billing: A JSON array of billing type. + :param billing: A JSON array of billing type. **Deprecated**. :type billing: OrganizationBilling, optional :param created: Date of the organization creation. @@ -69,7 +69,7 @@ def __init__(self_, *args, **kwargs): :param settings: A JSON array of settings. :type settings: OrganizationSettings, optional - :param subscription: Subscription definition. + :param subscription: Subscription definition. **Deprecated**. :type subscription: OrganizationSubscription, optional :param trial: Only available for MSP customers. Allows child organizations to be created on a trial plan. diff --git a/src/datadog_api_client/v1/model/organization_create_body.py b/src/datadog_api_client/v1/model/organization_create_body.py index 430803127b..2aed583230 100644 --- a/src/datadog_api_client/v1/model/organization_create_body.py +++ b/src/datadog_api_client/v1/model/organization_create_body.py @@ -37,13 +37,13 @@ def __init__(self_, name, *args, **kwargs): """ Object describing an organization to create. - :param billing: A JSON array of billing type. + :param billing: A JSON array of billing type. **Deprecated**. :type billing: OrganizationBilling, optional :param name: The name of the new child-organization, limited to 32 characters. :type name: str - :param subscription: Subscription definition. + :param subscription: Subscription definition. **Deprecated**. :type subscription: OrganizationSubscription, optional """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/model/slo_history_monitor.py b/src/datadog_api_client/v1/model/slo_history_monitor.py index d62e6931ba..236c47897f 100644 --- a/src/datadog_api_client/v1/model/slo_history_monitor.py +++ b/src/datadog_api_client/v1/model/slo_history_monitor.py @@ -71,7 +71,7 @@ def __init__(self_, *args, **kwargs): :param name: For groups in a grouped SLO, this is the group name. For monitors in a multi-monitor SLO, this is the monitor name. :type name: str, optional - :param precision: The amount of decimal places the SLI value is accurate to for the given from ``&&`` to timestamp. Use ``span_precision`` instead. + :param precision: The amount of decimal places the SLI value is accurate to for the given from ``&&`` to timestamp. Use ``span_precision`` instead. **Deprecated**. :type precision: float, optional :param preview: For ``monitor`` based SLOs, when ``true`` this indicates that a replay is in progress to give an accurate uptime @@ -84,7 +84,7 @@ def __init__(self_, *args, **kwargs): :param span_precision: The amount of decimal places the SLI value is accurate to for the given from ``&&`` to timestamp. :type span_precision: float, optional - :param uptime: Use ``sli_value`` instead. + :param uptime: Use ``sli_value`` instead. **Deprecated**. :type uptime: float, optional """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/model/slo_history_sli_data.py b/src/datadog_api_client/v1/model/slo_history_sli_data.py index bdda9856b8..24b8ed8177 100644 --- a/src/datadog_api_client/v1/model/slo_history_sli_data.py +++ b/src/datadog_api_client/v1/model/slo_history_sli_data.py @@ -84,7 +84,7 @@ def __init__(self_, *args, **kwargs): :param span_precision: The amount of decimal places the SLI value is accurate to for the given from ``&&`` to timestamp. :type span_precision: float, optional - :param uptime: Use ``sli_value`` instead. + :param uptime: Use ``sli_value`` instead. **Deprecated**. :type uptime: float, optional """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/model/synthetics_api_test_result_full.py b/src/datadog_api_client/v1/model/synthetics_api_test_result_full.py index 8b1fcb5f9c..aa8aed784c 100644 --- a/src/datadog_api_client/v1/model/synthetics_api_test_result_full.py +++ b/src/datadog_api_client/v1/model/synthetics_api_test_result_full.py @@ -60,7 +60,6 @@ def __init__(self_, *args, **kwargs): :param status: The status of your Synthetic monitor. - * ``O`` for not triggered * ``1`` for triggered * ``2`` for no data diff --git a/src/datadog_api_client/v1/model/synthetics_api_test_result_short.py b/src/datadog_api_client/v1/model/synthetics_api_test_result_short.py index e2b316e028..c99ea558b4 100644 --- a/src/datadog_api_client/v1/model/synthetics_api_test_result_short.py +++ b/src/datadog_api_client/v1/model/synthetics_api_test_result_short.py @@ -51,7 +51,6 @@ def __init__(self_, *args, **kwargs): :param status: The status of your Synthetic monitor. - * ``O`` for not triggered * ``1`` for triggered * ``2`` for no data diff --git a/src/datadog_api_client/v1/model/synthetics_browser_test_result_full.py b/src/datadog_api_client/v1/model/synthetics_browser_test_result_full.py index c6ed07f0e4..3b7d20b3e7 100644 --- a/src/datadog_api_client/v1/model/synthetics_browser_test_result_full.py +++ b/src/datadog_api_client/v1/model/synthetics_browser_test_result_full.py @@ -62,7 +62,6 @@ def __init__(self_, *args, **kwargs): :param status: The status of your Synthetic monitor. - * ``O`` for not triggered * ``1`` for triggered * ``2`` for no data diff --git a/src/datadog_api_client/v1/model/synthetics_browser_test_result_short.py b/src/datadog_api_client/v1/model/synthetics_browser_test_result_short.py index ec4f891a37..bf411b130a 100644 --- a/src/datadog_api_client/v1/model/synthetics_browser_test_result_short.py +++ b/src/datadog_api_client/v1/model/synthetics_browser_test_result_short.py @@ -51,7 +51,6 @@ def __init__(self_, *args, **kwargs): :param status: The status of your Synthetic monitor. - * ``O`` for not triggered * ``1`` for triggered * ``2`` for no data diff --git a/src/datadog_api_client/v1/model/tree_map_widget_definition.py b/src/datadog_api_client/v1/model/tree_map_widget_definition.py index be886a4ecb..c3d84d0726 100644 --- a/src/datadog_api_client/v1/model/tree_map_widget_definition.py +++ b/src/datadog_api_client/v1/model/tree_map_widget_definition.py @@ -53,19 +53,19 @@ def __init__(self_, requests, type, *args, **kwargs): """ The treemap visualization enables you to display hierarchical and nested data. It is well suited for queries that describe part-whole relationships, such as resource usage by availability zone, data center, or team. - :param color_by: (deprecated) The attribute formerly used to determine color in the widget. + :param color_by: (deprecated) The attribute formerly used to determine color in the widget. **Deprecated**. :type color_by: TreeMapColorBy, optional :param custom_links: List of custom links. :type custom_links: [WidgetCustomLink], optional - :param group_by: (deprecated) The attribute formerly used to group elements in the widget. + :param group_by: (deprecated) The attribute formerly used to group elements in the widget. **Deprecated**. :type group_by: TreeMapGroupBy, optional :param requests: List of treemap widget requests. :type requests: [TreeMapWidgetRequest] - :param size_by: (deprecated) The attribute formerly used to determine size in the widget. + :param size_by: (deprecated) The attribute formerly used to determine size in the widget. **Deprecated**. :type size_by: TreeMapSizeBy, optional :param time: Time setting for the widget. diff --git a/src/datadog_api_client/v1/model/widget_marker.py b/src/datadog_api_client/v1/model/widget_marker.py index fb356a3469..e135b37a91 100644 --- a/src/datadog_api_client/v1/model/widget_marker.py +++ b/src/datadog_api_client/v1/model/widget_marker.py @@ -32,7 +32,6 @@ def __init__(self_, value, *args, **kwargs): :param display_type: Combination of: - * A severity error, warning, ok, or info * A line type: dashed, solid, or bold In this case of a Distribution widget, this can be set to be ``x_axis_percentile``. diff --git a/src/datadog_api_client/v2/api/logs_api.py b/src/datadog_api_client/v2/api/logs_api.py index 1abe446794..16210ca44d 100644 --- a/src/datadog_api_client/v2/api/logs_api.py +++ b/src/datadog_api_client/v2/api/logs_api.py @@ -429,14 +429,12 @@ def submit_log( Send your logs to your Datadog platform over HTTP. Limits per HTTP request are: - * Maximum content size per payload (uncompressed): 5MB * Maximum size for a single log: 1MB * Maximum array size if sending multiple logs in an array: 1000 entries Any log exceeding 1MB is accepted and truncated by Datadog: - * For a single log request, the API truncates the log at 1MB and returns a 2xx. * For a multi-logs request, the API processes all logs, truncates only logs larger than 1MB, and returns a 2xx. @@ -445,7 +443,6 @@ def submit_log( The status codes answered by the HTTP API are: - * 202: Accepted: the request has been accepted for processing * 400: Bad request (likely an issue in the payload formatting) * 401: Unauthorized (likely a missing API Key) diff --git a/src/datadog_api_client/v2/api/metrics_api.py b/src/datadog_api_client/v2/api/metrics_api.py index 4950dbb6be..42d435fde9 100644 --- a/src/datadog_api_client/v2/api/metrics_api.py +++ b/src/datadog_api_client/v2/api/metrics_api.py @@ -35,7 +35,6 @@ class MetricsApi: """ The metrics endpoint allows you to: - * Post metrics data so it can be graphed on Datadog’s dashboards * Query metrics from any time period * Modify tag configurations for metrics @@ -690,7 +689,6 @@ def submit_metrics( If you’re submitting metrics directly to the Datadog API without using DogStatsD, expect: - * 64 bits for the timestamp * 64 bits for the value * 20 bytes for the metric names diff --git a/src/datadog_api_client/v2/api/usage_metering_api.py b/src/datadog_api_client/v2/api/usage_metering_api.py index 162592eb4f..dac9ace43f 100644 --- a/src/datadog_api_client/v2/api/usage_metering_api.py +++ b/src/datadog_api_client/v2/api/usage_metering_api.py @@ -4,6 +4,7 @@ from __future__ import annotations from typing import Any, Dict, Union +import warnings from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint from datadog_api_client.model_utils import ( @@ -304,7 +305,7 @@ def get_cost_by_org( *, end_month: Union[datetime, UnsetType] = unset, ) -> CostByOrgResponse: - """Get cost across multi-org account. + """Get cost across multi-org account. **Deprecated**. Get cost across multi-org account. Cost by org data for a given month becomes available no later than the 16th of the following month. @@ -324,6 +325,7 @@ def get_cost_by_org( if end_month is not unset: kwargs["end_month"] = end_month + warnings.warn("get_cost_by_org is deprecated", DeprecationWarning, stacklevel=2) return self._get_cost_by_org_endpoint.call_with_http_info(**kwargs) def get_estimated_cost_by_org( diff --git a/src/datadog_api_client/v2/model/metric_custom_aggregations.py b/src/datadog_api_client/v2/model/metric_custom_aggregations.py index c544a2e706..43db4e0b85 100644 --- a/src/datadog_api_client/v2/model/metric_custom_aggregations.py +++ b/src/datadog_api_client/v2/model/metric_custom_aggregations.py @@ -16,7 +16,6 @@ class MetricCustomAggregations(ModelSimple): Gauge metrics require the (time: avg, space: avg) aggregation. Additional time & space combinations are also available: - * time: avg, space: avg * time: avg, space: max * time: avg, space: min diff --git a/src/datadog_api_client/v2/model/metric_tag_configuration_attributes.py b/src/datadog_api_client/v2/model/metric_tag_configuration_attributes.py index d5070e75b5..69d11ae27f 100644 --- a/src/datadog_api_client/v2/model/metric_tag_configuration_attributes.py +++ b/src/datadog_api_client/v2/model/metric_tag_configuration_attributes.py @@ -43,7 +43,6 @@ def __init__(self_, *args, **kwargs): Gauge metrics require the (time: avg, space: avg) aggregation. Additional time & space combinations are also available: - * time: avg, space: avg * time: avg, space: max * time: avg, space: min diff --git a/src/datadog_api_client/v2/model/metric_tag_configuration_create_attributes.py b/src/datadog_api_client/v2/model/metric_tag_configuration_create_attributes.py index 68ff02c905..47f7b606f8 100644 --- a/src/datadog_api_client/v2/model/metric_tag_configuration_create_attributes.py +++ b/src/datadog_api_client/v2/model/metric_tag_configuration_create_attributes.py @@ -38,7 +38,6 @@ def __init__(self_, metric_type, *args, **kwargs): Gauge metrics require the (time: avg, space: avg) aggregation. Additional time & space combinations are also available: - * time: avg, space: avg * time: avg, space: max * time: avg, space: min diff --git a/src/datadog_api_client/v2/model/metric_tag_configuration_update_attributes.py b/src/datadog_api_client/v2/model/metric_tag_configuration_update_attributes.py index 11007806e9..fb07deb371 100644 --- a/src/datadog_api_client/v2/model/metric_tag_configuration_update_attributes.py +++ b/src/datadog_api_client/v2/model/metric_tag_configuration_update_attributes.py @@ -35,7 +35,6 @@ def __init__(self_, *args, **kwargs): Gauge metrics require the (time: avg, space: avg) aggregation. Additional time & space combinations are also available: - * time: avg, space: avg * time: avg, space: max * time: avg, space: min