Get scalar on-demand hot-spots data for cloud commitment programs, showing per-dimension breakdowns of on-demand spending with coverage metrics and potential savings.
This endpoint requires the cloud_cost_management_read permission.
OAuth apps require the cloud_cost_management_read authorization scope to access this endpoint.
Arguments
Query Strings
Name
Type
Description
provider [required]
enum
Cloud provider for commitment programs (aws or azure). Allowed enum values: aws, azure
product [required]
string
Cloud product identifier (for example, ec2, rds, virtualmachines).
start [required]
integer
Start of the query time range in Unix milliseconds.
end [required]
integer
End of the query time range in Unix milliseconds.
filterBy
string
Optional filter expression to narrow down results.
# Get commitments on-demand hot spots (scalar) returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.get_commitments_on_demand_hotspots_scalar".to_sym]=trueendapi_instance=DatadogAPIClient::V2::CloudCostManagementAPI.newpapi_instance.get_commitments_on_demand_hotspots_scalar(CommitmentsProvider::AWS,"product",9223372036854775807,9223372036854775807)
// Get commitments on-demand hot spots (scalar) 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(){ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.GetCommitmentsOnDemandHotspotsScalar",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewCloudCostManagementApi(apiClient)resp,r,err:=api.GetCommitmentsOnDemandHotspotsScalar(ctx,datadogV2.COMMITMENTSPROVIDER_AWS,"product",9223372036854775807,9223372036854775807,*datadogV2.NewGetCommitmentsOnDemandHotspotsScalarOptionalParameters())iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `CloudCostManagementApi.GetCommitmentsOnDemandHotspotsScalar`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `CloudCostManagementApi.GetCommitmentsOnDemandHotspotsScalar`:\n%s\n",responseContent)}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get commitments on-demand hot spots (scalar) returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.getCommitmentsOnDemandHotspotsScalar"]=true;constapiInstance=newv2.CloudCostManagementApi(configuration);constparams: v2.CloudCostManagementApiGetCommitmentsOnDemandHotspotsScalarRequest={provider:"aws",product:"product",start: 9223372036854775807,end: 9223372036854775807,};apiInstance.getCommitmentsOnDemandHotspotsScalar(params).then((data: v2.CommitmentsOnDemandHotspotsScalarResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));