From 1d9112fc813facba27dad5fadeb118cfa3ed1035 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 31 Jan 2022 10:16:59 +0000 Subject: [PATCH] Regenerate client from commit 28778f1 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v1/openapi.yaml | 42 ++++++++++ api/v1/datadog/docs/UsageAnalyzedLogsHour.md | 52 +++++++++++++ .../docs/UsageIncidentManagementHour.md | 52 +++++++++++++ api/v1/datadog/docs/UsageIndexedSpansHour.md | 52 +++++++++++++ api/v1/datadog/docs/UsageIngestedSpansHour.md | 52 +++++++++++++ api/v1/datadog/docs/UsageIoTHour.md | 52 +++++++++++++ api/v1/datadog/docs/UsageProfilingHour.md | 52 +++++++++++++ api/v1/datadog/docs/UsageSNMPHour.md | 52 +++++++++++++ .../datadog/model_usage_analyzed_logs_hour.go | 78 +++++++++++++++++++ .../model_usage_incident_management_hour.go | 78 +++++++++++++++++++ .../datadog/model_usage_indexed_spans_hour.go | 78 +++++++++++++++++++ .../model_usage_ingested_spans_hour.go | 78 +++++++++++++++++++ api/v1/datadog/model_usage_io_t_hour.go | 78 +++++++++++++++++++ api/v1/datadog/model_usage_profiling_hour.go | 78 +++++++++++++++++++ api/v1/datadog/model_usage_snmp_hour.go | 78 +++++++++++++++++++ .../usage-metering/GetIncidentManagement.go | 28 +++++++ .../v1/usage-metering/GetIngestedSpans.go | 28 +++++++ .../v1/usage-metering/GetUsageAnalyzedLogs.go | 28 +++++++ .../v1/usage-metering/GetUsageIndexedSpans.go | 28 +++++++ .../GetUsageInternetOfThings.go | 28 +++++++ .../v1/usage-metering/GetUsageProfiling.go | 28 +++++++ examples/v1/usage-metering/GetUsageSNMP.go | 28 +++++++ ...or_IoT_returns_Bad_Request_response.freeze | 1 + ..._for_IoT_returns_Bad_Request_response.yaml | 18 +++++ ...y_usage_for_IoT_returns_OK_response.freeze | 1 + ...rly_usage_for_IoT_returns_OK_response.yaml | 65 ++++++++++++++++ ...evices_returns_Bad_Request_response.freeze | 1 + ..._devices_returns_Bad_Request_response.yaml | 18 +++++ ...or_SNMP_devices_returns_OK_response.freeze | 1 + ..._for_SNMP_devices_returns_OK_response.yaml | 18 +++++ ...d_logs_returns_Bad_Request_response.freeze | 1 + ...zed_logs_returns_Bad_Request_response.yaml | 18 +++++ ...r_analyzed_logs_returns_OK_response.freeze | 1 + ...for_analyzed_logs_returns_OK_response.yaml | 18 +++++ ...gement_returns_Bad_Request_response.freeze | 1 + ...nagement_returns_Bad_Request_response.yaml | 18 +++++ ...dent_management_returns_OK_response.freeze | 1 + ...cident_management_returns_OK_response.yaml | 65 ++++++++++++++++ ..._spans_returns_Bad_Request_response.freeze | 1 + ...ed_spans_returns_Bad_Request_response.yaml | 18 +++++ ...r_indexed_spans_returns_OK_response.freeze | 1 + ...for_indexed_spans_returns_OK_response.yaml | 65 ++++++++++++++++ ..._spans_returns_Bad_Request_response.freeze | 1 + ...ed_spans_returns_Bad_Request_response.yaml | 18 +++++ ..._ingested_spans_returns_OK_response.freeze | 1 + ...or_ingested_spans_returns_OK_response.yaml | 65 ++++++++++++++++ ..._hosts_returns_Bad_Request_response.freeze | 1 + ...ed_hosts_returns_Bad_Request_response.yaml | 18 +++++ ..._profiled_hosts_returns_OK_response.freeze | 1 + ...or_profiled_hosts_returns_OK_response.yaml | 65 ++++++++++++++++ .../features/v1/usage_metering.feature | 56 +++++++++---- 52 files changed, 1695 insertions(+), 18 deletions(-) create mode 100644 examples/v1/usage-metering/GetIncidentManagement.go create mode 100644 examples/v1/usage-metering/GetIngestedSpans.go create mode 100644 examples/v1/usage-metering/GetUsageAnalyzedLogs.go create mode 100644 examples/v1/usage-metering/GetUsageIndexedSpans.go create mode 100644 examples/v1/usage-metering/GetUsageInternetOfThings.go create mode 100644 examples/v1/usage-metering/GetUsageProfiling.go create mode 100644 examples/v1/usage-metering/GetUsageSNMP.go create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_Bad_Request_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_Bad_Request_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_OK_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_OK_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_Bad_Request_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_Bad_Request_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_OK_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_OK_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_Bad_Request_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_Bad_Request_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_OK_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_OK_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_Bad_Request_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_Bad_Request_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_OK_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_OK_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_Bad_Request_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_Bad_Request_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_OK_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_OK_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_Bad_Request_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_Bad_Request_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_OK_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_OK_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_Bad_Request_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_Bad_Request_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_OK_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_OK_response.yaml diff --git a/.apigentools-info b/.apigentools-info index 83423bcfd87..345ece33e9f 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.1", - "regenerated": "2022-01-27 16:01:43.454600", - "spec_repo_commit": "c738c50" + "regenerated": "2022-01-31 10:15:52.937368", + "spec_repo_commit": "28778f1" }, "v2": { "apigentools_version": "1.6.1", - "regenerated": "2022-01-27 16:01:43.466103", - "spec_repo_commit": "c738c50" + "regenerated": "2022-01-31 10:15:52.951673", + "spec_repo_commit": "28778f1" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 4cbd60c87df..d043e881319 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -12428,6 +12428,12 @@ components: description: The hour for the usage. format: date-time type: string + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string type: object UsageAnalyzedLogsResponse: description: A response containing the number of analyzed logs for each hour @@ -13347,6 +13353,12 @@ components: of the given hour's month until the given hour. format: int64 type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string type: object UsageIncidentManagementResponse: description: Response containing the incident management usage for each hour @@ -13369,6 +13381,12 @@ components: description: Contains the number of spans indexed. format: int64 type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string type: object UsageIndexedSpansResponse: description: A response containing indexed spans usage. @@ -13392,6 +13410,12 @@ components: hour. format: int64 type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string type: object UsageIngestedSpansResponse: description: Response containing the ingested spans usage for each hour for @@ -13414,6 +13438,12 @@ components: description: The total number of IoT devices during a given hour. format: int64 type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string type: object UsageIoTResponse: description: Response containing the IoT usage for each hour for a given organization. @@ -13641,6 +13671,12 @@ components: description: The hour for the usage. format: date-time type: string + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string type: object UsageProfilingResponse: description: Response containing the number of profiled hosts for each hour @@ -13782,6 +13818,12 @@ components: description: The hour for the usage. format: date-time type: string + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string snmp_devices: description: Contains the number of SNMP devices. format: int64 diff --git a/api/v1/datadog/docs/UsageAnalyzedLogsHour.md b/api/v1/datadog/docs/UsageAnalyzedLogsHour.md index c0134041552..ec44b1215ab 100644 --- a/api/v1/datadog/docs/UsageAnalyzedLogsHour.md +++ b/api/v1/datadog/docs/UsageAnalyzedLogsHour.md @@ -6,6 +6,8 @@ | ---------------- | ------------------------ | ------------------------------------- | ---------- | | **AnalyzedLogs** | Pointer to **int64** | Contains the number of analyzed logs. | [optional] | | **Hour** | Pointer to **time.Time** | The hour for the usage. | [optional] | +| **OrgName** | Pointer to **string** | The organization name. | [optional] | +| **PublicId** | Pointer to **string** | The organization public ID. | [optional] | ## Methods @@ -76,4 +78,54 @@ SetHour sets Hour field to given value. HasHour returns a boolean if a field has been set. +### GetOrgName + +`func (o *UsageAnalyzedLogsHour) GetOrgName() string` + +GetOrgName returns the OrgName field if non-nil, zero value otherwise. + +### GetOrgNameOk + +`func (o *UsageAnalyzedLogsHour) GetOrgNameOk() (*string, bool)` + +GetOrgNameOk returns a tuple with the OrgName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgName + +`func (o *UsageAnalyzedLogsHour) SetOrgName(v string)` + +SetOrgName sets OrgName field to given value. + +### HasOrgName + +`func (o *UsageAnalyzedLogsHour) HasOrgName() bool` + +HasOrgName returns a boolean if a field has been set. + +### GetPublicId + +`func (o *UsageAnalyzedLogsHour) GetPublicId() string` + +GetPublicId returns the PublicId field if non-nil, zero value otherwise. + +### GetPublicIdOk + +`func (o *UsageAnalyzedLogsHour) GetPublicIdOk() (*string, bool)` + +GetPublicIdOk returns a tuple with the PublicId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPublicId + +`func (o *UsageAnalyzedLogsHour) SetPublicId(v string)` + +SetPublicId sets PublicId field to given value. + +### HasPublicId + +`func (o *UsageAnalyzedLogsHour) HasPublicId() bool` + +HasPublicId returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/api/v1/datadog/docs/UsageIncidentManagementHour.md b/api/v1/datadog/docs/UsageIncidentManagementHour.md index 24ea1cd8bd1..96673c34138 100644 --- a/api/v1/datadog/docs/UsageIncidentManagementHour.md +++ b/api/v1/datadog/docs/UsageIncidentManagementHour.md @@ -6,6 +6,8 @@ | ---------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------- | ---------- | | **Hour** | Pointer to **time.Time** | The hour for the usage. | [optional] | | **MonthlyActiveUsers** | Pointer to **int64** | Contains the total number monthly active users from the start of the given hour's month until the given hour. | [optional] | +| **OrgName** | Pointer to **string** | The organization name. | [optional] | +| **PublicId** | Pointer to **string** | The organization public ID. | [optional] | ## Methods @@ -76,4 +78,54 @@ SetMonthlyActiveUsers sets MonthlyActiveUsers field to given value. HasMonthlyActiveUsers returns a boolean if a field has been set. +### GetOrgName + +`func (o *UsageIncidentManagementHour) GetOrgName() string` + +GetOrgName returns the OrgName field if non-nil, zero value otherwise. + +### GetOrgNameOk + +`func (o *UsageIncidentManagementHour) GetOrgNameOk() (*string, bool)` + +GetOrgNameOk returns a tuple with the OrgName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgName + +`func (o *UsageIncidentManagementHour) SetOrgName(v string)` + +SetOrgName sets OrgName field to given value. + +### HasOrgName + +`func (o *UsageIncidentManagementHour) HasOrgName() bool` + +HasOrgName returns a boolean if a field has been set. + +### GetPublicId + +`func (o *UsageIncidentManagementHour) GetPublicId() string` + +GetPublicId returns the PublicId field if non-nil, zero value otherwise. + +### GetPublicIdOk + +`func (o *UsageIncidentManagementHour) GetPublicIdOk() (*string, bool)` + +GetPublicIdOk returns a tuple with the PublicId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPublicId + +`func (o *UsageIncidentManagementHour) SetPublicId(v string)` + +SetPublicId sets PublicId field to given value. + +### HasPublicId + +`func (o *UsageIncidentManagementHour) HasPublicId() bool` + +HasPublicId returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/api/v1/datadog/docs/UsageIndexedSpansHour.md b/api/v1/datadog/docs/UsageIndexedSpansHour.md index 1d0ad97b73e..a20d4f7a989 100644 --- a/api/v1/datadog/docs/UsageIndexedSpansHour.md +++ b/api/v1/datadog/docs/UsageIndexedSpansHour.md @@ -6,6 +6,8 @@ | ---------------------- | ------------------------ | ------------------------------------- | ---------- | | **Hour** | Pointer to **time.Time** | The hour for the usage. | [optional] | | **IndexedEventsCount** | Pointer to **int64** | Contains the number of spans indexed. | [optional] | +| **OrgName** | Pointer to **string** | The organization name. | [optional] | +| **PublicId** | Pointer to **string** | The organization public ID. | [optional] | ## Methods @@ -76,4 +78,54 @@ SetIndexedEventsCount sets IndexedEventsCount field to given value. HasIndexedEventsCount returns a boolean if a field has been set. +### GetOrgName + +`func (o *UsageIndexedSpansHour) GetOrgName() string` + +GetOrgName returns the OrgName field if non-nil, zero value otherwise. + +### GetOrgNameOk + +`func (o *UsageIndexedSpansHour) GetOrgNameOk() (*string, bool)` + +GetOrgNameOk returns a tuple with the OrgName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgName + +`func (o *UsageIndexedSpansHour) SetOrgName(v string)` + +SetOrgName sets OrgName field to given value. + +### HasOrgName + +`func (o *UsageIndexedSpansHour) HasOrgName() bool` + +HasOrgName returns a boolean if a field has been set. + +### GetPublicId + +`func (o *UsageIndexedSpansHour) GetPublicId() string` + +GetPublicId returns the PublicId field if non-nil, zero value otherwise. + +### GetPublicIdOk + +`func (o *UsageIndexedSpansHour) GetPublicIdOk() (*string, bool)` + +GetPublicIdOk returns a tuple with the PublicId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPublicId + +`func (o *UsageIndexedSpansHour) SetPublicId(v string)` + +SetPublicId sets PublicId field to given value. + +### HasPublicId + +`func (o *UsageIndexedSpansHour) HasPublicId() bool` + +HasPublicId returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/api/v1/datadog/docs/UsageIngestedSpansHour.md b/api/v1/datadog/docs/UsageIngestedSpansHour.md index 7e1557e660d..4f11e99590b 100644 --- a/api/v1/datadog/docs/UsageIngestedSpansHour.md +++ b/api/v1/datadog/docs/UsageIngestedSpansHour.md @@ -6,6 +6,8 @@ | ----------------------- | ------------------------ | ---------------------------------------------------------------- | ---------- | | **Hour** | Pointer to **time.Time** | The hour for the usage. | [optional] | | **IngestedEventsBytes** | Pointer to **int64** | Contains the total number of bytes ingested during a given hour. | [optional] | +| **OrgName** | Pointer to **string** | The organization name. | [optional] | +| **PublicId** | Pointer to **string** | The organization public ID. | [optional] | ## Methods @@ -76,4 +78,54 @@ SetIngestedEventsBytes sets IngestedEventsBytes field to given value. HasIngestedEventsBytes returns a boolean if a field has been set. +### GetOrgName + +`func (o *UsageIngestedSpansHour) GetOrgName() string` + +GetOrgName returns the OrgName field if non-nil, zero value otherwise. + +### GetOrgNameOk + +`func (o *UsageIngestedSpansHour) GetOrgNameOk() (*string, bool)` + +GetOrgNameOk returns a tuple with the OrgName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgName + +`func (o *UsageIngestedSpansHour) SetOrgName(v string)` + +SetOrgName sets OrgName field to given value. + +### HasOrgName + +`func (o *UsageIngestedSpansHour) HasOrgName() bool` + +HasOrgName returns a boolean if a field has been set. + +### GetPublicId + +`func (o *UsageIngestedSpansHour) GetPublicId() string` + +GetPublicId returns the PublicId field if non-nil, zero value otherwise. + +### GetPublicIdOk + +`func (o *UsageIngestedSpansHour) GetPublicIdOk() (*string, bool)` + +GetPublicIdOk returns a tuple with the PublicId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPublicId + +`func (o *UsageIngestedSpansHour) SetPublicId(v string)` + +SetPublicId sets PublicId field to given value. + +### HasPublicId + +`func (o *UsageIngestedSpansHour) HasPublicId() bool` + +HasPublicId returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/api/v1/datadog/docs/UsageIoTHour.md b/api/v1/datadog/docs/UsageIoTHour.md index 279b7b39260..ca4ba36358b 100644 --- a/api/v1/datadog/docs/UsageIoTHour.md +++ b/api/v1/datadog/docs/UsageIoTHour.md @@ -6,6 +6,8 @@ | ------------------ | ------------------------ | ---------------------------------------------------- | ---------- | | **Hour** | Pointer to **time.Time** | The hour for the usage. | [optional] | | **IotDeviceCount** | Pointer to **int64** | The total number of IoT devices during a given hour. | [optional] | +| **OrgName** | Pointer to **string** | The organization name. | [optional] | +| **PublicId** | Pointer to **string** | The organization public ID. | [optional] | ## Methods @@ -76,4 +78,54 @@ SetIotDeviceCount sets IotDeviceCount field to given value. HasIotDeviceCount returns a boolean if a field has been set. +### GetOrgName + +`func (o *UsageIoTHour) GetOrgName() string` + +GetOrgName returns the OrgName field if non-nil, zero value otherwise. + +### GetOrgNameOk + +`func (o *UsageIoTHour) GetOrgNameOk() (*string, bool)` + +GetOrgNameOk returns a tuple with the OrgName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgName + +`func (o *UsageIoTHour) SetOrgName(v string)` + +SetOrgName sets OrgName field to given value. + +### HasOrgName + +`func (o *UsageIoTHour) HasOrgName() bool` + +HasOrgName returns a boolean if a field has been set. + +### GetPublicId + +`func (o *UsageIoTHour) GetPublicId() string` + +GetPublicId returns the PublicId field if non-nil, zero value otherwise. + +### GetPublicIdOk + +`func (o *UsageIoTHour) GetPublicIdOk() (*string, bool)` + +GetPublicIdOk returns a tuple with the PublicId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPublicId + +`func (o *UsageIoTHour) SetPublicId(v string)` + +SetPublicId sets PublicId field to given value. + +### HasPublicId + +`func (o *UsageIoTHour) HasPublicId() bool` + +HasPublicId returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/api/v1/datadog/docs/UsageProfilingHour.md b/api/v1/datadog/docs/UsageProfilingHour.md index 5b1d52c2048..c34751daf22 100644 --- a/api/v1/datadog/docs/UsageProfilingHour.md +++ b/api/v1/datadog/docs/UsageProfilingHour.md @@ -7,6 +7,8 @@ | **AvgContainerAgentCount** | Pointer to **int64** | Get average number of container agents for that hour. | [optional] | | **HostCount** | Pointer to **int64** | Contains the total number of profiled hosts reporting during a given hour. | [optional] | | **Hour** | Pointer to **time.Time** | The hour for the usage. | [optional] | +| **OrgName** | Pointer to **string** | The organization name. | [optional] | +| **PublicId** | Pointer to **string** | The organization public ID. | [optional] | ## Methods @@ -102,4 +104,54 @@ SetHour sets Hour field to given value. HasHour returns a boolean if a field has been set. +### GetOrgName + +`func (o *UsageProfilingHour) GetOrgName() string` + +GetOrgName returns the OrgName field if non-nil, zero value otherwise. + +### GetOrgNameOk + +`func (o *UsageProfilingHour) GetOrgNameOk() (*string, bool)` + +GetOrgNameOk returns a tuple with the OrgName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgName + +`func (o *UsageProfilingHour) SetOrgName(v string)` + +SetOrgName sets OrgName field to given value. + +### HasOrgName + +`func (o *UsageProfilingHour) HasOrgName() bool` + +HasOrgName returns a boolean if a field has been set. + +### GetPublicId + +`func (o *UsageProfilingHour) GetPublicId() string` + +GetPublicId returns the PublicId field if non-nil, zero value otherwise. + +### GetPublicIdOk + +`func (o *UsageProfilingHour) GetPublicIdOk() (*string, bool)` + +GetPublicIdOk returns a tuple with the PublicId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPublicId + +`func (o *UsageProfilingHour) SetPublicId(v string)` + +SetPublicId sets PublicId field to given value. + +### HasPublicId + +`func (o *UsageProfilingHour) HasPublicId() bool` + +HasPublicId returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/api/v1/datadog/docs/UsageSNMPHour.md b/api/v1/datadog/docs/UsageSNMPHour.md index 832daa9b6b4..92ea7f24db2 100644 --- a/api/v1/datadog/docs/UsageSNMPHour.md +++ b/api/v1/datadog/docs/UsageSNMPHour.md @@ -5,6 +5,8 @@ | Name | Type | Description | Notes | | --------------- | ------------------------ | ------------------------------------ | ---------- | | **Hour** | Pointer to **time.Time** | The hour for the usage. | [optional] | +| **OrgName** | Pointer to **string** | The organization name. | [optional] | +| **PublicId** | Pointer to **string** | The organization public ID. | [optional] | | **SnmpDevices** | Pointer to **int64** | Contains the number of SNMP devices. | [optional] | ## Methods @@ -51,6 +53,56 @@ SetHour sets Hour field to given value. HasHour returns a boolean if a field has been set. +### GetOrgName + +`func (o *UsageSNMPHour) GetOrgName() string` + +GetOrgName returns the OrgName field if non-nil, zero value otherwise. + +### GetOrgNameOk + +`func (o *UsageSNMPHour) GetOrgNameOk() (*string, bool)` + +GetOrgNameOk returns a tuple with the OrgName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgName + +`func (o *UsageSNMPHour) SetOrgName(v string)` + +SetOrgName sets OrgName field to given value. + +### HasOrgName + +`func (o *UsageSNMPHour) HasOrgName() bool` + +HasOrgName returns a boolean if a field has been set. + +### GetPublicId + +`func (o *UsageSNMPHour) GetPublicId() string` + +GetPublicId returns the PublicId field if non-nil, zero value otherwise. + +### GetPublicIdOk + +`func (o *UsageSNMPHour) GetPublicIdOk() (*string, bool)` + +GetPublicIdOk returns a tuple with the PublicId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPublicId + +`func (o *UsageSNMPHour) SetPublicId(v string)` + +SetPublicId sets PublicId field to given value. + +### HasPublicId + +`func (o *UsageSNMPHour) HasPublicId() bool` + +HasPublicId returns a boolean if a field has been set. + ### GetSnmpDevices `func (o *UsageSNMPHour) GetSnmpDevices() int64` diff --git a/api/v1/datadog/model_usage_analyzed_logs_hour.go b/api/v1/datadog/model_usage_analyzed_logs_hour.go index f6082bd91cc..dcd040e91c6 100644 --- a/api/v1/datadog/model_usage_analyzed_logs_hour.go +++ b/api/v1/datadog/model_usage_analyzed_logs_hour.go @@ -19,6 +19,10 @@ type UsageAnalyzedLogsHour struct { AnalyzedLogs *int64 `json:"analyzed_logs,omitempty"` // The hour for the usage. Hour *time.Time `json:"hour,omitempty"` + // The organization name. + OrgName *string `json:"org_name,omitempty"` + // The organization public ID. + PublicId *string `json:"public_id,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:-` } @@ -104,6 +108,70 @@ func (o *UsageAnalyzedLogsHour) SetHour(v time.Time) { o.Hour = &v } +// GetOrgName returns the OrgName field value if set, zero value otherwise. +func (o *UsageAnalyzedLogsHour) GetOrgName() string { + if o == nil || o.OrgName == nil { + var ret string + return ret + } + return *o.OrgName +} + +// GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageAnalyzedLogsHour) GetOrgNameOk() (*string, bool) { + if o == nil || o.OrgName == nil { + return nil, false + } + return o.OrgName, true +} + +// HasOrgName returns a boolean if a field has been set. +func (o *UsageAnalyzedLogsHour) HasOrgName() bool { + if o != nil && o.OrgName != nil { + return true + } + + return false +} + +// SetOrgName gets a reference to the given string and assigns it to the OrgName field. +func (o *UsageAnalyzedLogsHour) SetOrgName(v string) { + o.OrgName = &v +} + +// GetPublicId returns the PublicId field value if set, zero value otherwise. +func (o *UsageAnalyzedLogsHour) GetPublicId() string { + if o == nil || o.PublicId == nil { + var ret string + return ret + } + return *o.PublicId +} + +// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageAnalyzedLogsHour) GetPublicIdOk() (*string, bool) { + if o == nil || o.PublicId == nil { + return nil, false + } + return o.PublicId, true +} + +// HasPublicId returns a boolean if a field has been set. +func (o *UsageAnalyzedLogsHour) HasPublicId() bool { + if o != nil && o.PublicId != nil { + return true + } + + return false +} + +// SetPublicId gets a reference to the given string and assigns it to the PublicId field. +func (o *UsageAnalyzedLogsHour) SetPublicId(v string) { + o.PublicId = &v +} + func (o UsageAnalyzedLogsHour) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.UnparsedObject != nil { @@ -115,6 +183,12 @@ func (o UsageAnalyzedLogsHour) MarshalJSON() ([]byte, error) { if o.Hour != nil { toSerialize["hour"] = o.Hour } + if o.OrgName != nil { + toSerialize["org_name"] = o.OrgName + } + if o.PublicId != nil { + toSerialize["public_id"] = o.PublicId + } return json.Marshal(toSerialize) } @@ -123,6 +197,8 @@ func (o *UsageAnalyzedLogsHour) UnmarshalJSON(bytes []byte) (err error) { all := struct { AnalyzedLogs *int64 `json:"analyzed_logs,omitempty"` Hour *time.Time `json:"hour,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { @@ -135,5 +211,7 @@ func (o *UsageAnalyzedLogsHour) UnmarshalJSON(bytes []byte) (err error) { } o.AnalyzedLogs = all.AnalyzedLogs o.Hour = all.Hour + o.OrgName = all.OrgName + o.PublicId = all.PublicId return nil } diff --git a/api/v1/datadog/model_usage_incident_management_hour.go b/api/v1/datadog/model_usage_incident_management_hour.go index dba39e8e294..a1e6bc9d1dc 100644 --- a/api/v1/datadog/model_usage_incident_management_hour.go +++ b/api/v1/datadog/model_usage_incident_management_hour.go @@ -19,6 +19,10 @@ type UsageIncidentManagementHour struct { Hour *time.Time `json:"hour,omitempty"` // Contains the total number monthly active users from the start of the given hour's month until the given hour. MonthlyActiveUsers *int64 `json:"monthly_active_users,omitempty"` + // The organization name. + OrgName *string `json:"org_name,omitempty"` + // The organization public ID. + PublicId *string `json:"public_id,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:-` } @@ -104,6 +108,70 @@ func (o *UsageIncidentManagementHour) SetMonthlyActiveUsers(v int64) { o.MonthlyActiveUsers = &v } +// GetOrgName returns the OrgName field value if set, zero value otherwise. +func (o *UsageIncidentManagementHour) GetOrgName() string { + if o == nil || o.OrgName == nil { + var ret string + return ret + } + return *o.OrgName +} + +// GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageIncidentManagementHour) GetOrgNameOk() (*string, bool) { + if o == nil || o.OrgName == nil { + return nil, false + } + return o.OrgName, true +} + +// HasOrgName returns a boolean if a field has been set. +func (o *UsageIncidentManagementHour) HasOrgName() bool { + if o != nil && o.OrgName != nil { + return true + } + + return false +} + +// SetOrgName gets a reference to the given string and assigns it to the OrgName field. +func (o *UsageIncidentManagementHour) SetOrgName(v string) { + o.OrgName = &v +} + +// GetPublicId returns the PublicId field value if set, zero value otherwise. +func (o *UsageIncidentManagementHour) GetPublicId() string { + if o == nil || o.PublicId == nil { + var ret string + return ret + } + return *o.PublicId +} + +// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageIncidentManagementHour) GetPublicIdOk() (*string, bool) { + if o == nil || o.PublicId == nil { + return nil, false + } + return o.PublicId, true +} + +// HasPublicId returns a boolean if a field has been set. +func (o *UsageIncidentManagementHour) HasPublicId() bool { + if o != nil && o.PublicId != nil { + return true + } + + return false +} + +// SetPublicId gets a reference to the given string and assigns it to the PublicId field. +func (o *UsageIncidentManagementHour) SetPublicId(v string) { + o.PublicId = &v +} + func (o UsageIncidentManagementHour) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.UnparsedObject != nil { @@ -115,6 +183,12 @@ func (o UsageIncidentManagementHour) MarshalJSON() ([]byte, error) { if o.MonthlyActiveUsers != nil { toSerialize["monthly_active_users"] = o.MonthlyActiveUsers } + if o.OrgName != nil { + toSerialize["org_name"] = o.OrgName + } + if o.PublicId != nil { + toSerialize["public_id"] = o.PublicId + } return json.Marshal(toSerialize) } @@ -123,6 +197,8 @@ func (o *UsageIncidentManagementHour) UnmarshalJSON(bytes []byte) (err error) { all := struct { Hour *time.Time `json:"hour,omitempty"` MonthlyActiveUsers *int64 `json:"monthly_active_users,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { @@ -135,5 +211,7 @@ func (o *UsageIncidentManagementHour) UnmarshalJSON(bytes []byte) (err error) { } o.Hour = all.Hour o.MonthlyActiveUsers = all.MonthlyActiveUsers + o.OrgName = all.OrgName + o.PublicId = all.PublicId return nil } diff --git a/api/v1/datadog/model_usage_indexed_spans_hour.go b/api/v1/datadog/model_usage_indexed_spans_hour.go index 74d79527702..b353dbd6d06 100644 --- a/api/v1/datadog/model_usage_indexed_spans_hour.go +++ b/api/v1/datadog/model_usage_indexed_spans_hour.go @@ -19,6 +19,10 @@ type UsageIndexedSpansHour struct { Hour *time.Time `json:"hour,omitempty"` // Contains the number of spans indexed. IndexedEventsCount *int64 `json:"indexed_events_count,omitempty"` + // The organization name. + OrgName *string `json:"org_name,omitempty"` + // The organization public ID. + PublicId *string `json:"public_id,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:-` } @@ -104,6 +108,70 @@ func (o *UsageIndexedSpansHour) SetIndexedEventsCount(v int64) { o.IndexedEventsCount = &v } +// GetOrgName returns the OrgName field value if set, zero value otherwise. +func (o *UsageIndexedSpansHour) GetOrgName() string { + if o == nil || o.OrgName == nil { + var ret string + return ret + } + return *o.OrgName +} + +// GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageIndexedSpansHour) GetOrgNameOk() (*string, bool) { + if o == nil || o.OrgName == nil { + return nil, false + } + return o.OrgName, true +} + +// HasOrgName returns a boolean if a field has been set. +func (o *UsageIndexedSpansHour) HasOrgName() bool { + if o != nil && o.OrgName != nil { + return true + } + + return false +} + +// SetOrgName gets a reference to the given string and assigns it to the OrgName field. +func (o *UsageIndexedSpansHour) SetOrgName(v string) { + o.OrgName = &v +} + +// GetPublicId returns the PublicId field value if set, zero value otherwise. +func (o *UsageIndexedSpansHour) GetPublicId() string { + if o == nil || o.PublicId == nil { + var ret string + return ret + } + return *o.PublicId +} + +// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageIndexedSpansHour) GetPublicIdOk() (*string, bool) { + if o == nil || o.PublicId == nil { + return nil, false + } + return o.PublicId, true +} + +// HasPublicId returns a boolean if a field has been set. +func (o *UsageIndexedSpansHour) HasPublicId() bool { + if o != nil && o.PublicId != nil { + return true + } + + return false +} + +// SetPublicId gets a reference to the given string and assigns it to the PublicId field. +func (o *UsageIndexedSpansHour) SetPublicId(v string) { + o.PublicId = &v +} + func (o UsageIndexedSpansHour) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.UnparsedObject != nil { @@ -115,6 +183,12 @@ func (o UsageIndexedSpansHour) MarshalJSON() ([]byte, error) { if o.IndexedEventsCount != nil { toSerialize["indexed_events_count"] = o.IndexedEventsCount } + if o.OrgName != nil { + toSerialize["org_name"] = o.OrgName + } + if o.PublicId != nil { + toSerialize["public_id"] = o.PublicId + } return json.Marshal(toSerialize) } @@ -123,6 +197,8 @@ func (o *UsageIndexedSpansHour) UnmarshalJSON(bytes []byte) (err error) { all := struct { Hour *time.Time `json:"hour,omitempty"` IndexedEventsCount *int64 `json:"indexed_events_count,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { @@ -135,5 +211,7 @@ func (o *UsageIndexedSpansHour) UnmarshalJSON(bytes []byte) (err error) { } o.Hour = all.Hour o.IndexedEventsCount = all.IndexedEventsCount + o.OrgName = all.OrgName + o.PublicId = all.PublicId return nil } diff --git a/api/v1/datadog/model_usage_ingested_spans_hour.go b/api/v1/datadog/model_usage_ingested_spans_hour.go index 43f0a952072..29d3c9b6c17 100644 --- a/api/v1/datadog/model_usage_ingested_spans_hour.go +++ b/api/v1/datadog/model_usage_ingested_spans_hour.go @@ -19,6 +19,10 @@ type UsageIngestedSpansHour struct { Hour *time.Time `json:"hour,omitempty"` // Contains the total number of bytes ingested during a given hour. IngestedEventsBytes *int64 `json:"ingested_events_bytes,omitempty"` + // The organization name. + OrgName *string `json:"org_name,omitempty"` + // The organization public ID. + PublicId *string `json:"public_id,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:-` } @@ -104,6 +108,70 @@ func (o *UsageIngestedSpansHour) SetIngestedEventsBytes(v int64) { o.IngestedEventsBytes = &v } +// GetOrgName returns the OrgName field value if set, zero value otherwise. +func (o *UsageIngestedSpansHour) GetOrgName() string { + if o == nil || o.OrgName == nil { + var ret string + return ret + } + return *o.OrgName +} + +// GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageIngestedSpansHour) GetOrgNameOk() (*string, bool) { + if o == nil || o.OrgName == nil { + return nil, false + } + return o.OrgName, true +} + +// HasOrgName returns a boolean if a field has been set. +func (o *UsageIngestedSpansHour) HasOrgName() bool { + if o != nil && o.OrgName != nil { + return true + } + + return false +} + +// SetOrgName gets a reference to the given string and assigns it to the OrgName field. +func (o *UsageIngestedSpansHour) SetOrgName(v string) { + o.OrgName = &v +} + +// GetPublicId returns the PublicId field value if set, zero value otherwise. +func (o *UsageIngestedSpansHour) GetPublicId() string { + if o == nil || o.PublicId == nil { + var ret string + return ret + } + return *o.PublicId +} + +// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageIngestedSpansHour) GetPublicIdOk() (*string, bool) { + if o == nil || o.PublicId == nil { + return nil, false + } + return o.PublicId, true +} + +// HasPublicId returns a boolean if a field has been set. +func (o *UsageIngestedSpansHour) HasPublicId() bool { + if o != nil && o.PublicId != nil { + return true + } + + return false +} + +// SetPublicId gets a reference to the given string and assigns it to the PublicId field. +func (o *UsageIngestedSpansHour) SetPublicId(v string) { + o.PublicId = &v +} + func (o UsageIngestedSpansHour) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.UnparsedObject != nil { @@ -115,6 +183,12 @@ func (o UsageIngestedSpansHour) MarshalJSON() ([]byte, error) { if o.IngestedEventsBytes != nil { toSerialize["ingested_events_bytes"] = o.IngestedEventsBytes } + if o.OrgName != nil { + toSerialize["org_name"] = o.OrgName + } + if o.PublicId != nil { + toSerialize["public_id"] = o.PublicId + } return json.Marshal(toSerialize) } @@ -123,6 +197,8 @@ func (o *UsageIngestedSpansHour) UnmarshalJSON(bytes []byte) (err error) { all := struct { Hour *time.Time `json:"hour,omitempty"` IngestedEventsBytes *int64 `json:"ingested_events_bytes,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { @@ -135,5 +211,7 @@ func (o *UsageIngestedSpansHour) UnmarshalJSON(bytes []byte) (err error) { } o.Hour = all.Hour o.IngestedEventsBytes = all.IngestedEventsBytes + o.OrgName = all.OrgName + o.PublicId = all.PublicId return nil } diff --git a/api/v1/datadog/model_usage_io_t_hour.go b/api/v1/datadog/model_usage_io_t_hour.go index 33fa764ab46..2930deb42c5 100644 --- a/api/v1/datadog/model_usage_io_t_hour.go +++ b/api/v1/datadog/model_usage_io_t_hour.go @@ -19,6 +19,10 @@ type UsageIoTHour struct { Hour *time.Time `json:"hour,omitempty"` // The total number of IoT devices during a given hour. IotDeviceCount *int64 `json:"iot_device_count,omitempty"` + // The organization name. + OrgName *string `json:"org_name,omitempty"` + // The organization public ID. + PublicId *string `json:"public_id,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:-` } @@ -104,6 +108,70 @@ func (o *UsageIoTHour) SetIotDeviceCount(v int64) { o.IotDeviceCount = &v } +// GetOrgName returns the OrgName field value if set, zero value otherwise. +func (o *UsageIoTHour) GetOrgName() string { + if o == nil || o.OrgName == nil { + var ret string + return ret + } + return *o.OrgName +} + +// GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageIoTHour) GetOrgNameOk() (*string, bool) { + if o == nil || o.OrgName == nil { + return nil, false + } + return o.OrgName, true +} + +// HasOrgName returns a boolean if a field has been set. +func (o *UsageIoTHour) HasOrgName() bool { + if o != nil && o.OrgName != nil { + return true + } + + return false +} + +// SetOrgName gets a reference to the given string and assigns it to the OrgName field. +func (o *UsageIoTHour) SetOrgName(v string) { + o.OrgName = &v +} + +// GetPublicId returns the PublicId field value if set, zero value otherwise. +func (o *UsageIoTHour) GetPublicId() string { + if o == nil || o.PublicId == nil { + var ret string + return ret + } + return *o.PublicId +} + +// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageIoTHour) GetPublicIdOk() (*string, bool) { + if o == nil || o.PublicId == nil { + return nil, false + } + return o.PublicId, true +} + +// HasPublicId returns a boolean if a field has been set. +func (o *UsageIoTHour) HasPublicId() bool { + if o != nil && o.PublicId != nil { + return true + } + + return false +} + +// SetPublicId gets a reference to the given string and assigns it to the PublicId field. +func (o *UsageIoTHour) SetPublicId(v string) { + o.PublicId = &v +} + func (o UsageIoTHour) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.UnparsedObject != nil { @@ -115,6 +183,12 @@ func (o UsageIoTHour) MarshalJSON() ([]byte, error) { if o.IotDeviceCount != nil { toSerialize["iot_device_count"] = o.IotDeviceCount } + if o.OrgName != nil { + toSerialize["org_name"] = o.OrgName + } + if o.PublicId != nil { + toSerialize["public_id"] = o.PublicId + } return json.Marshal(toSerialize) } @@ -123,6 +197,8 @@ func (o *UsageIoTHour) UnmarshalJSON(bytes []byte) (err error) { all := struct { Hour *time.Time `json:"hour,omitempty"` IotDeviceCount *int64 `json:"iot_device_count,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { @@ -135,5 +211,7 @@ func (o *UsageIoTHour) UnmarshalJSON(bytes []byte) (err error) { } o.Hour = all.Hour o.IotDeviceCount = all.IotDeviceCount + o.OrgName = all.OrgName + o.PublicId = all.PublicId return nil } diff --git a/api/v1/datadog/model_usage_profiling_hour.go b/api/v1/datadog/model_usage_profiling_hour.go index 9ac8ed0e09c..3892a405517 100644 --- a/api/v1/datadog/model_usage_profiling_hour.go +++ b/api/v1/datadog/model_usage_profiling_hour.go @@ -21,6 +21,10 @@ type UsageProfilingHour struct { HostCount *int64 `json:"host_count,omitempty"` // The hour for the usage. Hour *time.Time `json:"hour,omitempty"` + // The organization name. + OrgName *string `json:"org_name,omitempty"` + // The organization public ID. + PublicId *string `json:"public_id,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:-` } @@ -138,6 +142,70 @@ func (o *UsageProfilingHour) SetHour(v time.Time) { o.Hour = &v } +// GetOrgName returns the OrgName field value if set, zero value otherwise. +func (o *UsageProfilingHour) GetOrgName() string { + if o == nil || o.OrgName == nil { + var ret string + return ret + } + return *o.OrgName +} + +// GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageProfilingHour) GetOrgNameOk() (*string, bool) { + if o == nil || o.OrgName == nil { + return nil, false + } + return o.OrgName, true +} + +// HasOrgName returns a boolean if a field has been set. +func (o *UsageProfilingHour) HasOrgName() bool { + if o != nil && o.OrgName != nil { + return true + } + + return false +} + +// SetOrgName gets a reference to the given string and assigns it to the OrgName field. +func (o *UsageProfilingHour) SetOrgName(v string) { + o.OrgName = &v +} + +// GetPublicId returns the PublicId field value if set, zero value otherwise. +func (o *UsageProfilingHour) GetPublicId() string { + if o == nil || o.PublicId == nil { + var ret string + return ret + } + return *o.PublicId +} + +// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageProfilingHour) GetPublicIdOk() (*string, bool) { + if o == nil || o.PublicId == nil { + return nil, false + } + return o.PublicId, true +} + +// HasPublicId returns a boolean if a field has been set. +func (o *UsageProfilingHour) HasPublicId() bool { + if o != nil && o.PublicId != nil { + return true + } + + return false +} + +// SetPublicId gets a reference to the given string and assigns it to the PublicId field. +func (o *UsageProfilingHour) SetPublicId(v string) { + o.PublicId = &v +} + func (o UsageProfilingHour) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.UnparsedObject != nil { @@ -152,6 +220,12 @@ func (o UsageProfilingHour) MarshalJSON() ([]byte, error) { if o.Hour != nil { toSerialize["hour"] = o.Hour } + if o.OrgName != nil { + toSerialize["org_name"] = o.OrgName + } + if o.PublicId != nil { + toSerialize["public_id"] = o.PublicId + } return json.Marshal(toSerialize) } @@ -161,6 +235,8 @@ func (o *UsageProfilingHour) UnmarshalJSON(bytes []byte) (err error) { AvgContainerAgentCount *int64 `json:"avg_container_agent_count,omitempty"` HostCount *int64 `json:"host_count,omitempty"` Hour *time.Time `json:"hour,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { @@ -174,5 +250,7 @@ func (o *UsageProfilingHour) UnmarshalJSON(bytes []byte) (err error) { o.AvgContainerAgentCount = all.AvgContainerAgentCount o.HostCount = all.HostCount o.Hour = all.Hour + o.OrgName = all.OrgName + o.PublicId = all.PublicId return nil } diff --git a/api/v1/datadog/model_usage_snmp_hour.go b/api/v1/datadog/model_usage_snmp_hour.go index 65db462e7bf..55aa8cf0420 100644 --- a/api/v1/datadog/model_usage_snmp_hour.go +++ b/api/v1/datadog/model_usage_snmp_hour.go @@ -17,6 +17,10 @@ import ( type UsageSNMPHour struct { // The hour for the usage. Hour *time.Time `json:"hour,omitempty"` + // The organization name. + OrgName *string `json:"org_name,omitempty"` + // The organization public ID. + PublicId *string `json:"public_id,omitempty"` // Contains the number of SNMP devices. SnmpDevices *int64 `json:"snmp_devices,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -72,6 +76,70 @@ func (o *UsageSNMPHour) SetHour(v time.Time) { o.Hour = &v } +// GetOrgName returns the OrgName field value if set, zero value otherwise. +func (o *UsageSNMPHour) GetOrgName() string { + if o == nil || o.OrgName == nil { + var ret string + return ret + } + return *o.OrgName +} + +// GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSNMPHour) GetOrgNameOk() (*string, bool) { + if o == nil || o.OrgName == nil { + return nil, false + } + return o.OrgName, true +} + +// HasOrgName returns a boolean if a field has been set. +func (o *UsageSNMPHour) HasOrgName() bool { + if o != nil && o.OrgName != nil { + return true + } + + return false +} + +// SetOrgName gets a reference to the given string and assigns it to the OrgName field. +func (o *UsageSNMPHour) SetOrgName(v string) { + o.OrgName = &v +} + +// GetPublicId returns the PublicId field value if set, zero value otherwise. +func (o *UsageSNMPHour) GetPublicId() string { + if o == nil || o.PublicId == nil { + var ret string + return ret + } + return *o.PublicId +} + +// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSNMPHour) GetPublicIdOk() (*string, bool) { + if o == nil || o.PublicId == nil { + return nil, false + } + return o.PublicId, true +} + +// HasPublicId returns a boolean if a field has been set. +func (o *UsageSNMPHour) HasPublicId() bool { + if o != nil && o.PublicId != nil { + return true + } + + return false +} + +// SetPublicId gets a reference to the given string and assigns it to the PublicId field. +func (o *UsageSNMPHour) SetPublicId(v string) { + o.PublicId = &v +} + // GetSnmpDevices returns the SnmpDevices field value if set, zero value otherwise. func (o *UsageSNMPHour) GetSnmpDevices() int64 { if o == nil || o.SnmpDevices == nil { @@ -112,6 +180,12 @@ func (o UsageSNMPHour) MarshalJSON() ([]byte, error) { if o.Hour != nil { toSerialize["hour"] = o.Hour } + if o.OrgName != nil { + toSerialize["org_name"] = o.OrgName + } + if o.PublicId != nil { + toSerialize["public_id"] = o.PublicId + } if o.SnmpDevices != nil { toSerialize["snmp_devices"] = o.SnmpDevices } @@ -122,6 +196,8 @@ func (o *UsageSNMPHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { Hour *time.Time `json:"hour,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` SnmpDevices *int64 `json:"snmp_devices,omitempty"` }{} err = json.Unmarshal(bytes, &all) @@ -134,6 +210,8 @@ func (o *UsageSNMPHour) UnmarshalJSON(bytes []byte) (err error) { return nil } o.Hour = all.Hour + o.OrgName = all.OrgName + o.PublicId = all.PublicId o.SnmpDevices = all.SnmpDevices return nil } diff --git a/examples/v1/usage-metering/GetIncidentManagement.go b/examples/v1/usage-metering/GetIncidentManagement.go new file mode 100644 index 00000000000..3b16934ff0b --- /dev/null +++ b/examples/v1/usage-metering/GetIncidentManagement.go @@ -0,0 +1,28 @@ +// Get hourly usage for incident management returns "OK" response + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.UsageMeteringApi.GetIncidentManagement(ctx, time.Now().AddDate(0, 0, -5), *datadog.NewGetIncidentManagementOptionalParameters().WithEndHr(time.Now().AddDate(0, 0, -3))) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsageMeteringApi.GetIncidentManagement`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `UsageMeteringApi.GetIncidentManagement`:\n%s\n", responseContent) +} diff --git a/examples/v1/usage-metering/GetIngestedSpans.go b/examples/v1/usage-metering/GetIngestedSpans.go new file mode 100644 index 00000000000..315e431be5d --- /dev/null +++ b/examples/v1/usage-metering/GetIngestedSpans.go @@ -0,0 +1,28 @@ +// Get hourly usage for ingested spans returns "OK" response + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.UsageMeteringApi.GetIngestedSpans(ctx, time.Now().AddDate(0, 0, -5), *datadog.NewGetIngestedSpansOptionalParameters().WithEndHr(time.Now().AddDate(0, 0, -3))) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsageMeteringApi.GetIngestedSpans`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `UsageMeteringApi.GetIngestedSpans`:\n%s\n", responseContent) +} diff --git a/examples/v1/usage-metering/GetUsageAnalyzedLogs.go b/examples/v1/usage-metering/GetUsageAnalyzedLogs.go new file mode 100644 index 00000000000..8bc257e63a4 --- /dev/null +++ b/examples/v1/usage-metering/GetUsageAnalyzedLogs.go @@ -0,0 +1,28 @@ +// Get hourly usage for analyzed logs returns "OK" response + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.UsageMeteringApi.GetUsageAnalyzedLogs(ctx, time.Now().AddDate(0, 0, -5), *datadog.NewGetUsageAnalyzedLogsOptionalParameters().WithEndHr(time.Now().AddDate(0, 0, -3))) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsageMeteringApi.GetUsageAnalyzedLogs`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `UsageMeteringApi.GetUsageAnalyzedLogs`:\n%s\n", responseContent) +} diff --git a/examples/v1/usage-metering/GetUsageIndexedSpans.go b/examples/v1/usage-metering/GetUsageIndexedSpans.go new file mode 100644 index 00000000000..a82278443d3 --- /dev/null +++ b/examples/v1/usage-metering/GetUsageIndexedSpans.go @@ -0,0 +1,28 @@ +// Get hourly usage for indexed spans returns "OK" response + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.UsageMeteringApi.GetUsageIndexedSpans(ctx, time.Now().AddDate(0, 0, -5), *datadog.NewGetUsageIndexedSpansOptionalParameters().WithEndHr(time.Now().AddDate(0, 0, -3))) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsageMeteringApi.GetUsageIndexedSpans`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `UsageMeteringApi.GetUsageIndexedSpans`:\n%s\n", responseContent) +} diff --git a/examples/v1/usage-metering/GetUsageInternetOfThings.go b/examples/v1/usage-metering/GetUsageInternetOfThings.go new file mode 100644 index 00000000000..85ca4ac7cec --- /dev/null +++ b/examples/v1/usage-metering/GetUsageInternetOfThings.go @@ -0,0 +1,28 @@ +// Get hourly usage for IoT returns "OK" response + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.UsageMeteringApi.GetUsageInternetOfThings(ctx, time.Now().AddDate(0, 0, -5), *datadog.NewGetUsageInternetOfThingsOptionalParameters().WithEndHr(time.Now().AddDate(0, 0, -3))) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsageMeteringApi.GetUsageInternetOfThings`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `UsageMeteringApi.GetUsageInternetOfThings`:\n%s\n", responseContent) +} diff --git a/examples/v1/usage-metering/GetUsageProfiling.go b/examples/v1/usage-metering/GetUsageProfiling.go new file mode 100644 index 00000000000..de1defc502d --- /dev/null +++ b/examples/v1/usage-metering/GetUsageProfiling.go @@ -0,0 +1,28 @@ +// Get hourly usage for profiled hosts returns "OK" response + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.UsageMeteringApi.GetUsageProfiling(ctx, time.Now().AddDate(0, 0, -5), *datadog.NewGetUsageProfilingOptionalParameters().WithEndHr(time.Now().AddDate(0, 0, -3))) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsageMeteringApi.GetUsageProfiling`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `UsageMeteringApi.GetUsageProfiling`:\n%s\n", responseContent) +} diff --git a/examples/v1/usage-metering/GetUsageSNMP.go b/examples/v1/usage-metering/GetUsageSNMP.go new file mode 100644 index 00000000000..bc41b5ac71a --- /dev/null +++ b/examples/v1/usage-metering/GetUsageSNMP.go @@ -0,0 +1,28 @@ +// Get hourly usage for SNMP devices returns "OK" response + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.UsageMeteringApi.GetUsageSNMP(ctx, time.Now().AddDate(0, 0, -5), *datadog.NewGetUsageSNMPOptionalParameters().WithEndHr(time.Now().AddDate(0, 0, -3))) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsageMeteringApi.GetUsageSNMP`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `UsageMeteringApi.GetUsageSNMP`:\n%s\n", responseContent) +} diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..fb2b5acca8d --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2022-01-31T09:34:27.865Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_Bad_Request_response.yaml new file mode 100644 index 00000000000..9db7bff847d --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_Bad_Request_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: '' + form: {} + headers: + Accept: + - application/json;datetime-format=rfc3339 + method: GET + url: https://api.datadoghq.com/api/v1/usage/iot?start_hr=2022-01-28T09%3A34%3A27.865Z&end_hr=2022-01-26T09%3A34%3A27.865Z + response: + body: '{"errors": ["start_hr [YYYY-MM-DDThh] must be before end_hr [YYYY-MM-DDThh]"]}' + code: 400 + duration: '' + headers: + Content-Type: + - application/json + status: 400 Bad Request +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_OK_response.freeze new file mode 100644 index 00000000000..9ee4e323757 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_OK_response.freeze @@ -0,0 +1 @@ +2022-01-31T09:34:28.357Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_OK_response.yaml new file mode 100644 index 00000000000..076615f9f26 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_IoT_returns_OK_response.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: '' + form: {} + headers: + Accept: + - application/json;datetime-format=rfc3339 + method: GET + url: https://api.datadoghq.com/api/v1/usage/iot?start_hr=2022-01-26T09%3A34%3A28.357Z&end_hr=2022-01-28T09%3A34%3A28.357Z + response: + body: '{"usage":[{"org_name":"DD Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T08:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T08:00:00+00:00"}]}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..86865f10427 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2022-01-31T09:34:29.203Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_Bad_Request_response.yaml new file mode 100644 index 00000000000..cee346e68f1 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_Bad_Request_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: '' + form: {} + headers: + Accept: + - application/json;datetime-format=rfc3339 + method: GET + url: https://api.datadoghq.com/api/v1/usage/snmp?start_hr=2022-01-28T09%3A34%3A29.203Z&end_hr=2022-01-26T09%3A34%3A29.203Z + response: + body: '{"errors": ["start_hr [YYYY-MM-DDThh] must be before end_hr [YYYY-MM-DDThh]"]}' + code: 400 + duration: '' + headers: + Content-Type: + - application/json + status: 400 Bad Request +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_OK_response.freeze new file mode 100644 index 00000000000..f6b84beca06 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_OK_response.freeze @@ -0,0 +1 @@ +2022-01-31T09:34:29.627Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_OK_response.yaml new file mode 100644 index 00000000000..5dd787041f4 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_SNMP_devices_returns_OK_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: '' + form: {} + headers: + Accept: + - application/json;datetime-format=rfc3339 + method: GET + url: https://api.datadoghq.com/api/v1/usage/snmp?start_hr=2022-01-26T09%3A34%3A29.627Z&end_hr=2022-01-28T09%3A34%3A29.627Z + response: + body: '{"usage":[{"snmp_devices":0,"hour":"2022-01-26T09:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T10:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T11:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T12:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T13:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T14:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T15:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T16:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T17:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T18:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T19:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T20:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T21:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T22:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T23:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T00:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T01:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T02:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T03:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T04:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T05:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T06:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T07:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T08:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T09:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T10:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T11:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T12:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T13:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T14:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T15:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T16:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T17:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T18:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T19:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T20:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T21:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T22:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T23:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T00:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T01:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T02:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T03:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T04:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T05:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T06:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T07:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T08:00:00+00:00"}]}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..69dd8e44f56 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2022-01-31T09:34:30.286Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_Bad_Request_response.yaml new file mode 100644 index 00000000000..9636ad43e38 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_Bad_Request_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: '' + form: {} + headers: + Accept: + - application/json;datetime-format=rfc3339 + method: GET + url: https://api.datadoghq.com/api/v1/usage/analyzed_logs?start_hr=2022-01-28T09%3A34%3A30.286Z&end_hr=2022-01-26T09%3A34%3A30.286Z + response: + body: '{"errors": ["start_hr [YYYY-MM-DDThh] must be before end_hr [YYYY-MM-DDThh]"]}' + code: 400 + duration: '' + headers: + Content-Type: + - application/json + status: 400 Bad Request +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_OK_response.freeze new file mode 100644 index 00000000000..b02b2f6950d --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_OK_response.freeze @@ -0,0 +1 @@ +2022-01-31T09:34:30.705Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_OK_response.yaml new file mode 100644 index 00000000000..25c49bc9784 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_analyzed_logs_returns_OK_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: '' + form: {} + headers: + Accept: + - application/json;datetime-format=rfc3339 + method: GET + url: https://api.datadoghq.com/api/v1/usage/analyzed_logs?start_hr=2022-01-26T09%3A34%3A30.705Z&end_hr=2022-01-28T09%3A34%3A30.705Z + response: + body: '{"usage":[{"hour":"2022-01-26T09:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-26T10:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-26T11:00:00+00:00","analyzed_logs":412},{"hour":"2022-01-26T12:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-26T13:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-26T14:00:00+00:00","analyzed_logs":1014},{"hour":"2022-01-26T15:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-26T16:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-26T17:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-26T18:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-26T19:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-26T20:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-26T21:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-26T22:00:00+00:00","analyzed_logs":403786},{"hour":"2022-01-26T23:00:00+00:00","analyzed_logs":1500564},{"hour":"2022-01-27T00:00:00+00:00","analyzed_logs":2420},{"hour":"2022-01-27T01:00:00+00:00","analyzed_logs":1217},{"hour":"2022-01-27T02:00:00+00:00","analyzed_logs":978},{"hour":"2022-01-27T03:00:00+00:00","analyzed_logs":1178},{"hour":"2022-01-27T04:00:00+00:00","analyzed_logs":1014},{"hour":"2022-01-27T05:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-27T06:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-27T07:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-27T08:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-27T09:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-27T10:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-27T11:00:00+00:00","analyzed_logs":412},{"hour":"2022-01-27T12:00:00+00:00","analyzed_logs":194874},{"hour":"2022-01-27T13:00:00+00:00","analyzed_logs":1742486},{"hour":"2022-01-27T14:00:00+00:00","analyzed_logs":992448},{"hour":"2022-01-27T15:00:00+00:00","analyzed_logs":8200},{"hour":"2022-01-27T16:00:00+00:00","analyzed_logs":576000},{"hour":"2022-01-27T17:00:00+00:00","analyzed_logs":576200},{"hour":"2022-01-27T18:00:00+00:00","analyzed_logs":571200},{"hour":"2022-01-27T19:00:00+00:00","analyzed_logs":576200},{"hour":"2022-01-27T20:00:00+00:00","analyzed_logs":41600},{"hour":"2022-01-27T21:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-27T22:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-27T23:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-28T00:00:00+00:00","analyzed_logs":2420},{"hour":"2022-01-28T01:00:00+00:00","analyzed_logs":1217},{"hour":"2022-01-28T02:00:00+00:00","analyzed_logs":978},{"hour":"2022-01-28T03:00:00+00:00","analyzed_logs":1178},{"hour":"2022-01-28T04:00:00+00:00","analyzed_logs":1014},{"hour":"2022-01-28T05:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-28T06:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-28T07:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-28T08:00:00+00:00","analyzed_logs":0}]}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..4fe9e3998f1 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2022-01-31T09:34:31.364Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_Bad_Request_response.yaml new file mode 100644 index 00000000000..745b56dd4e5 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_Bad_Request_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: '' + form: {} + headers: + Accept: + - application/json;datetime-format=rfc3339 + method: GET + url: https://api.datadoghq.com/api/v1/usage/incident-management?start_hr=2022-01-28T09%3A34%3A31.364Z&end_hr=2022-01-26T09%3A34%3A31.364Z + response: + body: '{"errors": ["start_hr [YYYY-MM-DDThh] must be before end_hr [YYYY-MM-DDThh]"]}' + code: 400 + duration: '' + headers: + Content-Type: + - application/json + status: 400 Bad Request +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_OK_response.freeze new file mode 100644 index 00000000000..9427c84bfb8 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_OK_response.freeze @@ -0,0 +1 @@ +2022-01-31T09:34:31.797Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_OK_response.yaml new file mode 100644 index 00000000000..ae5a3e686d7 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_incident_management_returns_OK_response.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: '' + form: {} + headers: + Accept: + - application/json;datetime-format=rfc3339 + method: GET + url: https://api.datadoghq.com/api/v1/usage/incident-management?start_hr=2022-01-26T09%3A34%3A31.797Z&end_hr=2022-01-28T09%3A34%3A31.797Z + response: + body: '{"usage":[{"org_name":"DD Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T08:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T08:00:00+00:00"}]}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..df946f77535 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2022-01-31T09:34:32.316Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_Bad_Request_response.yaml new file mode 100644 index 00000000000..069f56f42db --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_Bad_Request_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: '' + form: {} + headers: + Accept: + - application/json;datetime-format=rfc3339 + method: GET + url: https://api.datadoghq.com/api/v1/usage/indexed-spans?start_hr=2022-01-28T09%3A34%3A32.316Z&end_hr=2022-01-26T09%3A34%3A32.316Z + response: + body: '{"errors": ["start_hr [YYYY-MM-DDThh] must be before end_hr [YYYY-MM-DDThh]"]}' + code: 400 + duration: '' + headers: + Content-Type: + - application/json + status: 400 Bad Request +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_OK_response.freeze new file mode 100644 index 00000000000..9fb62f6e09f --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_OK_response.freeze @@ -0,0 +1 @@ +2022-01-31T09:34:32.749Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_OK_response.yaml new file mode 100644 index 00000000000..e2462641dcb --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_indexed_spans_returns_OK_response.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: '' + form: {} + headers: + Accept: + - application/json;datetime-format=rfc3339 + method: GET + url: https://api.datadoghq.com/api/v1/usage/indexed-spans?start_hr=2022-01-26T09%3A34%3A32.749Z&end_hr=2022-01-28T09%3A34%3A32.749Z + response: + body: '{"usage":[{"org_name":"DD Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T08:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T08:00:00+00:00"}]}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..df831d1797e --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2022-01-31T09:34:33.304Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_Bad_Request_response.yaml new file mode 100644 index 00000000000..0744a1f61b5 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_Bad_Request_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: '' + form: {} + headers: + Accept: + - application/json;datetime-format=rfc3339 + method: GET + url: https://api.datadoghq.com/api/v1/usage/ingested-spans?start_hr=2022-01-28T09%3A34%3A33.304Z&end_hr=2022-01-26T09%3A34%3A33.304Z + response: + body: '{"errors": ["start_hr [YYYY-MM-DDThh] must be before end_hr [YYYY-MM-DDThh]"]}' + code: 400 + duration: '' + headers: + Content-Type: + - application/json + status: 400 Bad Request +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_OK_response.freeze new file mode 100644 index 00000000000..64f72f27aa3 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_OK_response.freeze @@ -0,0 +1 @@ +2022-01-31T09:34:33.739Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_OK_response.yaml new file mode 100644 index 00000000000..1f316b14bfb --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_ingested_spans_returns_OK_response.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: '' + form: {} + headers: + Accept: + - application/json;datetime-format=rfc3339 + method: GET + url: https://api.datadoghq.com/api/v1/usage/ingested-spans?start_hr=2022-01-26T09%3A34%3A33.739Z&end_hr=2022-01-28T09%3A34%3A33.739Z + response: + body: '{"usage":[{"org_name":"DD Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":569960,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":2118720,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T08:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":275263,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":2450015,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":1381529,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":10595,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":748763,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":748738,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":741902,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":748746,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":54279,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T08:00:00+00:00"}]}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..7a1e60b4a5a --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2022-01-31T09:34:34.396Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_Bad_Request_response.yaml new file mode 100644 index 00000000000..eb2e960a0bf --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_Bad_Request_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: '' + form: {} + headers: + Accept: + - application/json;datetime-format=rfc3339 + method: GET + url: https://api.datadoghq.com/api/v1/usage/profiling?start_hr=2022-01-28T09%3A34%3A34.396Z&end_hr=2022-01-26T09%3A34%3A34.396Z + response: + body: '{"errors": ["start_hr [YYYY-MM-DDThh] must be before end_hr [YYYY-MM-DDThh]"]}' + code: 400 + duration: '' + headers: + Content-Type: + - application/json + status: 400 Bad Request +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_OK_response.freeze new file mode 100644 index 00000000000..4650b4a1917 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_OK_response.freeze @@ -0,0 +1 @@ +2022-01-31T09:34:34.802Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_OK_response.yaml new file mode 100644 index 00000000000..0e05aef768b --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_profiled_hosts_returns_OK_response.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: '' + form: {} + headers: + Accept: + - application/json;datetime-format=rfc3339 + method: GET + url: https://api.datadoghq.com/api/v1/usage/profiling?start_hr=2022-01-26T09%3A34%3A34.802Z&end_hr=2022-01-28T09%3A34%3A34.802Z + response: + body: '{"usage":[{"host_count":null,"org_name":"DD Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T09:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T10:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T11:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T12:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T13:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T14:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T15:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T16:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T17:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T18:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T19:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T20:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T21:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T22:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T23:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T00:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T01:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T02:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T03:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T04:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T05:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T06:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T07:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T08:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T09:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T10:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T11:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T12:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T13:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T14:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T15:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T16:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T17:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T18:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T19:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T20:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T21:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T22:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T23:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T00:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T01:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T02:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T03:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T04:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T05:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T06:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T07:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T08:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null}]}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/features/v1/usage_metering.feature b/tests/scenarios/features/v1/usage_metering.feature index b3c229d6bd4..56b2b9d6ba6 100644 --- a/tests/scenarios/features/v1/usage_metering.feature +++ b/tests/scenarios/features/v1/usage_metering.feature @@ -146,15 +146,19 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for IoT returns "Bad Request" response Given new "GetUsageInternetOfThings" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 5d') }}" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for IoT returns "OK" response Given new "GetUsageInternetOfThings" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK @@ -242,15 +246,19 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for SNMP devices returns "Bad Request" response Given new "GetUsageSNMP" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 5d') }}" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for SNMP devices returns "OK" response Given new "GetUsageSNMP" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK @@ -302,15 +310,19 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for analyzed logs returns "Bad Request" response Given new "GetUsageAnalyzedLogs" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 5d') }}" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for analyzed logs returns "OK" response Given new "GetUsageAnalyzedLogs" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK @@ -350,51 +362,67 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for incident management returns "Bad Request" response Given new "GetIncidentManagement" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 5d') }}" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for incident management returns "OK" response Given new "GetIncidentManagement" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for indexed spans returns "Bad Request" response Given new "GetUsageIndexedSpans" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 5d') }}" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for indexed spans returns "OK" response Given new "GetUsageIndexedSpans" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for ingested spans returns "Bad Request" response Given new "GetIngestedSpans" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 5d') }}" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for ingested spans returns "OK" response Given new "GetIngestedSpans" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for profiled hosts returns "Bad Request" response Given new "GetUsageProfiling" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 5d') }}" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for profiled hosts returns "OK" response Given new "GetUsageProfiling" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK