diff --git a/.apigentools-info b/.apigentools-info index 2d4b0f51d3..9c9ef001cf 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-07-23 17:39:46.554429", - "spec_repo_commit": "ad82c0e5" + "regenerated": "2024-07-23 18:14:11.854690", + "spec_repo_commit": "9e027051" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-07-23 17:39:46.571472", - "spec_repo_commit": "ad82c0e5" + "regenerated": "2024-07-23 18:14:11.871946", + "spec_repo_commit": "9e027051" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 19a1e675d2..d921feb377 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -15172,6 +15172,12 @@ components: ProjectedCostAttributes: description: Projected Cost attributes data. properties: + account_name: + description: The account name. + type: string + account_public_id: + description: The account public ID. + type: string charges: description: List of charges data reported for the requested month. items: @@ -36703,6 +36709,15 @@ paths: schema: format: date-time type: string + - description: 'Boolean to specify whether to include accounts connected to + the current account as partner customers in the Datadog partner network + program. Defaults to `false`. ' + in: query + name: include_connected_accounts + required: false + schema: + default: false + type: boolean responses: '200': content: @@ -37009,6 +37024,15 @@ paths: required: false schema: type: string + - description: 'Boolean to specify whether to include accounts connected to + the current account as partner customers in the Datadog partner network + program. Defaults to `false`. ' + in: query + name: include_connected_accounts + required: false + schema: + default: false + type: boolean responses: '200': content: 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 e4c8b33439..8e9256819f 100644 --- a/src/datadog_api_client/v2/api/usage_metering_api.py +++ b/src/datadog_api_client/v2/api/usage_metering_api.py @@ -162,6 +162,11 @@ def __init__(self, api_client=None): "attribute": "end_month", "location": "query", }, + "include_connected_accounts": { + "openapi_types": (bool,), + "attribute": "include_connected_accounts", + "location": "query", + }, }, headers_map={ "accept": ["application/json;datetime-format=rfc3339"], @@ -312,6 +317,11 @@ def __init__(self, api_client=None): "attribute": "view", "location": "query", }, + "include_connected_accounts": { + "openapi_types": (bool,), + "attribute": "include_connected_accounts", + "location": "query", + }, }, headers_map={ "accept": ["application/json;datetime-format=rfc3339"], @@ -506,6 +516,7 @@ def get_historical_cost_by_org( *, view: Union[str, UnsetType] = unset, end_month: Union[datetime, UnsetType] = unset, + include_connected_accounts: Union[bool, UnsetType] = unset, ) -> CostByOrgResponse: """Get historical cost across your account. @@ -520,6 +531,8 @@ def get_historical_cost_by_org( :type view: str, optional :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 include_connected_accounts: Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to ``false``. + :type include_connected_accounts: bool, optional :rtype: CostByOrgResponse """ kwargs: Dict[str, Any] = {} @@ -531,6 +544,9 @@ def get_historical_cost_by_org( if end_month is not unset: kwargs["end_month"] = end_month + if include_connected_accounts is not unset: + kwargs["include_connected_accounts"] = include_connected_accounts + return self._get_historical_cost_by_org_endpoint.call_with_http_info(**kwargs) def get_hourly_usage( @@ -690,6 +706,7 @@ def get_projected_cost( self, *, view: Union[str, UnsetType] = unset, + include_connected_accounts: Union[bool, UnsetType] = unset, ) -> ProjectedCostResponse: """Get projected cost across your account. @@ -700,12 +717,17 @@ def get_projected_cost( :param view: String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are ``summary`` and ``sub-org``. Defaults to ``summary``. :type view: str, optional + :param include_connected_accounts: Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to ``false``. + :type include_connected_accounts: bool, optional :rtype: ProjectedCostResponse """ kwargs: Dict[str, Any] = {} if view is not unset: kwargs["view"] = view + if include_connected_accounts is not unset: + kwargs["include_connected_accounts"] = include_connected_accounts + return self._get_projected_cost_endpoint.call_with_http_info(**kwargs) def get_usage_application_security_monitoring( diff --git a/src/datadog_api_client/v2/model/projected_cost_attributes.py b/src/datadog_api_client/v2/model/projected_cost_attributes.py index b759c84cd0..db5b9640bb 100644 --- a/src/datadog_api_client/v2/model/projected_cost_attributes.py +++ b/src/datadog_api_client/v2/model/projected_cost_attributes.py @@ -24,6 +24,8 @@ def openapi_types(_): from datadog_api_client.v2.model.chargeback_breakdown import ChargebackBreakdown return { + "account_name": (str,), + "account_public_id": (str,), "charges": ([ChargebackBreakdown],), "date": (datetime,), "org_name": (str,), @@ -33,6 +35,8 @@ def openapi_types(_): } attribute_map = { + "account_name": "account_name", + "account_public_id": "account_public_id", "charges": "charges", "date": "date", "org_name": "org_name", @@ -43,6 +47,8 @@ def openapi_types(_): def __init__( self_, + account_name: Union[str, UnsetType] = unset, + account_public_id: Union[str, UnsetType] = unset, charges: Union[List[ChargebackBreakdown], UnsetType] = unset, date: Union[datetime, UnsetType] = unset, org_name: Union[str, UnsetType] = unset, @@ -54,6 +60,12 @@ def __init__( """ Projected Cost attributes data. + :param account_name: The account name. + :type account_name: str, optional + + :param account_public_id: The account public ID. + :type account_public_id: str, optional + :param charges: List of charges data reported for the requested month. :type charges: [ChargebackBreakdown], optional @@ -72,6 +84,10 @@ def __init__( :param region: The region of the Datadog instance that the organization belongs to. :type region: str, optional """ + if account_name is not unset: + kwargs["account_name"] = account_name + if account_public_id is not unset: + kwargs["account_public_id"] = account_public_id if charges is not unset: kwargs["charges"] = charges if date is not unset: