Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Application Vulnerability Management to usage metering API #1992

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.6.4",
"regenerated": "2023-05-12 13:13:13.223351",
"spec_repo_commit": "9eca3996"
"regenerated": "2023-05-17 14:44:50.426584",
"spec_repo_commit": "f8bfb8c1"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-05-12 13:13:13.242466",
"spec_repo_commit": "9eca3996"
"regenerated": "2023-05-17 14:44:50.442531",
"spec_repo_commit": "f8bfb8c1"
}
}
}
30 changes: 30 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3764,6 +3764,7 @@ components:
- snmp_usage
- estimated_rum_sessions_usage
- universal_service_monitoring_usage
- vuln_management_hosts_usage
type: string
x-enum-varnames:
- API_USAGE
Expand Down Expand Up @@ -3797,6 +3798,7 @@ components:
- SNMP_USAGE
- ESTIMATED_RUM_SESSIONS_USAGE
- UNIVERSAL_SERVICE_MONITORING_USAGE
- VULN_MANAGEMENT_HOSTS_USAGE
IFrameWidgetDefinition:
description: The iframe widget allows you to embed a portion of any other web
page on your dashboard. Only available on FREE layout dashboards.
Expand Down Expand Up @@ -7260,6 +7262,8 @@ components:
- estimated_rum_sessions_percentage
- universal_service_monitoring_usage
- universal_service_monitoring_percentage
- vuln_management_hosts_usage
- vuln_management_hosts_percentage
- '*'
type: string
x-enum-varnames:
Expand Down Expand Up @@ -7325,6 +7329,8 @@ components:
- ESTIMATED_RUM_SESSIONS_PERCENTAGE
- UNIVERSAL_SERVICE_MONITORING_USAGE
- UNIVERSAL_SERVICE_MONITORING_PERCENTAGE
- VULN_MANAGEMENT_HOSTS_USAGE
- VULN_MANAGEMENT_HOSTS_PERCENTAGE
- ALL
MonthlyUsageAttributionValues:
description: Fields in Usage Summary by tag(s).
Expand Down Expand Up @@ -7582,6 +7588,15 @@ components:
description: The universal service monitoring usage by tag(s).
format: double
type: number
vuln_management_hosts_percentage:
description: The percentage of Application Vulnerability Management usage
by tag(s).
format: double
type: number
vuln_management_hosts_usage:
description: The Application Vulnerability Management usage by tag(s).
format: double
type: number
type: object
NoteWidgetDefinition:
description: The notes and links widget is similar to free text widget, but
Expand Down Expand Up @@ -17615,6 +17630,11 @@ components:
in the current date for all organizations.
format: int64
type: integer
vuln_management_host_count_top99p:
description: Shows the 99th percentile of all Application Vulnerability
Management hosts over all hours in the current date for the given org.
format: int64
type: integer
type: object
UsageSummaryDateOrg:
description: Global hourly report of all data billed by Datadog for a given
Expand Down Expand Up @@ -18020,6 +18040,11 @@ components:
in the current date for the given org.
format: int64
type: integer
vuln_management_host_count_top99p:
description: Shows the 99th percentile of all Application Vulnerability
Management hosts over all hours in the current date for the given org.
format: int64
type: integer
type: object
UsageSummaryResponse:
description: Response summarizing all usage aggregated across the months in
Expand Down Expand Up @@ -18472,6 +18497,11 @@ components:
in the current months for all organizations.
format: int64
type: integer
vuln_management_host_count_top99p_sum:
description: Shows the 99th percentile of all Application Vulnerability
Management hosts over all hours in the current months for all organizations.
format: int64
type: integer
type: object
UsageSyntheticsAPIHour:
description: Number of Synthetics API tests run for each hour for a given organization.
Expand Down
2 changes: 2 additions & 0 deletions api/datadogV1/model_hourly_usage_attribution_usage_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const (
HOURLYUSAGEATTRIBUTIONUSAGETYPE_SNMP_USAGE HourlyUsageAttributionUsageType = "snmp_usage"
HOURLYUSAGEATTRIBUTIONUSAGETYPE_ESTIMATED_RUM_SESSIONS_USAGE HourlyUsageAttributionUsageType = "estimated_rum_sessions_usage"
HOURLYUSAGEATTRIBUTIONUSAGETYPE_UNIVERSAL_SERVICE_MONITORING_USAGE HourlyUsageAttributionUsageType = "universal_service_monitoring_usage"
HOURLYUSAGEATTRIBUTIONUSAGETYPE_VULN_MANAGEMENT_HOSTS_USAGE HourlyUsageAttributionUsageType = "vuln_management_hosts_usage"
)

var allowedHourlyUsageAttributionUsageTypeEnumValues = []HourlyUsageAttributionUsageType{
Expand Down Expand Up @@ -79,6 +80,7 @@ var allowedHourlyUsageAttributionUsageTypeEnumValues = []HourlyUsageAttributionU
HOURLYUSAGEATTRIBUTIONUSAGETYPE_SNMP_USAGE,
HOURLYUSAGEATTRIBUTIONUSAGETYPE_ESTIMATED_RUM_SESSIONS_USAGE,
HOURLYUSAGEATTRIBUTIONUSAGETYPE_UNIVERSAL_SERVICE_MONITORING_USAGE,
HOURLYUSAGEATTRIBUTIONUSAGETYPE_VULN_MANAGEMENT_HOSTS_USAGE,
}

// GetAllowedValues reeturns the list of possible values.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ const (
MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_RUM_SESSIONS_PERCENTAGE MonthlyUsageAttributionSupportedMetrics = "estimated_rum_sessions_percentage"
MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_UNIVERSAL_SERVICE_MONITORING_USAGE MonthlyUsageAttributionSupportedMetrics = "universal_service_monitoring_usage"
MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_UNIVERSAL_SERVICE_MONITORING_PERCENTAGE MonthlyUsageAttributionSupportedMetrics = "universal_service_monitoring_percentage"
MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_VULN_MANAGEMENT_HOSTS_USAGE MonthlyUsageAttributionSupportedMetrics = "vuln_management_hosts_usage"
MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_VULN_MANAGEMENT_HOSTS_PERCENTAGE MonthlyUsageAttributionSupportedMetrics = "vuln_management_hosts_percentage"
MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_ALL MonthlyUsageAttributionSupportedMetrics = "*"
)

Expand Down Expand Up @@ -142,6 +144,8 @@ var allowedMonthlyUsageAttributionSupportedMetricsEnumValues = []MonthlyUsageAtt
MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_RUM_SESSIONS_PERCENTAGE,
MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_UNIVERSAL_SERVICE_MONITORING_USAGE,
MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_UNIVERSAL_SERVICE_MONITORING_PERCENTAGE,
MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_VULN_MANAGEMENT_HOSTS_USAGE,
MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_VULN_MANAGEMENT_HOSTS_PERCENTAGE,
MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_ALL,
}

Expand Down
72 changes: 71 additions & 1 deletion api/datadogV1/model_monthly_usage_attribution_values.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ type MonthlyUsageAttributionValues struct {
UniversalServiceMonitoringPercentage *float64 `json:"universal_service_monitoring_percentage,omitempty"`
// The universal service monitoring usage by tag(s).
UniversalServiceMonitoringUsage *float64 `json:"universal_service_monitoring_usage,omitempty"`
// The percentage of Application Vulnerability Management usage by tag(s).
VulnManagementHostsPercentage *float64 `json:"vuln_management_hosts_percentage,omitempty"`
// The Application Vulnerability Management usage by tag(s).
VulnManagementHostsUsage *float64 `json:"vuln_management_hosts_usage,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
AdditionalProperties map[string]interface{}
Expand Down Expand Up @@ -1894,6 +1898,62 @@ func (o *MonthlyUsageAttributionValues) SetUniversalServiceMonitoringUsage(v flo
o.UniversalServiceMonitoringUsage = &v
}

// GetVulnManagementHostsPercentage returns the VulnManagementHostsPercentage field value if set, zero value otherwise.
func (o *MonthlyUsageAttributionValues) GetVulnManagementHostsPercentage() float64 {
if o == nil || o.VulnManagementHostsPercentage == nil {
var ret float64
return ret
}
return *o.VulnManagementHostsPercentage
}

// GetVulnManagementHostsPercentageOk returns a tuple with the VulnManagementHostsPercentage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonthlyUsageAttributionValues) GetVulnManagementHostsPercentageOk() (*float64, bool) {
if o == nil || o.VulnManagementHostsPercentage == nil {
return nil, false
}
return o.VulnManagementHostsPercentage, true
}

// HasVulnManagementHostsPercentage returns a boolean if a field has been set.
func (o *MonthlyUsageAttributionValues) HasVulnManagementHostsPercentage() bool {
return o != nil && o.VulnManagementHostsPercentage != nil
}

// SetVulnManagementHostsPercentage gets a reference to the given float64 and assigns it to the VulnManagementHostsPercentage field.
func (o *MonthlyUsageAttributionValues) SetVulnManagementHostsPercentage(v float64) {
o.VulnManagementHostsPercentage = &v
}

// GetVulnManagementHostsUsage returns the VulnManagementHostsUsage field value if set, zero value otherwise.
func (o *MonthlyUsageAttributionValues) GetVulnManagementHostsUsage() float64 {
if o == nil || o.VulnManagementHostsUsage == nil {
var ret float64
return ret
}
return *o.VulnManagementHostsUsage
}

// GetVulnManagementHostsUsageOk returns a tuple with the VulnManagementHostsUsage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MonthlyUsageAttributionValues) GetVulnManagementHostsUsageOk() (*float64, bool) {
if o == nil || o.VulnManagementHostsUsage == nil {
return nil, false
}
return o.VulnManagementHostsUsage, true
}

// HasVulnManagementHostsUsage returns a boolean if a field has been set.
func (o *MonthlyUsageAttributionValues) HasVulnManagementHostsUsage() bool {
return o != nil && o.VulnManagementHostsUsage != nil
}

// SetVulnManagementHostsUsage gets a reference to the given float64 and assigns it to the VulnManagementHostsUsage field.
func (o *MonthlyUsageAttributionValues) SetVulnManagementHostsUsage(v float64) {
o.VulnManagementHostsUsage = &v
}

// MarshalJSON serializes the struct using spec logic.
func (o MonthlyUsageAttributionValues) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
Expand Down Expand Up @@ -2086,6 +2146,12 @@ func (o MonthlyUsageAttributionValues) MarshalJSON() ([]byte, error) {
if o.UniversalServiceMonitoringUsage != nil {
toSerialize["universal_service_monitoring_usage"] = o.UniversalServiceMonitoringUsage
}
if o.VulnManagementHostsPercentage != nil {
toSerialize["vuln_management_hosts_percentage"] = o.VulnManagementHostsPercentage
}
if o.VulnManagementHostsUsage != nil {
toSerialize["vuln_management_hosts_usage"] = o.VulnManagementHostsUsage
}

for key, value := range o.AdditionalProperties {
toSerialize[key] = value
Expand Down Expand Up @@ -2159,6 +2225,8 @@ func (o *MonthlyUsageAttributionValues) UnmarshalJSON(bytes []byte) (err error)
SnmpUsage *float64 `json:"snmp_usage,omitempty"`
UniversalServiceMonitoringPercentage *float64 `json:"universal_service_monitoring_percentage,omitempty"`
UniversalServiceMonitoringUsage *float64 `json:"universal_service_monitoring_usage,omitempty"`
VulnManagementHostsPercentage *float64 `json:"vuln_management_hosts_percentage,omitempty"`
VulnManagementHostsUsage *float64 `json:"vuln_management_hosts_usage,omitempty"`
}{}
err = json.Unmarshal(bytes, &all)
if err != nil {
Expand All @@ -2171,7 +2239,7 @@ func (o *MonthlyUsageAttributionValues) UnmarshalJSON(bytes []byte) (err error)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"api_percentage", "api_usage", "apm_fargate_percentage", "apm_fargate_usage", "apm_host_percentage", "apm_host_usage", "appsec_fargate_percentage", "appsec_fargate_usage", "appsec_percentage", "appsec_usage", "browser_percentage", "browser_usage", "container_excl_agent_percentage", "container_excl_agent_usage", "container_percentage", "container_usage", "cspm_containers_percentage", "cspm_containers_usage", "cspm_hosts_percentage", "cspm_hosts_usage", "custom_ingested_timeseries_percentage", "custom_ingested_timeseries_usage", "custom_timeseries_percentage", "custom_timeseries_usage", "cws_containers_percentage", "cws_containers_usage", "cws_hosts_percentage", "cws_hosts_usage", "dbm_hosts_percentage", "dbm_hosts_usage", "dbm_queries_percentage", "dbm_queries_usage", "estimated_indexed_logs_percentage", "estimated_indexed_logs_usage", "estimated_indexed_spans_percentage", "estimated_indexed_spans_usage", "estimated_ingested_logs_percentage", "estimated_ingested_logs_usage", "estimated_ingested_spans_percentage", "estimated_ingested_spans_usage", "estimated_rum_sessions_percentage", "estimated_rum_sessions_usage", "fargate_percentage", "fargate_usage", "functions_percentage", "functions_usage", "infra_host_percentage", "infra_host_usage", "invocations_percentage", "invocations_usage", "npm_host_percentage", "npm_host_usage", "profiled_container_percentage", "profiled_container_usage", "profiled_fargate_percentage", "profiled_fargate_usage", "profiled_host_percentage", "profiled_host_usage", "snmp_percentage", "snmp_usage", "universal_service_monitoring_percentage", "universal_service_monitoring_usage"})
datadog.DeleteKeys(additionalProperties, &[]string{"api_percentage", "api_usage", "apm_fargate_percentage", "apm_fargate_usage", "apm_host_percentage", "apm_host_usage", "appsec_fargate_percentage", "appsec_fargate_usage", "appsec_percentage", "appsec_usage", "browser_percentage", "browser_usage", "container_excl_agent_percentage", "container_excl_agent_usage", "container_percentage", "container_usage", "cspm_containers_percentage", "cspm_containers_usage", "cspm_hosts_percentage", "cspm_hosts_usage", "custom_ingested_timeseries_percentage", "custom_ingested_timeseries_usage", "custom_timeseries_percentage", "custom_timeseries_usage", "cws_containers_percentage", "cws_containers_usage", "cws_hosts_percentage", "cws_hosts_usage", "dbm_hosts_percentage", "dbm_hosts_usage", "dbm_queries_percentage", "dbm_queries_usage", "estimated_indexed_logs_percentage", "estimated_indexed_logs_usage", "estimated_indexed_spans_percentage", "estimated_indexed_spans_usage", "estimated_ingested_logs_percentage", "estimated_ingested_logs_usage", "estimated_ingested_spans_percentage", "estimated_ingested_spans_usage", "estimated_rum_sessions_percentage", "estimated_rum_sessions_usage", "fargate_percentage", "fargate_usage", "functions_percentage", "functions_usage", "infra_host_percentage", "infra_host_usage", "invocations_percentage", "invocations_usage", "npm_host_percentage", "npm_host_usage", "profiled_container_percentage", "profiled_container_usage", "profiled_fargate_percentage", "profiled_fargate_usage", "profiled_host_percentage", "profiled_host_usage", "snmp_percentage", "snmp_usage", "universal_service_monitoring_percentage", "universal_service_monitoring_usage", "vuln_management_hosts_percentage", "vuln_management_hosts_usage"})
} else {
return err
}
Expand Down Expand Up @@ -2237,6 +2305,8 @@ func (o *MonthlyUsageAttributionValues) UnmarshalJSON(bytes []byte) (err error)
o.SnmpUsage = all.SnmpUsage
o.UniversalServiceMonitoringPercentage = all.UniversalServiceMonitoringPercentage
o.UniversalServiceMonitoringUsage = all.UniversalServiceMonitoringUsage
o.VulnManagementHostsPercentage = all.VulnManagementHostsPercentage
o.VulnManagementHostsUsage = all.VulnManagementHostsUsage
if len(additionalProperties) > 0 {
o.AdditionalProperties = additionalProperties
}
Expand Down
Loading