Skip to content

Commit f994167

Browse files
committed
Fix datastore item example
1 parent ce41d8b commit f994167

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

examples/v2/actions-datastores/BulkPutDatastoreItems.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ func main() {
1919
body := datadogV2.BulkPutAppsDatastoreItemsRequest{
2020
Data: &datadogV2.BulkPutAppsDatastoreItemsRequestData{
2121
Attributes: &datadogV2.BulkPutAppsDatastoreItemsRequestDataAttributes{
22-
Values: []interface{}{
22+
Values: []map[string]interface{}{
2323
{
24-
"28173b88-1a0e-001e-28c0-7664b6410518": "key1",
25-
"value": "{'data': 'example data 1', 'key': 'value'}",
24+
"data": "example data 1", "key": "value",
2625
},
2726
{
28-
"28173b88-1a0e-001e-28c0-7664b6410518": "key2",
29-
"value": "{'data': 'example data 2', 'key': 'value'}",
27+
"data": "example data 2", "key": "value",
3028
},
3129
},
3230
},

examples/v2/actions-datastores/CreateDatastoreFromImport.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ func main() {
1818
Attributes: &datadogV2.CreateAppsDatastoreFromImportRequestDataAttributes{
1919
Name: "datastore-name",
2020
PrimaryColumnName: "primaryKey",
21-
Values: []interface{}{
21+
Values: []map[string]interface{}{
2222
{
23-
"primaryKey": "key1",
24-
"value": "{'data': 'example data 1', 'key': 'value'}",
23+
"data": "example data 1", "key": "value",
2524
},
2625
{
27-
"primaryKey": "key2",
28-
"value": "{'data': 'example data 2', 'key': 'value'}",
26+
"data": "example data 2", "key": "value",
2927
},
3028
},
3129
},

0 commit comments

Comments
 (0)