diff --git a/.apigentools-info b/.apigentools-info index e55f1975e6..26a41b6ba0 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-07-11 16:35:12.035901", - "spec_repo_commit": "d83fe206" + "regenerated": "2024-07-16 10:52:48.447088", + "spec_repo_commit": "06d5775d" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-07-11 16:35:12.052518", - "spec_repo_commit": "d83fe206" + "regenerated": "2024-07-16 10:52:48.463831", + "spec_repo_commit": "06d5775d" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 1e2315f4a2..de6e0c8789 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -17269,6 +17269,12 @@ components: UsageBillableSummaryHour: description: Response with monthly summary of data billed by Datadog. properties: + account_name: + description: The account name. + type: string + account_public_id: + description: The account public ID. + type: string billing_plan: description: The billing plan. type: string @@ -31646,6 +31652,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: diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index b76b3c3098..ea353035b9 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -5390,6 +5390,12 @@ components: CostByOrgAttributes: description: 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: @@ -36185,6 +36191,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: 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 fffcd25180..8d5bb9a371 100644 --- a/src/datadog_api_client/v1/api/usage_metering_api.py +++ b/src/datadog_api_client/v1/api/usage_metering_api.py @@ -432,6 +432,11 @@ def __init__(self, api_client=None): "attribute": "month", "location": "query", }, + "include_connected_accounts": { + "openapi_types": (bool,), + "attribute": "include_connected_accounts", + "location": "query", + }, }, headers_map={ "accept": ["application/json;datetime-format=rfc3339"], @@ -1574,6 +1579,7 @@ def get_usage_billable_summary( self, *, month: Union[datetime, UnsetType] = unset, + include_connected_accounts: Union[bool, UnsetType] = unset, ) -> UsageBillableSummaryResponse: """Get billable usage across your account. @@ -1583,12 +1589,17 @@ def get_usage_billable_summary( :param month: Datetime in ISO-8601 format, UTC, precise to month: ``[YYYY-MM]`` for usage starting this month. :type 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: UsageBillableSummaryResponse """ kwargs: Dict[str, Any] = {} if month is not unset: kwargs["month"] = month + if include_connected_accounts is not unset: + kwargs["include_connected_accounts"] = include_connected_accounts + return self._get_usage_billable_summary_endpoint.call_with_http_info(**kwargs) def get_usage_ci_app( diff --git a/src/datadog_api_client/v1/model/usage_billable_summary_hour.py b/src/datadog_api_client/v1/model/usage_billable_summary_hour.py index 5a36848cac..5308ec4f27 100644 --- a/src/datadog_api_client/v1/model/usage_billable_summary_hour.py +++ b/src/datadog_api_client/v1/model/usage_billable_summary_hour.py @@ -24,6 +24,8 @@ def openapi_types(_): from datadog_api_client.v1.model.usage_billable_summary_keys import UsageBillableSummaryKeys return { + "account_name": (str,), + "account_public_id": (str,), "billing_plan": (str,), "end_date": (datetime,), "num_orgs": (int,), @@ -36,6 +38,8 @@ def openapi_types(_): } attribute_map = { + "account_name": "account_name", + "account_public_id": "account_public_id", "billing_plan": "billing_plan", "end_date": "end_date", "num_orgs": "num_orgs", @@ -49,6 +53,8 @@ def openapi_types(_): def __init__( self_, + account_name: Union[str, UnsetType] = unset, + account_public_id: Union[str, UnsetType] = unset, billing_plan: Union[str, UnsetType] = unset, end_date: Union[datetime, UnsetType] = unset, num_orgs: Union[int, UnsetType] = unset, @@ -63,6 +69,12 @@ def __init__( """ Response with monthly summary of data billed by Datadog. + :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 billing_plan: The billing plan. :type billing_plan: str, optional @@ -90,6 +102,10 @@ def __init__( :param usage: Response with aggregated usage types. :type usage: UsageBillableSummaryKeys, 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 billing_plan is not unset: kwargs["billing_plan"] = billing_plan if end_date is not unset: 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 4c62ba9748..dcc366436c 100644 --- a/src/datadog_api_client/v2/api/usage_metering_api.py +++ b/src/datadog_api_client/v2/api/usage_metering_api.py @@ -124,6 +124,11 @@ def __init__(self, api_client=None): "attribute": "end_date", "location": "query", }, + "include_connected_accounts": { + "openapi_types": (bool,), + "attribute": "include_connected_accounts", + "location": "query", + }, }, headers_map={ "accept": ["application/json;datetime-format=rfc3339"], @@ -444,6 +449,7 @@ def get_estimated_cost_by_org( end_month: Union[datetime, UnsetType] = unset, start_date: Union[datetime, UnsetType] = unset, end_date: Union[datetime, UnsetType] = unset, + include_connected_accounts: Union[bool, UnsetType] = unset, ) -> CostByOrgResponse: """Get estimated cost across your account. @@ -464,6 +470,8 @@ def get_estimated_cost_by_org( :type start_date: datetime, optional :param end_date: Datetime in ISO-8601 format, UTC, precise to day: ``[YYYY-MM-DD]`` for cost ending this day. :type end_date: 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] = {} @@ -482,6 +490,9 @@ def get_estimated_cost_by_org( if end_date is not unset: kwargs["end_date"] = end_date + if include_connected_accounts is not unset: + kwargs["include_connected_accounts"] = include_connected_accounts + return self._get_estimated_cost_by_org_endpoint.call_with_http_info(**kwargs) def get_historical_cost_by_org( diff --git a/src/datadog_api_client/v2/model/cost_by_org_attributes.py b/src/datadog_api_client/v2/model/cost_by_org_attributes.py index 3ecf65efa2..f5e2bcfe62 100644 --- a/src/datadog_api_client/v2/model/cost_by_org_attributes.py +++ b/src/datadog_api_client/v2/model/cost_by_org_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__( """ 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 total_cost: The total cost of products for the month. :type total_cost: float, 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: