Skip to content

Exposing set action on Terraform #2826

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:18.459381",
"spec_repo_commit": "64f5e7ee"
"regenerated": "2025-05-15 12:25:22.896480",
"spec_repo_commit": "7d24e85a"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-05-14 15:44:18.474808",
"spec_repo_commit": "64f5e7ee"
"regenerated": "2025-05-15 12:25:22.917353",
"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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
/** The action the rule can perform if triggered */
@JsonPropertyOrder({
CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_FILTER,
CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_KILL
CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_KILL,
CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_METADATA,
CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_SET
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All @@ -31,6 +33,12 @@ public class CloudWorkloadSecurityAgentRuleAction {
public static final String JSON_PROPERTY_KILL = "kill";
private CloudWorkloadSecurityAgentRuleKill kill;

public static final String JSON_PROPERTY_METADATA = "metadata";
private CloudWorkloadSecurityAgentRuleActionMetadata metadata;

public static final String JSON_PROPERTY_SET = "set";
private CloudWorkloadSecurityAgentRuleActionSet set;

public CloudWorkloadSecurityAgentRuleAction filter(String filter) {
this.filter = filter;
return this;
Expand Down Expand Up @@ -74,6 +82,51 @@ public void setKill(CloudWorkloadSecurityAgentRuleKill kill) {
this.kill = kill;
}

public CloudWorkloadSecurityAgentRuleAction metadata(
CloudWorkloadSecurityAgentRuleActionMetadata metadata) {
this.metadata = metadata;
this.unparsed |= metadata.unparsed;
return this;
}

/**
* The metadata action applied on the scope matching the rule
*
* @return metadata
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_METADATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public CloudWorkloadSecurityAgentRuleActionMetadata getMetadata() {
return metadata;
}

public void setMetadata(CloudWorkloadSecurityAgentRuleActionMetadata metadata) {
this.metadata = metadata;
}

public CloudWorkloadSecurityAgentRuleAction set(CloudWorkloadSecurityAgentRuleActionSet set) {
this.set = set;
this.unparsed |= set.unparsed;
return this;
}

/**
* The set action applied on the scope matching the rule
*
* @return set
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SET)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public CloudWorkloadSecurityAgentRuleActionSet getSet() {
return set;
}

public void setSet(CloudWorkloadSecurityAgentRuleActionSet set) {
this.set = set;
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
Expand Down Expand Up @@ -133,13 +186,15 @@ public boolean equals(Object o) {
(CloudWorkloadSecurityAgentRuleAction) o;
return Objects.equals(this.filter, cloudWorkloadSecurityAgentRuleAction.filter)
&& Objects.equals(this.kill, cloudWorkloadSecurityAgentRuleAction.kill)
&& Objects.equals(this.metadata, cloudWorkloadSecurityAgentRuleAction.metadata)
&& Objects.equals(this.set, cloudWorkloadSecurityAgentRuleAction.set)
&& Objects.equals(
this.additionalProperties, cloudWorkloadSecurityAgentRuleAction.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(filter, kill, additionalProperties);
return Objects.hash(filter, kill, metadata, set, additionalProperties);
}

@Override
Expand All @@ -148,6 +203,8 @@ public String toString() {
sb.append("class CloudWorkloadSecurityAgentRuleAction {\n");
sb.append(" filter: ").append(toIndentedString(filter)).append("\n");
sb.append(" kill: ").append(toIndentedString(kill)).append("\n");
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
sb.append(" set: ").append(toIndentedString(set)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
Loading
Loading