Skip to content

Add missing fields hasExtendedTitle, type, version and updateAuthorId for Security Monitoring Rule endpoints #483

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

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.4.1.dev8",
"regenerated": "2021-06-14 19:16:27.013245",
"spec_repo_commit": "0664044"
"regenerated": "2021-06-15 11:56:42.149205",
"spec_repo_commit": "92478ee"
},
"v2": {
"apigentools_version": "1.4.1.dev8",
"regenerated": "2021-06-14 19:16:47.726417",
"spec_repo_commit": "0664044"
"regenerated": "2021-06-15 11:57:08.179104",
"spec_repo_commit": "92478ee"
}
}
}
7 changes: 5 additions & 2 deletions docs/v2/SecurityMonitoringApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,10 @@ with ApiClient(configuration) as api_client:
query="query_example",
),
],
has_extended_title=True,
is_enabled=True,
message="",
name="",
name="My security monitoring rule.",
options=SecurityMonitoringRuleOptions(
detection_method=SecurityMonitoringRuleDetectionMethod("threshold"),
evaluation_window=SecurityMonitoringRuleEvaluationWindow(0),
Expand All @@ -172,7 +173,7 @@ with ApiClient(configuration) as api_client:
],
metric="metric_example",
name="name_example",
query="a < 3",
query="a > 3",
),
],
tags=["env:prod","team:security"],
Expand Down Expand Up @@ -900,6 +901,7 @@ with ApiClient(configuration) as api_client:
query="query_example",
),
],
has_extended_title=True,
is_enabled=True,
message="message_example",
name="name_example",
Expand Down Expand Up @@ -934,6 +936,7 @@ with ApiClient(configuration) as api_client:
tags=[
"tags_example",
],
version=1,
) # SecurityMonitoringRuleUpdatePayload |

# example passing only required values which don't have defaults set
Expand Down
2 changes: 1 addition & 1 deletion docs/v2/SecurityMonitoringListRulesResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ List of rules.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**[SecurityMonitoringRuleResponse]**](SecurityMonitoringRuleResponse.md) | TODO. | [optional]
**data** | [**[SecurityMonitoringRuleResponse]**](SecurityMonitoringRuleResponse.md) | Array containing the list of rules. | [optional]
**meta** | [**ResponseMetaAttributes**](ResponseMetaAttributes.md) | | [optional]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
Expand Down
1 change: 1 addition & 0 deletions docs/v2/SecurityMonitoringRuleCreatePayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**options** | [**SecurityMonitoringRuleOptions**](SecurityMonitoringRuleOptions.md) | |
**queries** | [**[SecurityMonitoringRuleQueryCreate]**](SecurityMonitoringRuleQueryCreate.md) | Queries for selecting logs which are part of the rule. |
**filters** | [**[SecurityMonitoringFilter]**](SecurityMonitoringFilter.md) | Additional queries to filter matched events before they are processed. | [optional]
**has_extended_title** | **bool** | Whether the notifications include the triggering group-by values in their title. | [optional]
**tags** | **[str]** | Tags for generated signals. | [optional]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
Expand Down
4 changes: 3 additions & 1 deletion docs/v2/SecurityMonitoringRuleResponse.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SecurityMonitoringRuleResponse

Detection rule.
Rule.

## Properties
Name | Type | Description | Notes
Expand All @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**created_at** | **int** | When the rule was created, timestamp in milliseconds. | [optional]
**creation_author_id** | **int** | User ID of the user who created the rule. | [optional]
**filters** | [**[SecurityMonitoringFilter]**](SecurityMonitoringFilter.md) | Additional queries to filter matched events before they are processed. | [optional]
**has_extended_title** | **bool** | Whether the notifications include the triggering group-by values in their title. | [optional]
**id** | **str** | The ID of the rule. | [optional]
**is_default** | **bool** | Whether the rule is included by default. | [optional]
**is_deleted** | **bool** | Whether the rule has been deleted. | [optional]
Expand All @@ -18,6 +19,7 @@ Name | Type | Description | Notes
**options** | [**SecurityMonitoringRuleOptions**](SecurityMonitoringRuleOptions.md) | | [optional]
**queries** | [**[SecurityMonitoringRuleQuery]**](SecurityMonitoringRuleQuery.md) | Queries for selecting logs which are part of the rule. | [optional]
**tags** | **[str]** | Tags for generated signals. | [optional]
**update_author_id** | **int** | User ID of the user who updated the rule. | [optional]
**version** | **int** | The version of the rule. | [optional]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/v2/SecurityMonitoringRuleUpdatePayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cases** | [**[SecurityMonitoringRuleCase]**](SecurityMonitoringRuleCase.md) | Cases for generating signals. | [optional]
**filters** | [**[SecurityMonitoringFilter]**](SecurityMonitoringFilter.md) | Additional queries to filter matched events before they are processed. | [optional]
**has_extended_title** | **bool** | Whether the notifications include the triggering group-by values in their title. | [optional]
**is_enabled** | **bool** | Whether the rule is enabled. | [optional]
**message** | **str** | Message for generated signals. | [optional]
**name** | **str** | Name of the rule. | [optional]
**options** | [**SecurityMonitoringRuleOptions**](SecurityMonitoringRuleOptions.md) | | [optional]
**queries** | [**[SecurityMonitoringRuleQuery]**](SecurityMonitoringRuleQuery.md) | Queries for selecting logs which are part of the rule. | [optional]
**tags** | **[str]** | Tags for generated signals. | [optional]
**version** | **int** | The version of the rule being updated. | [optional]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
data ([SecurityMonitoringRuleResponse]): TODO.. [optional] # noqa: E501
data ([SecurityMonitoringRuleResponse]): Array containing the list of rules.. [optional] # noqa: E501
meta (ResponseMetaAttributes): [optional] # noqa: E501
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def openapi_types():
"options": (SecurityMonitoringRuleOptions,), # noqa: E501
"queries": ([SecurityMonitoringRuleQueryCreate],), # noqa: E501
"filters": ([SecurityMonitoringFilter],), # noqa: E501
"has_extended_title": (bool,), # noqa: E501
"tags": ([str],), # noqa: E501
}

Expand All @@ -100,6 +101,7 @@ def discriminator():
"options": "options", # noqa: E501
"queries": "queries", # noqa: E501
"filters": "filters", # noqa: E501
"has_extended_title": "hasExtendedTitle", # noqa: E501
"tags": "tags", # noqa: E501
}

Expand Down Expand Up @@ -160,6 +162,7 @@ def __init__(self, cases, is_enabled, message, name, options, queries, *args, **
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
filters ([SecurityMonitoringFilter]): Additional queries to filter matched events before they are processed.. [optional] # noqa: E501
has_extended_title (bool): Whether the notifications include the triggering group-by values in their title.. [optional] # noqa: E501
tags ([str]): Tags for generated signals.. [optional] # noqa: E501
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def openapi_types():
"created_at": (int,), # noqa: E501
"creation_author_id": (int,), # noqa: E501
"filters": ([SecurityMonitoringFilter],), # noqa: E501
"has_extended_title": (bool,), # noqa: E501
"id": (str,), # noqa: E501
"is_default": (bool,), # noqa: E501
"is_deleted": (bool,), # noqa: E501
Expand All @@ -91,6 +92,7 @@ def openapi_types():
"options": (SecurityMonitoringRuleOptions,), # noqa: E501
"queries": ([SecurityMonitoringRuleQuery],), # noqa: E501
"tags": ([str],), # noqa: E501
"update_author_id": (int,), # noqa: E501
"version": (int,), # noqa: E501
}

Expand All @@ -103,6 +105,7 @@ def discriminator():
"created_at": "createdAt", # noqa: E501
"creation_author_id": "creationAuthorId", # noqa: E501
"filters": "filters", # noqa: E501
"has_extended_title": "hasExtendedTitle", # noqa: E501
"id": "id", # noqa: E501
"is_default": "isDefault", # noqa: E501
"is_deleted": "isDeleted", # noqa: E501
Expand All @@ -112,6 +115,7 @@ def discriminator():
"options": "options", # noqa: E501
"queries": "queries", # noqa: E501
"tags": "tags", # noqa: E501
"update_author_id": "updateAuthorId", # noqa: E501
"version": "version", # noqa: E501
}

Expand Down Expand Up @@ -167,6 +171,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
created_at (int): When the rule was created, timestamp in milliseconds.. [optional] # noqa: E501
creation_author_id (int): User ID of the user who created the rule.. [optional] # noqa: E501
filters ([SecurityMonitoringFilter]): Additional queries to filter matched events before they are processed.. [optional] # noqa: E501
has_extended_title (bool): Whether the notifications include the triggering group-by values in their title.. [optional] # noqa: E501
id (str): The ID of the rule.. [optional] # noqa: E501
is_default (bool): Whether the rule is included by default.. [optional] # noqa: E501
is_deleted (bool): Whether the rule has been deleted.. [optional] # noqa: E501
Expand All @@ -176,6 +181,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
options (SecurityMonitoringRuleOptions): [optional] # noqa: E501
queries ([SecurityMonitoringRuleQuery]): Queries for selecting logs which are part of the rule.. [optional] # noqa: E501
tags ([str]): Tags for generated signals.. [optional] # noqa: E501
update_author_id (int): User ID of the user who updated the rule.. [optional] # noqa: E501
version (int): The version of the rule.. [optional] # noqa: E501
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ class SecurityMonitoringRuleUpdatePayload(ModelNormal):

allowed_values = {}

validations = {}
validations = {
("version",): {
"inclusive_maximum": 2147483647,
},
}

additional_properties_type = None

Expand All @@ -80,12 +84,14 @@ def openapi_types():
return {
"cases": ([SecurityMonitoringRuleCase],), # noqa: E501
"filters": ([SecurityMonitoringFilter],), # noqa: E501
"has_extended_title": (bool,), # noqa: E501
"is_enabled": (bool,), # noqa: E501
"message": (str,), # noqa: E501
"name": (str,), # noqa: E501
"options": (SecurityMonitoringRuleOptions,), # noqa: E501
"queries": ([SecurityMonitoringRuleQuery],), # noqa: E501
"tags": ([str],), # noqa: E501
"version": (int,), # noqa: E501
}

@cached_property
Expand All @@ -95,12 +101,14 @@ def discriminator():
attribute_map = {
"cases": "cases", # noqa: E501
"filters": "filters", # noqa: E501
"has_extended_title": "hasExtendedTitle", # noqa: E501
"is_enabled": "isEnabled", # noqa: E501
"message": "message", # noqa: E501
"name": "name", # noqa: E501
"options": "options", # noqa: E501
"queries": "queries", # noqa: E501
"tags": "tags", # noqa: E501
"version": "version", # noqa: E501
}

_composed_schemas = {}
Expand Down Expand Up @@ -153,12 +161,14 @@ def __init__(self, *args, **kwargs): # noqa: E501
_visited_composed_classes = (Animal,)
cases ([SecurityMonitoringRuleCase]): Cases for generating signals.. [optional] # noqa: E501
filters ([SecurityMonitoringFilter]): Additional queries to filter matched events before they are processed.. [optional] # noqa: E501
has_extended_title (bool): Whether the notifications include the triggering group-by values in their title.. [optional] # noqa: E501
is_enabled (bool): Whether the rule is enabled.. [optional] # noqa: E501
message (str): Message for generated signals.. [optional] # noqa: E501
name (str): Name of the rule.. [optional] # noqa: E501
options (SecurityMonitoringRuleOptions): [optional] # noqa: E501
queries ([SecurityMonitoringRuleQuery]): Queries for selecting logs which are part of the rule.. [optional] # noqa: E501
tags ([str]): Tags for generated signals.. [optional] # noqa: E501
version (int): The version of the rule being updated.. [optional] # noqa: E501
"""

_check_type = kwargs.pop("_check_type", True)
Expand Down
32 changes: 28 additions & 4 deletions src/datadog_api_client/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4145,7 +4145,7 @@ components:
description: List of rules.
properties:
data:
description: TODO.
description: Array containing the list of rules.
items:
$ref: '#/components/schemas/SecurityMonitoringRuleResponse'
type: array
Expand Down Expand Up @@ -4211,6 +4211,11 @@ components:
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
Expand All @@ -4221,7 +4226,7 @@ components:
type: string
name:
description: The name of the rule.
example: ''
example: My security monitoring rule.
type: string
options:
$ref: '#/components/schemas/SecurityMonitoringRuleOptions'
Expand Down Expand Up @@ -4474,13 +4479,13 @@ components:
type: string
query:
description: Query to run on logs.
example: a < 3
example: a > 3
type: string
required:
- query
type: object
SecurityMonitoringRuleResponse:
description: Detection rule.
description: Rule.
properties:
cases:
description: Cases for generating signals.
Expand All @@ -4501,6 +4506,10 @@ components:
items:
$ref: '#/components/schemas/SecurityMonitoringFilter'
type: array
hasExtendedTitle:
description: Whether the notifications include the triggering group-by values
in their title.
type: boolean
id:
description: The ID of the rule.
type: string
Expand Down Expand Up @@ -4532,6 +4541,10 @@ components:
description: Tag.
type: string
type: array
updateAuthorId:
description: User ID of the user who updated the rule.
format: int64
type: integer
version:
description: The version of the rule.
format: int64
Expand Down Expand Up @@ -4565,6 +4578,11 @@ components:
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.
type: boolean
Expand All @@ -4587,6 +4605,12 @@ components:
description: Tag.
type: string
type: array
version:
description: The version of the rule being updated.
example: 1
format: int32
maximum: 2147483647
type: integer
type: object
SecurityMonitoringRuntimeAgentRule:
description: The Agent rule.
Expand Down
Loading