|
57 | 57 | from datadog_api_client.v2.model.custom_costs_file_upload_response import CustomCostsFileUploadResponse |
58 | 58 | from datadog_api_client.v2.model.custom_costs_file_line_item import CustomCostsFileLineItem |
59 | 59 | from datadog_api_client.v2.model.custom_costs_file_get_response import CustomCostsFileGetResponse |
| 60 | +from datadog_api_client.v2.model.custom_costs_file_update_request import CustomCostsFileUpdateRequest |
60 | 61 | from datadog_api_client.v2.model.gcp_usage_cost_configs_response import GCPUsageCostConfigsResponse |
61 | 62 | from datadog_api_client.v2.model.gcp_usage_cost_config_response import GCPUsageCostConfigResponse |
62 | 63 | from datadog_api_client.v2.model.gcp_usage_cost_config_post_request import GCPUsageCostConfigPostRequest |
@@ -1989,6 +1990,32 @@ def __init__(self, api_client=None): |
1989 | 1990 | api_client=api_client, |
1990 | 1991 | ) |
1991 | 1992 |
|
| 1993 | + self._update_custom_costs_file_endpoint = _Endpoint( |
| 1994 | + settings={ |
| 1995 | + "response_type": (CustomCostsFileUploadResponse,), |
| 1996 | + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], |
| 1997 | + "endpoint_path": "/api/v2/cost/custom_costs/{file_id}", |
| 1998 | + "operation_id": "update_custom_costs_file", |
| 1999 | + "http_method": "PATCH", |
| 2000 | + "version": "v2", |
| 2001 | + }, |
| 2002 | + params_map={ |
| 2003 | + "file_id": { |
| 2004 | + "required": True, |
| 2005 | + "openapi_types": (str,), |
| 2006 | + "attribute": "file_id", |
| 2007 | + "location": "path", |
| 2008 | + }, |
| 2009 | + "body": { |
| 2010 | + "required": True, |
| 2011 | + "openapi_types": (CustomCostsFileUpdateRequest,), |
| 2012 | + "location": "body", |
| 2013 | + }, |
| 2014 | + }, |
| 2015 | + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, |
| 2016 | + api_client=api_client, |
| 2017 | + ) |
| 2018 | + |
1992 | 2019 | self._update_tag_pipelines_ruleset_endpoint = _Endpoint( |
1993 | 2020 | settings={ |
1994 | 2021 | "response_type": (RulesetResp,), |
@@ -3807,6 +3834,27 @@ def update_custom_allocation_rule( |
3807 | 3834 |
|
3808 | 3835 | return self._update_custom_allocation_rule_endpoint.call_with_http_info(**kwargs) |
3809 | 3836 |
|
| 3837 | + def update_custom_costs_file( |
| 3838 | + self, |
| 3839 | + file_id: str, |
| 3840 | + body: CustomCostsFileUpdateRequest, |
| 3841 | + ) -> CustomCostsFileUploadResponse: |
| 3842 | + """Update Custom Costs file. |
| 3843 | +
|
| 3844 | + Mark whether a Custom Costs file holds AI provider costs. Datadog then recomputes the costs for the months that the file covers. |
| 3845 | +
|
| 3846 | + :param file_id: File ID. |
| 3847 | + :type file_id: str |
| 3848 | + :type body: CustomCostsFileUpdateRequest |
| 3849 | + :rtype: CustomCostsFileUploadResponse |
| 3850 | + """ |
| 3851 | + kwargs: Dict[str, Any] = {} |
| 3852 | + kwargs["file_id"] = file_id |
| 3853 | + |
| 3854 | + kwargs["body"] = body |
| 3855 | + |
| 3856 | + return self._update_custom_costs_file_endpoint.call_with_http_info(**kwargs) |
| 3857 | + |
3810 | 3858 | def update_tag_pipelines_ruleset( |
3811 | 3859 | self, |
3812 | 3860 | ruleset_id: str, |
|
0 commit comments