Skip to content
Open
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
42 changes: 38 additions & 4 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91507,6 +91507,10 @@ components:
properties:
attributes:
$ref: "#/components/schemas/SecurityMonitoringRuleBulkDeleteAttributes"
id:
description: Request ID. This value is echoed back as the response's resource ID.
example: bulk_delete
type: string
type:
$ref: "#/components/schemas/SecurityMonitoringRuleBulkDeleteRequestDataType"
required:
Expand All @@ -91531,6 +91535,12 @@ components:
- BULK_DELETE_RULES
SecurityMonitoringRuleBulkDeleteResponse:
description: Response for bulk deleting security monitoring rules.
properties:
data:
$ref: "#/components/schemas/SecurityMonitoringRuleBulkDeleteResponseData"
type: object
SecurityMonitoringRuleBulkDeleteResponseAttributes:
description: Attributes for the bulk delete response.
properties:
deletedRules:
description: List of successfully deleted rule IDs.
Expand All @@ -91543,6 +91553,25 @@ components:
type: string
type: array
type: object
SecurityMonitoringRuleBulkDeleteResponseData:
description: Data for the bulk delete response.
properties:
attributes:
$ref: "#/components/schemas/SecurityMonitoringRuleBulkDeleteResponseAttributes"
id:
description: The identifier of the bulk delete response.
type: string
type:
$ref: "#/components/schemas/SecurityMonitoringRuleBulkDeleteResponseDataType"
type: object
SecurityMonitoringRuleBulkDeleteResponseDataType:
description: The resource type for a bulk delete response.
enum:
- bulk_delete_response
example: bulk_delete_response
type: string
x-enum-varnames:
- BULK_DELETE_RESPONSE
SecurityMonitoringRuleBulkExportAttributes:
description: Attributes for bulk exporting security monitoring rules.
properties:
Expand Down Expand Up @@ -185417,6 +185446,7 @@ paths:
ruleIds:
- abc-000-u7q
- abc-000-7dd
id: bulk_delete
type: bulk_delete_rules
schema:
$ref: "#/components/schemas/SecurityMonitoringRuleBulkDeletePayload"
Expand All @@ -185428,10 +185458,14 @@ paths:
examples:
default:
value:
deletedRules:
- abc-000-u7q
- abc-000-7dd
failedRules: []
data:
attributes:
deletedRules:
- abc-000-u7q
- abc-000-7dd
failedRules: []
id: bulk_delete_response
type: bulk_delete_response
schema:
$ref: "#/components/schemas/SecurityMonitoringRuleBulkDeleteResponse"
description: OK
Expand Down
21 changes: 21 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39036,6 +39036,27 @@ datadog\_api\_client.v2.model.security\_monitoring\_rule\_bulk\_delete\_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.security\_monitoring\_rule\_bulk\_delete\_response\_attributes module
---------------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.security_monitoring_rule_bulk_delete_response_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.security\_monitoring\_rule\_bulk\_delete\_response\_data module
---------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.security_monitoring_rule_bulk_delete_response_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.security\_monitoring\_rule\_bulk\_delete\_response\_data\_type module
---------------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.security_monitoring_rule_bulk_delete_response_data_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.security\_monitoring\_rule\_bulk\_export\_attributes module
-----------------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"abc-000-7dd",
],
),
id="bulk_delete",
type=SecurityMonitoringRuleBulkDeleteRequestDataType.BULK_DELETE_RULES,
),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import TYPE_CHECKING
from typing import Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
)


Expand All @@ -32,18 +34,21 @@ def openapi_types(_):

return {
"attributes": (SecurityMonitoringRuleBulkDeleteAttributes,),
"id": (str,),
"type": (SecurityMonitoringRuleBulkDeleteRequestDataType,),
}

attribute_map = {
"attributes": "attributes",
"id": "id",
"type": "type",
}

def __init__(
self_,
attributes: SecurityMonitoringRuleBulkDeleteAttributes,
type: SecurityMonitoringRuleBulkDeleteRequestDataType,
id: Union[str, UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -52,9 +57,14 @@ def __init__(
:param attributes: Attributes for bulk deleting security monitoring rules.
:type attributes: SecurityMonitoringRuleBulkDeleteAttributes

:param id: Request ID. This value is echoed back as the response's resource ID.
:type id: str, optional

:param type: The resource type for a bulk delete request.
:type type: SecurityMonitoringRuleBulkDeleteRequestDataType
"""
if id is not unset:
kwargs["id"] = id
super().__init__(kwargs)

self_.attributes = attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import List, Union
from typing import Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
Expand All @@ -13,36 +13,34 @@
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.security_monitoring_rule_bulk_delete_response_data import (
SecurityMonitoringRuleBulkDeleteResponseData,
)


class SecurityMonitoringRuleBulkDeleteResponse(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.security_monitoring_rule_bulk_delete_response_data import (
SecurityMonitoringRuleBulkDeleteResponseData,
)

return {
"deleted_rules": ([str],),
"failed_rules": ([str],),
"data": (SecurityMonitoringRuleBulkDeleteResponseData,),
}

attribute_map = {
"deleted_rules": "deletedRules",
"failed_rules": "failedRules",
"data": "data",
}

def __init__(
self_,
deleted_rules: Union[List[str], UnsetType] = unset,
failed_rules: Union[List[str], UnsetType] = unset,
**kwargs,
):
def __init__(self_, data: Union[SecurityMonitoringRuleBulkDeleteResponseData, UnsetType] = unset, **kwargs):
"""
Response for bulk deleting security monitoring rules.

:param deleted_rules: List of successfully deleted rule IDs.
:type deleted_rules: [str], optional

:param failed_rules: List of rule IDs that could not be deleted.
:type failed_rules: [str], optional
:param data: Data for the bulk delete response.
:type data: SecurityMonitoringRuleBulkDeleteResponseData, optional
"""
if deleted_rules is not unset:
kwargs["deleted_rules"] = deleted_rules
if failed_rules is not unset:
kwargs["failed_rules"] = failed_rules
if data is not unset:
kwargs["data"] = data
super().__init__(kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import List, Union

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
)


class SecurityMonitoringRuleBulkDeleteResponseAttributes(ModelNormal):
@cached_property
def openapi_types(_):
return {
"deleted_rules": ([str],),
"failed_rules": ([str],),
}

attribute_map = {
"deleted_rules": "deletedRules",
"failed_rules": "failedRules",
}

def __init__(
self_,
deleted_rules: Union[List[str], UnsetType] = unset,
failed_rules: Union[List[str], UnsetType] = unset,
**kwargs,
):
"""
Attributes for the bulk delete response.

:param deleted_rules: List of successfully deleted rule IDs.
:type deleted_rules: [str], optional

:param failed_rules: List of rule IDs that could not be deleted.
:type failed_rules: [str], optional
"""
if deleted_rules is not unset:
kwargs["deleted_rules"] = deleted_rules
if failed_rules is not unset:
kwargs["failed_rules"] = failed_rules
super().__init__(kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.security_monitoring_rule_bulk_delete_response_attributes import (
SecurityMonitoringRuleBulkDeleteResponseAttributes,
)
from datadog_api_client.v2.model.security_monitoring_rule_bulk_delete_response_data_type import (
SecurityMonitoringRuleBulkDeleteResponseDataType,
)


class SecurityMonitoringRuleBulkDeleteResponseData(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.security_monitoring_rule_bulk_delete_response_attributes import (
SecurityMonitoringRuleBulkDeleteResponseAttributes,
)
from datadog_api_client.v2.model.security_monitoring_rule_bulk_delete_response_data_type import (
SecurityMonitoringRuleBulkDeleteResponseDataType,
)

return {
"attributes": (SecurityMonitoringRuleBulkDeleteResponseAttributes,),
"id": (str,),
"type": (SecurityMonitoringRuleBulkDeleteResponseDataType,),
}

attribute_map = {
"attributes": "attributes",
"id": "id",
"type": "type",
}

def __init__(
self_,
attributes: Union[SecurityMonitoringRuleBulkDeleteResponseAttributes, UnsetType] = unset,
id: Union[str, UnsetType] = unset,
type: Union[SecurityMonitoringRuleBulkDeleteResponseDataType, UnsetType] = unset,
**kwargs,
):
"""
Data for the bulk delete response.

:param attributes: Attributes for the bulk delete response.
:type attributes: SecurityMonitoringRuleBulkDeleteResponseAttributes, optional

:param id: The identifier of the bulk delete response.
:type id: str, optional

:param type: The resource type for a bulk delete response.
:type type: SecurityMonitoringRuleBulkDeleteResponseDataType, optional
"""
if attributes is not unset:
kwargs["attributes"] = attributes
if id is not unset:
kwargs["id"] = id
if type is not unset:
kwargs["type"] = type
super().__init__(kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations


from datadog_api_client.model_utils import (
ModelSimple,
cached_property,
)

from typing import ClassVar


class SecurityMonitoringRuleBulkDeleteResponseDataType(ModelSimple):
"""
The resource type for a bulk delete response.

:param value: If omitted defaults to "bulk_delete_response". Must be one of ["bulk_delete_response"].
:type value: str
"""

allowed_values = {
"bulk_delete_response",
}
BULK_DELETE_RESPONSE: ClassVar["SecurityMonitoringRuleBulkDeleteResponseDataType"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


SecurityMonitoringRuleBulkDeleteResponseDataType.BULK_DELETE_RESPONSE = (
SecurityMonitoringRuleBulkDeleteResponseDataType("bulk_delete_response")
)
Loading
Loading