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
50 changes: 47 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126140,6 +126140,41 @@ components:
- type
- attributes
type: object
SecurityMonitoringBatchMigrationPublishError:
description: The reason why the resource could not be published.
properties:
code:
description: The error code returned on rule creation.
example: InvalidArgument
type: string
details:
description: The rule validation errors returned on rule creation.
items:
$ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishErrorDetail"
type: array
message:
description: The error message.
example: Invalid rule configuration
type: string
required:
- message
type: object
SecurityMonitoringBatchMigrationPublishErrorDetail:
description: A rule validation error.
properties:
code:
description: The error code.
example: AlreadyExists
type: string
message:
description: The error message.
example: Rule name must be unique
type: string
target:
description: The rule field the error applies to.
example: name
type: string
type: object
SecurityMonitoringBatchMigrationPublishRequest:
description: Request to publish the resources of a batch migration.
properties:
Expand Down Expand Up @@ -126183,9 +126218,7 @@ components:
description: Attributes of the publication outcome of a batch migration resource.
properties:
error:
description: The reason why the resource could not be published.
example: failed to create rule
type: string
$ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishError"
ruleId:
description: The ID of the created Cloud SIEM detection rule.
example: abc-def-ghi
Expand Down Expand Up @@ -249749,6 +249782,17 @@ paths:
status: published
id: c968cf83-56c2-4d54-a993-6c86dfb83527
type: batchMigrationPublishedResource
- attributes:
error:
code: InvalidArgument
details:
- code: AlreadyExists
message: Rule name must be unique
target: name
message: Invalid rule configuration
status: failed
id: 0b9d3f3e-2a4c-4e8b-9f1a-6d2c7e5b8a41
type: batchMigrationPublishedResource
schema:
$ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishResponse"
description: OK
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 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, 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_batch_migration_publish_error_detail import (
SecurityMonitoringBatchMigrationPublishErrorDetail,
)


class SecurityMonitoringBatchMigrationPublishError(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.security_monitoring_batch_migration_publish_error_detail import (
SecurityMonitoringBatchMigrationPublishErrorDetail,
)

return {
"code": (str,),
"details": ([SecurityMonitoringBatchMigrationPublishErrorDetail],),
"message": (str,),
}

attribute_map = {
"code": "code",
"details": "details",
"message": "message",
}

def __init__(
self_,
message: str,
code: Union[str, UnsetType] = unset,
details: Union[List[SecurityMonitoringBatchMigrationPublishErrorDetail], UnsetType] = unset,
**kwargs,
):
"""
The reason why the resource could not be published.

:param code: The error code returned on rule creation.
:type code: str, optional

:param details: The rule validation errors returned on rule creation.
:type details: [SecurityMonitoringBatchMigrationPublishErrorDetail], optional

:param message: The error message.
:type message: str
"""
if code is not unset:
kwargs["code"] = code
if details is not unset:
kwargs["details"] = details
super().__init__(kwargs)

self_.message = message
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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

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


class SecurityMonitoringBatchMigrationPublishErrorDetail(ModelNormal):
@cached_property
def openapi_types(_):
return {
"code": (str,),
"message": (str,),
"target": (str,),
}

attribute_map = {
"code": "code",
"message": "message",
"target": "target",
}

def __init__(
self_,
code: Union[str, UnsetType] = unset,
message: Union[str, UnsetType] = unset,
target: Union[str, UnsetType] = unset,
**kwargs,
):
"""
A rule validation error.

:param code: The error code.
:type code: str, optional

:param message: The error message.
:type message: str, optional

:param target: The rule field the error applies to.
:type target: str, optional
"""
if code is not unset:
kwargs["code"] = code
if message is not unset:
kwargs["message"] = message
if target is not unset:
kwargs["target"] = target
super().__init__(kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@


if TYPE_CHECKING:
from datadog_api_client.v2.model.security_monitoring_batch_migration_publish_error import (
SecurityMonitoringBatchMigrationPublishError,
)
from datadog_api_client.v2.model.security_monitoring_batch_migration_published_resource_status import (
SecurityMonitoringBatchMigrationPublishedResourceStatus,
)
Expand All @@ -22,12 +25,15 @@
class SecurityMonitoringBatchMigrationPublishedResourceAttributes(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.security_monitoring_batch_migration_publish_error import (
SecurityMonitoringBatchMigrationPublishError,
)
from datadog_api_client.v2.model.security_monitoring_batch_migration_published_resource_status import (
SecurityMonitoringBatchMigrationPublishedResourceStatus,
)

return {
"error": (str,),
"error": (SecurityMonitoringBatchMigrationPublishError,),
"rule_id": (str,),
"status": (SecurityMonitoringBatchMigrationPublishedResourceStatus,),
}
Expand All @@ -41,15 +47,15 @@ def openapi_types(_):
def __init__(
self_,
status: SecurityMonitoringBatchMigrationPublishedResourceStatus,
error: Union[str, UnsetType] = unset,
error: Union[SecurityMonitoringBatchMigrationPublishError, UnsetType] = unset,
rule_id: Union[str, UnsetType] = unset,
**kwargs,
):
"""
Attributes of the publication outcome of a batch migration resource.

:param error: The reason why the resource could not be published.
:type error: str, optional
:type error: SecurityMonitoringBatchMigrationPublishError, optional

:param rule_id: The ID of the created Cloud SIEM detection rule.
:type rule_id: str, optional
Expand Down
8 changes: 8 additions & 0 deletions src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10828,6 +10828,12 @@
from datadog_api_client.v2.model.security_monitoring_batch_migration_publish_data import (
SecurityMonitoringBatchMigrationPublishData,
)
from datadog_api_client.v2.model.security_monitoring_batch_migration_publish_error import (
SecurityMonitoringBatchMigrationPublishError,
)
from datadog_api_client.v2.model.security_monitoring_batch_migration_publish_error_detail import (
SecurityMonitoringBatchMigrationPublishErrorDetail,
)
from datadog_api_client.v2.model.security_monitoring_batch_migration_publish_request import (
SecurityMonitoringBatchMigrationPublishRequest,
)
Expand Down Expand Up @@ -21385,6 +21391,8 @@
"SecurityMonitoringBatchMigrationListMeta",
"SecurityMonitoringBatchMigrationPublishAttributes",
"SecurityMonitoringBatchMigrationPublishData",
"SecurityMonitoringBatchMigrationPublishError",
"SecurityMonitoringBatchMigrationPublishErrorDetail",
"SecurityMonitoringBatchMigrationPublishRequest",
"SecurityMonitoringBatchMigrationPublishResponse",
"SecurityMonitoringBatchMigrationPublishType",
Expand Down
Loading