Skip to content

Commit

Permalink
Regenerate client from commit d1a4fc3 of spec repo (#1263)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Dec 21, 2021
1 parent b058a11 commit 6ecb136
Show file tree
Hide file tree
Showing 45 changed files with 1,976 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.5.1.dev2",
"regenerated": "2021-12-21 21:41:44.151379",
"spec_repo_commit": "ee277b0"
"regenerated": "2021-12-21 22:02:03.734218",
"spec_repo_commit": "d1a4fc3"
},
"v2": {
"apigentools_version": "1.5.1.dev2",
"regenerated": "2021-12-21 21:41:44.169261",
"spec_repo_commit": "ee277b0"
"regenerated": "2021-12-21 22:02:03.753283",
"spec_repo_commit": "d1a4fc3"
}
}
}
69 changes: 69 additions & 0 deletions examples/v1/dashboards/CreateDashboard_145494973.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// Create a new dashboard with apm resource stats widget

package main

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

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

func main() {
body := datadog.Dashboard{
Title: "Example-Create_a_new_dashboard_with_apm_resource_stats_widget",
Widgets: []datadog.Widget{
datadog.Widget{
Definition: datadog.WidgetDefinition{
TableWidgetDefinition: &datadog.TableWidgetDefinition{
Title: datadog.PtrString(""),
TitleSize: datadog.PtrString("16"),
TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(),
Type: datadog.TABLEWIDGETDEFINITIONTYPE_QUERY_TABLE,
Requests: []datadog.TableWidgetRequest{
datadog.TableWidgetRequest{
ResponseFormat: datadog.FORMULAANDFUNCTIONRESPONSEFORMAT_SCALAR.Ptr(),
Queries: &[]datadog.FormulaAndFunctionQueryDefinition{
datadog.FormulaAndFunctionQueryDefinition{
FormulaAndFunctionApmResourceStatsQueryDefinition: &datadog.FormulaAndFunctionApmResourceStatsQueryDefinition{
PrimaryTagValue: datadog.PtrString("edge-eu1.prod.dog"),
Stat: datadog.FORMULAANDFUNCTIONAPMRESOURCESTATNAME_HITS,
Name: "query1",
Service: "cassandra",
DataSource: datadog.FORMULAANDFUNCTIONAPMRESOURCESTATSDATASOURCE_APM_RESOURCE_STATS,
Env: "ci",
PrimaryTagName: datadog.PtrString("datacenter"),
OperationName: datadog.PtrString("cassandra.query"),
GroupBy: &[]string{
"resource_name",
},
}},
},
},
},
}},
Layout: &datadog.WidgetLayout{
X: 0,
Y: 0,
Width: 4,
Height: 4,
},
},
},
LayoutType: datadog.DASHBOARDLAYOUTTYPE_ORDERED,
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body)

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

responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent)
}
82 changes: 82 additions & 0 deletions examples/v1/dashboards/CreateDashboard_2104498738.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// Create a new dashboard with formulas and functions scatterplot widget

package main

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

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

func main() {
body := datadog.Dashboard{
Title: "Example-Create_a_new_dashboard_with_formulas_and_functions_scatterplot_widget",
Widgets: []datadog.Widget{
datadog.Widget{
Id: datadog.PtrInt64(5346764334358972),
Definition: datadog.WidgetDefinition{
ScatterPlotWidgetDefinition: &datadog.ScatterPlotWidgetDefinition{
Title: datadog.PtrString(""),
TitleSize: datadog.PtrString("16"),
TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(),
Type: datadog.SCATTERPLOTWIDGETDEFINITIONTYPE_SCATTERPLOT,
Requests: datadog.ScatterPlotWidgetDefinitionRequests{
Table: &datadog.ScatterplotTableRequest{
Formulas: &[]datadog.ScatterplotWidgetFormula{
datadog.ScatterplotWidgetFormula{
Formula: "query1",
Dimension: datadog.SCATTERPLOTDIMENSION_X,
Alias: datadog.PtrString("my-query1"),
},
datadog.ScatterplotWidgetFormula{
Formula: "query2",
Dimension: datadog.SCATTERPLOTDIMENSION_Y,
Alias: datadog.PtrString("my-query2"),
},
},
Queries: &[]datadog.FormulaAndFunctionQueryDefinition{
datadog.FormulaAndFunctionQueryDefinition{
FormulaAndFunctionMetricQueryDefinition: &datadog.FormulaAndFunctionMetricQueryDefinition{
DataSource: datadog.FORMULAANDFUNCTIONMETRICDATASOURCE_METRICS,
Name: "query1",
Query: "avg:system.cpu.user{*} by {service}",
Aggregator: datadog.FORMULAANDFUNCTIONMETRICAGGREGATION_AVG.Ptr(),
}},
datadog.FormulaAndFunctionQueryDefinition{
FormulaAndFunctionMetricQueryDefinition: &datadog.FormulaAndFunctionMetricQueryDefinition{
DataSource: datadog.FORMULAANDFUNCTIONMETRICDATASOURCE_METRICS,
Name: "query2",
Query: "avg:system.mem.used{*} by {service}",
Aggregator: datadog.FORMULAANDFUNCTIONMETRICAGGREGATION_AVG.Ptr(),
}},
},
ResponseFormat: datadog.FORMULAANDFUNCTIONRESPONSEFORMAT_SCALAR.Ptr(),
},
},
}},
Layout: &datadog.WidgetLayout{
X: 0,
Y: 0,
Width: 4,
Height: 2,
},
},
},
LayoutType: datadog.DASHBOARDLAYOUTTYPE_ORDERED,
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body)

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

responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent)
}
54 changes: 54 additions & 0 deletions examples/v1/dashboards/CreateDashboard_2338918735.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Create a new dashboard with list_stream widget

package main

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

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

func main() {
body := datadog.Dashboard{
LayoutType: datadog.DASHBOARDLAYOUTTYPE_ORDERED,
Title: "Example-Create_a_new_dashboard_with_list_stream_widget with list_stream widget",
Widgets: []datadog.Widget{
datadog.Widget{
Definition: datadog.WidgetDefinition{
ListStreamWidgetDefinition: &datadog.ListStreamWidgetDefinition{
Type: datadog.LISTSTREAMWIDGETDEFINITIONTYPE_LIST_STREAM,
Requests: []datadog.ListStreamWidgetRequest{
datadog.ListStreamWidgetRequest{
Columns: []datadog.ListStreamColumn{
datadog.ListStreamColumn{
Width: datadog.LISTSTREAMCOLUMNWIDTH_AUTO,
Field: "timestamp",
},
},
Query: datadog.ListStreamQuery{
DataSource: datadog.LISTSTREAMSOURCE_ISSUE_STREAM,
QueryString: "",
},
ResponseFormat: datadog.LISTSTREAMRESPONSEFORMAT_EVENT_LIST,
},
},
}},
},
},
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body)

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

responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent)
}
67 changes: 67 additions & 0 deletions examples/v1/dashboards/CreateDashboard_2490110261.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// Create a new dashboard with an audit logs query

package main

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

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

func main() {
body := datadog.Dashboard{
LayoutType: datadog.DASHBOARDLAYOUTTYPE_ORDERED,
Title: "Example-Create_a_new_dashboard_with_an_audit_logs_query with Audit Logs Query",
Widgets: []datadog.Widget{
datadog.Widget{
Definition: datadog.WidgetDefinition{
TimeseriesWidgetDefinition: &datadog.TimeseriesWidgetDefinition{
Type: datadog.TIMESERIESWIDGETDEFINITIONTYPE_TIMESERIES,
Requests: []datadog.TimeseriesWidgetRequest{
datadog.TimeseriesWidgetRequest{
ResponseFormat: datadog.FORMULAANDFUNCTIONRESPONSEFORMAT_TIMESERIES.Ptr(),
Queries: &[]datadog.FormulaAndFunctionQueryDefinition{
datadog.FormulaAndFunctionQueryDefinition{
FormulaAndFunctionEventQueryDefinition: &datadog.FormulaAndFunctionEventQueryDefinition{
Search: &datadog.FormulaAndFunctionEventQueryDefinitionSearch{
Query: "",
},
DataSource: datadog.FORMULAANDFUNCTIONEVENTSDATASOURCE_AUDIT,
Compute: datadog.FormulaAndFunctionEventQueryDefinitionCompute{
Aggregation: datadog.FORMULAANDFUNCTIONEVENTAGGREGATION_COUNT,
},
Name: "query1",
Indexes: &[]string{
"*",
},
GroupBy: &[]datadog.FormulaAndFunctionEventQueryGroupBy{},
}},
},
},
},
}},
Layout: &datadog.WidgetLayout{
X: 2,
Y: 0,
Width: 4,
Height: 2,
},
},
},
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body)

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

responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent)
}
70 changes: 70 additions & 0 deletions examples/v1/dashboards/CreateDashboard_2644712913.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// Create a new dashboard with a query value widget using the percentile aggregator

package main

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

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

func main() {
body := datadog.Dashboard{
LayoutType: datadog.DASHBOARDLAYOUTTYPE_ORDERED,
Title: "Example-Create_a_new_dashboard_with_a_query_value_widget_using_the_percentile_aggregator with QVW Percentile Aggregator",
Widgets: []datadog.Widget{
datadog.Widget{
Definition: datadog.WidgetDefinition{
QueryValueWidgetDefinition: &datadog.QueryValueWidgetDefinition{
TitleSize: datadog.PtrString("16"),
Title: datadog.PtrString(""),
TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(),
Precision: datadog.PtrInt64(2),
Time: &datadog.WidgetTime{},
Autoscale: datadog.PtrBool(true),
Requests: []datadog.QueryValueWidgetRequest{
datadog.QueryValueWidgetRequest{
Formulas: &[]datadog.WidgetFormula{
datadog.WidgetFormula{
Formula: "query1",
},
},
ResponseFormat: datadog.FORMULAANDFUNCTIONRESPONSEFORMAT_SCALAR.Ptr(),
Queries: &[]datadog.FormulaAndFunctionQueryDefinition{
datadog.FormulaAndFunctionQueryDefinition{
FormulaAndFunctionMetricQueryDefinition: &datadog.FormulaAndFunctionMetricQueryDefinition{
Query: "p90:dist.dd.dogweb.latency{*}",
DataSource: datadog.FORMULAANDFUNCTIONMETRICDATASOURCE_METRICS,
Name: "query1",
Aggregator: datadog.FORMULAANDFUNCTIONMETRICAGGREGATION_PERCENTILE.Ptr(),
}},
},
},
},
Type: datadog.QUERYVALUEWIDGETDEFINITIONTYPE_QUERY_VALUE,
}},
Layout: &datadog.WidgetLayout{
Y: 0,
X: 0,
Height: 2,
Width: 2,
},
},
},
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body)

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

responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent)
}
Loading

0 comments on commit 6ecb136

Please sign in to comment.