Skip to content

Commit

Permalink
Regenerate client from commit 0c154010 of spec repo (#1410)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Apr 6, 2022
1 parent 6bdfef2 commit 85f41ae
Show file tree
Hide file tree
Showing 32 changed files with 586 additions and 44 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.2",
"regenerated": "2022-04-06 07:46:46.134234",
"spec_repo_commit": "94f25be6"
"regenerated": "2022-04-06 13:53:29.324880",
"spec_repo_commit": "0c154010"
},
"v2": {
"apigentools_version": "1.6.2",
"regenerated": "2022-04-06 07:46:46.146504",
"spec_repo_commit": "94f25be6"
"regenerated": "2022-04-06 13:53:29.337308",
"spec_repo_commit": "0c154010"
}
}
}
6 changes: 6 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23136,6 +23136,12 @@ paths:
tags:
- Metrics
x-codegen-request-body-name: body
x-given:
metric:
parameters:
- file: metric_payload.json
name: body
step: there is a valid "metric" in the system
x-menu-order: 1
x-undo:
type: safe
Expand Down
2 changes: 1 addition & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9523,7 +9523,7 @@ paths:
value: '"{{ unique_alnum }}"'
- name: body
value: "{\n \"data\": {\n \"attributes\": {\n \"tags\":[\"app\",
\"datacenter\", \"{{ unique_alnum }}\"],\n \"metric_type\":\"distribution\"\n
\"datacenter\", \"{{ unique_alnum }}\"],\n \"metric_type\":\"gauge\"\n
\ },\n \"type\": \"manage_tags\",\n \"id\": \"{{ unique_alnum
}}\"\n }\n}"
step: there is a valid "metric_tag_configuration" in the system
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/metrics/CreateTagConfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func main() {
"app",
"datacenter",
},
MetricType: datadog.METRICTAGCONFIGURATIONMETRICTYPES_DISTRIBUTION,
MetricType: datadog.METRICTAGCONFIGURATIONMETRICTYPES_GAUGE,
},
},
}
Expand Down
5 changes: 1 addition & 4 deletions examples/v2/metrics/DeleteTagConfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@ import (
)

func main() {
// there is a valid "metric_tag_configuration" in the system
MetricTagConfigurationDataID := os.Getenv("METRIC_TAG_CONFIGURATION_DATA_ID")

ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("DeleteTagConfiguration", true)
apiClient := datadog.NewAPIClient(configuration)
r, err := apiClient.MetricsApi.DeleteTagConfiguration(ctx, MetricTagConfigurationDataID)
r, err := apiClient.MetricsApi.DeleteTagConfiguration(ctx, "ExampleDeleteatagconfigurationreturnsNoContentresponse")

if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MetricsApi.DeleteTagConfiguration`: %v\n", err)
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/metrics/ListTagConfigurations.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func main() {
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("ListTagConfigurations", true)
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.MetricsApi.ListTagConfigurations(ctx, *datadog.NewListTagConfigurationsOptionalParameters().WithFilterTagsConfigured("ExampleListtagconfigurationsreturnsSuccessresponse"))
resp, r, err := apiClient.MetricsApi.ListTagConfigurations(ctx, *datadog.NewListTagConfigurationsOptionalParameters())

if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MetricsApi.ListTagConfigurations`: %v\n", err)
Expand Down
28 changes: 28 additions & 0 deletions examples/v2/metrics/ListTagConfigurations_103226315.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// List tag configurations with configured filter returns "Success" response

package main

import (
"context"
"encoding/json"
"fmt"
"os"

datadog "github.com/DataDog/datadog-api-client-go/api/v2/datadog"
)

func main() {
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("ListTagConfigurations", true)
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.MetricsApi.ListTagConfigurations(ctx, *datadog.NewListTagConfigurationsOptionalParameters().WithFilterConfigured(true))

if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MetricsApi.ListTagConfigurations`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}

responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `MetricsApi.ListTagConfigurations`:\n%s\n", responseContent)
}
5 changes: 1 addition & 4 deletions examples/v2/metrics/ListVolumesByMetricName.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ import (
)

func main() {
// there is a valid "metric_tag_configuration" in the system
MetricTagConfigurationDataID := os.Getenv("METRIC_TAG_CONFIGURATION_DATA_ID")

ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.MetricsApi.ListVolumesByMetricName(ctx, MetricTagConfigurationDataID)
resp, r, err := apiClient.MetricsApi.ListVolumesByMetricName(ctx, "ExampleListdistinctmetricvolumesbymetricnamereturnsSuccessresponse")

if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MetricsApi.ListVolumesByMetricName`: %v\n", err)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2022-02-11T14:39:32.612Z
2022-03-29T16:50:50.982Z
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
interactions:
- request:
body: |
{"data":{"attributes":{"email":"Test-Configure_tags_for_multiple_metrics_returns_Accepted_response-1644590372@datadoghq.com","title":"user title"},"type":"users"}}
{"data":{"attributes":{"email":"Test-Configure_tags_for_multiple_metrics_returns_Accepted_response-1648572650@datadoghq.com","title":"user title"},"type":"users"}}
form: {}
headers:
Accept:
Expand All @@ -11,7 +11,7 @@ interactions:
method: POST
url: https://api.datadoghq.com/api/v2/users
response:
body: '{"data":{"type":"users","id":"6d716162-8b48-11ec-8120-da7ad0900002","attributes":{"name":null,"handle":"test-configure_tags_for_multiple_metrics_returns_accepted_response-1644590372@datadoghq.com","created_at":"2022-02-11T14:39:33.168622+00:00","modified_at":"2022-02-11T14:39:33.210204+00:00","email":"test-configure_tags_for_multiple_metrics_returns_accepted_response-1644590372@datadoghq.com","icon":"https://secure.gravatar.com/avatar/26c5c0db9872a0c3853a47185d64e364?s=48&d=retro","title":"user
body: '{"data":{"type":"users","id":"644595b6-af80-11ec-9083-da7ad0900002","attributes":{"name":null,"handle":"test-configure_tags_for_multiple_metrics_returns_accepted_response-1648572650@datadoghq.com","created_at":"2022-03-29T16:50:51.458189+00:00","modified_at":"2022-03-29T16:50:51.505052+00:00","email":"test-configure_tags_for_multiple_metrics_returns_accepted_response-1648572650@datadoghq.com","icon":"https://secure.gravatar.com/avatar/89de541493f01f9349b107331dc8148f?s=48&d=retro","title":"user
title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}}'
code: 201
duration: ''
Expand All @@ -21,7 +21,7 @@ interactions:
status: 201 Created
- request:
body: |
{"data":{"attributes":{"emails":["test-configure_tags_for_multiple_metrics_returns_accepted_response-1644590372@datadoghq.com"],"tags":["test","testconfiguretagsformultiplemetricsreturnsacceptedresponse1644590372"]},"id":"system.load.1","type":"metric_bulk_configure_tags"}}
{"data":{"attributes":{"emails":["test-configure_tags_for_multiple_metrics_returns_accepted_response-1648572650@datadoghq.com"],"tags":["test","testconfiguretagsformultiplemetricsreturnsacceptedresponse1648572650"]},"id":"system.load.1","type":"metric_bulk_configure_tags"}}
form: {}
headers:
Accept:
Expand All @@ -31,7 +31,7 @@ interactions:
method: POST
url: https://api.datadoghq.com/api/v2/metrics/config/bulk-tags
response:
body: '{"data":{"type":"metric_bulk_configure_tags","id":"system.load.1","attributes":{"tags":["test","testconfiguretagsformultiplemetricsreturnsacceptedresponse1644590372"],"emails":["test-configure_tags_for_multiple_metrics_returns_accepted_response-1644590372@datadoghq.com"],"status":"Accepted"}}}'
body: '{"data":{"type":"metric_bulk_configure_tags","id":"system.load.1","attributes":{"tags":["test","testconfiguretagsformultiplemetricsreturnsacceptedresponse1648572650"],"emails":["test-configure_tags_for_multiple_metrics_returns_accepted_response-1648572650@datadoghq.com"],"status":"Accepted"}}}'
code: 202
duration: ''
headers:
Expand All @@ -40,7 +40,7 @@ interactions:
status: 202 Accepted
- request:
body: |
{"data":{"attributes":{"emails":["test-configure_tags_for_multiple_metrics_returns_accepted_response-1644590372@datadoghq.com"],"status":"Accepted","tags":["test","testconfiguretagsformultiplemetricsreturnsacceptedresponse1644590372"]},"id":"system.load.1","type":"metric_bulk_configure_tags"}}
{"data":{"attributes":{"emails":["test-configure_tags_for_multiple_metrics_returns_accepted_response-1648572650@datadoghq.com"],"status":"Accepted","tags":["test","testconfiguretagsformultiplemetricsreturnsacceptedresponse1648572650"]},"id":"system.load.1","type":"metric_bulk_configure_tags"}}
form: {}
headers:
Accept:
Expand All @@ -50,7 +50,7 @@ interactions:
method: DELETE
url: https://api.datadoghq.com/api/v2/metrics/config/bulk-tags
response:
body: '{"data":{"type":"metric_bulk_configure_tags","id":"system.load.1","attributes":{"emails":["test-configure_tags_for_multiple_metrics_returns_accepted_response-1644590372@datadoghq.com"],"status":"Accepted"}}}'
body: '{"data":{"type":"metric_bulk_configure_tags","id":"system.load.1","attributes":{"emails":["test-configure_tags_for_multiple_metrics_returns_accepted_response-1648572650@datadoghq.com"],"status":"Accepted"}}}'
code: 202
duration: ''
headers:
Expand All @@ -64,7 +64,7 @@ interactions:
Accept:
- application/json
method: DELETE
url: https://api.datadoghq.com/api/v2/users/6d716162-8b48-11ec-8120-da7ad0900002
url: https://api.datadoghq.com/api/v2/users/644595b6-af80-11ec-9083-da7ad0900002
response:
body: ''
code: 204
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2022-03-28T20:32:26.156Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
interactions:
- request:
body: |
{"series":[{"metric":"TestCreateatagconfigurationreturnsCreatedresponse1648499546","points":[[1648499546,1.1]],"tags":["test:ExampleSubmitmetricsreturnsPayloadacceptedresponse"],"type":"gauge"}]}
form: {}
headers:
Accept:
- text/json
Content-Type:
- text/json
method: POST
url: https://api.datadoghq.com/api/v1/series
response:
body: '{"status": "ok"}'
code: 202
duration: ''
headers:
Content-Type:
- text/json
status: 202 Accepted
- request:
body: |
{"data":{"attributes":{"metric_type":"gauge","tags":["app","datacenter"]},"id":"TestCreateatagconfigurationreturnsCreatedresponse1648499546","type":"manage_tags"}}
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
method: POST
url: https://api.datadoghq.com/api/v2/metrics/TestCreateatagconfigurationreturnsCreatedresponse1648499546/tags
response:
body: '{"data":{"type":"manage_tags","id":"TestCreateatagconfigurationreturnsCreatedresponse1648499546","attributes":{"tags":["datacenter","app"],"created_at":"2022-03-28T20:32:28.716208+00:00","modified_at":"2022-03-28T20:32:28.716208+00:00","metric_type":"gauge","aggregations":[{"space":"avg","time":"avg"}]}}}'
code: 201
duration: ''
headers:
Content-Type:
- application/json
status: 201 Created
- request:
body: ''
form: {}
headers:
Accept:
- application/json
method: DELETE
url: https://api.datadoghq.com/api/v2/metrics/TestCreateatagconfigurationreturnsCreatedresponse1648499546/tags
response:
body: ''
code: 204
duration: ''
headers: {}
status: 204 No Content
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2022-03-29T13:29:02.583Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
interactions:
- request:
body: |
{"series":[{"metric":"TestDeleteatagconfigurationreturnsNoContentresponse1648560542","points":[[1648560542,1.1]],"tags":["test:ExampleSubmitmetricsreturnsPayloadacceptedresponse"],"type":"gauge"}]}
form: {}
headers:
Accept:
- text/json
Content-Type:
- text/json
method: POST
url: https://api.datadoghq.com/api/v1/series
response:
body: '{"status": "ok"}'
code: 202
duration: ''
headers:
Content-Type:
- text/json
status: 202 Accepted
- request:
body: |
{"data":{"attributes":{"metric_type":"gauge","tags":["app","datacenter","TestDeleteatagconfigurationreturnsNoContentresponse1648560542"]},"id":"TestDeleteatagconfigurationreturnsNoContentresponse1648560542","type":"manage_tags"}}
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
method: POST
url: https://api.datadoghq.com/api/v2/metrics/TestDeleteatagconfigurationreturnsNoContentresponse1648560542/tags
response:
body: '{"data":{"type":"manage_tags","id":"TestDeleteatagconfigurationreturnsNoContentresponse1648560542","attributes":{"tags":["datacenter","app","TestDeleteatagconfigurationreturnsNoContentresponse1648560542"],"created_at":"2022-03-29T13:29:03.991675+00:00","modified_at":"2022-03-29T13:29:03.991675+00:00","metric_type":"gauge","aggregations":[{"space":"avg","time":"avg"}]}}}'
code: 201
duration: ''
headers:
Content-Type:
- application/json
status: 201 Created
- request:
body: ''
form: {}
headers:
Accept:
- application/json
method: DELETE
url: https://api.datadoghq.com/api/v2/metrics/TestDeleteatagconfigurationreturnsNoContentresponse1648560542/tags
response:
body: ''
code: 204
duration: ''
headers: {}
status: 204 No Content
- request:
body: ''
form: {}
headers:
Accept:
- application/json
method: DELETE
url: https://api.datadoghq.com/api/v2/metrics/TestDeleteatagconfigurationreturnsNoContentresponse1648560542/tags
response:
body: '{"errors": ["TestDeleteatagconfigurationreturnsNoContentresponse1648560542
not found"]}'
code: 404
duration: ''
headers:
Content-Type:
- application/json
status: 404 Not Found
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2022-04-01T20:32:14.721Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
interactions:
- request:
body: |
{"series":[{"metric":"TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1648845134","points":[[1648845134,1.1]],"tags":["test:ExampleSubmitmetricsreturnsPayloadacceptedresponse"],"type":"gauge"}]}
form: {}
headers:
Accept:
- text/json
Content-Type:
- text/json
method: POST
url: https://api.datadoghq.com/api/v1/series
response:
body: '{"status": "ok"}'
code: 202
duration: ''
headers:
Content-Type:
- text/json
status: 202 Accepted
- request:
body: |
{"data":{"attributes":{"metric_type":"gauge","tags":["app","datacenter","TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1648845134"]},"id":"TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1648845134","type":"manage_tags"}}
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
method: POST
url: https://api.datadoghq.com/api/v2/metrics/TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1648845134/tags
response:
body: '{"data":{"type":"manage_tags","id":"TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1648845134","attributes":{"tags":["datacenter","app","TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1648845134"],"created_at":"2022-04-01T20:32:15.216397+00:00","modified_at":"2022-04-01T20:32:15.216397+00:00","metric_type":"gauge","aggregations":[{"space":"avg","time":"avg"}]}}}'
code: 201
duration: ''
headers:
Content-Type:
- application/json
status: 201 Created
- request:
body: ''
form: {}
headers:
Accept:
- application/json
method: GET
url: https://api.datadoghq.com/api/v2/metrics/TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1648845134/volumes
response:
body: '{"data":{"type":"metric_volumes","id":"TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1648845134","attributes":{"indexed_volume":0,"ingested_volume":0}}}'
code: 200
duration: ''
headers:
Content-Type:
- application/json
status: 200 OK
- request:
body: ''
form: {}
headers:
Accept:
- application/json
method: DELETE
url: https://api.datadoghq.com/api/v2/metrics/TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1648845134/tags
response:
body: ''
code: 204
duration: ''
headers: {}
status: 204 No Content
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2022-03-29T14:55:17.199Z
Loading

0 comments on commit 85f41ae

Please sign in to comment.