diff --git a/.apigentools-info b/.apigentools-info index 23174c5ca56..4233c474fc5 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.1", - "regenerated": "2022-01-21 12:35:34.456369", - "spec_repo_commit": "23b4462" + "regenerated": "2022-01-21 15:36:28.646928", + "spec_repo_commit": "a7ac3db" }, "v2": { "apigentools_version": "1.6.1", - "regenerated": "2022-01-21 12:35:34.467035", - "spec_repo_commit": "23b4462" + "regenerated": "2022-01-21 15:36:28.658569", + "spec_repo_commit": "a7ac3db" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 4ee3f7f9267..f8ae8928230 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -13057,16 +13057,36 @@ components: description: Cloud Security Posture Management usage for a given organization for a given hour. properties: + aas_host_count: + description: The number of Cloud Security Posture Management Azure app services + hosts during a given hour. + format: double + nullable: true + type: number + azure_host_count: + description: The number of Cloud Security Posture Management Azure hosts + during a given hour. + format: double + nullable: true + type: number + compliance_host_count: + description: The number of Cloud Security Posture Management hosts during + a given hour. + format: double + nullable: true + type: number container_count: description: The total number of Cloud Security Posture Management containers during a given hour. - format: int64 - type: integer + format: double + nullable: true + type: number host_count: description: The total number of Cloud Security Posture Management hosts during a given hour. - format: int64 - type: integer + format: double + nullable: true + type: number hour: description: The hour for the usage. format: date-time @@ -13939,6 +13959,16 @@ components: hours in the current date for all organizations. format: int64 type: integer + cspm_aas_host_top99p: + description: Shows the 99th percentile of all Cloud Security Posture Management + Azure app services hosts over all hours in the current date for all organizations. + format: int64 + type: integer + cspm_azure_host_top99p: + description: Shows the 99th percentile of all Cloud Security Posture Management + Azure hosts over all hours in the current date for all organizations. + format: int64 + type: integer cspm_container_avg: description: Shows the average number of Cloud Security Posture Management containers over all hours in the current date for all organizations. @@ -14219,6 +14249,17 @@ components: hours in the current date for the given org. format: int64 type: integer + cspm_aas_host_top99p: + description: Shows the 99th percentile of all Cloud Security Posture Management + Azure app services hosts over all hours in the current date for the given + org. + format: int64 + type: integer + cspm_azure_host_top99p: + description: Shows the 99th percentile of all Cloud Security Posture Management + Azure hosts over all hours in the current date for the given org. + format: int64 + type: integer cspm_container_avg: description: Shows the average number of Cloud Security Posture Management containers over all hours in the current date for the given org. @@ -14504,6 +14545,17 @@ components: over all hours in the current months for all organizations. format: int64 type: integer + cspm_aas_host_top99p_sum: + description: Shows the 99th percentile of all Cloud Security Posture Management + Azure app services hosts over all hours in the current months for all + organizations. + format: int64 + type: integer + cspm_azure_host_top99p_sum: + description: Shows the 99th percentile of all Cloud Security Posture Management + Azure hosts over all hours in the current months for all organizations. + format: int64 + type: integer cspm_container_avg_sum: description: Shows the average number of Cloud Security Posture Management containers over all hours in the current months for all organizations. diff --git a/api/v1/datadog/docs/UsageCloudSecurityPostureManagementHour.md b/api/v1/datadog/docs/UsageCloudSecurityPostureManagementHour.md index 2698087bbbf..610e226c36b 100644 --- a/api/v1/datadog/docs/UsageCloudSecurityPostureManagementHour.md +++ b/api/v1/datadog/docs/UsageCloudSecurityPostureManagementHour.md @@ -2,13 +2,16 @@ ## Properties -| Name | Type | Description | Notes | -| ------------------ | ------------------------ | ------------------------------------------------------------------------------------- | ---------- | -| **ContainerCount** | Pointer to **int64** | The total number of Cloud Security Posture Management containers during a given hour. | [optional] | -| **HostCount** | Pointer to **int64** | The total number of Cloud Security Posture Management hosts during a given hour. | [optional] | -| **Hour** | Pointer to **time.Time** | The hour for the usage. | [optional] | -| **OrgName** | Pointer to **string** | The organization name. | [optional] | -| **PublicId** | Pointer to **string** | The organization public ID. | [optional] | +| Name | Type | Description | Notes | +| ----------------------- | ------------------------------ | --------------------------------------------------------------------------------------------- | ---------- | +| **AasHostCount** | Pointer to **NullableFloat64** | The number of Cloud Security Posture Management Azure app services hosts during a given hour. | [optional] | +| **AzureHostCount** | Pointer to **NullableFloat64** | The number of Cloud Security Posture Management Azure hosts during a given hour. | [optional] | +| **ComplianceHostCount** | Pointer to **NullableFloat64** | The number of Cloud Security Posture Management hosts during a given hour. | [optional] | +| **ContainerCount** | Pointer to **NullableFloat64** | The total number of Cloud Security Posture Management containers during a given hour. | [optional] | +| **HostCount** | Pointer to **NullableFloat64** | The total number of Cloud Security Posture Management hosts during a given hour. | [optional] | +| **Hour** | Pointer to **time.Time** | The hour for the usage. | [optional] | +| **OrgName** | Pointer to **string** | The organization name. | [optional] | +| **PublicId** | Pointer to **string** | The organization public ID. | [optional] | ## Methods @@ -29,22 +32,133 @@ NewUsageCloudSecurityPostureManagementHourWithDefaults instantiates a new UsageC This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set. +### GetAasHostCount + +`func (o *UsageCloudSecurityPostureManagementHour) GetAasHostCount() float64` + +GetAasHostCount returns the AasHostCount field if non-nil, zero value otherwise. + +### GetAasHostCountOk + +`func (o *UsageCloudSecurityPostureManagementHour) GetAasHostCountOk() (*float64, bool)` + +GetAasHostCountOk returns a tuple with the AasHostCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAasHostCount + +`func (o *UsageCloudSecurityPostureManagementHour) SetAasHostCount(v float64)` + +SetAasHostCount sets AasHostCount field to given value. + +### HasAasHostCount + +`func (o *UsageCloudSecurityPostureManagementHour) HasAasHostCount() bool` + +HasAasHostCount returns a boolean if a field has been set. + +### SetAasHostCountNil + +`func (o *UsageCloudSecurityPostureManagementHour) SetAasHostCountNil(b bool)` + +SetAasHostCountNil sets the value for AasHostCount to be an explicit nil + +### UnsetAasHostCount + +`func (o *UsageCloudSecurityPostureManagementHour) UnsetAasHostCount()` + +UnsetAasHostCount ensures that no value is present for AasHostCount, not even an explicit nil + +### GetAzureHostCount + +`func (o *UsageCloudSecurityPostureManagementHour) GetAzureHostCount() float64` + +GetAzureHostCount returns the AzureHostCount field if non-nil, zero value otherwise. + +### GetAzureHostCountOk + +`func (o *UsageCloudSecurityPostureManagementHour) GetAzureHostCountOk() (*float64, bool)` + +GetAzureHostCountOk returns a tuple with the AzureHostCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAzureHostCount + +`func (o *UsageCloudSecurityPostureManagementHour) SetAzureHostCount(v float64)` + +SetAzureHostCount sets AzureHostCount field to given value. + +### HasAzureHostCount + +`func (o *UsageCloudSecurityPostureManagementHour) HasAzureHostCount() bool` + +HasAzureHostCount returns a boolean if a field has been set. + +### SetAzureHostCountNil + +`func (o *UsageCloudSecurityPostureManagementHour) SetAzureHostCountNil(b bool)` + +SetAzureHostCountNil sets the value for AzureHostCount to be an explicit nil + +### UnsetAzureHostCount + +`func (o *UsageCloudSecurityPostureManagementHour) UnsetAzureHostCount()` + +UnsetAzureHostCount ensures that no value is present for AzureHostCount, not even an explicit nil + +### GetComplianceHostCount + +`func (o *UsageCloudSecurityPostureManagementHour) GetComplianceHostCount() float64` + +GetComplianceHostCount returns the ComplianceHostCount field if non-nil, zero value otherwise. + +### GetComplianceHostCountOk + +`func (o *UsageCloudSecurityPostureManagementHour) GetComplianceHostCountOk() (*float64, bool)` + +GetComplianceHostCountOk returns a tuple with the ComplianceHostCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComplianceHostCount + +`func (o *UsageCloudSecurityPostureManagementHour) SetComplianceHostCount(v float64)` + +SetComplianceHostCount sets ComplianceHostCount field to given value. + +### HasComplianceHostCount + +`func (o *UsageCloudSecurityPostureManagementHour) HasComplianceHostCount() bool` + +HasComplianceHostCount returns a boolean if a field has been set. + +### SetComplianceHostCountNil + +`func (o *UsageCloudSecurityPostureManagementHour) SetComplianceHostCountNil(b bool)` + +SetComplianceHostCountNil sets the value for ComplianceHostCount to be an explicit nil + +### UnsetComplianceHostCount + +`func (o *UsageCloudSecurityPostureManagementHour) UnsetComplianceHostCount()` + +UnsetComplianceHostCount ensures that no value is present for ComplianceHostCount, not even an explicit nil + ### GetContainerCount -`func (o *UsageCloudSecurityPostureManagementHour) GetContainerCount() int64` +`func (o *UsageCloudSecurityPostureManagementHour) GetContainerCount() float64` GetContainerCount returns the ContainerCount field if non-nil, zero value otherwise. ### GetContainerCountOk -`func (o *UsageCloudSecurityPostureManagementHour) GetContainerCountOk() (*int64, bool)` +`func (o *UsageCloudSecurityPostureManagementHour) GetContainerCountOk() (*float64, bool)` GetContainerCountOk returns a tuple with the ContainerCount field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetContainerCount -`func (o *UsageCloudSecurityPostureManagementHour) SetContainerCount(v int64)` +`func (o *UsageCloudSecurityPostureManagementHour) SetContainerCount(v float64)` SetContainerCount sets ContainerCount field to given value. @@ -54,22 +168,34 @@ SetContainerCount sets ContainerCount field to given value. HasContainerCount returns a boolean if a field has been set. +### SetContainerCountNil + +`func (o *UsageCloudSecurityPostureManagementHour) SetContainerCountNil(b bool)` + +SetContainerCountNil sets the value for ContainerCount to be an explicit nil + +### UnsetContainerCount + +`func (o *UsageCloudSecurityPostureManagementHour) UnsetContainerCount()` + +UnsetContainerCount ensures that no value is present for ContainerCount, not even an explicit nil + ### GetHostCount -`func (o *UsageCloudSecurityPostureManagementHour) GetHostCount() int64` +`func (o *UsageCloudSecurityPostureManagementHour) GetHostCount() float64` GetHostCount returns the HostCount field if non-nil, zero value otherwise. ### GetHostCountOk -`func (o *UsageCloudSecurityPostureManagementHour) GetHostCountOk() (*int64, bool)` +`func (o *UsageCloudSecurityPostureManagementHour) GetHostCountOk() (*float64, bool)` GetHostCountOk returns a tuple with the HostCount field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHostCount -`func (o *UsageCloudSecurityPostureManagementHour) SetHostCount(v int64)` +`func (o *UsageCloudSecurityPostureManagementHour) SetHostCount(v float64)` SetHostCount sets HostCount field to given value. @@ -79,6 +205,18 @@ SetHostCount sets HostCount field to given value. HasHostCount returns a boolean if a field has been set. +### SetHostCountNil + +`func (o *UsageCloudSecurityPostureManagementHour) SetHostCountNil(b bool)` + +SetHostCountNil sets the value for HostCount to be an explicit nil + +### UnsetHostCount + +`func (o *UsageCloudSecurityPostureManagementHour) UnsetHostCount()` + +UnsetHostCount ensures that no value is present for HostCount, not even an explicit nil + ### GetHour `func (o *UsageCloudSecurityPostureManagementHour) GetHour() time.Time` diff --git a/api/v1/datadog/docs/UsageSummaryDate.md b/api/v1/datadog/docs/UsageSummaryDate.md index 52b228fae1e..4bfb49d5262 100644 --- a/api/v1/datadog/docs/UsageSummaryDate.md +++ b/api/v1/datadog/docs/UsageSummaryDate.md @@ -19,6 +19,8 @@ | **BrowserRumUnitsSum** | Pointer to **int64** | Shows the sum of all browser RUM units over all hours in the current date for all organizations. | [optional] | | **ContainerAvg** | Pointer to **int64** | Shows the average of all distinct containers over all hours in the current date for all organizations. | [optional] | | **ContainerHwm** | Pointer to **int64** | Shows the high-water mark of all distinct containers over all hours in the current date for all organizations. | [optional] | +| **CspmAasHostTop99p** | Pointer to **int64** | Shows the 99th percentile of all Cloud Security Posture Management Azure app services hosts over all hours in the current date for all organizations. | [optional] | +| **CspmAzureHostTop99p** | Pointer to **int64** | Shows the 99th percentile of all Cloud Security Posture Management Azure hosts over all hours in the current date for all organizations. | [optional] | | **CspmContainerAvg** | Pointer to **int64** | Shows the average number of Cloud Security Posture Management containers over all hours in the current date for all organizations. | [optional] | | **CspmContainerHwm** | Pointer to **int64** | Shows the high-water mark of Cloud Security Posture Management containers over all hours in the current date for all organizations. | [optional] | | **CspmHostTop99p** | Pointer to **int64** | Shows the 99th percentile of all Cloud Security Posture Management hosts over all hours in the current date for all organizations. | [optional] | @@ -454,6 +456,56 @@ SetContainerHwm sets ContainerHwm field to given value. HasContainerHwm returns a boolean if a field has been set. +### GetCspmAasHostTop99p + +`func (o *UsageSummaryDate) GetCspmAasHostTop99p() int64` + +GetCspmAasHostTop99p returns the CspmAasHostTop99p field if non-nil, zero value otherwise. + +### GetCspmAasHostTop99pOk + +`func (o *UsageSummaryDate) GetCspmAasHostTop99pOk() (*int64, bool)` + +GetCspmAasHostTop99pOk returns a tuple with the CspmAasHostTop99p field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCspmAasHostTop99p + +`func (o *UsageSummaryDate) SetCspmAasHostTop99p(v int64)` + +SetCspmAasHostTop99p sets CspmAasHostTop99p field to given value. + +### HasCspmAasHostTop99p + +`func (o *UsageSummaryDate) HasCspmAasHostTop99p() bool` + +HasCspmAasHostTop99p returns a boolean if a field has been set. + +### GetCspmAzureHostTop99p + +`func (o *UsageSummaryDate) GetCspmAzureHostTop99p() int64` + +GetCspmAzureHostTop99p returns the CspmAzureHostTop99p field if non-nil, zero value otherwise. + +### GetCspmAzureHostTop99pOk + +`func (o *UsageSummaryDate) GetCspmAzureHostTop99pOk() (*int64, bool)` + +GetCspmAzureHostTop99pOk returns a tuple with the CspmAzureHostTop99p field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCspmAzureHostTop99p + +`func (o *UsageSummaryDate) SetCspmAzureHostTop99p(v int64)` + +SetCspmAzureHostTop99p sets CspmAzureHostTop99p field to given value. + +### HasCspmAzureHostTop99p + +`func (o *UsageSummaryDate) HasCspmAzureHostTop99p() bool` + +HasCspmAzureHostTop99p returns a boolean if a field has been set. + ### GetCspmContainerAvg `func (o *UsageSummaryDate) GetCspmContainerAvg() int64` diff --git a/api/v1/datadog/docs/UsageSummaryDateOrg.md b/api/v1/datadog/docs/UsageSummaryDateOrg.md index eafee6578af..05b9e5ea2aa 100644 --- a/api/v1/datadog/docs/UsageSummaryDateOrg.md +++ b/api/v1/datadog/docs/UsageSummaryDateOrg.md @@ -19,6 +19,8 @@ | **BrowserRumUnitsSum** | Pointer to **int64** | Shows the sum of all browser RUM units over all hours in the current date for the given org. | [optional] | | **ContainerAvg** | Pointer to **int64** | Shows the average of all distinct containers over all hours in the current date for the given org. | [optional] | | **ContainerHwm** | Pointer to **int64** | Shows the high-water mark of all distinct containers over all hours in the current date for the given org. | [optional] | +| **CspmAasHostTop99p** | Pointer to **int64** | Shows the 99th percentile of all Cloud Security Posture Management Azure app services hosts over all hours in the current date for the given org. | [optional] | +| **CspmAzureHostTop99p** | Pointer to **int64** | Shows the 99th percentile of all Cloud Security Posture Management Azure hosts over all hours in the current date for the given org. | [optional] | | **CspmContainerAvg** | Pointer to **int64** | Shows the average number of Cloud Security Posture Management containers over all hours in the current date for the given org. | [optional] | | **CspmContainerHwm** | Pointer to **int64** | Shows the high-water mark of Cloud Security Posture Management containers over all hours in the current date for the given org. | [optional] | | **CspmHostTop99p** | Pointer to **int64** | Shows the 99th percentile of all Cloud Security Posture Management hosts over all hours in the current date for the given org. | [optional] | @@ -455,6 +457,56 @@ SetContainerHwm sets ContainerHwm field to given value. HasContainerHwm returns a boolean if a field has been set. +### GetCspmAasHostTop99p + +`func (o *UsageSummaryDateOrg) GetCspmAasHostTop99p() int64` + +GetCspmAasHostTop99p returns the CspmAasHostTop99p field if non-nil, zero value otherwise. + +### GetCspmAasHostTop99pOk + +`func (o *UsageSummaryDateOrg) GetCspmAasHostTop99pOk() (*int64, bool)` + +GetCspmAasHostTop99pOk returns a tuple with the CspmAasHostTop99p field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCspmAasHostTop99p + +`func (o *UsageSummaryDateOrg) SetCspmAasHostTop99p(v int64)` + +SetCspmAasHostTop99p sets CspmAasHostTop99p field to given value. + +### HasCspmAasHostTop99p + +`func (o *UsageSummaryDateOrg) HasCspmAasHostTop99p() bool` + +HasCspmAasHostTop99p returns a boolean if a field has been set. + +### GetCspmAzureHostTop99p + +`func (o *UsageSummaryDateOrg) GetCspmAzureHostTop99p() int64` + +GetCspmAzureHostTop99p returns the CspmAzureHostTop99p field if non-nil, zero value otherwise. + +### GetCspmAzureHostTop99pOk + +`func (o *UsageSummaryDateOrg) GetCspmAzureHostTop99pOk() (*int64, bool)` + +GetCspmAzureHostTop99pOk returns a tuple with the CspmAzureHostTop99p field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCspmAzureHostTop99p + +`func (o *UsageSummaryDateOrg) SetCspmAzureHostTop99p(v int64)` + +SetCspmAzureHostTop99p sets CspmAzureHostTop99p field to given value. + +### HasCspmAzureHostTop99p + +`func (o *UsageSummaryDateOrg) HasCspmAzureHostTop99p() bool` + +HasCspmAzureHostTop99p returns a boolean if a field has been set. + ### GetCspmContainerAvg `func (o *UsageSummaryDateOrg) GetCspmContainerAvg() int64` diff --git a/api/v1/datadog/docs/UsageSummaryResponse.md b/api/v1/datadog/docs/UsageSummaryResponse.md index 27de7a7666f..75dd0cd30b3 100644 --- a/api/v1/datadog/docs/UsageSummaryResponse.md +++ b/api/v1/datadog/docs/UsageSummaryResponse.md @@ -20,6 +20,8 @@ | **BrowserRumUnitsAggSum** | Pointer to **int64** | Shows the sum of all browser RUM units over all hours in the current months for all organizations. | [optional] | | **ContainerAvgSum** | Pointer to **int64** | Shows the average of all distinct containers over all hours in the current months for all organizations. | [optional] | | **ContainerHwmSum** | Pointer to **int64** | Shows the sum of the high-water marks of all distinct containers over all hours in the current months for all organizations. | [optional] | +| **CspmAasHostTop99pSum** | Pointer to **int64** | Shows the 99th percentile of all Cloud Security Posture Management Azure app services hosts over all hours in the current months for all organizations. | [optional] | +| **CspmAzureHostTop99pSum** | Pointer to **int64** | Shows the 99th percentile of all Cloud Security Posture Management Azure hosts over all hours in the current months for all organizations. | [optional] | | **CspmContainerAvgSum** | Pointer to **int64** | Shows the average number of Cloud Security Posture Management containers over all hours in the current months for all organizations. | [optional] | | **CspmContainerHwmSum** | Pointer to **int64** | Shows the sum of the the high-water marks of Cloud Security Posture Management containers over all hours in the current months for all organizations. | [optional] | | **CspmHostTop99pSum** | Pointer to **int64** | Shows the 99th percentile of all Cloud Security Posture Management hosts over all hours in the current months for all organizations. | [optional] | @@ -488,6 +490,56 @@ SetContainerHwmSum sets ContainerHwmSum field to given value. HasContainerHwmSum returns a boolean if a field has been set. +### GetCspmAasHostTop99pSum + +`func (o *UsageSummaryResponse) GetCspmAasHostTop99pSum() int64` + +GetCspmAasHostTop99pSum returns the CspmAasHostTop99pSum field if non-nil, zero value otherwise. + +### GetCspmAasHostTop99pSumOk + +`func (o *UsageSummaryResponse) GetCspmAasHostTop99pSumOk() (*int64, bool)` + +GetCspmAasHostTop99pSumOk returns a tuple with the CspmAasHostTop99pSum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCspmAasHostTop99pSum + +`func (o *UsageSummaryResponse) SetCspmAasHostTop99pSum(v int64)` + +SetCspmAasHostTop99pSum sets CspmAasHostTop99pSum field to given value. + +### HasCspmAasHostTop99pSum + +`func (o *UsageSummaryResponse) HasCspmAasHostTop99pSum() bool` + +HasCspmAasHostTop99pSum returns a boolean if a field has been set. + +### GetCspmAzureHostTop99pSum + +`func (o *UsageSummaryResponse) GetCspmAzureHostTop99pSum() int64` + +GetCspmAzureHostTop99pSum returns the CspmAzureHostTop99pSum field if non-nil, zero value otherwise. + +### GetCspmAzureHostTop99pSumOk + +`func (o *UsageSummaryResponse) GetCspmAzureHostTop99pSumOk() (*int64, bool)` + +GetCspmAzureHostTop99pSumOk returns a tuple with the CspmAzureHostTop99pSum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCspmAzureHostTop99pSum + +`func (o *UsageSummaryResponse) SetCspmAzureHostTop99pSum(v int64)` + +SetCspmAzureHostTop99pSum sets CspmAzureHostTop99pSum field to given value. + +### HasCspmAzureHostTop99pSum + +`func (o *UsageSummaryResponse) HasCspmAzureHostTop99pSum() bool` + +HasCspmAzureHostTop99pSum returns a boolean if a field has been set. + ### GetCspmContainerAvgSum `func (o *UsageSummaryResponse) GetCspmContainerAvgSum() int64` diff --git a/api/v1/datadog/model_usage_cloud_security_posture_management_hour.go b/api/v1/datadog/model_usage_cloud_security_posture_management_hour.go index 3e377cf1713..a20d1b33589 100644 --- a/api/v1/datadog/model_usage_cloud_security_posture_management_hour.go +++ b/api/v1/datadog/model_usage_cloud_security_posture_management_hour.go @@ -15,10 +15,16 @@ import ( // UsageCloudSecurityPostureManagementHour Cloud Security Posture Management usage for a given organization for a given hour. type UsageCloudSecurityPostureManagementHour struct { + // The number of Cloud Security Posture Management Azure app services hosts during a given hour. + AasHostCount NullableFloat64 `json:"aas_host_count,omitempty"` + // The number of Cloud Security Posture Management Azure hosts during a given hour. + AzureHostCount NullableFloat64 `json:"azure_host_count,omitempty"` + // The number of Cloud Security Posture Management hosts during a given hour. + ComplianceHostCount NullableFloat64 `json:"compliance_host_count,omitempty"` // The total number of Cloud Security Posture Management containers during a given hour. - ContainerCount *int64 `json:"container_count,omitempty"` + ContainerCount NullableFloat64 `json:"container_count,omitempty"` // The total number of Cloud Security Posture Management hosts during a given hour. - HostCount *int64 `json:"host_count,omitempty"` + HostCount NullableFloat64 `json:"host_count,omitempty"` // The hour for the usage. Hour *time.Time `json:"hour,omitempty"` // The organization name. @@ -46,68 +52,219 @@ func NewUsageCloudSecurityPostureManagementHourWithDefaults() *UsageCloudSecurit return &this } -// GetContainerCount returns the ContainerCount field value if set, zero value otherwise. -func (o *UsageCloudSecurityPostureManagementHour) GetContainerCount() int64 { - if o == nil || o.ContainerCount == nil { - var ret int64 +// GetAasHostCount returns the AasHostCount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UsageCloudSecurityPostureManagementHour) GetAasHostCount() float64 { + if o == nil || o.AasHostCount.Get() == nil { + var ret float64 return ret } - return *o.ContainerCount + return *o.AasHostCount.Get() +} + +// GetAasHostCountOk returns a tuple with the AasHostCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UsageCloudSecurityPostureManagementHour) GetAasHostCountOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.AasHostCount.Get(), o.AasHostCount.IsSet() +} + +// HasAasHostCount returns a boolean if a field has been set. +func (o *UsageCloudSecurityPostureManagementHour) HasAasHostCount() bool { + if o != nil && o.AasHostCount.IsSet() { + return true + } + + return false +} + +// SetAasHostCount gets a reference to the given NullableFloat64 and assigns it to the AasHostCount field. +func (o *UsageCloudSecurityPostureManagementHour) SetAasHostCount(v float64) { + o.AasHostCount.Set(&v) +} + +// SetAasHostCountNil sets the value for AasHostCount to be an explicit nil +func (o *UsageCloudSecurityPostureManagementHour) SetAasHostCountNil() { + o.AasHostCount.Set(nil) +} + +// UnsetAasHostCount ensures that no value is present for AasHostCount, not even an explicit nil +func (o *UsageCloudSecurityPostureManagementHour) UnsetAasHostCount() { + o.AasHostCount.Unset() +} + +// GetAzureHostCount returns the AzureHostCount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UsageCloudSecurityPostureManagementHour) GetAzureHostCount() float64 { + if o == nil || o.AzureHostCount.Get() == nil { + var ret float64 + return ret + } + return *o.AzureHostCount.Get() +} + +// GetAzureHostCountOk returns a tuple with the AzureHostCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UsageCloudSecurityPostureManagementHour) GetAzureHostCountOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.AzureHostCount.Get(), o.AzureHostCount.IsSet() +} + +// HasAzureHostCount returns a boolean if a field has been set. +func (o *UsageCloudSecurityPostureManagementHour) HasAzureHostCount() bool { + if o != nil && o.AzureHostCount.IsSet() { + return true + } + + return false +} + +// SetAzureHostCount gets a reference to the given NullableFloat64 and assigns it to the AzureHostCount field. +func (o *UsageCloudSecurityPostureManagementHour) SetAzureHostCount(v float64) { + o.AzureHostCount.Set(&v) +} + +// SetAzureHostCountNil sets the value for AzureHostCount to be an explicit nil +func (o *UsageCloudSecurityPostureManagementHour) SetAzureHostCountNil() { + o.AzureHostCount.Set(nil) +} + +// UnsetAzureHostCount ensures that no value is present for AzureHostCount, not even an explicit nil +func (o *UsageCloudSecurityPostureManagementHour) UnsetAzureHostCount() { + o.AzureHostCount.Unset() +} + +// GetComplianceHostCount returns the ComplianceHostCount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UsageCloudSecurityPostureManagementHour) GetComplianceHostCount() float64 { + if o == nil || o.ComplianceHostCount.Get() == nil { + var ret float64 + return ret + } + return *o.ComplianceHostCount.Get() +} + +// GetComplianceHostCountOk returns a tuple with the ComplianceHostCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UsageCloudSecurityPostureManagementHour) GetComplianceHostCountOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ComplianceHostCount.Get(), o.ComplianceHostCount.IsSet() +} + +// HasComplianceHostCount returns a boolean if a field has been set. +func (o *UsageCloudSecurityPostureManagementHour) HasComplianceHostCount() bool { + if o != nil && o.ComplianceHostCount.IsSet() { + return true + } + + return false +} + +// SetComplianceHostCount gets a reference to the given NullableFloat64 and assigns it to the ComplianceHostCount field. +func (o *UsageCloudSecurityPostureManagementHour) SetComplianceHostCount(v float64) { + o.ComplianceHostCount.Set(&v) +} + +// SetComplianceHostCountNil sets the value for ComplianceHostCount to be an explicit nil +func (o *UsageCloudSecurityPostureManagementHour) SetComplianceHostCountNil() { + o.ComplianceHostCount.Set(nil) +} + +// UnsetComplianceHostCount ensures that no value is present for ComplianceHostCount, not even an explicit nil +func (o *UsageCloudSecurityPostureManagementHour) UnsetComplianceHostCount() { + o.ComplianceHostCount.Unset() +} + +// GetContainerCount returns the ContainerCount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UsageCloudSecurityPostureManagementHour) GetContainerCount() float64 { + if o == nil || o.ContainerCount.Get() == nil { + var ret float64 + return ret + } + return *o.ContainerCount.Get() } // GetContainerCountOk returns a tuple with the ContainerCount field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UsageCloudSecurityPostureManagementHour) GetContainerCountOk() (*int64, bool) { - if o == nil || o.ContainerCount == nil { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UsageCloudSecurityPostureManagementHour) GetContainerCountOk() (*float64, bool) { + if o == nil { return nil, false } - return o.ContainerCount, true + return o.ContainerCount.Get(), o.ContainerCount.IsSet() } // HasContainerCount returns a boolean if a field has been set. func (o *UsageCloudSecurityPostureManagementHour) HasContainerCount() bool { - if o != nil && o.ContainerCount != nil { + if o != nil && o.ContainerCount.IsSet() { return true } return false } -// SetContainerCount gets a reference to the given int64 and assigns it to the ContainerCount field. -func (o *UsageCloudSecurityPostureManagementHour) SetContainerCount(v int64) { - o.ContainerCount = &v +// SetContainerCount gets a reference to the given NullableFloat64 and assigns it to the ContainerCount field. +func (o *UsageCloudSecurityPostureManagementHour) SetContainerCount(v float64) { + o.ContainerCount.Set(&v) +} + +// SetContainerCountNil sets the value for ContainerCount to be an explicit nil +func (o *UsageCloudSecurityPostureManagementHour) SetContainerCountNil() { + o.ContainerCount.Set(nil) } -// GetHostCount returns the HostCount field value if set, zero value otherwise. -func (o *UsageCloudSecurityPostureManagementHour) GetHostCount() int64 { - if o == nil || o.HostCount == nil { - var ret int64 +// UnsetContainerCount ensures that no value is present for ContainerCount, not even an explicit nil +func (o *UsageCloudSecurityPostureManagementHour) UnsetContainerCount() { + o.ContainerCount.Unset() +} + +// GetHostCount returns the HostCount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UsageCloudSecurityPostureManagementHour) GetHostCount() float64 { + if o == nil || o.HostCount.Get() == nil { + var ret float64 return ret } - return *o.HostCount + return *o.HostCount.Get() } // GetHostCountOk returns a tuple with the HostCount field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UsageCloudSecurityPostureManagementHour) GetHostCountOk() (*int64, bool) { - if o == nil || o.HostCount == nil { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UsageCloudSecurityPostureManagementHour) GetHostCountOk() (*float64, bool) { + if o == nil { return nil, false } - return o.HostCount, true + return o.HostCount.Get(), o.HostCount.IsSet() } // HasHostCount returns a boolean if a field has been set. func (o *UsageCloudSecurityPostureManagementHour) HasHostCount() bool { - if o != nil && o.HostCount != nil { + if o != nil && o.HostCount.IsSet() { return true } return false } -// SetHostCount gets a reference to the given int64 and assigns it to the HostCount field. -func (o *UsageCloudSecurityPostureManagementHour) SetHostCount(v int64) { - o.HostCount = &v +// SetHostCount gets a reference to the given NullableFloat64 and assigns it to the HostCount field. +func (o *UsageCloudSecurityPostureManagementHour) SetHostCount(v float64) { + o.HostCount.Set(&v) +} + +// SetHostCountNil sets the value for HostCount to be an explicit nil +func (o *UsageCloudSecurityPostureManagementHour) SetHostCountNil() { + o.HostCount.Set(nil) +} + +// UnsetHostCount ensures that no value is present for HostCount, not even an explicit nil +func (o *UsageCloudSecurityPostureManagementHour) UnsetHostCount() { + o.HostCount.Unset() } // GetHour returns the Hour field value if set, zero value otherwise. @@ -211,11 +368,20 @@ func (o UsageCloudSecurityPostureManagementHour) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return json.Marshal(o.UnparsedObject) } - if o.ContainerCount != nil { - toSerialize["container_count"] = o.ContainerCount + if o.AasHostCount.IsSet() { + toSerialize["aas_host_count"] = o.AasHostCount.Get() + } + if o.AzureHostCount.IsSet() { + toSerialize["azure_host_count"] = o.AzureHostCount.Get() + } + if o.ComplianceHostCount.IsSet() { + toSerialize["compliance_host_count"] = o.ComplianceHostCount.Get() + } + if o.ContainerCount.IsSet() { + toSerialize["container_count"] = o.ContainerCount.Get() } - if o.HostCount != nil { - toSerialize["host_count"] = o.HostCount + if o.HostCount.IsSet() { + toSerialize["host_count"] = o.HostCount.Get() } if o.Hour != nil { toSerialize["hour"] = o.Hour @@ -232,11 +398,14 @@ func (o UsageCloudSecurityPostureManagementHour) MarshalJSON() ([]byte, error) { func (o *UsageCloudSecurityPostureManagementHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - ContainerCount *int64 `json:"container_count,omitempty"` - HostCount *int64 `json:"host_count,omitempty"` - Hour *time.Time `json:"hour,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` + AasHostCount NullableFloat64 `json:"aas_host_count,omitempty"` + AzureHostCount NullableFloat64 `json:"azure_host_count,omitempty"` + ComplianceHostCount NullableFloat64 `json:"compliance_host_count,omitempty"` + ContainerCount NullableFloat64 `json:"container_count,omitempty"` + HostCount NullableFloat64 `json:"host_count,omitempty"` + Hour *time.Time `json:"hour,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { @@ -247,6 +416,9 @@ func (o *UsageCloudSecurityPostureManagementHour) UnmarshalJSON(bytes []byte) (e o.UnparsedObject = raw return nil } + o.AasHostCount = all.AasHostCount + o.AzureHostCount = all.AzureHostCount + o.ComplianceHostCount = all.ComplianceHostCount o.ContainerCount = all.ContainerCount o.HostCount = all.HostCount o.Hour = all.Hour diff --git a/api/v1/datadog/model_usage_summary_date.go b/api/v1/datadog/model_usage_summary_date.go index 5fc267d2914..d9966a108e4 100644 --- a/api/v1/datadog/model_usage_summary_date.go +++ b/api/v1/datadog/model_usage_summary_date.go @@ -45,6 +45,10 @@ type UsageSummaryDate struct { ContainerAvg *int64 `json:"container_avg,omitempty"` // Shows the high-water mark of all distinct containers over all hours in the current date for all organizations. ContainerHwm *int64 `json:"container_hwm,omitempty"` + // Shows the 99th percentile of all Cloud Security Posture Management Azure app services hosts over all hours in the current date for all organizations. + CspmAasHostTop99p *int64 `json:"cspm_aas_host_top99p,omitempty"` + // Shows the 99th percentile of all Cloud Security Posture Management Azure hosts over all hours in the current date for all organizations. + CspmAzureHostTop99p *int64 `json:"cspm_azure_host_top99p,omitempty"` // Shows the average number of Cloud Security Posture Management containers over all hours in the current date for all organizations. CspmContainerAvg *int64 `json:"cspm_container_avg,omitempty"` // Shows the high-water mark of Cloud Security Posture Management containers over all hours in the current date for all organizations. @@ -626,6 +630,70 @@ func (o *UsageSummaryDate) SetContainerHwm(v int64) { o.ContainerHwm = &v } +// GetCspmAasHostTop99p returns the CspmAasHostTop99p field value if set, zero value otherwise. +func (o *UsageSummaryDate) GetCspmAasHostTop99p() int64 { + if o == nil || o.CspmAasHostTop99p == nil { + var ret int64 + return ret + } + return *o.CspmAasHostTop99p +} + +// GetCspmAasHostTop99pOk returns a tuple with the CspmAasHostTop99p field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryDate) GetCspmAasHostTop99pOk() (*int64, bool) { + if o == nil || o.CspmAasHostTop99p == nil { + return nil, false + } + return o.CspmAasHostTop99p, true +} + +// HasCspmAasHostTop99p returns a boolean if a field has been set. +func (o *UsageSummaryDate) HasCspmAasHostTop99p() bool { + if o != nil && o.CspmAasHostTop99p != nil { + return true + } + + return false +} + +// SetCspmAasHostTop99p gets a reference to the given int64 and assigns it to the CspmAasHostTop99p field. +func (o *UsageSummaryDate) SetCspmAasHostTop99p(v int64) { + o.CspmAasHostTop99p = &v +} + +// GetCspmAzureHostTop99p returns the CspmAzureHostTop99p field value if set, zero value otherwise. +func (o *UsageSummaryDate) GetCspmAzureHostTop99p() int64 { + if o == nil || o.CspmAzureHostTop99p == nil { + var ret int64 + return ret + } + return *o.CspmAzureHostTop99p +} + +// GetCspmAzureHostTop99pOk returns a tuple with the CspmAzureHostTop99p field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryDate) GetCspmAzureHostTop99pOk() (*int64, bool) { + if o == nil || o.CspmAzureHostTop99p == nil { + return nil, false + } + return o.CspmAzureHostTop99p, true +} + +// HasCspmAzureHostTop99p returns a boolean if a field has been set. +func (o *UsageSummaryDate) HasCspmAzureHostTop99p() bool { + if o != nil && o.CspmAzureHostTop99p != nil { + return true + } + + return false +} + +// SetCspmAzureHostTop99p gets a reference to the given int64 and assigns it to the CspmAzureHostTop99p field. +func (o *UsageSummaryDate) SetCspmAzureHostTop99p(v int64) { + o.CspmAzureHostTop99p = &v +} + // GetCspmContainerAvg returns the CspmContainerAvg field value if set, zero value otherwise. func (o *UsageSummaryDate) GetCspmContainerAvg() int64 { if o == nil || o.CspmContainerAvg == nil { @@ -1956,6 +2024,12 @@ func (o UsageSummaryDate) MarshalJSON() ([]byte, error) { if o.ContainerHwm != nil { toSerialize["container_hwm"] = o.ContainerHwm } + if o.CspmAasHostTop99p != nil { + toSerialize["cspm_aas_host_top99p"] = o.CspmAasHostTop99p + } + if o.CspmAzureHostTop99p != nil { + toSerialize["cspm_azure_host_top99p"] = o.CspmAzureHostTop99p + } if o.CspmContainerAvg != nil { toSerialize["cspm_container_avg"] = o.CspmContainerAvg } @@ -2097,6 +2171,8 @@ func (o *UsageSummaryDate) UnmarshalJSON(bytes []byte) (err error) { BrowserRumUnitsSum *int64 `json:"browser_rum_units_sum,omitempty"` ContainerAvg *int64 `json:"container_avg,omitempty"` ContainerHwm *int64 `json:"container_hwm,omitempty"` + CspmAasHostTop99p *int64 `json:"cspm_aas_host_top99p,omitempty"` + CspmAzureHostTop99p *int64 `json:"cspm_azure_host_top99p,omitempty"` CspmContainerAvg *int64 `json:"cspm_container_avg,omitempty"` CspmContainerHwm *int64 `json:"cspm_container_hwm,omitempty"` CspmHostTop99p *int64 `json:"cspm_host_top99p,omitempty"` @@ -2162,6 +2238,8 @@ func (o *UsageSummaryDate) UnmarshalJSON(bytes []byte) (err error) { o.BrowserRumUnitsSum = all.BrowserRumUnitsSum o.ContainerAvg = all.ContainerAvg o.ContainerHwm = all.ContainerHwm + o.CspmAasHostTop99p = all.CspmAasHostTop99p + o.CspmAzureHostTop99p = all.CspmAzureHostTop99p o.CspmContainerAvg = all.CspmContainerAvg o.CspmContainerHwm = all.CspmContainerHwm o.CspmHostTop99p = all.CspmHostTop99p diff --git a/api/v1/datadog/model_usage_summary_date_org.go b/api/v1/datadog/model_usage_summary_date_org.go index 37d424be54b..80bfb3b9c64 100644 --- a/api/v1/datadog/model_usage_summary_date_org.go +++ b/api/v1/datadog/model_usage_summary_date_org.go @@ -44,6 +44,10 @@ type UsageSummaryDateOrg struct { ContainerAvg *int64 `json:"container_avg,omitempty"` // Shows the high-water mark of all distinct containers over all hours in the current date for the given org. ContainerHwm *int64 `json:"container_hwm,omitempty"` + // Shows the 99th percentile of all Cloud Security Posture Management Azure app services hosts over all hours in the current date for the given org. + CspmAasHostTop99p *int64 `json:"cspm_aas_host_top99p,omitempty"` + // Shows the 99th percentile of all Cloud Security Posture Management Azure hosts over all hours in the current date for the given org. + CspmAzureHostTop99p *int64 `json:"cspm_azure_host_top99p,omitempty"` // Shows the average number of Cloud Security Posture Management containers over all hours in the current date for the given org. CspmContainerAvg *int64 `json:"cspm_container_avg,omitempty"` // Shows the high-water mark of Cloud Security Posture Management containers over all hours in the current date for the given org. @@ -627,6 +631,70 @@ func (o *UsageSummaryDateOrg) SetContainerHwm(v int64) { o.ContainerHwm = &v } +// GetCspmAasHostTop99p returns the CspmAasHostTop99p field value if set, zero value otherwise. +func (o *UsageSummaryDateOrg) GetCspmAasHostTop99p() int64 { + if o == nil || o.CspmAasHostTop99p == nil { + var ret int64 + return ret + } + return *o.CspmAasHostTop99p +} + +// GetCspmAasHostTop99pOk returns a tuple with the CspmAasHostTop99p field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryDateOrg) GetCspmAasHostTop99pOk() (*int64, bool) { + if o == nil || o.CspmAasHostTop99p == nil { + return nil, false + } + return o.CspmAasHostTop99p, true +} + +// HasCspmAasHostTop99p returns a boolean if a field has been set. +func (o *UsageSummaryDateOrg) HasCspmAasHostTop99p() bool { + if o != nil && o.CspmAasHostTop99p != nil { + return true + } + + return false +} + +// SetCspmAasHostTop99p gets a reference to the given int64 and assigns it to the CspmAasHostTop99p field. +func (o *UsageSummaryDateOrg) SetCspmAasHostTop99p(v int64) { + o.CspmAasHostTop99p = &v +} + +// GetCspmAzureHostTop99p returns the CspmAzureHostTop99p field value if set, zero value otherwise. +func (o *UsageSummaryDateOrg) GetCspmAzureHostTop99p() int64 { + if o == nil || o.CspmAzureHostTop99p == nil { + var ret int64 + return ret + } + return *o.CspmAzureHostTop99p +} + +// GetCspmAzureHostTop99pOk returns a tuple with the CspmAzureHostTop99p field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryDateOrg) GetCspmAzureHostTop99pOk() (*int64, bool) { + if o == nil || o.CspmAzureHostTop99p == nil { + return nil, false + } + return o.CspmAzureHostTop99p, true +} + +// HasCspmAzureHostTop99p returns a boolean if a field has been set. +func (o *UsageSummaryDateOrg) HasCspmAzureHostTop99p() bool { + if o != nil && o.CspmAzureHostTop99p != nil { + return true + } + + return false +} + +// SetCspmAzureHostTop99p gets a reference to the given int64 and assigns it to the CspmAzureHostTop99p field. +func (o *UsageSummaryDateOrg) SetCspmAzureHostTop99p(v int64) { + o.CspmAzureHostTop99p = &v +} + // GetCspmContainerAvg returns the CspmContainerAvg field value if set, zero value otherwise. func (o *UsageSummaryDateOrg) GetCspmContainerAvg() int64 { if o == nil || o.CspmContainerAvg == nil { @@ -1989,6 +2057,12 @@ func (o UsageSummaryDateOrg) MarshalJSON() ([]byte, error) { if o.ContainerHwm != nil { toSerialize["container_hwm"] = o.ContainerHwm } + if o.CspmAasHostTop99p != nil { + toSerialize["cspm_aas_host_top99p"] = o.CspmAasHostTop99p + } + if o.CspmAzureHostTop99p != nil { + toSerialize["cspm_azure_host_top99p"] = o.CspmAzureHostTop99p + } if o.CspmContainerAvg != nil { toSerialize["cspm_container_avg"] = o.CspmContainerAvg } @@ -2133,6 +2207,8 @@ func (o *UsageSummaryDateOrg) UnmarshalJSON(bytes []byte) (err error) { BrowserRumUnitsSum *int64 `json:"browser_rum_units_sum,omitempty"` ContainerAvg *int64 `json:"container_avg,omitempty"` ContainerHwm *int64 `json:"container_hwm,omitempty"` + CspmAasHostTop99p *int64 `json:"cspm_aas_host_top99p,omitempty"` + CspmAzureHostTop99p *int64 `json:"cspm_azure_host_top99p,omitempty"` CspmContainerAvg *int64 `json:"cspm_container_avg,omitempty"` CspmContainerHwm *int64 `json:"cspm_container_hwm,omitempty"` CspmHostTop99p *int64 `json:"cspm_host_top99p,omitempty"` @@ -2199,6 +2275,8 @@ func (o *UsageSummaryDateOrg) UnmarshalJSON(bytes []byte) (err error) { o.BrowserRumUnitsSum = all.BrowserRumUnitsSum o.ContainerAvg = all.ContainerAvg o.ContainerHwm = all.ContainerHwm + o.CspmAasHostTop99p = all.CspmAasHostTop99p + o.CspmAzureHostTop99p = all.CspmAzureHostTop99p o.CspmContainerAvg = all.CspmContainerAvg o.CspmContainerHwm = all.CspmContainerHwm o.CspmHostTop99p = all.CspmHostTop99p diff --git a/api/v1/datadog/model_usage_summary_response.go b/api/v1/datadog/model_usage_summary_response.go index ac2e3b2de2d..59c9f3bad6c 100644 --- a/api/v1/datadog/model_usage_summary_response.go +++ b/api/v1/datadog/model_usage_summary_response.go @@ -47,6 +47,10 @@ type UsageSummaryResponse struct { ContainerAvgSum *int64 `json:"container_avg_sum,omitempty"` // Shows the sum of the high-water marks of all distinct containers over all hours in the current months for all organizations. ContainerHwmSum *int64 `json:"container_hwm_sum,omitempty"` + // Shows the 99th percentile of all Cloud Security Posture Management Azure app services hosts over all hours in the current months for all organizations. + CspmAasHostTop99pSum *int64 `json:"cspm_aas_host_top99p_sum,omitempty"` + // Shows the 99th percentile of all Cloud Security Posture Management Azure hosts over all hours in the current months for all organizations. + CspmAzureHostTop99pSum *int64 `json:"cspm_azure_host_top99p_sum,omitempty"` // Shows the average number of Cloud Security Posture Management containers over all hours in the current months for all organizations. CspmContainerAvgSum *int64 `json:"cspm_container_avg_sum,omitempty"` // Shows the sum of the the high-water marks of Cloud Security Posture Management containers over all hours in the current months for all organizations. @@ -675,6 +679,70 @@ func (o *UsageSummaryResponse) SetContainerHwmSum(v int64) { o.ContainerHwmSum = &v } +// GetCspmAasHostTop99pSum returns the CspmAasHostTop99pSum field value if set, zero value otherwise. +func (o *UsageSummaryResponse) GetCspmAasHostTop99pSum() int64 { + if o == nil || o.CspmAasHostTop99pSum == nil { + var ret int64 + return ret + } + return *o.CspmAasHostTop99pSum +} + +// GetCspmAasHostTop99pSumOk returns a tuple with the CspmAasHostTop99pSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryResponse) GetCspmAasHostTop99pSumOk() (*int64, bool) { + if o == nil || o.CspmAasHostTop99pSum == nil { + return nil, false + } + return o.CspmAasHostTop99pSum, true +} + +// HasCspmAasHostTop99pSum returns a boolean if a field has been set. +func (o *UsageSummaryResponse) HasCspmAasHostTop99pSum() bool { + if o != nil && o.CspmAasHostTop99pSum != nil { + return true + } + + return false +} + +// SetCspmAasHostTop99pSum gets a reference to the given int64 and assigns it to the CspmAasHostTop99pSum field. +func (o *UsageSummaryResponse) SetCspmAasHostTop99pSum(v int64) { + o.CspmAasHostTop99pSum = &v +} + +// GetCspmAzureHostTop99pSum returns the CspmAzureHostTop99pSum field value if set, zero value otherwise. +func (o *UsageSummaryResponse) GetCspmAzureHostTop99pSum() int64 { + if o == nil || o.CspmAzureHostTop99pSum == nil { + var ret int64 + return ret + } + return *o.CspmAzureHostTop99pSum +} + +// GetCspmAzureHostTop99pSumOk returns a tuple with the CspmAzureHostTop99pSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryResponse) GetCspmAzureHostTop99pSumOk() (*int64, bool) { + if o == nil || o.CspmAzureHostTop99pSum == nil { + return nil, false + } + return o.CspmAzureHostTop99pSum, true +} + +// HasCspmAzureHostTop99pSum returns a boolean if a field has been set. +func (o *UsageSummaryResponse) HasCspmAzureHostTop99pSum() bool { + if o != nil && o.CspmAzureHostTop99pSum != nil { + return true + } + + return false +} + +// SetCspmAzureHostTop99pSum gets a reference to the given int64 and assigns it to the CspmAzureHostTop99pSum field. +func (o *UsageSummaryResponse) SetCspmAzureHostTop99pSum(v int64) { + o.CspmAzureHostTop99pSum = &v +} + // GetCspmContainerAvgSum returns the CspmContainerAvgSum field value if set, zero value otherwise. func (o *UsageSummaryResponse) GetCspmContainerAvgSum() int64 { if o == nil || o.CspmContainerAvgSum == nil { @@ -2264,6 +2332,12 @@ func (o UsageSummaryResponse) MarshalJSON() ([]byte, error) { if o.ContainerHwmSum != nil { toSerialize["container_hwm_sum"] = o.ContainerHwmSum } + if o.CspmAasHostTop99pSum != nil { + toSerialize["cspm_aas_host_top99p_sum"] = o.CspmAasHostTop99pSum + } + if o.CspmAzureHostTop99pSum != nil { + toSerialize["cspm_azure_host_top99p_sum"] = o.CspmAzureHostTop99pSum + } if o.CspmContainerAvgSum != nil { toSerialize["cspm_container_avg_sum"] = o.CspmContainerAvgSum } @@ -2430,6 +2504,8 @@ func (o *UsageSummaryResponse) UnmarshalJSON(bytes []byte) (err error) { BrowserRumUnitsAggSum *int64 `json:"browser_rum_units_agg_sum,omitempty"` ContainerAvgSum *int64 `json:"container_avg_sum,omitempty"` ContainerHwmSum *int64 `json:"container_hwm_sum,omitempty"` + CspmAasHostTop99pSum *int64 `json:"cspm_aas_host_top99p_sum,omitempty"` + CspmAzureHostTop99pSum *int64 `json:"cspm_azure_host_top99p_sum,omitempty"` CspmContainerAvgSum *int64 `json:"cspm_container_avg_sum,omitempty"` CspmContainerHwmSum *int64 `json:"cspm_container_hwm_sum,omitempty"` CspmHostTop99pSum *int64 `json:"cspm_host_top99p_sum,omitempty"` @@ -2504,6 +2580,8 @@ func (o *UsageSummaryResponse) UnmarshalJSON(bytes []byte) (err error) { o.BrowserRumUnitsAggSum = all.BrowserRumUnitsAggSum o.ContainerAvgSum = all.ContainerAvgSum o.ContainerHwmSum = all.ContainerHwmSum + o.CspmAasHostTop99pSum = all.CspmAasHostTop99pSum + o.CspmAzureHostTop99pSum = all.CspmAzureHostTop99pSum o.CspmContainerAvgSum = all.CspmContainerAvgSum o.CspmContainerHwmSum = all.CspmContainerHwmSum o.CspmHostTop99pSum = all.CspmHostTop99pSum diff --git a/examples/v1/usage-metering/GetUsageCloudSecurityPostureManagement.go b/examples/v1/usage-metering/GetUsageCloudSecurityPostureManagement.go new file mode 100644 index 00000000000..7bef0d5076b --- /dev/null +++ b/examples/v1/usage-metering/GetUsageCloudSecurityPostureManagement.go @@ -0,0 +1,28 @@ +// Get hourly usage for CSPM returns "OK" response + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.UsageMeteringApi.GetUsageCloudSecurityPostureManagement(ctx, time.Now().AddDate(0, 0, -3), *datadog.NewGetUsageCloudSecurityPostureManagementOptionalParameters()) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsageMeteringApi.GetUsageCloudSecurityPostureManagement`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `UsageMeteringApi.GetUsageCloudSecurityPostureManagement`:\n%s\n", responseContent) +} diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_CSPM_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_CSPM_returns_OK_response.freeze new file mode 100644 index 00000000000..405cd604872 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_CSPM_returns_OK_response.freeze @@ -0,0 +1 @@ +2022-01-21T12:03:20.978Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_CSPM_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_CSPM_returns_OK_response.yaml new file mode 100644 index 00000000000..755ec58c821 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Usage_Metering/Scenario_Get_hourly_usage_for_CSPM_returns_OK_response.yaml @@ -0,0 +1,41 @@ +interactions: +- request: + body: '' + form: {} + headers: + Accept: + - application/json;datetime-format=rfc3339 + method: GET + url: https://api.datadoghq.com/api/v1/usage/cspm?start_hr=2022-01-18T12%3A03%3A20.978Z + response: + body: '{"usage":[{"host_count":null,"org_name":"DD Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-18T12:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-18T13:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-18T14:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-18T15:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-18T16:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-18T17:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-18T18:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-18T19:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-18T20:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-18T21:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-18T22:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-18T23:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-19T00:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-19T01:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-19T02:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-19T03:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-19T04:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-19T05:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-19T06:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-19T07:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-19T08:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-19T09:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-19T10:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"},{"host_count":null,"org_name":"DD + Integration Tests (321813)","container_count":null,"aas_host_count":null,"hour":"2022-01-19T11:00:00+00:00","compliance_host_count":null,"azure_host_count":null,"public_id":"fasjyydbcgwwc2uc"}]}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/features/v1/logs.feature b/tests/scenarios/features/v1/logs.feature index d860b2fd3de..daebcc54868 100644 --- a/tests/scenarios/features/v1/logs.feature +++ b/tests/scenarios/features/v1/logs.feature @@ -22,7 +22,7 @@ Feature: Logs When the request is sent Then the response status is 200 OK - @integration-only @skip-validation @skip-terraform-config @team:DataDog/logs-intake + @integration-only @skip-terraform-config @skip-validation @team:DataDog/logs-intake Scenario: Send deflate logs returns "Response from server (always 200 empty JSON)." response Given new "SubmitLog" request And body with value [{"message": "{{ unique }}", "ddtags": "host:{{ unique_alnum }}"}] @@ -30,7 +30,7 @@ Feature: Logs When the request is sent Then the response status is 200 Response from server (always 200 empty JSON). - @integration-only @skip-validation @skip-terraform-config @team:DataDog/logs-intake + @integration-only @skip-terraform-config @skip-validation @team:DataDog/logs-intake Scenario: Send gzip logs returns "Response from server (always 200 empty JSON)." response Given new "SubmitLog" request And body with value [{"message": "{{ unique }}", "ddtags": "host:{{ unique_alnum }}"}] diff --git a/tests/scenarios/features/v1/usage_metering.feature b/tests/scenarios/features/v1/usage_metering.feature index f2482516332..b3c229d6bd4 100644 --- a/tests/scenarios/features/v1/usage_metering.feature +++ b/tests/scenarios/features/v1/usage_metering.feature @@ -103,9 +103,10 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for CSPM returns "OK" response Given new "GetUsageCloudSecurityPostureManagement" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK