Skip to content

Commit

Permalink
Regenerate client from commit 1ef2d5fc of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Dec 14, 2022
1 parent 1f5a987 commit 6bb9b83
Show file tree
Hide file tree
Showing 26 changed files with 1,840 additions and 70 deletions.
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": "2022-12-13 20:14:53.242276",
"spec_repo_commit": "cb07e37b"
"regenerated": "2022-12-14 12:52:34.630004",
"spec_repo_commit": "1ef2d5fc"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2022-12-13 20:14:53.259631",
"spec_repo_commit": "cb07e37b"
"regenerated": "2022-12-14 12:52:34.641536",
"spec_repo_commit": "1ef2d5fc"
}
}
}
4 changes: 0 additions & 4 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6155,10 +6155,6 @@ components:
enable_logs_sample:
description: Whether or not to send a log sample when the log monitor triggers.
type: boolean
enable_samples:
description: Whether or not to send a list of samples when the monitor triggers.
This is only used by CI Test and Pipeline monitors.
type: boolean
escalation_message:
default: none
description: 'We recommend using the [is_renotify](https://docs.datadoghq.com/monitors/notify/?tab=is_alert#renotify),
Expand Down
149 changes: 149 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1761,6 +1761,148 @@ components:
example: infra_host
type: string
type: object
CloudConfigurationComplianceRuleOptions:
description: Options for cloud_configuration rules.
properties:
complexRule:
description: 'Whether the rule is a complex one.

Must be set to true if `regoRule.resourceTypes` contains more than one
item. Defaults to false.

'
type: boolean
regoRule:
$ref: '#/components/schemas/CloudConfigurationRegoRule'
required:
- regoRule
type: object
CloudConfigurationRegoRule:
description: Rule details.
properties:
policy:
description: 'The policy written in `rego`, see: https://www.openpolicyagent.org/docs/latest/policy-language/'
example: "package datadog\n\nimport data.datadog.output as dd_output\nimport
future.keywords.contains\nimport future.keywords.if\nimport future.keywords.in\n\neval(resource)
= \"skip\" if {\n # Logic that evaluates to true if the resource should
be skipped\n true\n} else = \"pass\" {\n # Logic that evaluates to true
if the resource is compliant\n true\n} else = \"fail\" {\n # Logic that
evaluates to true if the resource is not compliant\n true\n}\n\n# This
part remains unchanged for all rules\nresults contains result if {\n some
resource in input.resources[input.main_resource_type]\n result := dd_output.format(resource,
eval(resource))\n}\n"
type: string
resourceTypes:
description: List of resource types that will be evaluated upon. Must have
at least one element.
example:
- gcp_iam_service_account
- gcp_iam_policy
items:
type: string
type: array
required:
- policy
- resourceTypes
type: object
CloudConfigurationRuleCaseCreate:
description: Description of signals.
properties:
notifications:
description: Notification targets for each rule case.
items:
description: Notification.
type: string
type: array
status:
$ref: '#/components/schemas/SecurityMonitoringRuleSeverity'
required:
- status
type: object
CloudConfigurationRuleComplianceSignalOptions:
description: How to generate compliance signals. Useful for cloud_configuration
rules only.
properties:
userActivationStatus:
description: Whether signals will be sent.
type: boolean
userGroupByFields:
description: Fields to use to group findings by when sending signals.
items:
type: string
type: array
type: object
CloudConfigurationRuleCreatePayload:
description: Create a new cloud configuration rule.
properties:
cases:
description: 'Description of generated findings and signals (severity and
channels to be notified in case of a signal). Must contain exactly one
item.

'
items:
$ref: '#/components/schemas/CloudConfigurationRuleCaseCreate'
type: array
complianceSignalOptions:
$ref: '#/components/schemas/CloudConfigurationRuleComplianceSignalOptions'
isEnabled:
description: Whether the rule is enabled.
example: true
type: boolean
message:
description: Message in markdown format for generated findings and signals.
example: '#Description

Explanation of the rule.


#Remediation

How to fix the security issue.

'
type: string
name:
description: The name of the rule.
example: My security monitoring rule.
type: string
options:
$ref: '#/components/schemas/CloudConfigurationRuleOptions'
tags:
description: Tags for generated findings and signals.
example:
- env:prod
- team:security
items:
description: Tag.
type: string
type: array
type:
$ref: '#/components/schemas/CloudConfigurationRuleType'
required:
- name
- isEnabled
- options
- complianceSignalOptions
- cases
- message
type: object
CloudConfigurationRuleOptions:
description: Options on cloud configuration rules.
properties:
complianceRuleOptions:
$ref: '#/components/schemas/CloudConfigurationComplianceRuleOptions'
required:
- complianceRuleOptions
type: object
CloudConfigurationRuleType:
description: The rule type.
enum:
- cloud_configuration
type: string
x-enum-varnames:
- CLOUD_CONFIGURATION
CloudWorkloadSecurityAgentRuleAttributes:
description: A Cloud Workload Security Agent rule returned by the API.
properties:
Expand Down Expand Up @@ -8344,6 +8486,7 @@ components:
oneOf:
- $ref: '#/components/schemas/SecurityMonitoringStandardRuleCreatePayload'
- $ref: '#/components/schemas/SecurityMonitoringSignalRuleCreatePayload'
- $ref: '#/components/schemas/CloudConfigurationRuleCreatePayload'
type: object
SecurityMonitoringRuleDecreaseCriticalityBasedOnEnv:
description: 'If true, signals in non-production environments have a lower severity
Expand Down Expand Up @@ -8549,6 +8692,8 @@ components:
SecurityMonitoringRuleOptions:
description: Options on rules.
properties:
complianceRuleOptions:
$ref: '#/components/schemas/CloudConfigurationComplianceRuleOptions'
decreaseCriticalityBasedOnEnv:
$ref: '#/components/schemas/SecurityMonitoringRuleDecreaseCriticalityBasedOnEnv'
detectionMethod:
Expand Down Expand Up @@ -8643,6 +8788,8 @@ components:
items:
$ref: '#/components/schemas/SecurityMonitoringRuleCase'
type: array
complianceSignalOptions:
$ref: '#/components/schemas/CloudConfigurationRuleComplianceSignalOptions'
filters:
description: Additional queries to filter matched events before they are
processed.
Expand Down Expand Up @@ -9323,6 +9470,8 @@ components:
items:
$ref: '#/components/schemas/SecurityMonitoringRuleCase'
type: array
complianceSignalOptions:
$ref: '#/components/schemas/CloudConfigurationRuleComplianceSignalOptions'
createdAt:
description: When the rule was created, timestamp in milliseconds.
format: int64
Expand Down
35 changes: 0 additions & 35 deletions api/datadogV1/model_monitor_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ type MonitorOptions struct {
DeviceIds []MonitorDeviceID `json:"device_ids,omitempty"`
// Whether or not to send a log sample when the log monitor triggers.
EnableLogsSample *bool `json:"enable_logs_sample,omitempty"`
// Whether or not to send a list of samples when the monitor triggers. This is only used by CI Test and Pipeline monitors.
EnableSamples *bool `json:"enable_samples,omitempty"`
// We recommend using the [is_renotify](https://docs.datadoghq.com/monitors/notify/?tab=is_alert#renotify),
// block in the original message instead.
// A message to include with a re-notification. Supports the `@username` notification we allow elsewhere.
Expand Down Expand Up @@ -254,34 +252,6 @@ func (o *MonitorOptions) SetEnableLogsSample(v bool) {
o.EnableLogsSample = &v
}

// GetEnableSamples returns the EnableSamples field value if set, zero value otherwise.
func (o *MonitorOptions) GetEnableSamples() bool {
if o == nil || o.EnableSamples == nil {
var ret bool
return ret
}
return *o.EnableSamples
}

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

// HasEnableSamples returns a boolean if a field has been set.
func (o *MonitorOptions) HasEnableSamples() bool {
return o != nil && o.EnableSamples != nil
}

// SetEnableSamples gets a reference to the given bool and assigns it to the EnableSamples field.
func (o *MonitorOptions) SetEnableSamples(v bool) {
o.EnableSamples = &v
}

// GetEscalationMessage returns the EscalationMessage field value if set, zero value otherwise.
func (o *MonitorOptions) GetEscalationMessage() string {
if o == nil || o.EscalationMessage == nil {
Expand Down Expand Up @@ -1148,9 +1118,6 @@ func (o MonitorOptions) MarshalJSON() ([]byte, error) {
if o.EnableLogsSample != nil {
toSerialize["enable_logs_sample"] = o.EnableLogsSample
}
if o.EnableSamples != nil {
toSerialize["enable_samples"] = o.EnableSamples
}
if o.EscalationMessage != nil {
toSerialize["escalation_message"] = o.EscalationMessage
}
Expand Down Expand Up @@ -1243,7 +1210,6 @@ func (o *MonitorOptions) UnmarshalJSON(bytes []byte) (err error) {
Aggregation *MonitorOptionsAggregation `json:"aggregation,omitempty"`
DeviceIds []MonitorDeviceID `json:"device_ids,omitempty"`
EnableLogsSample *bool `json:"enable_logs_sample,omitempty"`
EnableSamples *bool `json:"enable_samples,omitempty"`
EscalationMessage *string `json:"escalation_message,omitempty"`
EvaluationDelay datadog.NullableInt64 `json:"evaluation_delay,omitempty"`
GroupRetentionDuration *string `json:"group_retention_duration,omitempty"`
Expand Down Expand Up @@ -1298,7 +1264,6 @@ func (o *MonitorOptions) UnmarshalJSON(bytes []byte) (err error) {
o.Aggregation = all.Aggregation
o.DeviceIds = all.DeviceIds
o.EnableLogsSample = all.EnableLogsSample
o.EnableSamples = all.EnableSamples
o.EscalationMessage = all.EscalationMessage
o.EvaluationDelay = all.EvaluationDelay
o.GroupRetentionDuration = all.GroupRetentionDuration
Expand Down
Loading

0 comments on commit 6bb9b83

Please sign in to comment.