Skip to content

Commit

Permalink
Regenerate client from commit 95bc8aae of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Sep 19, 2022
1 parent 565ce9d commit e8fceb6
Show file tree
Hide file tree
Showing 22 changed files with 2,310 additions and 444 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-09-16 08:46:36.930376",
"spec_repo_commit": "f1faacea"
"regenerated": "2022-09-19 10:55:48.421109",
"spec_repo_commit": "95bc8aae"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2022-09-16 08:46:36.947672",
"spec_repo_commit": "f1faacea"
"regenerated": "2022-09-19 10:55:48.433811",
"spec_repo_commit": "95bc8aae"
}
}
}
199 changes: 177 additions & 22 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7050,6 +7050,15 @@ components:
- options
- cases
- message
- type
type: object
SecurityMonitoringRuleCreatePayloadCommon:
description: Create a new rule.
discriminator:
propertyName: type
oneOf:
- $ref: '#/components/schemas/SecurityMonitoringRuleCreatePayload'
- $ref: '#/components/schemas/SecurityMonitoringSignalCorrelationRuleCreatePayload'
type: object
SecurityMonitoringRuleDecreaseCriticalityBasedOnEnv:
description: 'If true, signals in non-production environments have a lower severity
Expand Down Expand Up @@ -7273,6 +7282,31 @@ components:
$ref: '#/components/schemas/SecurityMonitoringRuleNewValueOptions'
type: object
SecurityMonitoringRuleQuery:
description: Query for matching rule.
oneOf:
- $ref: '#/components/schemas/SecurityMonitoringRuleQueryStandard'
- $ref: '#/components/schemas/SecurityMonitoringRuleQuerySignal'
type: object
SecurityMonitoringRuleQueryAggregation:
description: The aggregation type.
enum:
- count
- cardinality
- sum
- max
- new_value
- geo_data
- event_count
type: string
x-enum-varnames:
- COUNT
- CARDINALITY
- SUM
- MAX
- NEW_VALUE
- GEO_DATA
- EVENT_COUNT
SecurityMonitoringRuleQueryCreate:
description: Query for matching rule.
properties:
aggregation:
Expand Down Expand Up @@ -7306,26 +7340,81 @@ components:
type: string
query:
description: Query to run on logs.
example: a > 3
type: string
required:
- query
type: object
SecurityMonitoringRuleQueryAggregation:
description: The aggregation type.
enum:
- count
- cardinality
- sum
- max
- new_value
- geo_data
type: string
x-enum-varnames:
- COUNT
- CARDINALITY
- SUM
- MAX
- NEW_VALUE
- GEO_DATA
SecurityMonitoringRuleQueryCreate:
SecurityMonitoringRuleQuerySignal:
description: Query for matching rule on signals
properties:
aggregation:
$ref: '#/components/schemas/SecurityMonitoringRuleQueryAggregation'
correlatedByFields:
description: Fields to group by.
items:
description: Field.
type: string
type: array
correlatedQueryIndex:
description: Index of the rule query used to retrieve the correlated field.
type: integer
metric:
description: 'The target field to aggregate over when using the sum or max
aggregations.'
type: string
metrics:
description: Group of target fields to aggregate over when using the new
value aggregations.
items:
description: Field.
type: string
type: array
name:
description: Name of the query.
type: string
ruleId:
description: RuleId to match on signals.
type: string
type: object
SecurityMonitoringRuleQuerySignalCreate:
description: Query for matching rule on signals
properties:
aggregation:
$ref: '#/components/schemas/SecurityMonitoringRuleQueryAggregation'
correlatedByFields:
description: Fields to group by.
items:
description: Field.
type: string
type: array
correlatedQueryIndex:
description: Index of the rule query used to retrieve the correlated field.
type: integer
metric:
description: 'The target field to aggregate over when using the sum or max
aggregations.'
type: string
metrics:
description: Group of target fields to aggregate over when using the new
value aggregations.
items:
description: Field.
type: string
type: array
name:
description: Name of the query.
type: string
ruleId:
description: RuleId to match on signals.
example: d3f-ru1-e1d
type: string
required:
- ruleId
type: object
SecurityMonitoringRuleQueryStandard:
description: Query for matching rule.
properties:
aggregation:
Expand Down Expand Up @@ -7359,10 +7448,7 @@ components:
type: string
query:
description: Query to run on logs.
example: a > 3
type: string
required:
- query
type: object
SecurityMonitoringRuleResponse:
description: Rule.
Expand Down Expand Up @@ -7460,12 +7546,14 @@ components:
description: The rule type.
enum:
- log_detection
- signal_correlation
- infrastructure_configuration
- workload_security
- cloud_configuration
type: string
x-enum-varnames:
- LOG_DETECTION
- SIGNAL_CORRELATION
- INFRASTRUCTURE_CONFIGURATION
- WORKLOAD_SECURITY
- CLOUD_CONFIGURATION
Expand Down Expand Up @@ -7609,6 +7697,73 @@ components:
format: date-time
type: string
type: object
SecurityMonitoringSignalCorrelationRuleCreatePayload:
description: Create a new signal correlation rule.
properties:
cases:
description: Cases for generating signals.
example: []
items:
$ref: '#/components/schemas/SecurityMonitoringRuleCaseCreate'
type: array
filters:
description: Additional queries to filter matched events before they are
processed.
items:
$ref: '#/components/schemas/SecurityMonitoringFilter'
type: array
hasExtendedTitle:
description: Whether the notifications include the triggering group-by values
in their title.
example: true
type: boolean
isEnabled:
description: Whether the rule is enabled.
example: true
type: boolean
message:
description: Message for generated signals.
example: ''
type: string
name:
description: The name of the rule.
example: My security monitoring rule.
type: string
options:
$ref: '#/components/schemas/SecurityMonitoringRuleOptions'
queries:
description: Queries for selecting logs which are part of the rule.
example: []
items:
$ref: '#/components/schemas/SecurityMonitoringRuleQuerySignalCreate'
type: array
tags:
description: Tags for generated signals.
example:
- env:prod
- team:security
items:
description: Tag.
type: string
type: array
type:
$ref: '#/components/schemas/SecurityMonitoringSignalCorrelationRuleTypeCreate'
required:
- name
- isEnabled
- queries
- options
- cases
- message
- type
type: object
SecurityMonitoringSignalCorrelationRuleTypeCreate:
description: The rule type.
enum:
- signal_correlation
type: string
x-enum-varnames:
- SIGNAL_CORRELATION
SecurityMonitoringSignalIncidentIds:
description: Array of incidents that are associated with this signal.
items:
Expand Down Expand Up @@ -12625,7 +12780,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/SecurityMonitoringRuleCreatePayload'
$ref: '#/components/schemas/SecurityMonitoringRuleCreatePayloadCommon'
required: true
responses:
'200':
Expand Down
6 changes: 3 additions & 3 deletions api/datadogV2/api_security_monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ func (a *SecurityMonitoringApi) createSecurityFilterExecute(r apiCreateSecurityF

type apiCreateSecurityMonitoringRuleRequest struct {
ctx _context.Context
body *SecurityMonitoringRuleCreatePayload
body *SecurityMonitoringRuleCreatePayloadCommon
}

func (a *SecurityMonitoringApi) buildCreateSecurityMonitoringRuleRequest(ctx _context.Context, body SecurityMonitoringRuleCreatePayload) (apiCreateSecurityMonitoringRuleRequest, error) {
func (a *SecurityMonitoringApi) buildCreateSecurityMonitoringRuleRequest(ctx _context.Context, body SecurityMonitoringRuleCreatePayloadCommon) (apiCreateSecurityMonitoringRuleRequest, error) {
req := apiCreateSecurityMonitoringRuleRequest{
ctx: ctx,
body: &body,
Expand All @@ -161,7 +161,7 @@ func (a *SecurityMonitoringApi) buildCreateSecurityMonitoringRuleRequest(ctx _co

// CreateSecurityMonitoringRule Create a detection rule.
// Create a detection rule.
func (a *SecurityMonitoringApi) CreateSecurityMonitoringRule(ctx _context.Context, body SecurityMonitoringRuleCreatePayload) (SecurityMonitoringRuleResponse, *_nethttp.Response, error) {
func (a *SecurityMonitoringApi) CreateSecurityMonitoringRule(ctx _context.Context, body SecurityMonitoringRuleCreatePayloadCommon) (SecurityMonitoringRuleResponse, *_nethttp.Response, error) {
req, err := a.buildCreateSecurityMonitoringRuleRequest(ctx, body)
if err != nil {
var localVarReturnValue SecurityMonitoringRuleResponse
Expand Down
Loading

0 comments on commit e8fceb6

Please sign in to comment.