Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 33 additions & 21 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4608,10 +4608,11 @@ components:
type: array
type: object
HourlyUsageAttributionUsageType:
description: 'Supported products for hourly usage attribution requests.
description: 'Supported products for hourly usage attribution requests. Usage
types are in the format `<usage_type>_usage`.

The following values have been **deprecated**: `estimated_indexed_spans_usage`,
`estimated_ingested_spans_usage`.'
To obtain the complete list of valid usage types, make a request to the [Get
usage attribution types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).'
enum:
- api_usage
- apm_fargate_usage
Expand Down Expand Up @@ -9161,7 +9162,11 @@ components:
type: array
type: object
MonthlyUsageAttributionSupportedMetrics:
description: Supported metrics for monthly usage attribution requests.
description: 'Supported metrics for monthly usage attribution requests. Usage
types are in the format `<usage_type>_usage`.

To obtain the complete list of valid usage types, make a request to the [Get
usage attribution types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).'
enum:
- api_usage
- api_percentage
Expand Down Expand Up @@ -9492,10 +9497,7 @@ components:
- SCA_FARGATE_PERCENTAGE
- ALL
MonthlyUsageAttributionValues:
description: 'Fields in Usage Summary by tag(s).

The following values have been **deprecated**: `estimated_indexed_spans_usage`,
`estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`.'
description: Fields in Usage Summary by tag(s).
properties:
api_percentage:
description: The percentage of synthetic API test usage by tag(s).
Expand Down Expand Up @@ -37493,10 +37495,7 @@ paths:
code example:\n\n```\nresponse := GetHourlyUsageAttribution(start_month)\ncursor
:= response.metadata.pagination.next_record_id\nWHILE cursor != null BEGIN\n
\ sleep(5 seconds) # Avoid running into rate limit\n response := GetHourlyUsageAttribution(start_month,
next_record_id=cursor)\n cursor := response.metadata.pagination.next_record_id\nEND\n```\nThe
following values have been **deprecated**:\n `estimated_indexed_spans_usage`,
`estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`,
`llm_observability_usage`, `llm_observability_percentage`."
next_record_id=cursor)\n cursor := response.metadata.pagination.next_record_id\nEND\n```"
operationId: GetHourlyUsageAttribution
parameters:
- description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`
Expand All @@ -37517,9 +37516,14 @@ paths:
schema:
format: date-time
type: string
- description: 'Usage type to retrieve. The following values have been **deprecated**:
- description: 'Usage type to retrieve. Usage types are in the format `<usage_type>_usage`.

Example: `infra_host_usage`

`estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.'
To obtain the complete list of active usage types that can be used to replace

`<usage_type>` in the field names, make a request to the [Get usage attribution
types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).'
in: query
name: usage_type
required: true
Expand Down Expand Up @@ -38072,10 +38076,15 @@ paths:
- description: 'Comma-separated list of usage types to return, or `*` for all
usage types.

The following values have been **deprecated**:
Usage types are in the format `<usage_type>_usage` and `<usage_type>_percentage`.

Example: `infra_host_usage,infra_host_percentage`

`estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`,
`estimated_ingested_spans_percentage`, `llm_observability_usage`, `llm_observability_percentage`.'
To obtain the complete list of usage attribution types that can be used
to replace

`<usage_type>` in the field names, make a request to the [Get usage attribution
types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).'
in: query
name: fields
required: true
Expand All @@ -38087,12 +38096,15 @@ paths:
required: false
schema:
$ref: '#/components/schemas/UsageSortDirection'
- description: 'The field to sort by.
- description: 'The field to sort by. Sort fields are in the format `<usage_type>_usage`.

Example: `infra_host_usage`

The following values have been **deprecated**:
To obtain the complete list of usage attribution types that can be used
to replace

`estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`,
`estimated_ingested_spans_percentage`.'
`<usage_type>` in the field names, make a request to the [Get usage attribution
types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).'
in: query
name: sort_name
required: false
Expand Down
93 changes: 84 additions & 9 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70690,6 +70690,42 @@ components:
usage_type:
$ref: '#/components/schemas/HourlyUsageType'
type: object
UsageAttributionTypesAttributes:
description: List of usage attribution types.
properties:
values:
description: List of usage attribution types.
items:
description: A given usage type in a list.
example: infra_host
type: string
type: array
type: object
UsageAttributionTypesBody:
description: Usage attribution types data.
properties:
attributes:
$ref: '#/components/schemas/UsageAttributionTypesAttributes'
id:
description: Unique ID of the response.
type: string
type:
$ref: '#/components/schemas/UsageAttributionTypesType'
type: object
UsageAttributionTypesResponse:
description: Usage attribution types response.
properties:
data:
$ref: '#/components/schemas/UsageAttributionTypesBody'
type: object
UsageAttributionTypesType:
default: usage_attribution_types
description: Type of usage attribution types data.
enum:
- usage_attribution_types
type: string
x-enum-varnames:
- USAGE_ATTRIBUTION_TYPES
UsageDataObject:
description: Usage data.
properties:
Expand Down Expand Up @@ -91067,14 +91103,18 @@ paths:
- logs_read_data
/api/v2/metrics:
get:
description: "Returns all metrics that can be configured in the Metrics Summary
page or with Metrics without Limits\u2122 (matching additional filters if
specified).\nOptionally, paginate by using the `page[cursor]` and/or `page[size]`
query parameters.\nTo fetch the first page, pass in a query parameter with
either a valid `page[size]` or an empty cursor like `page[cursor]=`. To fetch
the next page, pass in the `next_cursor` value from the response as the new
`page[cursor]` value.\nOnce the `meta.pagination.next_cursor` value is null,
all pages have been retrieved."
description: 'Returns all metrics for your organization that match the given
filter parameters.

Optionally, paginate by using the `page[cursor]` and/or `page[size]` query
parameters.

To fetch the first page, pass in a query parameter with either a valid `page[size]`
or an empty cursor like `page[cursor]=`. To fetch the next page, pass in the
`next_cursor` value from the response as the new `page[cursor]` value.

Once the `meta.pagination.next_cursor` value is null, all pages have been
retrieved.'
operationId: ListTagConfigurations
parameters:
- description: Filter custom metrics that have configured tags.
Expand Down Expand Up @@ -91159,7 +91199,7 @@ paths:
- description: 'The number of seconds of look back (from now) to apply to a
filter[tag] or filter[queried] query.

Default value is 3600 (1 hour), maximum value is 2,592,000 (30 days).'
Default value is 3600 (1 hour), maximum value is 5,184,000 (60 days).'
example: 3600
in: query
name: window[seconds]
Expand Down Expand Up @@ -109760,6 +109800,41 @@ paths:
permissions:
- usage_read
- billing_read
/api/v2/usage/usage-attribution-types:
get:
description: Get usage attribution types.
operationId: GetUsageAttributionTypes
responses:
'200':
content:
application/json;datetime-format=rfc3339:
schema:
$ref: '#/components/schemas/UsageAttributionTypesResponse'
description: OK
'403':
content:
application/json;datetime-format=rfc3339:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Forbidden - User is not authorized
'429':
content:
application/json;datetime-format=rfc3339:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Too many requests
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- usage_read
summary: Get usage attribution types
tags:
- Usage Metering
x-permission:
operator: OR
permissions:
- usage_read
/api/v2/user_invitations:
post:
description: Sends emails to one or more users inviting them to join the organization.
Expand Down
28 changes: 28 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31077,6 +31077,34 @@ datadog\_api\_client.v2.model.usage\_attributes\_object module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.usage\_attribution\_types\_attributes module
--------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.usage_attribution_types_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.usage\_attribution\_types\_body module
--------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.usage_attribution_types_body
:members:
:show-inheritance:

datadog\_api\_client.v2.model.usage\_attribution\_types\_response module
------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.usage_attribution_types_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.usage\_attribution\_types\_type module
--------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.usage_attribution_types_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.usage\_data\_object module
--------------------------------------------------------

Expand Down
13 changes: 13 additions & 0 deletions examples/v2/usage-metering/GetUsageAttributionTypes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""
Get usage attribution types returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.usage_metering_api import UsageMeteringApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = UsageMeteringApi(api_client)
response = api_instance.get_usage_attribution_types()

print(response)
22 changes: 12 additions & 10 deletions src/datadog_api_client/v1/api/usage_metering_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1280,13 +1280,12 @@ def get_hourly_usage_attribution(
cursor := response.metadata.pagination.next_record_id
END

The following values have been **deprecated** :
``estimated_indexed_spans_usage`` , ``estimated_indexed_spans_percentage`` , ``estimated_ingested_spans_usage`` , ``estimated_ingested_spans_percentage`` , ``llm_observability_usage`` , ``llm_observability_percentage``.

:param start_hr: Datetime in ISO-8601 format, UTC, precise to hour: ``[YYYY-MM-DDThh]`` for usage beginning at this hour.
:type start_hr: datetime
:param usage_type: Usage type to retrieve. The following values have been **deprecated** :
``estimated_indexed_spans_usage`` , ``estimated_ingested_spans_usage``.
:param usage_type: Usage type to retrieve. Usage types are in the format ``<usage_type>_usage``.
Example: ``infra_host_usage``
To obtain the complete list of active usage types that can be used to replace
``<usage_type>`` in the field names, make a request to the `Get usage attribution types API <https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types>`_.
:type usage_type: HourlyUsageAttributionUsageType
:param end_hr: Datetime in ISO-8601 format, UTC, precise to hour: ``[YYYY-MM-DDThh]`` for usage ending
**before** this hour.
Expand Down Expand Up @@ -1448,16 +1447,19 @@ def get_monthly_usage_attribution(
Maximum of 15 months ago.
:type start_month: datetime
:param fields: Comma-separated list of usage types to return, or ``*`` for all usage types.
The following values have been **deprecated** :
``estimated_indexed_spans_usage`` , ``estimated_indexed_spans_percentage`` , ``estimated_ingested_spans_usage`` , ``estimated_ingested_spans_percentage`` , ``llm_observability_usage`` , ``llm_observability_percentage``.
Usage types are in the format ``<usage_type>_usage`` and ``<usage_type>_percentage``.
Example: ``infra_host_usage,infra_host_percentage``
To obtain the complete list of usage attribution types that can be used to replace
``<usage_type>`` in the field names, make a request to the `Get usage attribution types API <https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types>`_.
:type fields: MonthlyUsageAttributionSupportedMetrics
:param end_month: Datetime in ISO-8601 format, UTC, precise to month: ``[YYYY-MM]`` for usage ending this month.
:type end_month: datetime, optional
:param sort_direction: The direction to sort by: ``[desc, asc]``.
:type sort_direction: UsageSortDirection, optional
:param sort_name: The field to sort by.
The following values have been **deprecated** :
``estimated_indexed_spans_usage`` , ``estimated_indexed_spans_percentage`` , ``estimated_ingested_spans_usage`` , ``estimated_ingested_spans_percentage``.
:param sort_name: The field to sort by. Sort fields are in the format ``<usage_type>_usage``.
Example: ``infra_host_usage``
To obtain the complete list of usage attribution types that can be used to replace
``<usage_type>`` in the field names, make a request to the `Get usage attribution types API <https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types>`_.
:type sort_name: MonthlyUsageAttributionSupportedMetrics, optional
:param tag_breakdown_keys: Comma separated list of tag keys used to group usage. If no value is provided the usage will not be broken down by tags.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ def __init__(
:param updated_at: Shows the most recent hour in the current month for all organizations where usages are calculated.
:type updated_at: str, optional

:param usage_type: Supported products for hourly usage attribution requests.
The following values have been **deprecated** : ``estimated_indexed_spans_usage`` , ``estimated_ingested_spans_usage``.
:param usage_type: Supported products for hourly usage attribution requests. Usage types are in the format ``<usage_type>_usage``.
To obtain the complete list of valid usage types, make a request to the `Get usage attribution types API <https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types>`_.
:type usage_type: HourlyUsageAttributionUsageType, optional
"""
if hour is not unset:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

class HourlyUsageAttributionUsageType(ModelSimple):
"""
Supported products for hourly usage attribution requests.
The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.
Supported products for hourly usage attribution requests. Usage types are in the format `<usage_type>_usage`.
To obtain the complete list of valid usage types, make a request to the [Get usage attribution types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).

:param value: Must be one of ["api_usage", "apm_fargate_usage", "apm_host_usage", "apm_usm_usage", "appsec_fargate_usage", "appsec_usage", "asm_serverless_traced_invocations_usage", "asm_serverless_traced_invocations_percentage", "bits_ai_investigations_usage", "browser_usage", "ci_pipeline_indexed_spans_usage", "ci_test_indexed_spans_usage", "ci_visibility_itr_usage", "cloud_siem_usage", "code_security_host_usage", "container_excl_agent_usage", "container_usage", "cspm_containers_usage", "cspm_hosts_usage", "custom_event_usage", "custom_ingested_timeseries_usage", "custom_timeseries_usage", "cws_containers_usage", "cws_fargate_task_usage", "cws_hosts_usage", "data_jobs_monitoring_usage", "data_stream_monitoring_usage", "dbm_hosts_usage", "dbm_queries_usage", "error_tracking_usage", "error_tracking_percentage", "estimated_indexed_spans_usage", "estimated_ingested_spans_usage", "fargate_usage", "flex_logs_starter", "flex_stored_logs", "functions_usage", "incident_management_monthly_active_users_usage", "indexed_spans_usage", "infra_host_usage", "ingested_logs_bytes_usage", "ingested_spans_bytes_usage", "invocations_usage", "lambda_traced_invocations_usage", "llm_observability_usage", "llm_spans_usage", "logs_indexed_15day_usage", "logs_indexed_180day_usage", "logs_indexed_1day_usage", "logs_indexed_30day_usage", "logs_indexed_360day_usage", "logs_indexed_3day_usage", "logs_indexed_45day_usage", "logs_indexed_60day_usage", "logs_indexed_7day_usage", "logs_indexed_90day_usage", "logs_indexed_custom_retention_usage", "mobile_app_testing_usage", "ndm_netflow_usage", "npm_host_usage", "network_device_wireless_usage", "obs_pipeline_bytes_usage", "obs_pipelines_vcpu_usage", "online_archive_usage", "product_analytics_session_usage", "profiled_container_usage", "profiled_fargate_usage", "profiled_host_usage", "published_app", "rum_browser_mobile_sessions_usage", "rum_ingested_usage", "rum_investigate_usage", "rum_replay_sessions_usage", "rum_session_replay_add_on_usage", "sca_fargate_usage", "sds_scanned_bytes_usage", "serverless_apps_usage", "siem_analyzed_logs_add_on_usage", "siem_ingested_bytes_usage", "snmp_usage", "universal_service_monitoring_usage", "vuln_management_hosts_usage", "workflow_executions_usage"].
:type value: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ def __init__(
:type updated_at: datetime, optional

:param values: Fields in Usage Summary by tag(s).
The following values have been **deprecated** : ``estimated_indexed_spans_usage`` , ``estimated_indexed_spans_percentage`` , ``estimated_ingested_spans_usage`` , ``estimated_ingested_spans_percentage``.
:type values: MonthlyUsageAttributionValues, optional
"""
if month is not unset:
Expand Down
Loading