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
The unique identifier of the datastore.
type [required]
enum
The resource type for datastores.
Allowed enum values: datastores
"""
Get datastore returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.actions_datastores_apiimportActionsDatastoresApi# there is a valid "datastore" in the systemDATASTORE_DATA_ID=environ["DATASTORE_DATA_ID"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=ActionsDatastoresApi(api_client)response=api_instance.get_datastore(datastore_id=DATASTORE_DATA_ID,)print(response)
# Get datastore returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::ActionsDatastoresAPI.new# there is a valid "datastore" in the systemDATASTORE_DATA_ID=ENV["DATASTORE_DATA_ID"]papi_instance.get_datastore(DATASTORE_DATA_ID)
// Get datastore returns "OK" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){// there is a valid "datastore" in the systemDatastoreDataID:=os.Getenv("DATASTORE_DATA_ID")ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewActionsDatastoresApi(apiClient)resp,r,err:=api.GetDatastore(ctx,DatastoreDataID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `ActionsDatastoresApi.GetDatastore`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `ActionsDatastoresApi.GetDatastore`:\n%s\n",responseContent)}
// Get datastore returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.ActionsDatastoresApi;importcom.datadog.api.client.v2.model.Datastore;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();ActionsDatastoresApiapiInstance=newActionsDatastoresApi(defaultClient);// there is a valid "datastore" in the systemStringDATASTORE_DATA_ID=System.getenv("DATASTORE_DATA_ID");try{Datastoreresult=apiInstance.getDatastore(DATASTORE_DATA_ID);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling ActionsDatastoresApi#getDatastore");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get datastore returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_actions_datastores::ActionsDatastoresAPI;#[tokio::main]asyncfnmain(){// there is a valid "datastore" in the system
letdatastore_data_id=std::env::var("DATASTORE_DATA_ID").unwrap();letconfiguration=datadog::Configuration::new();letapi=ActionsDatastoresAPI::with_config(configuration);letresp=api.get_datastore(datastore_data_id.clone()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Get datastore returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.ActionsDatastoresApi(configuration);// there is a valid "datastore" in the system
constDATASTORE_DATA_ID=process.env.DATASTORE_DATA_IDasstring;constparams: v2.ActionsDatastoresApiGetDatastoreRequest={datastoreId: DATASTORE_DATA_ID,};apiInstance.getDatastore(params).then((data: v2.Datastore)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));