From 193ff055ff8a044422594092afae740c144e0084 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 27 Sep 2024 17:46:09 +0000 Subject: [PATCH] Regenerate client from commit 2bcb16df of spec repo --- .apigentools-info | 8 ++++---- .generator/schemas/v2/openapi.yaml | 2 +- src/datadog_api_client/v2/api/usage_metering_api.py | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index bf3c436fc5..9579cd49e1 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-09-26 19:34:36.904910", - "spec_repo_commit": "83debf9e" + "regenerated": "2024-09-27 17:45:38.637915", + "spec_repo_commit": "2bcb16df" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-09-26 19:34:36.918924", - "spec_repo_commit": "83debf9e" + "regenerated": "2024-09-27 17:45:38.752669", + "spec_repo_commit": "2bcb16df" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index ae553e0278..f331fd940d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -28272,7 +28272,7 @@ paths: for cost ending this month.' in: query name: end_month - required: true + required: false schema: format: date-time type: string 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 6a7f57a555..fd0b95a95a 100644 --- a/src/datadog_api_client/v2/api/usage_metering_api.py +++ b/src/datadog_api_client/v2/api/usage_metering_api.py @@ -259,7 +259,6 @@ def __init__(self, api_client=None): "location": "query", }, "end_month": { - "required": True, "openapi_types": (datetime,), "attribute": "end_month", "location": "query", @@ -627,9 +626,9 @@ def get_hourly_usage( def get_monthly_cost_attribution( self, start_month: datetime, - end_month: datetime, fields: str, *, + end_month: Union[datetime, UnsetType] = unset, sort_direction: Union[SortDirection, UnsetType] = unset, sort_name: Union[str, UnsetType] = unset, tag_breakdown_keys: Union[str, UnsetType] = unset, @@ -658,14 +657,14 @@ def get_monthly_cost_attribution( :param start_month: Datetime in ISO-8601 format, UTC, precise to month: ``[YYYY-MM]`` for cost beginning in this month. :type start_month: datetime - :param end_month: Datetime in ISO-8601 format, UTC, precise to month: ``[YYYY-MM]`` for cost ending this month. - :type end_month: datetime :param fields: Comma-separated list specifying cost types (e.g., ``_on_demand_cost`` , ``_committed_cost`` , ``_total_cost`` ) and the proportions ( ``_percentage_in_org`` , ``_percentage_in_account`` ). Use ``*`` to retrieve all fields. Example: ``infra_host_on_demand_cost,infra_host_percentage_in_account`` To obtain the complete list of active billing dimensions that can be used to replace ```` in the field names, make a request to the `Get active billing dimensions API `_. :type fields: str + :param end_month: Datetime in ISO-8601 format, UTC, precise to month: ``[YYYY-MM]`` for cost ending this month. + :type end_month: datetime, optional :param sort_direction: The direction to sort by: ``[desc, asc]``. :type sort_direction: SortDirection, optional :param sort_name: The billing dimension to sort by. Always sorted by total cost. Example: ``infra_host``. @@ -682,7 +681,8 @@ def get_monthly_cost_attribution( kwargs: Dict[str, Any] = {} kwargs["start_month"] = start_month - kwargs["end_month"] = end_month + if end_month is not unset: + kwargs["end_month"] = end_month kwargs["fields"] = fields