Skip to content

Commit

Permalink
update usage summary API docs for partner program (#2065)
Browse files Browse the repository at this point in the history
* Regenerate client from commit ad82c0e5 of spec repo

* pre-commit fixes

---------

Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec committed Jul 23, 2024
1 parent 4337a59 commit d212351
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-23 15:33:51.142309",
"spec_repo_commit": "015355f6"
"regenerated": "2024-07-23 17:39:46.554429",
"spec_repo_commit": "ad82c0e5"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-23 15:33:51.159414",
"spec_repo_commit": "015355f6"
"regenerated": "2024-07-23 17:39:46.571472",
"spec_repo_commit": "ad82c0e5"
}
}
}
15 changes: 15 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19337,6 +19337,12 @@ components:
description: Global hourly report of all data billed by Datadog for a given
organization.
properties:
account_name:
description: The account name.
type: string
account_public_id:
description: The account public id.
type: string
agent_host_top99p:
description: Shows the 99th percentile of all agent hosts over all hours
in the current date for the given org.
Expand Down Expand Up @@ -33211,6 +33217,15 @@ paths:
required: false
schema:
type: boolean
- 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:
Expand Down
11 changes: 11 additions & 0 deletions src/datadog_api_client/v1/api/usage_metering_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,11 @@ def __init__(self, api_client=None):
"attribute": "include_org_details",
"location": "query",
},
"include_connected_accounts": {
"openapi_types": (bool,),
"attribute": "include_connected_accounts",
"location": "query",
},
},
headers_map={
"accept": ["application/json;datetime-format=rfc3339"],
Expand Down Expand Up @@ -2149,6 +2154,7 @@ def get_usage_summary(
*,
end_month: Union[datetime, UnsetType] = unset,
include_org_details: Union[bool, UnsetType] = unset,
include_connected_accounts: Union[bool, UnsetType] = unset,
) -> UsageSummaryResponse:
"""Get usage across your account.
Expand All @@ -2163,6 +2169,8 @@ def get_usage_summary(
:type end_month: datetime, optional
:param include_org_details: Include usage summaries for each sub-org.
:type include_org_details: bool, 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: UsageSummaryResponse
"""
kwargs: Dict[str, Any] = {}
Expand All @@ -2174,6 +2182,9 @@ def get_usage_summary(
if include_org_details is not unset:
kwargs["include_org_details"] = include_org_details

if include_connected_accounts is not unset:
kwargs["include_connected_accounts"] = include_connected_accounts

return self._get_usage_summary_endpoint.call_with_http_info(**kwargs)

def get_usage_synthetics(
Expand Down
16 changes: 16 additions & 0 deletions src/datadog_api_client/v1/model/usage_summary_date_org.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class UsageSummaryDateOrg(ModelNormal):
@cached_property
def openapi_types(_):
return {
"account_name": (str,),
"account_public_id": (str,),
"agent_host_top99p": (int,),
"apm_azure_app_service_host_top99p": (int,),
"apm_devsecops_host_top99p": (int,),
Expand Down Expand Up @@ -150,6 +152,8 @@ def openapi_types(_):
}

attribute_map = {
"account_name": "account_name",
"account_public_id": "account_public_id",
"agent_host_top99p": "agent_host_top99p",
"apm_azure_app_service_host_top99p": "apm_azure_app_service_host_top99p",
"apm_devsecops_host_top99p": "apm_devsecops_host_top99p",
Expand Down Expand Up @@ -284,6 +288,8 @@ def openapi_types(_):

def __init__(
self_,
account_name: Union[str, UnsetType] = unset,
account_public_id: Union[str, UnsetType] = unset,
agent_host_top99p: Union[int, UnsetType] = unset,
apm_azure_app_service_host_top99p: Union[int, UnsetType] = unset,
apm_devsecops_host_top99p: Union[int, UnsetType] = unset,
Expand Down Expand Up @@ -419,6 +425,12 @@ def __init__(
"""
Global hourly report of all data billed by Datadog for a given organization.
: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 agent_host_top99p: Shows the 99th percentile of all agent hosts over all hours in the current date for the given org.
:type agent_host_top99p: int, optional
Expand Down Expand Up @@ -809,6 +821,10 @@ def __init__(
:param workflow_executions_usage_sum: Sum of all workflows executed over all hours in the current date for the given org.
:type workflow_executions_usage_sum: int, 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 agent_host_top99p is not unset:
kwargs["agent_host_top99p"] = agent_host_top99p
if apm_azure_app_service_host_top99p is not unset:
Expand Down

0 comments on commit d212351

Please sign in to comment.