Can be set to uuid to automatically generate primary keys when new items are added. Default value is none, which requires you to supply a primary key for each new item.
Allowed enum values: none,uuid
id
string
Optional ID for the new datastore. If not provided, one will be generated automatically.
type [required]
enum
The resource type for datastores.
Allowed enum values: datastores
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Create datastore returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.ActionsDatastoresApi(configuration);constparams: v2.ActionsDatastoresApiCreateDatastoreRequest={body:{data:{attributes:{name:"datastore-name",primaryColumnName:"primaryKey",},type:"datastores",},},};apiInstance.createDatastore(params).then((data: v2.CreateAppsDatastoreResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));