From ec010d8eaf9813c5822cd9a49f01a3202717c01a Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 15 May 2026 18:20:11 +0000 Subject: [PATCH] Regenerate client from commit 75f611a of spec repo --- .generator/schemas/v2/openapi.yaml | 654 +++++++++++++++++- docs/datadog_api_client.v2.model.rst | 140 ++++ .../GetCostTagMetadataCurrency.py | 16 + .../ListCostTagKeySources.py | 16 + .../ListCostTagMetadata.py | 16 + .../ListCostTagMetadataMetrics.py | 16 + .../ListCostTagMetadataOrchestrators.py | 16 + src/datadog_api_client/configuration.py | 5 + .../v2/api/cloud_cost_management_api.py | 299 ++++++++ .../v2/model/cost_currency.py | 46 ++ .../v2/model/cost_currency_response.py | 40 ++ .../v2/model/cost_currency_type.py | 35 + .../v2/model/cost_metric.py | 46 ++ .../v2/model/cost_metric_type.py | 35 + .../v2/model/cost_metrics_response.py | 40 ++ .../v2/model/cost_orchestrator.py | 46 ++ .../v2/model/cost_orchestrator_type.py | 35 + .../v2/model/cost_orchestrators_response.py | 40 ++ .../v2/model/cost_tag_key_metadata.py | 54 ++ .../model/cost_tag_key_metadata_attributes.py | 99 +++ ...tag_key_metadata_cardinality_by_account.py | 22 + .../model/cost_tag_key_metadata_response.py | 40 ++ ..._tag_key_metadata_top_values_by_account.py | 22 + .../v2/model/cost_tag_key_metadata_type.py | 35 + .../v2/model/cost_tag_key_source.py | 54 ++ .../model/cost_tag_key_source_attributes.py | 40 ++ .../v2/model/cost_tag_key_source_type.py | 35 + .../v2/model/cost_tag_key_sources_response.py | 40 ++ .../model/cost_tag_metadata_daily_filter.py | 38 + src/datadog_api_client/v2/models/__init__.py | 42 ++ .../v2/features/cloud_cost_management.feature | 80 +++ tests/v2/features/undo.json | 30 + 32 files changed, 2171 insertions(+), 1 deletion(-) create mode 100644 examples/v2/cloud-cost-management/GetCostTagMetadataCurrency.py create mode 100644 examples/v2/cloud-cost-management/ListCostTagKeySources.py create mode 100644 examples/v2/cloud-cost-management/ListCostTagMetadata.py create mode 100644 examples/v2/cloud-cost-management/ListCostTagMetadataMetrics.py create mode 100644 examples/v2/cloud-cost-management/ListCostTagMetadataOrchestrators.py create mode 100644 src/datadog_api_client/v2/model/cost_currency.py create mode 100644 src/datadog_api_client/v2/model/cost_currency_response.py create mode 100644 src/datadog_api_client/v2/model/cost_currency_type.py create mode 100644 src/datadog_api_client/v2/model/cost_metric.py create mode 100644 src/datadog_api_client/v2/model/cost_metric_type.py create mode 100644 src/datadog_api_client/v2/model/cost_metrics_response.py create mode 100644 src/datadog_api_client/v2/model/cost_orchestrator.py create mode 100644 src/datadog_api_client/v2/model/cost_orchestrator_type.py create mode 100644 src/datadog_api_client/v2/model/cost_orchestrators_response.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_key_metadata.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_key_metadata_attributes.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_key_metadata_cardinality_by_account.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_key_metadata_response.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_key_metadata_top_values_by_account.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_key_metadata_type.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_key_source.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_key_source_attributes.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_key_source_type.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_key_sources_response.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_metadata_daily_filter.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 39623cac69..66a1f30dbe 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -14680,7 +14680,8 @@ components: example: - 0.85 - 0.72 - items: {} + items: + description: A scalar column value, either a group key (string) or a numeric metric. type: array CommitmentsScalarColumns: description: Array of scalar columns in the response. @@ -14708,6 +14709,7 @@ components: CommitmentsTimeseriesValues: description: A series of numeric values for a timeseries metric. items: + description: A single numeric value in the timeseries. format: double type: number type: array @@ -14717,6 +14719,7 @@ components: - 1693526400 - 1693612800 items: + description: A Unix timestamp in seconds. format: int64 type: integer type: array @@ -16478,6 +16481,7 @@ components: additionalProperties: description: The list of correlated values for the tag key. items: + description: A correlated tag value. type: string type: array description: Map of correlated tag keys to the list of correlated tag values. @@ -16658,6 +16662,121 @@ components: type: string x-enum-varnames: - COST_BY_ORG + CostCurrency: + description: A Cloud Cost Management billing currency entry. + properties: + id: + description: The currency code (for example, `USD`). + example: USD + type: string + type: + $ref: "#/components/schemas/CostCurrencyType" + required: + - id + - type + type: object + CostCurrencyResponse: + description: The dominant Cloud Cost Management billing currency for the requested period. The `data` array contains at most one entry, and is empty when no currency data is available. + example: + data: + - id: USD + type: cost_currency + properties: + data: + description: The dominant billing currency. Empty when no data is available, or a single entry otherwise. + items: + $ref: "#/components/schemas/CostCurrency" + type: array + required: + - data + type: object + CostCurrencyType: + default: cost_currency + description: Type of the Cloud Cost Management billing currency resource. + enum: + - cost_currency + example: cost_currency + type: string + x-enum-varnames: + - COST_CURRENCY + CostMetric: + description: A Cloud Cost Management metric that has data for the requested period. + properties: + id: + description: The metric name, for example `aws.cost.net.amortized`. + example: aws.cost.net.amortized + type: string + type: + $ref: "#/components/schemas/CostMetricType" + required: + - id + - type + type: object + CostMetricType: + default: cost_metric + description: Type of the Cloud Cost Management available metric resource. + enum: + - cost_metric + example: cost_metric + type: string + x-enum-varnames: + - COST_METRIC + CostMetricsResponse: + description: List of available Cloud Cost Management metrics for the requested period. + example: + data: + - id: aws.cost.net.amortized + type: cost_metric + - id: gcp.cost.amortized + type: cost_metric + properties: + data: + description: List of available metrics. + items: + $ref: "#/components/schemas/CostMetric" + type: array + required: + - data + type: object + CostOrchestrator: + description: A container orchestrator detected in Cloud Cost Management data. + properties: + id: + description: The orchestrator name, for example `kubernetes` or `ecs`. + example: kubernetes + type: string + type: + $ref: "#/components/schemas/CostOrchestratorType" + required: + - id + - type + type: object + CostOrchestratorType: + default: cost_orchestrator + description: Type of the Cloud Cost Management orchestrator resource. + enum: + - cost_orchestrator + example: cost_orchestrator + type: string + x-enum-varnames: + - COST_ORCHESTRATOR + CostOrchestratorsResponse: + description: List of container orchestrators detected in Cloud Cost Management data for the requested period. + example: + data: + - id: ecs + type: cost_orchestrator + - id: kubernetes + type: cost_orchestrator + properties: + data: + description: List of detected container orchestrators. + items: + $ref: "#/components/schemas/CostOrchestrator" + type: array + required: + - data + type: object CostTag: description: A Cloud Cost Management tag. properties: @@ -16843,6 +16962,121 @@ components: - description - tag_values type: object + CostTagKeyMetadata: + description: A Cloud Cost Management tag key metadata entry, aggregating coverage and example values for a single tag key, metric, and period. + properties: + attributes: + $ref: "#/components/schemas/CostTagKeyMetadataAttributes" + id: + description: A composite identifier of the form `tag_key:metric` for monthly roll-ups, or `tag_key:metric:YYYY-MM-DD` when `filter[daily]=true`. + example: env:aws.cost.net.amortized + type: string + type: + $ref: "#/components/schemas/CostTagKeyMetadataType" + required: + - attributes + - id + - type + type: object + CostTagKeyMetadataAttributes: + description: Attributes of a Cloud Cost Management tag key metadata entry. + properties: + cardinality_by_account: + $ref: "#/components/schemas/CostTagKeyMetadataCardinalityByAccount" + cost_covered: + description: Total cost (in the report currency) of cost line items that carry this tag key for the requested period. + example: 1234.56 + format: double + type: number + date: + description: The day this row corresponds to, in `YYYY-MM-DD` format. Present only when `filter[daily]=true`; omitted for the monthly roll-up returned by default. + example: "2026-02-15" + type: string + metric: + description: The Cloud Cost Management metric this row aggregates, for example `aws.cost.net.amortized`. + example: aws.cost.net.amortized + type: string + row_count: + description: Number of cost rows that carry this tag key over the requested period. + example: 100 + format: int64 + type: integer + tag_sources: + description: Origins where this tag key was observed (for example, `aws-user-defined`). + example: + - aws-user-defined + items: + description: A tag source. + type: string + type: array + top_values_by_account: + $ref: "#/components/schemas/CostTagKeyMetadataTopValuesByAccount" + required: + - cardinality_by_account + - cost_covered + - metric + - row_count + - tag_sources + - top_values_by_account + type: object + CostTagKeyMetadataCardinalityByAccount: + additionalProperties: + description: Number of unique tag values observed in the account. + format: int64 + type: integer + description: Number of unique tag values observed for this tag key, keyed by cloud account ID. + example: + "123456789012": 42 + type: object + CostTagKeyMetadataResponse: + description: List of Cloud Cost Management tag key metadata entries for the requested period. + example: + data: + - attributes: + cardinality_by_account: + "123456789012": 42 + cost_covered: 1234.56 + metric: aws.cost.net.amortized + row_count: 100 + tag_sources: + - aws-user-defined + top_values_by_account: + "123456789012": + - prod + - staging + id: env:aws.cost.net.amortized + type: cost_tag_key_metadata + properties: + data: + description: List of tag key metadata entries. + items: + $ref: "#/components/schemas/CostTagKeyMetadata" + type: array + required: + - data + type: object + CostTagKeyMetadataTopValuesByAccount: + additionalProperties: + description: A sample of the most frequent tag values observed in the account. + items: + description: A tag value observed for this tag key. + type: string + type: array + description: A sample of the most frequent tag values observed for this tag key, keyed by cloud account ID. + example: + "123456789012": + - prod + - staging + type: object + CostTagKeyMetadataType: + default: cost_tag_key_metadata + description: Type of the Cloud Cost Management tag key metadata resource. + enum: + - cost_tag_key_metadata + example: cost_tag_key_metadata + type: string + x-enum-varnames: + - COST_TAG_KEY_METADATA CostTagKeyResponse: description: A single Cloud Cost Management tag key. example: @@ -16865,6 +17099,77 @@ components: required: - data type: object + CostTagKeySource: + description: A Cloud Cost Management tag key paired with the sources that produced it. + properties: + attributes: + $ref: "#/components/schemas/CostTagKeySourceAttributes" + id: + description: The tag key identifier. Equal to the empty-tag sentinel `__empty_tag_key__` when the tag key is empty. + example: env + type: string + type: + $ref: "#/components/schemas/CostTagKeySourceType" + required: + - attributes + - id + - type + type: object + CostTagKeySourceAttributes: + description: Attributes of a Cloud Cost Management tag source. + properties: + tag_key: + description: The tag key name. + example: env + type: string + tag_sources: + description: Origins where this tag key was observed (for example, `aws-user-defined`). + example: + - aws-user-defined + - custom + items: + description: A tag source. + type: string + type: array + required: + - tag_key + - tag_sources + type: object + CostTagKeySourceType: + default: cost_tag_key_source + description: Type of the Cloud Cost Management tag source resource. + enum: + - cost_tag_key_source + example: cost_tag_key_source + type: string + x-enum-varnames: + - COST_TAG_KEY_SOURCE + CostTagKeySourcesResponse: + description: List of Cloud Cost Management tag keys with their origin sources for the requested period. + example: + data: + - attributes: + tag_key: env + tag_sources: + - aws-user-defined + - custom + id: env + type: cost_tag_key_source + - attributes: + tag_key: service + tag_sources: + - aws + id: service + type: cost_tag_key_source + properties: + data: + description: List of tag keys with their origin sources. + items: + $ref: "#/components/schemas/CostTagKeySource" + type: array + required: + - data + type: object CostTagKeyType: default: cost_tag_key description: Type of the Cloud Cost Management tag key resource. @@ -16898,6 +17203,16 @@ components: required: - data type: object + CostTagMetadataDailyFilter: + description: Granularity for tag metadata results. `true` returns one row per day, `false` (or omitted) returns the monthly roll-up. + enum: + - "true" + - "false" + example: "true" + type: string + x-enum-varnames: + - "TRUE" + - "FALSE" CostTagType: default: cost_tag description: Type of the Cloud Cost Management tag resource. @@ -100048,6 +100363,343 @@ paths: operator: OR permissions: - cloud_cost_management_read + /api/v2/cost/tag_metadata: + get: + description: List Cloud Cost Management tag key metadata, including row counts, cost covered, cardinality, and a sample of top tag values per cloud account. Use `filter[daily]=true` to return daily rows instead of the default monthly roll-up. + operationId: ListCostTagMetadata + parameters: + - description: The month to scope the query to, in `YYYY-MM` format. + example: "2026-02" + in: query + name: filter[month] + required: true + schema: + type: string + - description: Filter results to a specific provider. Common cloud values are `aws`, `azure`, `gcp`, `Oracle` (OCI), and `custom`. SaaS billing integrations (for example, `Snowflake`, `MongoDB`, `Databricks`) are also accepted using their display-name string. Values are case-sensitive. + in: query + name: filter[provider] + schema: + type: string + - description: Filter results to a specific Cloud Cost Management metric (for example, `aws.cost.net.amortized`). When omitted, every available metric for the requested period is returned. + in: query + name: filter[metric] + schema: + type: string + - description: Restrict results to a single tag key. + in: query + name: filter[tag_key] + schema: + type: string + - description: When `true`, return one row per day with the day in the `date` attribute. Defaults to the monthly roll-up when omitted. + in: query + name: filter[daily] + schema: + $ref: "#/components/schemas/CostTagMetadataDailyFilter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + cardinality_by_account: + "123456789012": 42 + cost_covered: 1234.56 + metric: aws.cost.net.amortized + row_count: 100 + tag_sources: + - aws-user-defined + top_values_by_account: + "123456789012": + - prod + - staging + id: env:aws.cost.net.amortized + type: cost_tag_key_metadata + schema: + $ref: "#/components/schemas/CostTagKeyMetadataResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List Cloud Cost Management tag key metadata + tags: + - Cloud Cost Management + "x-permission": + operator: OR + permissions: + - cloud_cost_management_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/cost/tag_metadata/currency: + get: + description: Get the dominant billing currency observed in Cloud Cost Management data for the requested period. The response wraps the currency in a JSON:API `data` array containing at most one entry; the array is empty when no currency data is available. + operationId: GetCostTagMetadataCurrency + parameters: + - description: The month to scope the query to, in `YYYY-MM` format. + example: "2026-02" + in: query + name: filter[month] + required: true + schema: + type: string + - description: Filter results to a specific provider. Common cloud values are `aws`, `azure`, `gcp`, `Oracle` (OCI), and `custom`. SaaS billing integrations (for example, `Snowflake`, `MongoDB`, `Databricks`) are also accepted using their display-name string. Values are case-sensitive. + in: query + name: filter[provider] + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - id: USD + type: cost_currency + schema: + $ref: "#/components/schemas/CostCurrencyResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Get the Cloud Cost Management billing currency + tags: + - Cloud Cost Management + "x-permission": + operator: OR + permissions: + - cloud_cost_management_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/cost/tag_metadata/metrics: + get: + description: List Cloud Cost Management metrics that have data for the requested period. + operationId: ListCostTagMetadataMetrics + parameters: + - description: The month to scope the query to, in `YYYY-MM` format. + example: "2026-02" + in: query + name: filter[month] + required: true + schema: + type: string + - description: Filter results to a specific provider. Common cloud values are `aws`, `azure`, `gcp`, `Oracle` (OCI), and `custom`. SaaS billing integrations (for example, `Snowflake`, `MongoDB`, `Databricks`) are also accepted using their display-name string. Values are case-sensitive. + in: query + name: filter[provider] + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - id: aws.cost.net.amortized + type: cost_metric + - id: gcp.cost.amortized + type: cost_metric + schema: + $ref: "#/components/schemas/CostMetricsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List available Cloud Cost Management metrics + tags: + - Cloud Cost Management + "x-permission": + operator: OR + permissions: + - cloud_cost_management_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/cost/tag_metadata/orchestrators: + get: + description: List container orchestrators (for example, `kubernetes`, `ecs`) detected in Cloud Cost Management data for the requested period. + operationId: ListCostTagMetadataOrchestrators + parameters: + - description: The month to scope the query to, in `YYYY-MM` format. + example: "2026-02" + in: query + name: filter[month] + required: true + schema: + type: string + - description: Filter results to a specific provider. Common cloud values are `aws`, `azure`, `gcp`, `Oracle` (OCI), and `custom`. SaaS billing integrations (for example, `Snowflake`, `MongoDB`, `Databricks`) are also accepted using their display-name string. Values are case-sensitive. + in: query + name: filter[provider] + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - id: ecs + type: cost_orchestrator + - id: kubernetes + type: cost_orchestrator + schema: + $ref: "#/components/schemas/CostOrchestratorsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List Cloud Cost Management orchestrators + tags: + - Cloud Cost Management + "x-permission": + operator: OR + permissions: + - cloud_cost_management_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/cost/tag_metadata/tag_sources: + get: + description: List Cloud Cost Management tag keys observed for the requested period, along with the origin sources that produced them (for example, `aws-user-defined`, `custom`). + operationId: ListCostTagKeySources + parameters: + - description: The month to scope the query to, in `YYYY-MM` format. + example: "2026-02" + in: query + name: filter[month] + required: true + schema: + type: string + - description: Filter results to a specific provider. Common cloud values are `aws`, `azure`, `gcp`, `Oracle` (OCI), and `custom`. SaaS billing integrations (for example, `Snowflake`, `MongoDB`, `Databricks`) are also accepted using their display-name string. Values are case-sensitive. + in: query + name: filter[provider] + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + tag_key: env + tag_sources: + - aws-user-defined + - custom + id: env + type: cost_tag_key_source + - attributes: + tag_key: service + tag_sources: + - aws + id: service + type: cost_tag_key_source + schema: + $ref: "#/components/schemas/CostTagKeySourcesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List Cloud Cost Management tag sources + tags: + - Cloud Cost Management + "x-permission": + operator: OR + permissions: + - cloud_cost_management_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cost/tags: get: description: List Cloud Cost Management tags for a given metric. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index ef362a0afc..d339c6676a 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -6535,6 +6535,69 @@ datadog\_api\_client.v2.model.cost\_by\_org\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.cost\_currency module +--------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_currency + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_currency\_response module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_currency_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_currency\_type module +--------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_currency_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_metric module +------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_metric + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_metric\_type module +------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_metric_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_metrics\_response module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.cost_metrics_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_orchestrator module +------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_orchestrator + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_orchestrator\_type module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_orchestrator_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_orchestrators\_response module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.cost_orchestrators_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.cost\_tag module ---------------------------------------------- @@ -6605,6 +6668,48 @@ datadog\_api\_client.v2.model.cost\_tag\_key\_details module :members: :show-inheritance: +datadog\_api\_client.v2.model.cost\_tag\_key\_metadata module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_key_metadata + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_tag\_key\_metadata\_attributes module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_key_metadata_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_tag\_key\_metadata\_cardinality\_by\_account module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_key_metadata_cardinality_by_account + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_tag\_key\_metadata\_response module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_key_metadata_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_tag\_key\_metadata\_top\_values\_by\_account module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_key_metadata_top_values_by_account + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_tag\_key\_metadata\_type module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_key_metadata_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.cost\_tag\_key\_response module ------------------------------------------------------------- @@ -6612,6 +6717,34 @@ datadog\_api\_client.v2.model.cost\_tag\_key\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.cost\_tag\_key\_source module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_key_source + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_tag\_key\_source\_attributes module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_key_source_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_tag\_key\_source\_type module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_key_source_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_tag\_key\_sources\_response module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_key_sources_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.cost\_tag\_key\_type module --------------------------------------------------------- @@ -6626,6 +6759,13 @@ datadog\_api\_client.v2.model.cost\_tag\_keys\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.cost\_tag\_metadata\_daily\_filter module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_metadata_daily_filter + :members: + :show-inheritance: + datadog\_api\_client.v2.model.cost\_tag\_type module ---------------------------------------------------- diff --git a/examples/v2/cloud-cost-management/GetCostTagMetadataCurrency.py b/examples/v2/cloud-cost-management/GetCostTagMetadataCurrency.py new file mode 100644 index 0000000000..4e7b43d769 --- /dev/null +++ b/examples/v2/cloud-cost-management/GetCostTagMetadataCurrency.py @@ -0,0 +1,16 @@ +""" +Get the Cloud Cost Management billing currency returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi + +configuration = Configuration() +configuration.unstable_operations["get_cost_tag_metadata_currency"] = True +with ApiClient(configuration) as api_client: + api_instance = CloudCostManagementApi(api_client) + response = api_instance.get_cost_tag_metadata_currency( + filter_month="filter[month]", + ) + + print(response) diff --git a/examples/v2/cloud-cost-management/ListCostTagKeySources.py b/examples/v2/cloud-cost-management/ListCostTagKeySources.py new file mode 100644 index 0000000000..d1d5eaf329 --- /dev/null +++ b/examples/v2/cloud-cost-management/ListCostTagKeySources.py @@ -0,0 +1,16 @@ +""" +List Cloud Cost Management tag sources returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi + +configuration = Configuration() +configuration.unstable_operations["list_cost_tag_key_sources"] = True +with ApiClient(configuration) as api_client: + api_instance = CloudCostManagementApi(api_client) + response = api_instance.list_cost_tag_key_sources( + filter_month="filter[month]", + ) + + print(response) diff --git a/examples/v2/cloud-cost-management/ListCostTagMetadata.py b/examples/v2/cloud-cost-management/ListCostTagMetadata.py new file mode 100644 index 0000000000..a8d4363b52 --- /dev/null +++ b/examples/v2/cloud-cost-management/ListCostTagMetadata.py @@ -0,0 +1,16 @@ +""" +List Cloud Cost Management tag key metadata returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi + +configuration = Configuration() +configuration.unstable_operations["list_cost_tag_metadata"] = True +with ApiClient(configuration) as api_client: + api_instance = CloudCostManagementApi(api_client) + response = api_instance.list_cost_tag_metadata( + filter_month="filter[month]", + ) + + print(response) diff --git a/examples/v2/cloud-cost-management/ListCostTagMetadataMetrics.py b/examples/v2/cloud-cost-management/ListCostTagMetadataMetrics.py new file mode 100644 index 0000000000..da3c42f3d8 --- /dev/null +++ b/examples/v2/cloud-cost-management/ListCostTagMetadataMetrics.py @@ -0,0 +1,16 @@ +""" +List available Cloud Cost Management metrics returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi + +configuration = Configuration() +configuration.unstable_operations["list_cost_tag_metadata_metrics"] = True +with ApiClient(configuration) as api_client: + api_instance = CloudCostManagementApi(api_client) + response = api_instance.list_cost_tag_metadata_metrics( + filter_month="filter[month]", + ) + + print(response) diff --git a/examples/v2/cloud-cost-management/ListCostTagMetadataOrchestrators.py b/examples/v2/cloud-cost-management/ListCostTagMetadataOrchestrators.py new file mode 100644 index 0000000000..fe39928f3b --- /dev/null +++ b/examples/v2/cloud-cost-management/ListCostTagMetadataOrchestrators.py @@ -0,0 +1,16 @@ +""" +List Cloud Cost Management orchestrators returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi + +configuration = Configuration() +configuration.unstable_operations["list_cost_tag_metadata_orchestrators"] = True +with ApiClient(configuration) as api_client: + api_instance = CloudCostManagementApi(api_client) + response = api_instance.list_cost_tag_metadata_orchestrators( + filter_month="filter[month]", + ) + + print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 9d77d4720c..87496e47ce 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -361,7 +361,12 @@ def __init__( "v2.get_commitments_utilization_scalar": False, "v2.get_commitments_utilization_timeseries": False, "v2.get_cost_anomaly": False, + "v2.get_cost_tag_metadata_currency": False, "v2.list_cost_anomalies": False, + "v2.list_cost_tag_key_sources": False, + "v2.list_cost_tag_metadata": False, + "v2.list_cost_tag_metadata_metrics": False, + "v2.list_cost_tag_metadata_orchestrators": False, "v2.create_dashboard_secure_embed": False, "v2.delete_dashboard_secure_embed": False, "v2.get_dashboard_secure_embed": False, diff --git a/src/datadog_api_client/v2/api/cloud_cost_management_api.py b/src/datadog_api_client/v2/api/cloud_cost_management_api.py index 48b133f336..c4ec954d7e 100644 --- a/src/datadog_api_client/v2/api/cloud_cost_management_api.py +++ b/src/datadog_api_client/v2/api/cloud_cost_management_api.py @@ -59,6 +59,12 @@ from datadog_api_client.v2.model.cost_tag_descriptions_response import CostTagDescriptionsResponse from datadog_api_client.v2.model.cost_tag_keys_response import CostTagKeysResponse from datadog_api_client.v2.model.cost_tag_key_response import CostTagKeyResponse +from datadog_api_client.v2.model.cost_tag_key_metadata_response import CostTagKeyMetadataResponse +from datadog_api_client.v2.model.cost_tag_metadata_daily_filter import CostTagMetadataDailyFilter +from datadog_api_client.v2.model.cost_currency_response import CostCurrencyResponse +from datadog_api_client.v2.model.cost_metrics_response import CostMetricsResponse +from datadog_api_client.v2.model.cost_orchestrators_response import CostOrchestratorsResponse +from datadog_api_client.v2.model.cost_tag_key_sources_response import CostTagKeySourcesResponse from datadog_api_client.v2.model.cost_tags_response import CostTagsResponse from datadog_api_client.v2.model.ruleset_resp_array import RulesetRespArray from datadog_api_client.v2.model.ruleset_resp import RulesetResp @@ -875,6 +881,34 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_cost_tag_metadata_currency_endpoint = _Endpoint( + settings={ + "response_type": (CostCurrencyResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/cost/tag_metadata/currency", + "operation_id": "get_cost_tag_metadata_currency", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "filter_month": { + "required": True, + "openapi_types": (str,), + "attribute": "filter[month]", + "location": "query", + }, + "filter_provider": { + "openapi_types": (str,), + "attribute": "filter[provider]", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._get_custom_allocation_rule_endpoint = _Endpoint( settings={ "response_type": (ArbitraryRuleResponse,), @@ -1147,6 +1181,133 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_cost_tag_key_sources_endpoint = _Endpoint( + settings={ + "response_type": (CostTagKeySourcesResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/cost/tag_metadata/tag_sources", + "operation_id": "list_cost_tag_key_sources", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "filter_month": { + "required": True, + "openapi_types": (str,), + "attribute": "filter[month]", + "location": "query", + }, + "filter_provider": { + "openapi_types": (str,), + "attribute": "filter[provider]", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_cost_tag_metadata_endpoint = _Endpoint( + settings={ + "response_type": (CostTagKeyMetadataResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/cost/tag_metadata", + "operation_id": "list_cost_tag_metadata", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "filter_month": { + "required": True, + "openapi_types": (str,), + "attribute": "filter[month]", + "location": "query", + }, + "filter_provider": { + "openapi_types": (str,), + "attribute": "filter[provider]", + "location": "query", + }, + "filter_metric": { + "openapi_types": (str,), + "attribute": "filter[metric]", + "location": "query", + }, + "filter_tag_key": { + "openapi_types": (str,), + "attribute": "filter[tag_key]", + "location": "query", + }, + "filter_daily": { + "openapi_types": (CostTagMetadataDailyFilter,), + "attribute": "filter[daily]", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_cost_tag_metadata_metrics_endpoint = _Endpoint( + settings={ + "response_type": (CostMetricsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/cost/tag_metadata/metrics", + "operation_id": "list_cost_tag_metadata_metrics", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "filter_month": { + "required": True, + "openapi_types": (str,), + "attribute": "filter[month]", + "location": "query", + }, + "filter_provider": { + "openapi_types": (str,), + "attribute": "filter[provider]", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_cost_tag_metadata_orchestrators_endpoint = _Endpoint( + settings={ + "response_type": (CostOrchestratorsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/cost/tag_metadata/orchestrators", + "operation_id": "list_cost_tag_metadata_orchestrators", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "filter_month": { + "required": True, + "openapi_types": (str,), + "attribute": "filter[month]", + "location": "query", + }, + "filter_provider": { + "openapi_types": (str,), + "attribute": "filter[provider]", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_cost_tags_endpoint = _Endpoint( settings={ "response_type": (CostTagsResponse,), @@ -2231,6 +2392,30 @@ def get_cost_tag_key( return self._get_cost_tag_key_endpoint.call_with_http_info(**kwargs) + def get_cost_tag_metadata_currency( + self, + filter_month: str, + *, + filter_provider: Union[str, UnsetType] = unset, + ) -> CostCurrencyResponse: + """Get the Cloud Cost Management billing currency. + + Get the dominant billing currency observed in Cloud Cost Management data for the requested period. The response wraps the currency in a JSON:API ``data`` array containing at most one entry; the array is empty when no currency data is available. + + :param filter_month: The month to scope the query to, in ``YYYY-MM`` format. + :type filter_month: str + :param filter_provider: Filter results to a specific provider. Common cloud values are ``aws`` , ``azure`` , ``gcp`` , ``Oracle`` (OCI), and ``custom``. SaaS billing integrations (for example, ``Snowflake`` , ``MongoDB`` , ``Databricks`` ) are also accepted using their display-name string. Values are case-sensitive. + :type filter_provider: str, optional + :rtype: CostCurrencyResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["filter_month"] = filter_month + + if filter_provider is not unset: + kwargs["filter_provider"] = filter_provider + + return self._get_cost_tag_metadata_currency_endpoint.call_with_http_info(**kwargs) + def get_custom_allocation_rule( self, rule_id: int, @@ -2465,6 +2650,120 @@ def list_cost_tag_keys( return self._list_cost_tag_keys_endpoint.call_with_http_info(**kwargs) + def list_cost_tag_key_sources( + self, + filter_month: str, + *, + filter_provider: Union[str, UnsetType] = unset, + ) -> CostTagKeySourcesResponse: + """List Cloud Cost Management tag sources. + + List Cloud Cost Management tag keys observed for the requested period, along with the origin sources that produced them (for example, ``aws-user-defined`` , ``custom`` ). + + :param filter_month: The month to scope the query to, in ``YYYY-MM`` format. + :type filter_month: str + :param filter_provider: Filter results to a specific provider. Common cloud values are ``aws`` , ``azure`` , ``gcp`` , ``Oracle`` (OCI), and ``custom``. SaaS billing integrations (for example, ``Snowflake`` , ``MongoDB`` , ``Databricks`` ) are also accepted using their display-name string. Values are case-sensitive. + :type filter_provider: str, optional + :rtype: CostTagKeySourcesResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["filter_month"] = filter_month + + if filter_provider is not unset: + kwargs["filter_provider"] = filter_provider + + return self._list_cost_tag_key_sources_endpoint.call_with_http_info(**kwargs) + + def list_cost_tag_metadata( + self, + filter_month: str, + *, + filter_provider: Union[str, UnsetType] = unset, + filter_metric: Union[str, UnsetType] = unset, + filter_tag_key: Union[str, UnsetType] = unset, + filter_daily: Union[CostTagMetadataDailyFilter, UnsetType] = unset, + ) -> CostTagKeyMetadataResponse: + """List Cloud Cost Management tag key metadata. + + List Cloud Cost Management tag key metadata, including row counts, cost covered, cardinality, and a sample of top tag values per cloud account. Use ``filter[daily]=true`` to return daily rows instead of the default monthly roll-up. + + :param filter_month: The month to scope the query to, in ``YYYY-MM`` format. + :type filter_month: str + :param filter_provider: Filter results to a specific provider. Common cloud values are ``aws`` , ``azure`` , ``gcp`` , ``Oracle`` (OCI), and ``custom``. SaaS billing integrations (for example, ``Snowflake`` , ``MongoDB`` , ``Databricks`` ) are also accepted using their display-name string. Values are case-sensitive. + :type filter_provider: str, optional + :param filter_metric: Filter results to a specific Cloud Cost Management metric (for example, ``aws.cost.net.amortized`` ). When omitted, every available metric for the requested period is returned. + :type filter_metric: str, optional + :param filter_tag_key: Restrict results to a single tag key. + :type filter_tag_key: str, optional + :param filter_daily: When ``true`` , return one row per day with the day in the ``date`` attribute. Defaults to the monthly roll-up when omitted. + :type filter_daily: CostTagMetadataDailyFilter, optional + :rtype: CostTagKeyMetadataResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["filter_month"] = filter_month + + if filter_provider is not unset: + kwargs["filter_provider"] = filter_provider + + if filter_metric is not unset: + kwargs["filter_metric"] = filter_metric + + if filter_tag_key is not unset: + kwargs["filter_tag_key"] = filter_tag_key + + if filter_daily is not unset: + kwargs["filter_daily"] = filter_daily + + return self._list_cost_tag_metadata_endpoint.call_with_http_info(**kwargs) + + def list_cost_tag_metadata_metrics( + self, + filter_month: str, + *, + filter_provider: Union[str, UnsetType] = unset, + ) -> CostMetricsResponse: + """List available Cloud Cost Management metrics. + + List Cloud Cost Management metrics that have data for the requested period. + + :param filter_month: The month to scope the query to, in ``YYYY-MM`` format. + :type filter_month: str + :param filter_provider: Filter results to a specific provider. Common cloud values are ``aws`` , ``azure`` , ``gcp`` , ``Oracle`` (OCI), and ``custom``. SaaS billing integrations (for example, ``Snowflake`` , ``MongoDB`` , ``Databricks`` ) are also accepted using their display-name string. Values are case-sensitive. + :type filter_provider: str, optional + :rtype: CostMetricsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["filter_month"] = filter_month + + if filter_provider is not unset: + kwargs["filter_provider"] = filter_provider + + return self._list_cost_tag_metadata_metrics_endpoint.call_with_http_info(**kwargs) + + def list_cost_tag_metadata_orchestrators( + self, + filter_month: str, + *, + filter_provider: Union[str, UnsetType] = unset, + ) -> CostOrchestratorsResponse: + """List Cloud Cost Management orchestrators. + + List container orchestrators (for example, ``kubernetes`` , ``ecs`` ) detected in Cloud Cost Management data for the requested period. + + :param filter_month: The month to scope the query to, in ``YYYY-MM`` format. + :type filter_month: str + :param filter_provider: Filter results to a specific provider. Common cloud values are ``aws`` , ``azure`` , ``gcp`` , ``Oracle`` (OCI), and ``custom``. SaaS billing integrations (for example, ``Snowflake`` , ``MongoDB`` , ``Databricks`` ) are also accepted using their display-name string. Values are case-sensitive. + :type filter_provider: str, optional + :rtype: CostOrchestratorsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["filter_month"] = filter_month + + if filter_provider is not unset: + kwargs["filter_provider"] = filter_provider + + return self._list_cost_tag_metadata_orchestrators_endpoint.call_with_http_info(**kwargs) + def list_cost_tags( self, *, diff --git a/src/datadog_api_client/v2/model/cost_currency.py b/src/datadog_api_client/v2/model/cost_currency.py new file mode 100644 index 0000000000..806c8086cb --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_currency.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.cost_currency_type import CostCurrencyType + + +class CostCurrency(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_currency_type import CostCurrencyType + + return { + "id": (str,), + "type": (CostCurrencyType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: CostCurrencyType, **kwargs): + """ + A Cloud Cost Management billing currency entry. + + :param id: The currency code (for example, ``USD`` ). + :type id: str + + :param type: Type of the Cloud Cost Management billing currency resource. + :type type: CostCurrencyType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/cost_currency_response.py b/src/datadog_api_client/v2/model/cost_currency_response.py new file mode 100644 index 0000000000..6ac0dbd6db --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_currency_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.cost_currency import CostCurrency + + +class CostCurrencyResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_currency import CostCurrency + + return { + "data": ([CostCurrency],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[CostCurrency], **kwargs): + """ + The dominant Cloud Cost Management billing currency for the requested period. The ``data`` array contains at most one entry, and is empty when no currency data is available. + + :param data: The dominant billing currency. Empty when no data is available, or a single entry otherwise. + :type data: [CostCurrency] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/cost_currency_type.py b/src/datadog_api_client/v2/model/cost_currency_type.py new file mode 100644 index 0000000000..fe7c342a73 --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_currency_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CostCurrencyType(ModelSimple): + """ + Type of the Cloud Cost Management billing currency resource. + + :param value: If omitted defaults to "cost_currency". Must be one of ["cost_currency"]. + :type value: str + """ + + allowed_values = { + "cost_currency", + } + COST_CURRENCY: ClassVar["CostCurrencyType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CostCurrencyType.COST_CURRENCY = CostCurrencyType("cost_currency") diff --git a/src/datadog_api_client/v2/model/cost_metric.py b/src/datadog_api_client/v2/model/cost_metric.py new file mode 100644 index 0000000000..58a122bfa3 --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_metric.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.cost_metric_type import CostMetricType + + +class CostMetric(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_metric_type import CostMetricType + + return { + "id": (str,), + "type": (CostMetricType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: CostMetricType, **kwargs): + """ + A Cloud Cost Management metric that has data for the requested period. + + :param id: The metric name, for example ``aws.cost.net.amortized``. + :type id: str + + :param type: Type of the Cloud Cost Management available metric resource. + :type type: CostMetricType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/cost_metric_type.py b/src/datadog_api_client/v2/model/cost_metric_type.py new file mode 100644 index 0000000000..d473c7fe4e --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_metric_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CostMetricType(ModelSimple): + """ + Type of the Cloud Cost Management available metric resource. + + :param value: If omitted defaults to "cost_metric". Must be one of ["cost_metric"]. + :type value: str + """ + + allowed_values = { + "cost_metric", + } + COST_METRIC: ClassVar["CostMetricType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CostMetricType.COST_METRIC = CostMetricType("cost_metric") diff --git a/src/datadog_api_client/v2/model/cost_metrics_response.py b/src/datadog_api_client/v2/model/cost_metrics_response.py new file mode 100644 index 0000000000..5686275558 --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_metrics_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.cost_metric import CostMetric + + +class CostMetricsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_metric import CostMetric + + return { + "data": ([CostMetric],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[CostMetric], **kwargs): + """ + List of available Cloud Cost Management metrics for the requested period. + + :param data: List of available metrics. + :type data: [CostMetric] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/cost_orchestrator.py b/src/datadog_api_client/v2/model/cost_orchestrator.py new file mode 100644 index 0000000000..e1cc4c765c --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_orchestrator.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.cost_orchestrator_type import CostOrchestratorType + + +class CostOrchestrator(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_orchestrator_type import CostOrchestratorType + + return { + "id": (str,), + "type": (CostOrchestratorType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: CostOrchestratorType, **kwargs): + """ + A container orchestrator detected in Cloud Cost Management data. + + :param id: The orchestrator name, for example ``kubernetes`` or ``ecs``. + :type id: str + + :param type: Type of the Cloud Cost Management orchestrator resource. + :type type: CostOrchestratorType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/cost_orchestrator_type.py b/src/datadog_api_client/v2/model/cost_orchestrator_type.py new file mode 100644 index 0000000000..0f84b09358 --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_orchestrator_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CostOrchestratorType(ModelSimple): + """ + Type of the Cloud Cost Management orchestrator resource. + + :param value: If omitted defaults to "cost_orchestrator". Must be one of ["cost_orchestrator"]. + :type value: str + """ + + allowed_values = { + "cost_orchestrator", + } + COST_ORCHESTRATOR: ClassVar["CostOrchestratorType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CostOrchestratorType.COST_ORCHESTRATOR = CostOrchestratorType("cost_orchestrator") diff --git a/src/datadog_api_client/v2/model/cost_orchestrators_response.py b/src/datadog_api_client/v2/model/cost_orchestrators_response.py new file mode 100644 index 0000000000..587ca10e2d --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_orchestrators_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.cost_orchestrator import CostOrchestrator + + +class CostOrchestratorsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_orchestrator import CostOrchestrator + + return { + "data": ([CostOrchestrator],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[CostOrchestrator], **kwargs): + """ + List of container orchestrators detected in Cloud Cost Management data for the requested period. + + :param data: List of detected container orchestrators. + :type data: [CostOrchestrator] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/cost_tag_key_metadata.py b/src/datadog_api_client/v2/model/cost_tag_key_metadata.py new file mode 100644 index 0000000000..a00daf71cb --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_key_metadata.py @@ -0,0 +1,54 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.cost_tag_key_metadata_attributes import CostTagKeyMetadataAttributes + from datadog_api_client.v2.model.cost_tag_key_metadata_type import CostTagKeyMetadataType + + +class CostTagKeyMetadata(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_tag_key_metadata_attributes import CostTagKeyMetadataAttributes + from datadog_api_client.v2.model.cost_tag_key_metadata_type import CostTagKeyMetadataType + + return { + "attributes": (CostTagKeyMetadataAttributes,), + "id": (str,), + "type": (CostTagKeyMetadataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: CostTagKeyMetadataAttributes, id: str, type: CostTagKeyMetadataType, **kwargs): + """ + A Cloud Cost Management tag key metadata entry, aggregating coverage and example values for a single tag key, metric, and period. + + :param attributes: Attributes of a Cloud Cost Management tag key metadata entry. + :type attributes: CostTagKeyMetadataAttributes + + :param id: A composite identifier of the form ``tag_key:metric`` for monthly roll-ups, or ``tag_key:metric:YYYY-MM-DD`` when ``filter[daily]=true``. + :type id: str + + :param type: Type of the Cloud Cost Management tag key metadata resource. + :type type: CostTagKeyMetadataType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/cost_tag_key_metadata_attributes.py b/src/datadog_api_client/v2/model/cost_tag_key_metadata_attributes.py new file mode 100644 index 0000000000..42a3e09086 --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_key_metadata_attributes.py @@ -0,0 +1,99 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.cost_tag_key_metadata_cardinality_by_account import ( + CostTagKeyMetadataCardinalityByAccount, + ) + from datadog_api_client.v2.model.cost_tag_key_metadata_top_values_by_account import ( + CostTagKeyMetadataTopValuesByAccount, + ) + + +class CostTagKeyMetadataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_tag_key_metadata_cardinality_by_account import ( + CostTagKeyMetadataCardinalityByAccount, + ) + from datadog_api_client.v2.model.cost_tag_key_metadata_top_values_by_account import ( + CostTagKeyMetadataTopValuesByAccount, + ) + + return { + "cardinality_by_account": (CostTagKeyMetadataCardinalityByAccount,), + "cost_covered": (float,), + "date": (str,), + "metric": (str,), + "row_count": (int,), + "tag_sources": ([str],), + "top_values_by_account": (CostTagKeyMetadataTopValuesByAccount,), + } + + attribute_map = { + "cardinality_by_account": "cardinality_by_account", + "cost_covered": "cost_covered", + "date": "date", + "metric": "metric", + "row_count": "row_count", + "tag_sources": "tag_sources", + "top_values_by_account": "top_values_by_account", + } + + def __init__( + self_, + cardinality_by_account: CostTagKeyMetadataCardinalityByAccount, + cost_covered: float, + metric: str, + row_count: int, + tag_sources: List[str], + top_values_by_account: CostTagKeyMetadataTopValuesByAccount, + date: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a Cloud Cost Management tag key metadata entry. + + :param cardinality_by_account: Number of unique tag values observed for this tag key, keyed by cloud account ID. + :type cardinality_by_account: CostTagKeyMetadataCardinalityByAccount + + :param cost_covered: Total cost (in the report currency) of cost line items that carry this tag key for the requested period. + :type cost_covered: float + + :param date: The day this row corresponds to, in ``YYYY-MM-DD`` format. Present only when ``filter[daily]=true`` ; omitted for the monthly roll-up returned by default. + :type date: str, optional + + :param metric: The Cloud Cost Management metric this row aggregates, for example ``aws.cost.net.amortized``. + :type metric: str + + :param row_count: Number of cost rows that carry this tag key over the requested period. + :type row_count: int + + :param tag_sources: Origins where this tag key was observed (for example, ``aws-user-defined`` ). + :type tag_sources: [str] + + :param top_values_by_account: A sample of the most frequent tag values observed for this tag key, keyed by cloud account ID. + :type top_values_by_account: CostTagKeyMetadataTopValuesByAccount + """ + if date is not unset: + kwargs["date"] = date + super().__init__(kwargs) + + self_.cardinality_by_account = cardinality_by_account + self_.cost_covered = cost_covered + self_.metric = metric + self_.row_count = row_count + self_.tag_sources = tag_sources + self_.top_values_by_account = top_values_by_account diff --git a/src/datadog_api_client/v2/model/cost_tag_key_metadata_cardinality_by_account.py b/src/datadog_api_client/v2/model/cost_tag_key_metadata_cardinality_by_account.py new file mode 100644 index 0000000000..119d86c1f1 --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_key_metadata_cardinality_by_account.py @@ -0,0 +1,22 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CostTagKeyMetadataCardinalityByAccount(ModelNormal): + @cached_property + def additional_properties_type(_): + return (int,) + + def __init__(self_, **kwargs): + """ + Number of unique tag values observed for this tag key, keyed by cloud account ID. + """ + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/cost_tag_key_metadata_response.py b/src/datadog_api_client/v2/model/cost_tag_key_metadata_response.py new file mode 100644 index 0000000000..f08807e4cf --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_key_metadata_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.cost_tag_key_metadata import CostTagKeyMetadata + + +class CostTagKeyMetadataResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_tag_key_metadata import CostTagKeyMetadata + + return { + "data": ([CostTagKeyMetadata],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[CostTagKeyMetadata], **kwargs): + """ + List of Cloud Cost Management tag key metadata entries for the requested period. + + :param data: List of tag key metadata entries. + :type data: [CostTagKeyMetadata] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/cost_tag_key_metadata_top_values_by_account.py b/src/datadog_api_client/v2/model/cost_tag_key_metadata_top_values_by_account.py new file mode 100644 index 0000000000..4943cb2619 --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_key_metadata_top_values_by_account.py @@ -0,0 +1,22 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CostTagKeyMetadataTopValuesByAccount(ModelNormal): + @cached_property + def additional_properties_type(_): + return ([str],) + + def __init__(self_, **kwargs): + """ + A sample of the most frequent tag values observed for this tag key, keyed by cloud account ID. + """ + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/cost_tag_key_metadata_type.py b/src/datadog_api_client/v2/model/cost_tag_key_metadata_type.py new file mode 100644 index 0000000000..bdc7ce3751 --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_key_metadata_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CostTagKeyMetadataType(ModelSimple): + """ + Type of the Cloud Cost Management tag key metadata resource. + + :param value: If omitted defaults to "cost_tag_key_metadata". Must be one of ["cost_tag_key_metadata"]. + :type value: str + """ + + allowed_values = { + "cost_tag_key_metadata", + } + COST_TAG_KEY_METADATA: ClassVar["CostTagKeyMetadataType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CostTagKeyMetadataType.COST_TAG_KEY_METADATA = CostTagKeyMetadataType("cost_tag_key_metadata") diff --git a/src/datadog_api_client/v2/model/cost_tag_key_source.py b/src/datadog_api_client/v2/model/cost_tag_key_source.py new file mode 100644 index 0000000000..8c2a350e0e --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_key_source.py @@ -0,0 +1,54 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.cost_tag_key_source_attributes import CostTagKeySourceAttributes + from datadog_api_client.v2.model.cost_tag_key_source_type import CostTagKeySourceType + + +class CostTagKeySource(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_tag_key_source_attributes import CostTagKeySourceAttributes + from datadog_api_client.v2.model.cost_tag_key_source_type import CostTagKeySourceType + + return { + "attributes": (CostTagKeySourceAttributes,), + "id": (str,), + "type": (CostTagKeySourceType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: CostTagKeySourceAttributes, id: str, type: CostTagKeySourceType, **kwargs): + """ + A Cloud Cost Management tag key paired with the sources that produced it. + + :param attributes: Attributes of a Cloud Cost Management tag source. + :type attributes: CostTagKeySourceAttributes + + :param id: The tag key identifier. Equal to the empty-tag sentinel ``__empty_tag_key__`` when the tag key is empty. + :type id: str + + :param type: Type of the Cloud Cost Management tag source resource. + :type type: CostTagKeySourceType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/cost_tag_key_source_attributes.py b/src/datadog_api_client/v2/model/cost_tag_key_source_attributes.py new file mode 100644 index 0000000000..3fa940564a --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_key_source_attributes.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CostTagKeySourceAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "tag_key": (str,), + "tag_sources": ([str],), + } + + attribute_map = { + "tag_key": "tag_key", + "tag_sources": "tag_sources", + } + + def __init__(self_, tag_key: str, tag_sources: List[str], **kwargs): + """ + Attributes of a Cloud Cost Management tag source. + + :param tag_key: The tag key name. + :type tag_key: str + + :param tag_sources: Origins where this tag key was observed (for example, ``aws-user-defined`` ). + :type tag_sources: [str] + """ + super().__init__(kwargs) + + self_.tag_key = tag_key + self_.tag_sources = tag_sources diff --git a/src/datadog_api_client/v2/model/cost_tag_key_source_type.py b/src/datadog_api_client/v2/model/cost_tag_key_source_type.py new file mode 100644 index 0000000000..1e0c1d89bc --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_key_source_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CostTagKeySourceType(ModelSimple): + """ + Type of the Cloud Cost Management tag source resource. + + :param value: If omitted defaults to "cost_tag_key_source". Must be one of ["cost_tag_key_source"]. + :type value: str + """ + + allowed_values = { + "cost_tag_key_source", + } + COST_TAG_KEY_SOURCE: ClassVar["CostTagKeySourceType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CostTagKeySourceType.COST_TAG_KEY_SOURCE = CostTagKeySourceType("cost_tag_key_source") diff --git a/src/datadog_api_client/v2/model/cost_tag_key_sources_response.py b/src/datadog_api_client/v2/model/cost_tag_key_sources_response.py new file mode 100644 index 0000000000..ff1e3cc5db --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_key_sources_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.cost_tag_key_source import CostTagKeySource + + +class CostTagKeySourcesResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_tag_key_source import CostTagKeySource + + return { + "data": ([CostTagKeySource],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[CostTagKeySource], **kwargs): + """ + List of Cloud Cost Management tag keys with their origin sources for the requested period. + + :param data: List of tag keys with their origin sources. + :type data: [CostTagKeySource] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/cost_tag_metadata_daily_filter.py b/src/datadog_api_client/v2/model/cost_tag_metadata_daily_filter.py new file mode 100644 index 0000000000..7ca84ba1e5 --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_metadata_daily_filter.py @@ -0,0 +1,38 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CostTagMetadataDailyFilter(ModelSimple): + """ + Granularity for tag metadata results. `true` returns one row per day, `false` (or omitted) returns the monthly roll-up. + + :param value: Must be one of ["true", "false"]. + :type value: str + """ + + allowed_values = { + "true", + "false", + } + TRUE: ClassVar["CostTagMetadataDailyFilter"] + FALSE: ClassVar["CostTagMetadataDailyFilter"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CostTagMetadataDailyFilter.TRUE = CostTagMetadataDailyFilter("true") +CostTagMetadataDailyFilter.FALSE = CostTagMetadataDailyFilter("false") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 33de6c51a8..ac4f1dadd1 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1223,6 +1223,15 @@ from datadog_api_client.v2.model.cost_by_org_attributes import CostByOrgAttributes from datadog_api_client.v2.model.cost_by_org_response import CostByOrgResponse from datadog_api_client.v2.model.cost_by_org_type import CostByOrgType +from datadog_api_client.v2.model.cost_currency import CostCurrency +from datadog_api_client.v2.model.cost_currency_response import CostCurrencyResponse +from datadog_api_client.v2.model.cost_currency_type import CostCurrencyType +from datadog_api_client.v2.model.cost_metric import CostMetric +from datadog_api_client.v2.model.cost_metric_type import CostMetricType +from datadog_api_client.v2.model.cost_metrics_response import CostMetricsResponse +from datadog_api_client.v2.model.cost_orchestrator import CostOrchestrator +from datadog_api_client.v2.model.cost_orchestrator_type import CostOrchestratorType +from datadog_api_client.v2.model.cost_orchestrators_response import CostOrchestratorsResponse from datadog_api_client.v2.model.cost_tag import CostTag from datadog_api_client.v2.model.cost_tag_attributes import CostTagAttributes from datadog_api_client.v2.model.cost_tag_description import CostTagDescription @@ -1233,9 +1242,22 @@ from datadog_api_client.v2.model.cost_tag_key import CostTagKey from datadog_api_client.v2.model.cost_tag_key_attributes import CostTagKeyAttributes from datadog_api_client.v2.model.cost_tag_key_details import CostTagKeyDetails +from datadog_api_client.v2.model.cost_tag_key_metadata import CostTagKeyMetadata +from datadog_api_client.v2.model.cost_tag_key_metadata_attributes import CostTagKeyMetadataAttributes +from datadog_api_client.v2.model.cost_tag_key_metadata_cardinality_by_account import ( + CostTagKeyMetadataCardinalityByAccount, +) +from datadog_api_client.v2.model.cost_tag_key_metadata_response import CostTagKeyMetadataResponse +from datadog_api_client.v2.model.cost_tag_key_metadata_top_values_by_account import CostTagKeyMetadataTopValuesByAccount +from datadog_api_client.v2.model.cost_tag_key_metadata_type import CostTagKeyMetadataType from datadog_api_client.v2.model.cost_tag_key_response import CostTagKeyResponse +from datadog_api_client.v2.model.cost_tag_key_source import CostTagKeySource +from datadog_api_client.v2.model.cost_tag_key_source_attributes import CostTagKeySourceAttributes +from datadog_api_client.v2.model.cost_tag_key_source_type import CostTagKeySourceType +from datadog_api_client.v2.model.cost_tag_key_sources_response import CostTagKeySourcesResponse from datadog_api_client.v2.model.cost_tag_key_type import CostTagKeyType from datadog_api_client.v2.model.cost_tag_keys_response import CostTagKeysResponse +from datadog_api_client.v2.model.cost_tag_metadata_daily_filter import CostTagMetadataDailyFilter from datadog_api_client.v2.model.cost_tag_type import CostTagType from datadog_api_client.v2.model.cost_tags_response import CostTagsResponse from datadog_api_client.v2.model.coverage_summary_attributes import CoverageSummaryAttributes @@ -8602,6 +8624,15 @@ "CostByOrgAttributes", "CostByOrgResponse", "CostByOrgType", + "CostCurrency", + "CostCurrencyResponse", + "CostCurrencyType", + "CostMetric", + "CostMetricType", + "CostMetricsResponse", + "CostOrchestrator", + "CostOrchestratorType", + "CostOrchestratorsResponse", "CostTag", "CostTagAttributes", "CostTagDescription", @@ -8612,9 +8643,20 @@ "CostTagKey", "CostTagKeyAttributes", "CostTagKeyDetails", + "CostTagKeyMetadata", + "CostTagKeyMetadataAttributes", + "CostTagKeyMetadataCardinalityByAccount", + "CostTagKeyMetadataResponse", + "CostTagKeyMetadataTopValuesByAccount", + "CostTagKeyMetadataType", "CostTagKeyResponse", + "CostTagKeySource", + "CostTagKeySourceAttributes", + "CostTagKeySourceType", + "CostTagKeySourcesResponse", "CostTagKeyType", "CostTagKeysResponse", + "CostTagMetadataDailyFilter", "CostTagType", "CostTagsResponse", "CoverageSummaryAttributes", diff --git a/tests/v2/features/cloud_cost_management.feature b/tests/v2/features/cloud_cost_management.feature index 76cb7c1d63..578dbb4200 100644 --- a/tests/v2/features/cloud_cost_management.feature +++ b/tests/v2/features/cloud_cost_management.feature @@ -520,6 +520,22 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Get the Cloud Cost Management billing currency returns "Bad Request" response + Given operation "GetCostTagMetadataCurrency" enabled + And new "GetCostTagMetadataCurrency" request + And request contains "filter[month]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Get the Cloud Cost Management billing currency returns "OK" response + Given operation "GetCostTagMetadataCurrency" enabled + And new "GetCostTagMetadataCurrency" request + And request contains "filter[month]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @replay-only @team:DataDog/cloud-cost-management Scenario: List Cloud Cost Management AWS CUR configs returns "OK" response Given new "ListCostAWSCURConfigs" request @@ -540,12 +556,44 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List Cloud Cost Management orchestrators returns "Bad Request" response + Given operation "ListCostTagMetadataOrchestrators" enabled + And new "ListCostTagMetadataOrchestrators" request + And request contains "filter[month]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List Cloud Cost Management orchestrators returns "OK" response + Given operation "ListCostTagMetadataOrchestrators" enabled + And new "ListCostTagMetadataOrchestrators" request + And request contains "filter[month]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management Scenario: List Cloud Cost Management tag descriptions returns "OK" response Given new "ListCostTagDescriptions" request When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List Cloud Cost Management tag key metadata returns "Bad Request" response + Given operation "ListCostTagMetadata" enabled + And new "ListCostTagMetadata" request + And request contains "filter[month]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List Cloud Cost Management tag key metadata returns "OK" response + Given operation "ListCostTagMetadata" enabled + And new "ListCostTagMetadata" request + And request contains "filter[month]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management Scenario: List Cloud Cost Management tag keys returns "Bad Request" response Given new "ListCostTagKeys" request @@ -558,6 +606,22 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List Cloud Cost Management tag sources returns "Bad Request" response + Given operation "ListCostTagKeySources" enabled + And new "ListCostTagKeySources" request + And request contains "filter[month]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List Cloud Cost Management tag sources returns "OK" response + Given operation "ListCostTagKeySources" enabled + And new "ListCostTagKeySources" request + And request contains "filter[month]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management Scenario: List Cloud Cost Management tags returns "Bad Request" response Given new "ListCostTags" request @@ -596,6 +660,22 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List available Cloud Cost Management metrics returns "Bad Request" response + Given operation "ListCostTagMetadataMetrics" enabled + And new "ListCostTagMetadataMetrics" request + And request contains "filter[month]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List available Cloud Cost Management metrics returns "OK" response + Given operation "ListCostTagMetadataMetrics" enabled + And new "ListCostTagMetadataMetrics" request + And request contains "filter[month]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @team:DataDog/cloud-cost-management Scenario: List budgets returns "OK" response Given new "ListBudgets" request diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 7a5941a2c0..faa660d7de 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -1609,6 +1609,36 @@ "type": "safe" } }, + "ListCostTagMetadata": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "GetCostTagMetadataCurrency": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "ListCostTagMetadataMetrics": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "ListCostTagMetadataOrchestrators": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "ListCostTagKeySources": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "ListCostTags": { "tag": "Cloud Cost Management", "undo": {