Skip to content

Exposing set action on Terraform #2533

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
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.6",
"regenerated": "2025-05-14 15:44:27.314895",
"spec_repo_commit": "64f5e7ee"
"regenerated": "2025-05-15 12:25:35.310202",
"spec_repo_commit": "7d24e85a"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-05-14 15:44:27.373827",
"spec_repo_commit": "64f5e7ee"
"regenerated": "2025-05-15 12:25:35.359129",
"spec_repo_commit": "7d24e85a"
}
}
}
89 changes: 89 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7469,6 +7469,50 @@ components:
type: string
kill:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleKill'
metadata:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActionMetadata'
set:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActionSet'
type: object
CloudWorkloadSecurityAgentRuleActionMetadata:
description: The metadata action applied on the scope matching the rule
properties:
image_tag:
description: The image tag of the metadata action
type: string
service:
description: The service of the metadata action
type: string
short_image:
description: The short image of the metadata action
type: string
type: object
CloudWorkloadSecurityAgentRuleActionSet:
description: The set action applied on the scope matching the rule
properties:
append:
description: Whether the value should be appended to the field
type: boolean
field:
description: The field of the set action
type: string
name:
description: The name of the set action
type: string
scope:
description: The scope of the set action
type: string
size:
description: The size of the set action
format: int64
type: integer
ttl:
description: The time to live of the set action
format: int64
type: integer
value:
description: The value of the set action
type: string
type: object
CloudWorkloadSecurityAgentRuleActions:
description: The array of actions the rule can perform if triggered
Expand All @@ -7484,6 +7528,11 @@ components:
agentConstraint:
description: The version of the Agent
type: string
blocking:
description: The blocking policies that the rule belongs to
items:
type: string
type: array
category:
description: The category of the Agent rule
example: Process Activity
Expand All @@ -7507,6 +7556,11 @@ components:
description: The description of the Agent rule
example: My Agent rule
type: string
disabled:
description: The disabled policies that the rule belongs to
items:
type: string
type: array
enabled:
description: Whether the Agent rule is enabled
example: true
Expand All @@ -7520,6 +7574,11 @@ components:
items:
type: string
type: array
monitoring:
description: The monitoring policies that the rule belongs to
items:
type: string
type: array
name:
description: The name of the Agent rule
example: my_agent_rule
Expand Down Expand Up @@ -7554,10 +7613,20 @@ components:
CloudWorkloadSecurityAgentRuleCreateAttributes:
description: Create a new Cloud Workload Security Agent rule.
properties:
blocking:
description: The blocking policies that the rule belongs to
items:
type: string
type: array
description:
description: The description of the Agent rule.
example: My Agent rule
type: string
disabled:
description: The disabled policies that the rule belongs to
items:
type: string
type: array
enabled:
description: Whether the Agent rule is enabled
example: true
Expand All @@ -7571,6 +7640,11 @@ components:
items:
type: string
type: array
monitoring:
description: The monitoring policies that the rule belongs to
items:
type: string
type: array
name:
description: The name of the Agent rule.
example: my_agent_rule
Expand Down Expand Up @@ -7661,10 +7735,20 @@ components:
CloudWorkloadSecurityAgentRuleUpdateAttributes:
description: Update an existing Cloud Workload Security Agent rule
properties:
blocking:
description: The blocking policies that the rule belongs to
items:
type: string
type: array
description:
description: The description of the Agent rule
example: My Agent rule
type: string
disabled:
description: The disabled policies that the rule belongs to
items:
type: string
type: array
enabled:
description: Whether the Agent rule is enabled
example: true
Expand All @@ -7673,6 +7757,11 @@ components:
description: The SECL expression of the Agent rule
example: exec.file.name == "sh"
type: string
monitoring:
description: The monitoring policies that the rule belongs to
items:
type: string
type: array
policy_id:
description: The ID of the policy where the Agent rule is saved
example: a8c8e364-6556-434d-b798-a4c23de29c0b
Expand Down
14 changes: 14 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2839,6 +2839,20 @@ datadog\_api\_client.v2.model.cloud\_workload\_security\_agent\_rule\_action mod
:members:
:show-inheritance:

datadog\_api\_client.v2.model.cloud\_workload\_security\_agent\_rule\_action\_metadata module
---------------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.cloud\_workload\_security\_agent\_rule\_action\_set module
----------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.cloud\_workload\_security\_agent\_rule\_attributes module
---------------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@

if TYPE_CHECKING:
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_kill import CloudWorkloadSecurityAgentRuleKill
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_metadata import (
CloudWorkloadSecurityAgentRuleActionMetadata,
)
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_set import (
CloudWorkloadSecurityAgentRuleActionSet,
)


class CloudWorkloadSecurityAgentRuleAction(ModelNormal):
Expand All @@ -23,21 +29,33 @@ def openapi_types(_):
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_kill import (
CloudWorkloadSecurityAgentRuleKill,
)
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_metadata import (
CloudWorkloadSecurityAgentRuleActionMetadata,
)
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_set import (
CloudWorkloadSecurityAgentRuleActionSet,
)

return {
"filter": (str,),
"kill": (CloudWorkloadSecurityAgentRuleKill,),
"metadata": (CloudWorkloadSecurityAgentRuleActionMetadata,),
"set": (CloudWorkloadSecurityAgentRuleActionSet,),
}

attribute_map = {
"filter": "filter",
"kill": "kill",
"metadata": "metadata",
"set": "set",
}

def __init__(
self_,
filter: Union[str, UnsetType] = unset,
kill: Union[CloudWorkloadSecurityAgentRuleKill, UnsetType] = unset,
metadata: Union[CloudWorkloadSecurityAgentRuleActionMetadata, UnsetType] = unset,
set: Union[CloudWorkloadSecurityAgentRuleActionSet, UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -48,9 +66,19 @@ def __init__(

:param kill: Kill system call applied on the container matching the rule
:type kill: CloudWorkloadSecurityAgentRuleKill, optional

:param metadata: The metadata action applied on the scope matching the rule
:type metadata: CloudWorkloadSecurityAgentRuleActionMetadata, optional

:param set: The set action applied on the scope matching the rule
:type set: CloudWorkloadSecurityAgentRuleActionSet, optional
"""
if filter is not unset:
kwargs["filter"] = filter
if kill is not unset:
kwargs["kill"] = kill
if metadata is not unset:
kwargs["metadata"] = metadata
if set is not unset:
kwargs["set"] = set
super().__init__(kwargs)
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 CloudWorkloadSecurityAgentRuleActionMetadata(ModelNormal):
@cached_property
def openapi_types(_):
return {
"image_tag": (str,),
"service": (str,),
"short_image": (str,),
}

attribute_map = {
"image_tag": "image_tag",
"service": "service",
"short_image": "short_image",
}

def __init__(
self_,
image_tag: Union[str, UnsetType] = unset,
service: Union[str, UnsetType] = unset,
short_image: Union[str, UnsetType] = unset,
**kwargs,
):
"""
The metadata action applied on the scope matching the rule

:param image_tag: The image tag of the metadata action
:type image_tag: str, optional

:param service: The service of the metadata action
:type service: str, optional

:param short_image: The short image of the metadata action
:type short_image: str, optional
"""
if image_tag is not unset:
kwargs["image_tag"] = image_tag
if service is not unset:
kwargs["service"] = service
if short_image is not unset:
kwargs["short_image"] = short_image
super().__init__(kwargs)
Loading
Loading