diff --git a/.apigentools-info b/.apigentools-info
index 89fe27797f1..b7d231afb87 100644
--- a/.apigentools-info
+++ b/.apigentools-info
@@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
- "regenerated": "2025-04-17 13:26:18.289754",
- "spec_repo_commit": "12ab5180"
+ "regenerated": "2025-04-18 09:52:24.965114",
+ "spec_repo_commit": "5f0a41bc"
},
"v2": {
"apigentools_version": "1.6.6",
- "regenerated": "2025-04-17 13:26:18.308287",
- "spec_repo_commit": "12ab5180"
+ "regenerated": "2025-04-18 09:52:24.981373",
+ "spec_repo_commit": "5f0a41bc"
}
}
}
\ No newline at end of file
diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index a191ada020a..2277752c2b1 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -209,13 +209,29 @@ components:
schema:
type: string
CloudWorkloadSecurityAgentRuleID:
- description: The ID of the Agent rule.
+ description: The ID of the Agent rule
example: 3b5-v82-ns6
in: path
name: agent_rule_id
required: true
schema:
type: string
+ CloudWorkloadSecurityPathAgentPolicyID:
+ description: The ID of the Agent policy
+ example: 6517fcc1-cec7-4394-a655-8d6e9d085255
+ in: path
+ name: policy_id
+ required: true
+ schema:
+ type: string
+ CloudWorkloadSecurityQueryAgentPolicyID:
+ description: The ID of the Agent policy
+ example: 6517fcc1-cec7-4394-a655-8d6e9d085255
+ in: query
+ name: policy_id
+ required: false
+ schema:
+ type: string
ConfluentAccountID:
description: Confluent Account ID.
in: path
@@ -7020,8 +7036,240 @@ components:
type: string
x-enum-varnames:
- CLOUD_CONFIGURATION
+ CloudWorkloadSecurityAgentPoliciesListResponse:
+ description: Response object that includes a list of Agent policies
+ properties:
+ data:
+ description: A list of Agent policy objects
+ items:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyData'
+ type: array
+ type: object
+ CloudWorkloadSecurityAgentPolicyAttributes:
+ description: A Cloud Workload Security Agent policy returned by the API
+ properties:
+ blockingRulesCount:
+ description: The number of rules with the blocking feature in this policy
+ example: 100
+ format: int32
+ maximum: 2147483647
+ type: integer
+ datadogManaged:
+ description: Whether the policy is managed by Datadog
+ example: false
+ type: boolean
+ description:
+ description: The description of the policy
+ example: My agent policy
+ type: string
+ disabledRulesCount:
+ description: The number of rules that are disabled in this policy
+ example: 100
+ format: int32
+ maximum: 2147483647
+ type: integer
+ enabled:
+ description: Whether the Agent policy is enabled
+ example: true
+ type: boolean
+ hostTags:
+ description: The host tags defining where this policy is deployed
+ items:
+ type: string
+ type: array
+ hostTagsLists:
+ description: The host tags defining where this policy is deployed, the inner
+ values are linked with AND, the outer values are linked with OR
+ items:
+ items:
+ type: string
+ type: array
+ type: array
+ monitoringRulesCount:
+ description: The number of rules in the monitoring state in this policy
+ example: 100
+ format: int32
+ maximum: 2147483647
+ type: integer
+ name:
+ description: The name of the policy
+ example: my_agent_policy
+ type: string
+ policyVersion:
+ description: The version of the policy
+ example: '1'
+ type: string
+ priority:
+ description: The priority of the policy
+ example: 10
+ format: int64
+ type: integer
+ ruleCount:
+ description: The number of rules in this policy
+ example: 100
+ format: int32
+ maximum: 2147483647
+ type: integer
+ updateDate:
+ description: Timestamp in milliseconds when the policy was last updated
+ example: 1624366480320
+ format: int64
+ type: integer
+ updatedAt:
+ description: When the policy was last updated, timestamp in milliseconds
+ example: 1624366480320
+ format: int64
+ type: integer
+ updater:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyUpdaterAttributes'
+ type: object
+ CloudWorkloadSecurityAgentPolicyCreateAttributes:
+ description: Create a new Cloud Workload Security Agent policy
+ properties:
+ description:
+ description: The description of the policy
+ example: My agent policy
+ type: string
+ enabled:
+ description: Whether the policy is enabled
+ example: true
+ type: boolean
+ hostTags:
+ description: The host tags defining where this policy is deployed
+ items:
+ type: string
+ type: array
+ hostTagsLists:
+ description: The host tags defining where this policy is deployed, the inner
+ values are linked with AND, the outer values are linked with OR
+ items:
+ items:
+ type: string
+ type: array
+ type: array
+ name:
+ description: The name of the policy
+ example: my_agent_policy
+ type: string
+ required:
+ - name
+ type: object
+ CloudWorkloadSecurityAgentPolicyCreateData:
+ description: Object for a single Agent rule
+ properties:
+ attributes:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyCreateAttributes'
+ type:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyType'
+ required:
+ - attributes
+ - type
+ type: object
+ CloudWorkloadSecurityAgentPolicyCreateRequest:
+ description: Request object that includes the Agent policy to create
+ properties:
+ data:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyCreateData'
+ required:
+ - data
+ type: object
+ CloudWorkloadSecurityAgentPolicyData:
+ description: Object for a single Agent policy
+ properties:
+ attributes:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyAttributes'
+ id:
+ description: The ID of the Agent policy
+ example: 6517fcc1-cec7-4394-a655-8d6e9d085255
+ type: string
+ type:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyType'
+ type: object
+ CloudWorkloadSecurityAgentPolicyID:
+ description: The ID of the Agent policy
+ example: 6517fcc1-cec7-4394-a655-8d6e9d085255
+ type: string
+ CloudWorkloadSecurityAgentPolicyResponse:
+ description: Response object that includes an Agent policy
+ properties:
+ data:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyData'
+ type: object
+ CloudWorkloadSecurityAgentPolicyType:
+ default: policy
+ description: The type of the resource, must always be `policy`
+ enum:
+ - policy
+ example: policy
+ type: string
+ x-enum-varnames:
+ - POLICY
+ CloudWorkloadSecurityAgentPolicyUpdateAttributes:
+ description: Update an existing Cloud Workload Security Agent policy
+ properties:
+ description:
+ description: The description of the policy
+ example: My agent policy
+ type: string
+ enabled:
+ description: Whether the policy is enabled
+ example: true
+ type: boolean
+ hostTags:
+ description: The host tags defining where this policy is deployed
+ items:
+ type: string
+ type: array
+ hostTagsLists:
+ description: The host tags defining where this policy is deployed, the inner
+ values are linked with AND, the outer values are linked with OR
+ items:
+ items:
+ type: string
+ type: array
+ type: array
+ name:
+ description: The name of the policy
+ example: my_agent_policy
+ type: string
+ type: object
+ CloudWorkloadSecurityAgentPolicyUpdateData:
+ description: Object for a single Agent policy
+ properties:
+ attributes:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyUpdateAttributes'
+ id:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyID'
+ type:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyType'
+ required:
+ - attributes
+ - type
+ type: object
+ CloudWorkloadSecurityAgentPolicyUpdateRequest:
+ description: Request object that includes the Agent policy with the attributes
+ to update
+ properties:
+ data:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyUpdateData'
+ required:
+ - data
+ type: object
+ CloudWorkloadSecurityAgentPolicyUpdaterAttributes:
+ description: The attributes of the user who last updated the policy
+ properties:
+ handle:
+ description: The handle of the user
+ example: datadog.user@example.com
+ type: string
+ name:
+ description: The name of the user
+ example: Datadog User
+ nullable: true
+ type: string
+ type: object
CloudWorkloadSecurityAgentRuleAction:
- description: The action the rule can perform if triggered.
+ description: The action the rule can perform if triggered
properties:
filter:
description: SECL expression used to target the container to apply the action
@@ -7031,77 +7279,82 @@ components:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleKill'
type: object
CloudWorkloadSecurityAgentRuleActions:
- description: The array of actions the rule can perform if triggered.
+ description: The array of actions the rule can perform if triggered
items:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleAction'
nullable: true
type: array
CloudWorkloadSecurityAgentRuleAttributes:
- description: A Cloud Workload Security Agent rule returned by the API.
+ description: A Cloud Workload Security Agent rule returned by the API
properties:
actions:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActions'
agentConstraint:
- description: The version of the agent.
+ description: The version of the Agent
type: string
category:
- description: The category of the Agent rule.
+ description: The category of the Agent rule
example: Process Activity
type: string
creationAuthorUuId:
- description: The ID of the user who created the rule.
+ description: The ID of the user who created the rule
example: e51c9744-d158-11ec-ad23-da7ad0900002
type: string
creationDate:
- description: When the Agent rule was created, timestamp in milliseconds.
+ description: When the Agent rule was created, timestamp in milliseconds
example: 1624366480320
format: int64
type: integer
creator:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreatorAttributes'
defaultRule:
- description: Whether the rule is included by default.
+ description: Whether the rule is included by default
example: false
type: boolean
description:
- description: The description of the Agent rule.
+ description: The description of the Agent rule
example: My Agent rule
type: string
enabled:
- description: Whether the Agent rule is enabled.
+ description: Whether the Agent rule is enabled
example: true
type: boolean
expression:
- description: The SECL expression of the Agent rule.
- example: exec.file.name == \"sh\"
+ description: The SECL expression of the Agent rule
+ example: exec.file.name == "sh"
type: string
filters:
- description: The platforms the Agent rule is supported on.
+ description: The platforms the Agent rule is supported on
items:
type: string
type: array
name:
- description: The name of the Agent rule.
+ description: The name of the Agent rule
example: my_agent_rule
type: string
+ product_tags:
+ description: The list of product tags associated with the rule
+ items:
+ type: string
+ type: array
updateAuthorUuId:
- description: The ID of the user who updated the rule.
+ description: The ID of the user who updated the rule
example: e51c9744-d158-11ec-ad23-da7ad0900002
type: string
updateDate:
- description: Timestamp in milliseconds when the Agent rule was last updated.
+ description: Timestamp in milliseconds when the Agent rule was last updated
example: 1624366480320
format: int64
type: integer
updatedAt:
- description: When the Agent rule was last updated, timestamp in milliseconds.
+ description: When the Agent rule was last updated, timestamp in milliseconds
example: 1624366480320
format: int64
type: integer
updater:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdaterAttributes'
version:
- description: The version of the Agent rule.
+ description: The version of the Agent rule
example: 23
format: int64
type: integer
@@ -7114,15 +7367,15 @@ components:
example: My Agent rule
type: string
enabled:
- description: Whether the Agent rule is enabled.
+ description: Whether the Agent rule is enabled
example: true
type: boolean
expression:
description: The SECL expression of the Agent rule.
- example: exec.file.name == \"sh\"
+ example: exec.file.name == "sh"
type: string
filters:
- description: The platforms the Agent rule is supported on.
+ description: The platforms the Agent rule is supported on
items:
type: string
type: array
@@ -7130,12 +7383,21 @@ components:
description: The name of the Agent rule.
example: my_agent_rule
type: string
+ policy_id:
+ description: The ID of the policy where the Agent rule is saved
+ example: a8c8e364-6556-434d-b798-a4c23de29c0b
+ type: string
+ product_tags:
+ description: The list of product tags associated with the rule
+ items:
+ type: string
+ type: array
required:
- name
- expression
type: object
CloudWorkloadSecurityAgentRuleCreateData:
- description: Object for a single Agent rule.
+ description: Object for a single Agent rule
properties:
attributes:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreateAttributes'
@@ -7146,7 +7408,7 @@ components:
- type
type: object
CloudWorkloadSecurityAgentRuleCreateRequest:
- description: Request object that includes the Agent rule to create.
+ description: Request object that includes the Agent rule to create
properties:
data:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreateData'
@@ -7154,50 +7416,50 @@ components:
- data
type: object
CloudWorkloadSecurityAgentRuleCreatorAttributes:
- description: The attributes of the user who created the Agent rule.
+ description: The attributes of the user who created the Agent rule
properties:
handle:
- description: The handle of the user.
+ description: The handle of the user
example: datadog.user@example.com
type: string
name:
- description: The name of the user.
+ description: The name of the user
example: Datadog User
nullable: true
type: string
type: object
CloudWorkloadSecurityAgentRuleData:
- description: Object for a single Agent rule.
+ description: Object for a single Agent rule
properties:
attributes:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleAttributes'
id:
- description: The ID of the Agent rule.
+ description: The ID of the Agent rule
example: 3dd-0uc-h1s
type: string
type:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleType'
type: object
CloudWorkloadSecurityAgentRuleID:
- description: The ID of the agent rule.
+ description: The ID of the Agent rule
example: 3dd-0uc-h1s
type: string
CloudWorkloadSecurityAgentRuleKill:
description: Kill system call applied on the container matching the rule
properties:
signal:
- description: Supported signals for the kill system call.
+ description: Supported signals for the kill system call
type: string
type: object
CloudWorkloadSecurityAgentRuleResponse:
- description: Response object that includes an Agent rule.
+ description: Response object that includes an Agent rule
properties:
data:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleData'
type: object
CloudWorkloadSecurityAgentRuleType:
default: agent_rule
- description: The type of the resource. The value should always be `agent_rule`.
+ description: The type of the resource, must always be `agent_rule`
enum:
- agent_rule
example: agent_rule
@@ -7205,23 +7467,32 @@ components:
x-enum-varnames:
- AGENT_RULE
CloudWorkloadSecurityAgentRuleUpdateAttributes:
- description: Update an existing Cloud Workload Security Agent rule.
+ description: Update an existing Cloud Workload Security Agent rule
properties:
description:
- description: The description of the Agent rule.
+ description: The description of the Agent rule
example: My Agent rule
type: string
enabled:
- description: Whether the Agent rule is enabled.
+ description: Whether the Agent rule is enabled
example: true
type: boolean
expression:
- description: The SECL expression of the Agent rule.
- example: exec.file.name == \"sh\"
+ description: The SECL expression of the Agent rule
+ example: exec.file.name == "sh"
+ type: string
+ policy_id:
+ description: The ID of the policy where the Agent rule is saved
+ example: a8c8e364-6556-434d-b798-a4c23de29c0b
type: string
+ product_tags:
+ description: The list of product tags associated with the rule
+ items:
+ type: string
+ type: array
type: object
CloudWorkloadSecurityAgentRuleUpdateData:
- description: Object for a single Agent rule.
+ description: Object for a single Agent rule
properties:
attributes:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdateAttributes'
@@ -7235,7 +7506,7 @@ components:
type: object
CloudWorkloadSecurityAgentRuleUpdateRequest:
description: Request object that includes the Agent rule with the attributes
- to update.
+ to update
properties:
data:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdateData'
@@ -7243,23 +7514,23 @@ components:
- data
type: object
CloudWorkloadSecurityAgentRuleUpdaterAttributes:
- description: The attributes of the user who last updated the Agent rule.
+ description: The attributes of the user who last updated the Agent rule
properties:
handle:
- description: The handle of the user.
+ description: The handle of the user
example: datadog.user@example.com
type: string
name:
- description: The name of the user.
+ description: The name of the user
example: Datadog User
nullable: true
type: string
type: object
CloudWorkloadSecurityAgentRulesListResponse:
- description: Response object that includes a list of Agent rule.
+ description: Response object that includes a list of Agent rule
properties:
data:
- description: A list of Agent rules objects.
+ description: A list of Agent rules objects
items:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleData'
type: array
@@ -48792,8 +49063,10 @@ paths:
x-terraform-resource: appsec_waf_exclusion_filter
/api/v2/remote_config/products/cws/agent_rules:
get:
- description: Get the list of Cloud Security Management Threats Agent rules.
+ description: Get the list of Cloud Security Management Threats Agent rules
operationId: ListCSMThreatsAgentRules
+ parameters:
+ - $ref: '#/components/parameters/CloudWorkloadSecurityQueryAgentPolicyID'
responses:
'200':
content:
@@ -48810,14 +49083,14 @@ paths:
- CSM Threats
post:
description: Create a new Cloud Security Management Threats Agent rule with
- the given parameters.
+ the given parameters
operationId: CreateCSMThreatsAgentRule
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreateRequest'
- description: The definition of the new Agent rule.
+ description: The definition of the new Agent rule
required: true
responses:
'200':
@@ -48840,10 +49113,11 @@ paths:
x-codegen-request-body-name: body
/api/v2/remote_config/products/cws/agent_rules/{agent_rule_id}:
delete:
- description: Delete a specific Cloud Security Management Threats Agent rule.
+ description: Delete a specific Cloud Security Management Threats Agent rule
operationId: DeleteCSMThreatsAgentRule
parameters:
- $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
+ - $ref: '#/components/parameters/CloudWorkloadSecurityQueryAgentPolicyID'
responses:
'204':
description: OK
@@ -48858,10 +49132,11 @@ paths:
- CSM Threats
get:
description: Get the details of a specific Cloud Security Management Threats
- Agent rule.
+ Agent rule
operationId: GetCSMThreatsAgentRule
parameters:
- $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
+ - $ref: '#/components/parameters/CloudWorkloadSecurityQueryAgentPolicyID'
responses:
'200':
content:
@@ -48885,12 +49160,13 @@ paths:
operationId: UpdateCSMThreatsAgentRule
parameters:
- $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
+ - $ref: '#/components/parameters/CloudWorkloadSecurityQueryAgentPolicyID'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdateRequest'
- description: New definition of the Agent rule.
+ description: New definition of the Agent rule
required: true
responses:
'200':
@@ -48913,6 +49189,54 @@ paths:
tags:
- CSM Threats
x-codegen-request-body-name: body
+ /api/v2/remote_config/products/cws/policy:
+ get:
+ description: Get the list of Cloud Security Management Threats Agent policies
+ operationId: ListCSMThreatsAgentPolicies
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPoliciesListResponse'
+ description: OK
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Get all CSM Threats Agent policies
+ tags:
+ - CSM Threats
+ post:
+ description: Create a new Cloud Security Management Threats Agent policy with
+ the given parameters
+ operationId: CreateCSMThreatsAgentPolicy
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyCreateRequest'
+ description: The definition of the new Agent policy
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyResponse'
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '409':
+ $ref: '#/components/responses/ConflictResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Create a CSM Threats Agent policy
+ tags:
+ - CSM Threats
+ x-codegen-request-body-name: body
/api/v2/remote_config/products/cws/policy/download:
get:
description: 'The download endpoint generates a CSM Threats policy file from
@@ -48938,6 +49262,83 @@ paths:
summary: Get the latest CSM Threats policy
tags:
- CSM Threats
+ /api/v2/remote_config/products/cws/policy/{policy_id}:
+ delete:
+ description: Delete a specific Cloud Security Management Threats Agent policy
+ operationId: DeleteCSMThreatsAgentPolicy
+ parameters:
+ - $ref: '#/components/parameters/CloudWorkloadSecurityPathAgentPolicyID'
+ responses:
+ '202':
+ description: OK
+ '204':
+ description: OK
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Delete a CSM Threats Agent policy
+ tags:
+ - CSM Threats
+ get:
+ description: Get the details of a specific Cloud Security Management Threats
+ Agent policy
+ operationId: GetCSMThreatsAgentPolicy
+ parameters:
+ - $ref: '#/components/parameters/CloudWorkloadSecurityPathAgentPolicyID'
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyResponse'
+ description: OK
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Get a CSM Threats Agent policy
+ tags:
+ - CSM Threats
+ patch:
+ description: 'Update a specific Cloud Security Management Threats Agent policy.
+
+ Returns the Agent policy object when the request is successful.'
+ operationId: UpdateCSMThreatsAgentPolicy
+ parameters:
+ - $ref: '#/components/parameters/CloudWorkloadSecurityPathAgentPolicyID'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyUpdateRequest'
+ description: New definition of the Agent policy
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyResponse'
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '409':
+ $ref: '#/components/responses/ConcurrentModificationResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Update a CSM Threats Agent policy
+ tags:
+ - CSM Threats
+ x-codegen-request-body-name: body
/api/v2/remote_config/products/obs_pipelines/pipelines:
post:
description: Create a new pipeline.
@@ -51843,7 +52244,7 @@ paths:
- security_monitoring_notification_profiles_write
/api/v2/security_monitoring/cloud_workload_security/agent_rules:
get:
- description: Get the list of Agent rules.
+ description: Get the list of Agent rules
operationId: ListCloudWorkloadSecurityAgentRules
responses:
'200':
@@ -51871,7 +52272,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreateRequest'
- description: The definition of the new Agent rule.
+ description: The definition of the new Agent rule
required: true
responses:
'200':
@@ -51898,7 +52299,7 @@ paths:
- security_monitoring_cws_agent_rules_write
/api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}:
delete:
- description: Delete a specific Agent rule.
+ description: Delete a specific Agent rule
operationId: DeleteCloudWorkloadSecurityAgentRule
parameters:
- $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
@@ -51919,7 +52320,7 @@ paths:
permissions:
- security_monitoring_cws_agent_rules_write
get:
- description: Get the details of a specific Agent rule.
+ description: Get the details of a specific Agent rule
operationId: GetCloudWorkloadSecurityAgentRule
parameters:
- $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
@@ -51955,7 +52356,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdateRequest'
- description: New definition of the Agent rule.
+ description: New definition of the Agent rule
required: true
responses:
'200':
diff --git a/examples/v2/csm-threats/CreateCSMThreatsAgentPolicy.java b/examples/v2/csm-threats/CreateCSMThreatsAgentPolicy.java
new file mode 100644
index 00000000000..589a9e8a5ba
--- /dev/null
+++ b/examples/v2/csm-threats/CreateCSMThreatsAgentPolicy.java
@@ -0,0 +1,43 @@
+// Create a CSM Threats Agent policy returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.CsmThreatsApi;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPolicyCreateAttributes;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPolicyCreateData;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPolicyCreateRequest;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPolicyResponse;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPolicyType;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ CsmThreatsApi apiInstance = new CsmThreatsApi(defaultClient);
+
+ CloudWorkloadSecurityAgentPolicyCreateRequest body =
+ new CloudWorkloadSecurityAgentPolicyCreateRequest()
+ .data(
+ new CloudWorkloadSecurityAgentPolicyCreateData()
+ .attributes(
+ new CloudWorkloadSecurityAgentPolicyCreateAttributes()
+ .description("My agent policy")
+ .enabled(true)
+ .hostTagsLists(
+ Collections.singletonList(Collections.singletonList("env:test")))
+ .name("my_agent_policy"))
+ .type(CloudWorkloadSecurityAgentPolicyType.POLICY));
+
+ try {
+ CloudWorkloadSecurityAgentPolicyResponse result =
+ apiInstance.createCSMThreatsAgentPolicy(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling CsmThreatsApi#createCSMThreatsAgentPolicy");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/csm-threats/CreateCSMThreatsAgentRule.java b/examples/v2/csm-threats/CreateCSMThreatsAgentRule.java
index 694eab569af..ffd615c8e75 100644
--- a/examples/v2/csm-threats/CreateCSMThreatsAgentRule.java
+++ b/examples/v2/csm-threats/CreateCSMThreatsAgentRule.java
@@ -8,13 +8,15 @@
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleCreateRequest;
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleResponse;
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleType;
-import java.util.Collections;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
CsmThreatsApi apiInstance = new CsmThreatsApi(defaultClient);
+ // there is a valid "policy_rc" in the system
+ String POLICY_DATA_ID = System.getenv("POLICY_DATA_ID");
+
CloudWorkloadSecurityAgentRuleCreateRequest body =
new CloudWorkloadSecurityAgentRuleCreateRequest()
.data(
@@ -26,10 +28,8 @@ public static void main(String[] args) {
.expression("""
exec.file.name == "sh"
""")
- .filters(Collections.singletonList("""
-os == "linux"
-"""))
- .name("examplecsmthreat"))
+ .name("examplecsmthreat")
+ .policyId(POLICY_DATA_ID))
.type(CloudWorkloadSecurityAgentRuleType.AGENT_RULE));
try {
diff --git a/examples/v2/csm-threats/CreateCloudWorkloadSecurityAgentRule.java b/examples/v2/csm-threats/CreateCloudWorkloadSecurityAgentRule.java
index ac58b83a1dc..e4b576a87ba 100644
--- a/examples/v2/csm-threats/CreateCloudWorkloadSecurityAgentRule.java
+++ b/examples/v2/csm-threats/CreateCloudWorkloadSecurityAgentRule.java
@@ -20,7 +20,7 @@ public static void main(String[] args) {
new CloudWorkloadSecurityAgentRuleCreateData()
.attributes(
new CloudWorkloadSecurityAgentRuleCreateAttributes()
- .description("Test Agent rule")
+ .description("My Agent rule")
.enabled(true)
.expression("""
exec.file.name == "sh"
diff --git a/examples/v2/csm-threats/DeleteCSMThreatsAgentPolicy.java b/examples/v2/csm-threats/DeleteCSMThreatsAgentPolicy.java
new file mode 100644
index 00000000000..208f9e23875
--- /dev/null
+++ b/examples/v2/csm-threats/DeleteCSMThreatsAgentPolicy.java
@@ -0,0 +1,25 @@
+// Delete a CSM Threats Agent policy returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.CsmThreatsApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ CsmThreatsApi apiInstance = new CsmThreatsApi(defaultClient);
+
+ // there is a valid "policy_rc" in the system
+ String POLICY_DATA_ID = System.getenv("POLICY_DATA_ID");
+
+ try {
+ apiInstance.deleteCSMThreatsAgentPolicy(POLICY_DATA_ID);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling CsmThreatsApi#deleteCSMThreatsAgentPolicy");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/csm-threats/DeleteCSMThreatsAgentRule.java b/examples/v2/csm-threats/DeleteCSMThreatsAgentRule.java
index 09824af46fe..d071d87e064 100644
--- a/examples/v2/csm-threats/DeleteCSMThreatsAgentRule.java
+++ b/examples/v2/csm-threats/DeleteCSMThreatsAgentRule.java
@@ -3,6 +3,7 @@
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.CsmThreatsApi;
+import com.datadog.api.client.v2.api.CsmThreatsApi.DeleteCSMThreatsAgentRuleOptionalParameters;
public class Example {
public static void main(String[] args) {
@@ -12,8 +13,13 @@ public static void main(String[] args) {
// there is a valid "agent_rule_rc" in the system
String AGENT_RULE_DATA_ID = System.getenv("AGENT_RULE_DATA_ID");
+ // there is a valid "policy_rc" in the system
+ String POLICY_DATA_ID = System.getenv("POLICY_DATA_ID");
+
try {
- apiInstance.deleteCSMThreatsAgentRule(AGENT_RULE_DATA_ID);
+ apiInstance.deleteCSMThreatsAgentRule(
+ AGENT_RULE_DATA_ID,
+ new DeleteCSMThreatsAgentRuleOptionalParameters().policyId(POLICY_DATA_ID));
} catch (ApiException e) {
System.err.println("Exception when calling CsmThreatsApi#deleteCSMThreatsAgentRule");
System.err.println("Status code: " + e.getCode());
diff --git a/examples/v2/csm-threats/GetCSMThreatsAgentPolicy.java b/examples/v2/csm-threats/GetCSMThreatsAgentPolicy.java
new file mode 100644
index 00000000000..a39f596c311
--- /dev/null
+++ b/examples/v2/csm-threats/GetCSMThreatsAgentPolicy.java
@@ -0,0 +1,28 @@
+// Get a CSM Threats Agent policy returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.CsmThreatsApi;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPolicyResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ CsmThreatsApi apiInstance = new CsmThreatsApi(defaultClient);
+
+ // there is a valid "policy_rc" in the system
+ String POLICY_DATA_ID = System.getenv("POLICY_DATA_ID");
+
+ try {
+ CloudWorkloadSecurityAgentPolicyResponse result =
+ apiInstance.getCSMThreatsAgentPolicy(POLICY_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling CsmThreatsApi#getCSMThreatsAgentPolicy");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/csm-threats/GetCSMThreatsAgentRule.java b/examples/v2/csm-threats/GetCSMThreatsAgentRule.java
index 30699e7f54e..787ce177aeb 100644
--- a/examples/v2/csm-threats/GetCSMThreatsAgentRule.java
+++ b/examples/v2/csm-threats/GetCSMThreatsAgentRule.java
@@ -3,6 +3,7 @@
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.CsmThreatsApi;
+import com.datadog.api.client.v2.api.CsmThreatsApi.GetCSMThreatsAgentRuleOptionalParameters;
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleResponse;
public class Example {
@@ -13,9 +14,14 @@ public static void main(String[] args) {
// there is a valid "agent_rule_rc" in the system
String AGENT_RULE_DATA_ID = System.getenv("AGENT_RULE_DATA_ID");
+ // there is a valid "policy_rc" in the system
+ String POLICY_DATA_ID = System.getenv("POLICY_DATA_ID");
+
try {
CloudWorkloadSecurityAgentRuleResponse result =
- apiInstance.getCSMThreatsAgentRule(AGENT_RULE_DATA_ID);
+ apiInstance.getCSMThreatsAgentRule(
+ AGENT_RULE_DATA_ID,
+ new GetCSMThreatsAgentRuleOptionalParameters().policyId(POLICY_DATA_ID));
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CsmThreatsApi#getCSMThreatsAgentRule");
diff --git a/examples/v2/csm-threats/ListCSMThreatsAgentPolicies.java b/examples/v2/csm-threats/ListCSMThreatsAgentPolicies.java
new file mode 100644
index 00000000000..92042f1bed5
--- /dev/null
+++ b/examples/v2/csm-threats/ListCSMThreatsAgentPolicies.java
@@ -0,0 +1,25 @@
+// Get all CSM Threats Agent policies returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.CsmThreatsApi;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPoliciesListResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ CsmThreatsApi apiInstance = new CsmThreatsApi(defaultClient);
+
+ try {
+ CloudWorkloadSecurityAgentPoliciesListResponse result =
+ apiInstance.listCSMThreatsAgentPolicies();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling CsmThreatsApi#listCSMThreatsAgentPolicies");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/csm-threats/UpdateCSMThreatsAgentPolicy.java b/examples/v2/csm-threats/UpdateCSMThreatsAgentPolicy.java
new file mode 100644
index 00000000000..9a35e786348
--- /dev/null
+++ b/examples/v2/csm-threats/UpdateCSMThreatsAgentPolicy.java
@@ -0,0 +1,47 @@
+// Update a CSM Threats Agent policy returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.CsmThreatsApi;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPolicyResponse;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPolicyType;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPolicyUpdateAttributes;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPolicyUpdateData;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPolicyUpdateRequest;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ CsmThreatsApi apiInstance = new CsmThreatsApi(defaultClient);
+
+ // there is a valid "policy_rc" in the system
+ String POLICY_DATA_ID = System.getenv("POLICY_DATA_ID");
+
+ CloudWorkloadSecurityAgentPolicyUpdateRequest body =
+ new CloudWorkloadSecurityAgentPolicyUpdateRequest()
+ .data(
+ new CloudWorkloadSecurityAgentPolicyUpdateData()
+ .attributes(
+ new CloudWorkloadSecurityAgentPolicyUpdateAttributes()
+ .description("Updated agent policy")
+ .enabled(true)
+ .hostTagsLists(
+ Collections.singletonList(Collections.singletonList("env:test")))
+ .name("updated_agent_policy"))
+ .id(POLICY_DATA_ID)
+ .type(CloudWorkloadSecurityAgentPolicyType.POLICY));
+
+ try {
+ CloudWorkloadSecurityAgentPolicyResponse result =
+ apiInstance.updateCSMThreatsAgentPolicy(POLICY_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling CsmThreatsApi#updateCSMThreatsAgentPolicy");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/csm-threats/UpdateCSMThreatsAgentRule.java b/examples/v2/csm-threats/UpdateCSMThreatsAgentRule.java
index ff278494363..8ec292c4643 100644
--- a/examples/v2/csm-threats/UpdateCSMThreatsAgentRule.java
+++ b/examples/v2/csm-threats/UpdateCSMThreatsAgentRule.java
@@ -3,6 +3,7 @@
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.CsmThreatsApi;
+import com.datadog.api.client.v2.api.CsmThreatsApi.UpdateCSMThreatsAgentRuleOptionalParameters;
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleResponse;
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleType;
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleUpdateAttributes;
@@ -17,23 +18,30 @@ public static void main(String[] args) {
// there is a valid "agent_rule_rc" in the system
String AGENT_RULE_DATA_ID = System.getenv("AGENT_RULE_DATA_ID");
+ // there is a valid "policy_rc" in the system
+ String POLICY_DATA_ID = System.getenv("POLICY_DATA_ID");
+
CloudWorkloadSecurityAgentRuleUpdateRequest body =
new CloudWorkloadSecurityAgentRuleUpdateRequest()
.data(
new CloudWorkloadSecurityAgentRuleUpdateData()
.attributes(
new CloudWorkloadSecurityAgentRuleUpdateAttributes()
- .description("Test Agent rule")
+ .description("My Agent rule")
.enabled(true)
.expression("""
exec.file.name == "sh"
-"""))
- .type(CloudWorkloadSecurityAgentRuleType.AGENT_RULE)
- .id(AGENT_RULE_DATA_ID));
+""")
+ .policyId(POLICY_DATA_ID))
+ .id(AGENT_RULE_DATA_ID)
+ .type(CloudWorkloadSecurityAgentRuleType.AGENT_RULE));
try {
CloudWorkloadSecurityAgentRuleResponse result =
- apiInstance.updateCSMThreatsAgentRule(AGENT_RULE_DATA_ID, body);
+ apiInstance.updateCSMThreatsAgentRule(
+ AGENT_RULE_DATA_ID,
+ body,
+ new UpdateCSMThreatsAgentRuleOptionalParameters().policyId(POLICY_DATA_ID));
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CsmThreatsApi#updateCSMThreatsAgentRule");
diff --git a/examples/v2/csm-threats/UpdateCloudWorkloadSecurityAgentRule.java b/examples/v2/csm-threats/UpdateCloudWorkloadSecurityAgentRule.java
index 517a7963934..7e2d14c13e8 100644
--- a/examples/v2/csm-threats/UpdateCloudWorkloadSecurityAgentRule.java
+++ b/examples/v2/csm-threats/UpdateCloudWorkloadSecurityAgentRule.java
@@ -23,13 +23,12 @@ public static void main(String[] args) {
new CloudWorkloadSecurityAgentRuleUpdateData()
.attributes(
new CloudWorkloadSecurityAgentRuleUpdateAttributes()
- .description("Test Agent rule")
- .enabled(true)
+ .description("Updated Agent rule")
.expression("""
exec.file.name == "sh"
"""))
- .type(CloudWorkloadSecurityAgentRuleType.AGENT_RULE)
- .id(AGENT_RULE_DATA_ID));
+ .id(AGENT_RULE_DATA_ID)
+ .type(CloudWorkloadSecurityAgentRuleType.AGENT_RULE));
try {
CloudWorkloadSecurityAgentRuleResponse result =
diff --git a/src/main/java/com/datadog/api/client/v2/api/CsmThreatsApi.java b/src/main/java/com/datadog/api/client/v2/api/CsmThreatsApi.java
index 45ae8d051fd..e196f81b175 100644
--- a/src/main/java/com/datadog/api/client/v2/api/CsmThreatsApi.java
+++ b/src/main/java/com/datadog/api/client/v2/api/CsmThreatsApi.java
@@ -4,6 +4,10 @@
import com.datadog.api.client.ApiException;
import com.datadog.api.client.ApiResponse;
import com.datadog.api.client.Pair;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPoliciesListResponse;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPolicyCreateRequest;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPolicyResponse;
+import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentPolicyUpdateRequest;
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleCreateRequest;
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleResponse;
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleUpdateRequest;
@@ -13,6 +17,7 @@
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
@@ -52,7 +57,7 @@ public void setApiClient(ApiClient apiClient) {
*
*
See {@link #createCloudWorkloadSecurityAgentRuleWithHttpInfo}.
*
- * @param body The definition of the new Agent rule. (required)
+ * @param body The definition of the new Agent rule (required)
* @return CloudWorkloadSecurityAgentRuleResponse
* @throws ApiException if fails to make API call
*/
@@ -66,7 +71,7 @@ public CloudWorkloadSecurityAgentRuleResponse createCloudWorkloadSecurityAgentRu
*
*
See {@link #createCloudWorkloadSecurityAgentRuleWithHttpInfoAsync}.
*
- * @param body The definition of the new Agent rule. (required)
+ * @param body The definition of the new Agent rule (required)
* @return CompletableFuture<CloudWorkloadSecurityAgentRuleResponse>
*/
public CompletableFuture
@@ -81,7 +86,7 @@ public CloudWorkloadSecurityAgentRuleResponse createCloudWorkloadSecurityAgentRu
/**
* Create a new Agent rule with the given parameters.
*
- * @param body The definition of the new Agent rule. (required)
+ * @param body The definition of the new Agent rule (required)
* @return ApiResponse<CloudWorkloadSecurityAgentRuleResponse>
* @throws ApiException if fails to make API call
* @http.response.details
@@ -137,7 +142,7 @@ public CloudWorkloadSecurityAgentRuleResponse createCloudWorkloadSecurityAgentRu
*
* See {@link #createCloudWorkloadSecurityAgentRuleWithHttpInfo}.
*
- * @param body The definition of the new Agent rule. (required)
+ * @param body The definition of the new Agent rule (required)
* @return CompletableFuture<ApiResponse<CloudWorkloadSecurityAgentRuleResponse>>
*/
public CompletableFuture>
@@ -189,12 +194,151 @@ public CloudWorkloadSecurityAgentRuleResponse createCloudWorkloadSecurityAgentRu
new GenericType() {});
}
+ /**
+ * Create a CSM Threats Agent policy.
+ *
+ * See {@link #createCSMThreatsAgentPolicyWithHttpInfo}.
+ *
+ * @param body The definition of the new Agent policy (required)
+ * @return CloudWorkloadSecurityAgentPolicyResponse
+ * @throws ApiException if fails to make API call
+ */
+ public CloudWorkloadSecurityAgentPolicyResponse createCSMThreatsAgentPolicy(
+ CloudWorkloadSecurityAgentPolicyCreateRequest body) throws ApiException {
+ return createCSMThreatsAgentPolicyWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create a CSM Threats Agent policy.
+ *
+ *
See {@link #createCSMThreatsAgentPolicyWithHttpInfoAsync}.
+ *
+ * @param body The definition of the new Agent policy (required)
+ * @return CompletableFuture<CloudWorkloadSecurityAgentPolicyResponse>
+ */
+ public CompletableFuture
+ createCSMThreatsAgentPolicyAsync(CloudWorkloadSecurityAgentPolicyCreateRequest body) {
+ return createCSMThreatsAgentPolicyWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create a new Cloud Security Management Threats Agent policy with the given parameters
+ *
+ * @param body The definition of the new Agent policy (required)
+ * @return ApiResponse<CloudWorkloadSecurityAgentPolicyResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | OK | - |
+ * 400 | Bad Request | - |
+ * 403 | Not Authorized | - |
+ * 409 | Conflict | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse
+ createCSMThreatsAgentPolicyWithHttpInfo(CloudWorkloadSecurityAgentPolicyCreateRequest body)
+ throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createCSMThreatsAgentPolicy");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/remote_config/products/cws/policy";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.CsmThreatsApi.createCSMThreatsAgentPolicy",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create a CSM Threats Agent policy.
+ *
+ * See {@link #createCSMThreatsAgentPolicyWithHttpInfo}.
+ *
+ * @param body The definition of the new Agent policy (required)
+ * @return CompletableFuture<ApiResponse<CloudWorkloadSecurityAgentPolicyResponse>>
+ */
+ public CompletableFuture>
+ createCSMThreatsAgentPolicyWithHttpInfoAsync(
+ CloudWorkloadSecurityAgentPolicyCreateRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'body' when calling createCSMThreatsAgentPolicy"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/remote_config/products/cws/policy";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.CsmThreatsApi.createCSMThreatsAgentPolicy",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
/**
* Create a CSM Threats Agent rule.
*
* See {@link #createCSMThreatsAgentRuleWithHttpInfo}.
*
- * @param body The definition of the new Agent rule. (required)
+ * @param body The definition of the new Agent rule (required)
* @return CloudWorkloadSecurityAgentRuleResponse
* @throws ApiException if fails to make API call
*/
@@ -208,7 +352,7 @@ public CloudWorkloadSecurityAgentRuleResponse createCSMThreatsAgentRule(
*
*
See {@link #createCSMThreatsAgentRuleWithHttpInfoAsync}.
*
- * @param body The definition of the new Agent rule. (required)
+ * @param body The definition of the new Agent rule (required)
* @return CompletableFuture<CloudWorkloadSecurityAgentRuleResponse>
*/
public CompletableFuture createCSMThreatsAgentRuleAsync(
@@ -221,9 +365,9 @@ public CompletableFuture createCSMThreat
}
/**
- * Create a new Cloud Security Management Threats Agent rule with the given parameters.
+ * Create a new Cloud Security Management Threats Agent rule with the given parameters
*
- * @param body The definition of the new Agent rule. (required)
+ * @param body The definition of the new Agent rule (required)
* @return ApiResponse<CloudWorkloadSecurityAgentRuleResponse>
* @throws ApiException if fails to make API call
* @http.response.details
@@ -276,7 +420,7 @@ public ApiResponse createCSMThreatsAgent
*
* See {@link #createCSMThreatsAgentRuleWithHttpInfo}.
*
- * @param body The definition of the new Agent rule. (required)
+ * @param body The definition of the new Agent rule (required)
* @return CompletableFuture<ApiResponse<CloudWorkloadSecurityAgentRuleResponse>>
*/
public CompletableFuture>
@@ -330,7 +474,7 @@ public ApiResponse createCSMThreatsAgent
*
* See {@link #deleteCloudWorkloadSecurityAgentRuleWithHttpInfo}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
* @throws ApiException if fails to make API call
*/
public void deleteCloudWorkloadSecurityAgentRule(String agentRuleId) throws ApiException {
@@ -342,7 +486,7 @@ public void deleteCloudWorkloadSecurityAgentRule(String agentRuleId) throws ApiE
*
*
See {@link #deleteCloudWorkloadSecurityAgentRuleWithHttpInfoAsync}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
* @return CompletableFuture
*/
public CompletableFuture deleteCloudWorkloadSecurityAgentRuleAsync(String agentRuleId) {
@@ -354,9 +498,9 @@ public CompletableFuture deleteCloudWorkloadSecurityAgentRuleAsync(String
}
/**
- * Delete a specific Agent rule.
+ * Delete a specific Agent rule
*
- * @param agentRuleId The ID of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
@@ -413,7 +557,7 @@ public ApiResponse deleteCloudWorkloadSecurityAgentRuleWithHttpInfo(String
*
* See {@link #deleteCloudWorkloadSecurityAgentRuleWithHttpInfo}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
* @return CompletableFuture<ApiResponse<Void>>
*/
public CompletableFuture> deleteCloudWorkloadSecurityAgentRuleWithHttpInfoAsync(
@@ -465,16 +609,171 @@ public CompletableFuture> deleteCloudWorkloadSecurityAgentRule
null);
}
+ /**
+ * Delete a CSM Threats Agent policy.
+ *
+ * See {@link #deleteCSMThreatsAgentPolicyWithHttpInfo}.
+ *
+ * @param policyId The ID of the Agent policy (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteCSMThreatsAgentPolicy(String policyId) throws ApiException {
+ deleteCSMThreatsAgentPolicyWithHttpInfo(policyId);
+ }
+
+ /**
+ * Delete a CSM Threats Agent policy.
+ *
+ *
See {@link #deleteCSMThreatsAgentPolicyWithHttpInfoAsync}.
+ *
+ * @param policyId The ID of the Agent policy (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteCSMThreatsAgentPolicyAsync(String policyId) {
+ return deleteCSMThreatsAgentPolicyWithHttpInfoAsync(policyId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Delete a specific Cloud Security Management Threats Agent policy
+ *
+ * @param policyId The ID of the Agent policy (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 202 | OK | - |
+ * 204 | OK | - |
+ * 403 | Not Authorized | - |
+ * 404 | Not Found | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteCSMThreatsAgentPolicyWithHttpInfo(String policyId)
+ throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'policyId' is set
+ if (policyId == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'policyId' when calling deleteCSMThreatsAgentPolicy");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/remote_config/products/cws/policy/{policy_id}"
+ .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.CsmThreatsApi.deleteCSMThreatsAgentPolicy",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete a CSM Threats Agent policy.
+ *
+ * See {@link #deleteCSMThreatsAgentPolicyWithHttpInfo}.
+ *
+ * @param policyId The ID of the Agent policy (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteCSMThreatsAgentPolicyWithHttpInfoAsync(
+ String policyId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'policyId' is set
+ if (policyId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'policyId' when calling"
+ + " deleteCSMThreatsAgentPolicy"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/remote_config/products/cws/policy/{policy_id}"
+ .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.CsmThreatsApi.deleteCSMThreatsAgentPolicy",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /** Manage optional parameters to deleteCSMThreatsAgentRule. */
+ public static class DeleteCSMThreatsAgentRuleOptionalParameters {
+ private String policyId;
+
+ /**
+ * Set policyId.
+ *
+ * @param policyId The ID of the Agent policy (optional)
+ * @return DeleteCSMThreatsAgentRuleOptionalParameters
+ */
+ public DeleteCSMThreatsAgentRuleOptionalParameters policyId(String policyId) {
+ this.policyId = policyId;
+ return this;
+ }
+ }
+
/**
* Delete a CSM Threats Agent rule.
*
* See {@link #deleteCSMThreatsAgentRuleWithHttpInfo}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
* @throws ApiException if fails to make API call
*/
public void deleteCSMThreatsAgentRule(String agentRuleId) throws ApiException {
- deleteCSMThreatsAgentRuleWithHttpInfo(agentRuleId);
+ deleteCSMThreatsAgentRuleWithHttpInfo(
+ agentRuleId, new DeleteCSMThreatsAgentRuleOptionalParameters());
}
/**
@@ -482,11 +781,45 @@ public void deleteCSMThreatsAgentRule(String agentRuleId) throws ApiException {
*
*
See {@link #deleteCSMThreatsAgentRuleWithHttpInfoAsync}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
* @return CompletableFuture
*/
public CompletableFuture deleteCSMThreatsAgentRuleAsync(String agentRuleId) {
- return deleteCSMThreatsAgentRuleWithHttpInfoAsync(agentRuleId)
+ return deleteCSMThreatsAgentRuleWithHttpInfoAsync(
+ agentRuleId, new DeleteCSMThreatsAgentRuleOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Delete a CSM Threats Agent rule.
+ *
+ * See {@link #deleteCSMThreatsAgentRuleWithHttpInfo}.
+ *
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param parameters Optional parameters for the request.
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteCSMThreatsAgentRule(
+ String agentRuleId, DeleteCSMThreatsAgentRuleOptionalParameters parameters)
+ throws ApiException {
+ deleteCSMThreatsAgentRuleWithHttpInfo(agentRuleId, parameters);
+ }
+
+ /**
+ * Delete a CSM Threats Agent rule.
+ *
+ *
See {@link #deleteCSMThreatsAgentRuleWithHttpInfoAsync}.
+ *
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteCSMThreatsAgentRuleAsync(
+ String agentRuleId, DeleteCSMThreatsAgentRuleOptionalParameters parameters) {
+ return deleteCSMThreatsAgentRuleWithHttpInfoAsync(agentRuleId, parameters)
.thenApply(
response -> {
return response.getData();
@@ -494,9 +827,10 @@ public CompletableFuture deleteCSMThreatsAgentRuleAsync(String agentRuleId
}
/**
- * Delete a specific Cloud Security Management Threats Agent rule.
+ * Delete a specific Cloud Security Management Threats Agent rule
*
- * @param agentRuleId The ID of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param parameters Optional parameters for the request.
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
@@ -509,7 +843,8 @@ public CompletableFuture deleteCSMThreatsAgentRuleAsync(String agentRuleId
* 429 | Too many requests | - |
*
*/
- public ApiResponse deleteCSMThreatsAgentRuleWithHttpInfo(String agentRuleId)
+ public ApiResponse deleteCSMThreatsAgentRuleWithHttpInfo(
+ String agentRuleId, DeleteCSMThreatsAgentRuleOptionalParameters parameters)
throws ApiException {
Object localVarPostBody = null;
@@ -519,19 +854,23 @@ public ApiResponse deleteCSMThreatsAgentRuleWithHttpInfo(String agentRuleI
400,
"Missing the required parameter 'agentRuleId' when calling deleteCSMThreatsAgentRule");
}
+ String policyId = parameters.policyId;
// create path and map variables
String localVarPath =
"/api/v2/remote_config/products/cws/agent_rules/{agent_rule_id}"
.replaceAll(
"\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString()));
+ List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "policy_id", policyId));
+
Invocation.Builder builder =
apiClient.createBuilder(
"v2.CsmThreatsApi.deleteCSMThreatsAgentRule",
localVarPath,
- new ArrayList(),
+ localVarQueryParams,
localVarHeaderParams,
new HashMap(),
new String[] {"*/*"},
@@ -552,11 +891,12 @@ public ApiResponse deleteCSMThreatsAgentRuleWithHttpInfo(String agentRuleI
*
* See {@link #deleteCSMThreatsAgentRuleWithHttpInfo}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param parameters Optional parameters for the request.
* @return CompletableFuture<ApiResponse<Void>>
*/
public CompletableFuture> deleteCSMThreatsAgentRuleWithHttpInfoAsync(
- String agentRuleId) {
+ String agentRuleId, DeleteCSMThreatsAgentRuleOptionalParameters parameters) {
Object localVarPostBody = null;
// verify the required parameter 'agentRuleId' is set
@@ -569,21 +909,25 @@ public CompletableFuture> deleteCSMThreatsAgentRuleWithHttpInf
+ " deleteCSMThreatsAgentRule"));
return result;
}
+ String policyId = parameters.policyId;
// create path and map variables
String localVarPath =
"/api/v2/remote_config/products/cws/agent_rules/{agent_rule_id}"
.replaceAll(
"\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString()));
+ List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "policy_id", policyId));
+
Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v2.CsmThreatsApi.deleteCSMThreatsAgentRule",
localVarPath,
- new ArrayList(),
+ localVarQueryParams,
localVarHeaderParams,
new HashMap(),
new String[] {"*/*"},
@@ -831,7 +1175,7 @@ public CompletableFuture> downloadCSMThreatsPolicyWithHttpInfo
*
* See {@link #getCloudWorkloadSecurityAgentRuleWithHttpInfo}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
* @return CloudWorkloadSecurityAgentRuleResponse
* @throws ApiException if fails to make API call
*/
@@ -845,7 +1189,7 @@ public CloudWorkloadSecurityAgentRuleResponse getCloudWorkloadSecurityAgentRule(
*
*
See {@link #getCloudWorkloadSecurityAgentRuleWithHttpInfoAsync}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
* @return CompletableFuture<CloudWorkloadSecurityAgentRuleResponse>
*/
public CompletableFuture
@@ -858,9 +1202,9 @@ public CloudWorkloadSecurityAgentRuleResponse getCloudWorkloadSecurityAgentRule(
}
/**
- * Get the details of a specific Agent rule.
+ * Get the details of a specific Agent rule
*
- * @param agentRuleId The ID of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
* @return ApiResponse<CloudWorkloadSecurityAgentRuleResponse>
* @throws ApiException if fails to make API call
* @http.response.details
@@ -917,7 +1261,7 @@ public CloudWorkloadSecurityAgentRuleResponse getCloudWorkloadSecurityAgentRule(
*
* See {@link #getCloudWorkloadSecurityAgentRuleWithHttpInfo}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
* @return CompletableFuture<ApiResponse<CloudWorkloadSecurityAgentRuleResponse>>
*/
public CompletableFuture>
@@ -972,30 +1316,30 @@ public CloudWorkloadSecurityAgentRuleResponse getCloudWorkloadSecurityAgentRule(
}
/**
- * Get a CSM Threats Agent rule.
+ * Get a CSM Threats Agent policy.
*
- * See {@link #getCSMThreatsAgentRuleWithHttpInfo}.
+ *
See {@link #getCSMThreatsAgentPolicyWithHttpInfo}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
- * @return CloudWorkloadSecurityAgentRuleResponse
+ * @param policyId The ID of the Agent policy (required)
+ * @return CloudWorkloadSecurityAgentPolicyResponse
* @throws ApiException if fails to make API call
*/
- public CloudWorkloadSecurityAgentRuleResponse getCSMThreatsAgentRule(String agentRuleId)
+ public CloudWorkloadSecurityAgentPolicyResponse getCSMThreatsAgentPolicy(String policyId)
throws ApiException {
- return getCSMThreatsAgentRuleWithHttpInfo(agentRuleId).getData();
+ return getCSMThreatsAgentPolicyWithHttpInfo(policyId).getData();
}
/**
- * Get a CSM Threats Agent rule.
+ * Get a CSM Threats Agent policy.
*
- *
See {@link #getCSMThreatsAgentRuleWithHttpInfoAsync}.
+ *
See {@link #getCSMThreatsAgentPolicyWithHttpInfoAsync}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
- * @return CompletableFuture<CloudWorkloadSecurityAgentRuleResponse>
+ * @param policyId The ID of the Agent policy (required)
+ * @return CompletableFuture<CloudWorkloadSecurityAgentPolicyResponse>
*/
- public CompletableFuture getCSMThreatsAgentRuleAsync(
- String agentRuleId) {
- return getCSMThreatsAgentRuleWithHttpInfoAsync(agentRuleId)
+ public CompletableFuture getCSMThreatsAgentPolicyAsync(
+ String policyId) {
+ return getCSMThreatsAgentPolicyWithHttpInfoAsync(policyId)
.thenApply(
response -> {
return response.getData();
@@ -1003,10 +1347,10 @@ public CompletableFuture getCSMThreatsAg
}
/**
- * Get the details of a specific Cloud Security Management Threats Agent rule.
+ * Get the details of a specific Cloud Security Management Threats Agent policy
*
- * @param agentRuleId The ID of the Agent rule. (required)
- * @return ApiResponse<CloudWorkloadSecurityAgentRuleResponse>
+ * @param policyId The ID of the Agent policy (required)
+ * @return ApiResponse<CloudWorkloadSecurityAgentPolicyResponse>
* @throws ApiException if fails to make API call
* @http.response.details
*
@@ -1018,28 +1362,225 @@ public CompletableFuture getCSMThreatsAg
* 429 | Too many requests | - |
*
*/
- public ApiResponse getCSMThreatsAgentRuleWithHttpInfo(
- String agentRuleId) throws ApiException {
+ public ApiResponse getCSMThreatsAgentPolicyWithHttpInfo(
+ String policyId) throws ApiException {
Object localVarPostBody = null;
- // verify the required parameter 'agentRuleId' is set
- if (agentRuleId == null) {
+ // verify the required parameter 'policyId' is set
+ if (policyId == null) {
throw new ApiException(
- 400, "Missing the required parameter 'agentRuleId' when calling getCSMThreatsAgentRule");
+ 400, "Missing the required parameter 'policyId' when calling getCSMThreatsAgentPolicy");
}
// create path and map variables
String localVarPath =
- "/api/v2/remote_config/products/cws/agent_rules/{agent_rule_id}"
+ "/api/v2/remote_config/products/cws/policy/{policy_id}"
+ .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.CsmThreatsApi.getCSMThreatsAgentPolicy",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get a CSM Threats Agent policy.
+ *
+ * See {@link #getCSMThreatsAgentPolicyWithHttpInfo}.
+ *
+ * @param policyId The ID of the Agent policy (required)
+ * @return CompletableFuture<ApiResponse<CloudWorkloadSecurityAgentPolicyResponse>>
+ */
+ public CompletableFuture>
+ getCSMThreatsAgentPolicyWithHttpInfoAsync(String policyId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'policyId' is set
+ if (policyId == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'policyId' when calling getCSMThreatsAgentPolicy"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/remote_config/products/cws/policy/{policy_id}"
+ .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.CsmThreatsApi.getCSMThreatsAgentPolicy",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to getCSMThreatsAgentRule. */
+ public static class GetCSMThreatsAgentRuleOptionalParameters {
+ private String policyId;
+
+ /**
+ * Set policyId.
+ *
+ * @param policyId The ID of the Agent policy (optional)
+ * @return GetCSMThreatsAgentRuleOptionalParameters
+ */
+ public GetCSMThreatsAgentRuleOptionalParameters policyId(String policyId) {
+ this.policyId = policyId;
+ return this;
+ }
+ }
+
+ /**
+ * Get a CSM Threats Agent rule.
+ *
+ * See {@link #getCSMThreatsAgentRuleWithHttpInfo}.
+ *
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @return CloudWorkloadSecurityAgentRuleResponse
+ * @throws ApiException if fails to make API call
+ */
+ public CloudWorkloadSecurityAgentRuleResponse getCSMThreatsAgentRule(String agentRuleId)
+ throws ApiException {
+ return getCSMThreatsAgentRuleWithHttpInfo(
+ agentRuleId, new GetCSMThreatsAgentRuleOptionalParameters())
+ .getData();
+ }
+
+ /**
+ * Get a CSM Threats Agent rule.
+ *
+ *
See {@link #getCSMThreatsAgentRuleWithHttpInfoAsync}.
+ *
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @return CompletableFuture<CloudWorkloadSecurityAgentRuleResponse>
+ */
+ public CompletableFuture getCSMThreatsAgentRuleAsync(
+ String agentRuleId) {
+ return getCSMThreatsAgentRuleWithHttpInfoAsync(
+ agentRuleId, new GetCSMThreatsAgentRuleOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get a CSM Threats Agent rule.
+ *
+ * See {@link #getCSMThreatsAgentRuleWithHttpInfo}.
+ *
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param parameters Optional parameters for the request.
+ * @return CloudWorkloadSecurityAgentRuleResponse
+ * @throws ApiException if fails to make API call
+ */
+ public CloudWorkloadSecurityAgentRuleResponse getCSMThreatsAgentRule(
+ String agentRuleId, GetCSMThreatsAgentRuleOptionalParameters parameters) throws ApiException {
+ return getCSMThreatsAgentRuleWithHttpInfo(agentRuleId, parameters).getData();
+ }
+
+ /**
+ * Get a CSM Threats Agent rule.
+ *
+ *
See {@link #getCSMThreatsAgentRuleWithHttpInfoAsync}.
+ *
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<CloudWorkloadSecurityAgentRuleResponse>
+ */
+ public CompletableFuture getCSMThreatsAgentRuleAsync(
+ String agentRuleId, GetCSMThreatsAgentRuleOptionalParameters parameters) {
+ return getCSMThreatsAgentRuleWithHttpInfoAsync(agentRuleId, parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get the details of a specific Cloud Security Management Threats Agent rule
+ *
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<CloudWorkloadSecurityAgentRuleResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | OK | - |
+ * 403 | Not Authorized | - |
+ * 404 | Not Found | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getCSMThreatsAgentRuleWithHttpInfo(
+ String agentRuleId, GetCSMThreatsAgentRuleOptionalParameters parameters) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'agentRuleId' is set
+ if (agentRuleId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'agentRuleId' when calling getCSMThreatsAgentRule");
+ }
+ String policyId = parameters.policyId;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/remote_config/products/cws/agent_rules/{agent_rule_id}"
.replaceAll(
"\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString()));
+ List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "policy_id", policyId));
+
Invocation.Builder builder =
apiClient.createBuilder(
"v2.CsmThreatsApi.getCSMThreatsAgentRule",
localVarPath,
- new ArrayList(),
+ localVarQueryParams,
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
@@ -1060,11 +1601,13 @@ public ApiResponse getCSMThreatsAgentRul
*
* See {@link #getCSMThreatsAgentRuleWithHttpInfo}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param parameters Optional parameters for the request.
* @return CompletableFuture<ApiResponse<CloudWorkloadSecurityAgentRuleResponse>>
*/
public CompletableFuture>
- getCSMThreatsAgentRuleWithHttpInfoAsync(String agentRuleId) {
+ getCSMThreatsAgentRuleWithHttpInfoAsync(
+ String agentRuleId, GetCSMThreatsAgentRuleOptionalParameters parameters) {
Object localVarPostBody = null;
// verify the required parameter 'agentRuleId' is set
@@ -1077,21 +1620,25 @@ public ApiResponse getCSMThreatsAgentRul
"Missing the required parameter 'agentRuleId' when calling getCSMThreatsAgentRule"));
return result;
}
+ String policyId = parameters.policyId;
// create path and map variables
String localVarPath =
"/api/v2/remote_config/products/cws/agent_rules/{agent_rule_id}"
.replaceAll(
"\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString()));
+ List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "policy_id", policyId));
+
Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v2.CsmThreatsApi.getCSMThreatsAgentRule",
localVarPath,
- new ArrayList(),
+ localVarQueryParams,
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
@@ -1143,7 +1690,7 @@ public CloudWorkloadSecurityAgentRulesListResponse listCloudWorkloadSecurityAgen
}
/**
- * Get the list of Agent rules.
+ * Get the list of Agent rules
*
* @return ApiResponse<CloudWorkloadSecurityAgentRulesListResponse>
* @throws ApiException if fails to make API call
@@ -1227,6 +1774,137 @@ public CloudWorkloadSecurityAgentRulesListResponse listCloudWorkloadSecurityAgen
new GenericType() {});
}
+ /**
+ * Get all CSM Threats Agent policies.
+ *
+ * See {@link #listCSMThreatsAgentPoliciesWithHttpInfo}.
+ *
+ * @return CloudWorkloadSecurityAgentPoliciesListResponse
+ * @throws ApiException if fails to make API call
+ */
+ public CloudWorkloadSecurityAgentPoliciesListResponse listCSMThreatsAgentPolicies()
+ throws ApiException {
+ return listCSMThreatsAgentPoliciesWithHttpInfo().getData();
+ }
+
+ /**
+ * Get all CSM Threats Agent policies.
+ *
+ *
See {@link #listCSMThreatsAgentPoliciesWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<CloudWorkloadSecurityAgentPoliciesListResponse>
+ */
+ public CompletableFuture
+ listCSMThreatsAgentPoliciesAsync() {
+ return listCSMThreatsAgentPoliciesWithHttpInfoAsync()
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get the list of Cloud Security Management Threats Agent policies
+ *
+ * @return ApiResponse<CloudWorkloadSecurityAgentPoliciesListResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | OK | - |
+ * 403 | Not Authorized | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse
+ listCSMThreatsAgentPoliciesWithHttpInfo() throws ApiException {
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/remote_config/products/cws/policy";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.CsmThreatsApi.listCSMThreatsAgentPolicies",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get all CSM Threats Agent policies.
+ *
+ * See {@link #listCSMThreatsAgentPoliciesWithHttpInfo}.
+ *
+ * @return
+ * CompletableFuture<ApiResponse<CloudWorkloadSecurityAgentPoliciesListResponse>>
+ */
+ public CompletableFuture>
+ listCSMThreatsAgentPoliciesWithHttpInfoAsync() {
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/remote_config/products/cws/policy";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.CsmThreatsApi.listCSMThreatsAgentPolicies",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to listCSMThreatsAgentRules. */
+ public static class ListCSMThreatsAgentRulesOptionalParameters {
+ private String policyId;
+
+ /**
+ * Set policyId.
+ *
+ * @param policyId The ID of the Agent policy (optional)
+ * @return ListCSMThreatsAgentRulesOptionalParameters
+ */
+ public ListCSMThreatsAgentRulesOptionalParameters policyId(String policyId) {
+ this.policyId = policyId;
+ return this;
+ }
+ }
+
/**
* Get all CSM Threats Agent rules.
*
@@ -1237,7 +1915,8 @@ public CloudWorkloadSecurityAgentRulesListResponse listCloudWorkloadSecurityAgen
*/
public CloudWorkloadSecurityAgentRulesListResponse listCSMThreatsAgentRules()
throws ApiException {
- return listCSMThreatsAgentRulesWithHttpInfo().getData();
+ return listCSMThreatsAgentRulesWithHttpInfo(new ListCSMThreatsAgentRulesOptionalParameters())
+ .getData();
}
/**
@@ -1249,7 +1928,39 @@ public CloudWorkloadSecurityAgentRulesListResponse listCSMThreatsAgentRules()
*/
public CompletableFuture
listCSMThreatsAgentRulesAsync() {
- return listCSMThreatsAgentRulesWithHttpInfoAsync()
+ return listCSMThreatsAgentRulesWithHttpInfoAsync(
+ new ListCSMThreatsAgentRulesOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get all CSM Threats Agent rules.
+ *
+ * See {@link #listCSMThreatsAgentRulesWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CloudWorkloadSecurityAgentRulesListResponse
+ * @throws ApiException if fails to make API call
+ */
+ public CloudWorkloadSecurityAgentRulesListResponse listCSMThreatsAgentRules(
+ ListCSMThreatsAgentRulesOptionalParameters parameters) throws ApiException {
+ return listCSMThreatsAgentRulesWithHttpInfo(parameters).getData();
+ }
+
+ /**
+ * Get all CSM Threats Agent rules.
+ *
+ *
See {@link #listCSMThreatsAgentRulesWithHttpInfoAsync}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<CloudWorkloadSecurityAgentRulesListResponse>
+ */
+ public CompletableFuture
+ listCSMThreatsAgentRulesAsync(ListCSMThreatsAgentRulesOptionalParameters parameters) {
+ return listCSMThreatsAgentRulesWithHttpInfoAsync(parameters)
.thenApply(
response -> {
return response.getData();
@@ -1257,8 +1968,9 @@ public CloudWorkloadSecurityAgentRulesListResponse listCSMThreatsAgentRules()
}
/**
- * Get the list of Cloud Security Management Threats Agent rules.
+ * Get the list of Cloud Security Management Threats Agent rules
*
+ * @param parameters Optional parameters for the request.
* @return ApiResponse<CloudWorkloadSecurityAgentRulesListResponse>
* @throws ApiException if fails to make API call
* @http.response.details
@@ -1271,18 +1983,23 @@ public CloudWorkloadSecurityAgentRulesListResponse listCSMThreatsAgentRules()
*
*/
public ApiResponse
- listCSMThreatsAgentRulesWithHttpInfo() throws ApiException {
+ listCSMThreatsAgentRulesWithHttpInfo(ListCSMThreatsAgentRulesOptionalParameters parameters)
+ throws ApiException {
Object localVarPostBody = null;
+ String policyId = parameters.policyId;
// create path and map variables
String localVarPath = "/api/v2/remote_config/products/cws/agent_rules";
+ List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "policy_id", policyId));
+
Invocation.Builder builder =
apiClient.createBuilder(
"v2.CsmThreatsApi.listCSMThreatsAgentRules",
localVarPath,
- new ArrayList(),
+ localVarQueryParams,
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
@@ -1303,23 +2020,29 @@ public CloudWorkloadSecurityAgentRulesListResponse listCSMThreatsAgentRules()
*
* See {@link #listCSMThreatsAgentRulesWithHttpInfo}.
*
+ * @param parameters Optional parameters for the request.
* @return CompletableFuture<ApiResponse<CloudWorkloadSecurityAgentRulesListResponse>>
*/
public CompletableFuture>
- listCSMThreatsAgentRulesWithHttpInfoAsync() {
+ listCSMThreatsAgentRulesWithHttpInfoAsync(
+ ListCSMThreatsAgentRulesOptionalParameters parameters) {
Object localVarPostBody = null;
+ String policyId = parameters.policyId;
// create path and map variables
String localVarPath = "/api/v2/remote_config/products/cws/agent_rules";
+ List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "policy_id", policyId));
+
Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v2.CsmThreatsApi.listCSMThreatsAgentRules",
localVarPath,
- new ArrayList(),
+ localVarQueryParams,
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
@@ -1346,8 +2069,8 @@ public CloudWorkloadSecurityAgentRulesListResponse listCSMThreatsAgentRules()
*
* See {@link #updateCloudWorkloadSecurityAgentRuleWithHttpInfo}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
- * @param body New definition of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param body New definition of the Agent rule (required)
* @return CloudWorkloadSecurityAgentRuleResponse
* @throws ApiException if fails to make API call
*/
@@ -1361,8 +2084,8 @@ public CloudWorkloadSecurityAgentRuleResponse updateCloudWorkloadSecurityAgentRu
*
*
See {@link #updateCloudWorkloadSecurityAgentRuleWithHttpInfoAsync}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
- * @param body New definition of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param body New definition of the Agent rule (required)
* @return CompletableFuture<CloudWorkloadSecurityAgentRuleResponse>
*/
public CompletableFuture
@@ -1378,8 +2101,8 @@ public CloudWorkloadSecurityAgentRuleResponse updateCloudWorkloadSecurityAgentRu
/**
* Update a specific Agent rule. Returns the Agent rule object when the request is successful.
*
- * @param agentRuleId The ID of the Agent rule. (required)
- * @param body New definition of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param body New definition of the Agent rule (required)
* @return ApiResponse<CloudWorkloadSecurityAgentRuleResponse>
* @throws ApiException if fails to make API call
* @http.response.details
@@ -1448,8 +2171,8 @@ public CloudWorkloadSecurityAgentRuleResponse updateCloudWorkloadSecurityAgentRu
*
* See {@link #updateCloudWorkloadSecurityAgentRuleWithHttpInfo}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
- * @param body New definition of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param body New definition of the Agent rule (required)
* @return CompletableFuture<ApiResponse<CloudWorkloadSecurityAgentRuleResponse>>
*/
public CompletableFuture>
@@ -1516,19 +2239,206 @@ public CloudWorkloadSecurityAgentRuleResponse updateCloudWorkloadSecurityAgentRu
new GenericType() {});
}
+ /**
+ * Update a CSM Threats Agent policy.
+ *
+ * See {@link #updateCSMThreatsAgentPolicyWithHttpInfo}.
+ *
+ * @param policyId The ID of the Agent policy (required)
+ * @param body New definition of the Agent policy (required)
+ * @return CloudWorkloadSecurityAgentPolicyResponse
+ * @throws ApiException if fails to make API call
+ */
+ public CloudWorkloadSecurityAgentPolicyResponse updateCSMThreatsAgentPolicy(
+ String policyId, CloudWorkloadSecurityAgentPolicyUpdateRequest body) throws ApiException {
+ return updateCSMThreatsAgentPolicyWithHttpInfo(policyId, body).getData();
+ }
+
+ /**
+ * Update a CSM Threats Agent policy.
+ *
+ *
See {@link #updateCSMThreatsAgentPolicyWithHttpInfoAsync}.
+ *
+ * @param policyId The ID of the Agent policy (required)
+ * @param body New definition of the Agent policy (required)
+ * @return CompletableFuture<CloudWorkloadSecurityAgentPolicyResponse>
+ */
+ public CompletableFuture
+ updateCSMThreatsAgentPolicyAsync(
+ String policyId, CloudWorkloadSecurityAgentPolicyUpdateRequest body) {
+ return updateCSMThreatsAgentPolicyWithHttpInfoAsync(policyId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Update a specific Cloud Security Management Threats Agent policy. Returns the Agent policy
+ * object when the request is successful.
+ *
+ * @param policyId The ID of the Agent policy (required)
+ * @param body New definition of the Agent policy (required)
+ * @return ApiResponse<CloudWorkloadSecurityAgentPolicyResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | OK | - |
+ * 400 | Bad Request | - |
+ * 403 | Not Authorized | - |
+ * 404 | Not Found | - |
+ * 409 | Concurrent Modification | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse
+ updateCSMThreatsAgentPolicyWithHttpInfo(
+ String policyId, CloudWorkloadSecurityAgentPolicyUpdateRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'policyId' is set
+ if (policyId == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'policyId' when calling updateCSMThreatsAgentPolicy");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateCSMThreatsAgentPolicy");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/remote_config/products/cws/policy/{policy_id}"
+ .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.CsmThreatsApi.updateCSMThreatsAgentPolicy",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update a CSM Threats Agent policy.
+ *
+ * See {@link #updateCSMThreatsAgentPolicyWithHttpInfo}.
+ *
+ * @param policyId The ID of the Agent policy (required)
+ * @param body New definition of the Agent policy (required)
+ * @return CompletableFuture<ApiResponse<CloudWorkloadSecurityAgentPolicyResponse>>
+ */
+ public CompletableFuture>
+ updateCSMThreatsAgentPolicyWithHttpInfoAsync(
+ String policyId, CloudWorkloadSecurityAgentPolicyUpdateRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'policyId' is set
+ if (policyId == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'policyId' when calling"
+ + " updateCSMThreatsAgentPolicy"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'body' when calling updateCSMThreatsAgentPolicy"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/remote_config/products/cws/policy/{policy_id}"
+ .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.CsmThreatsApi.updateCSMThreatsAgentPolicy",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to updateCSMThreatsAgentRule. */
+ public static class UpdateCSMThreatsAgentRuleOptionalParameters {
+ private String policyId;
+
+ /**
+ * Set policyId.
+ *
+ * @param policyId The ID of the Agent policy (optional)
+ * @return UpdateCSMThreatsAgentRuleOptionalParameters
+ */
+ public UpdateCSMThreatsAgentRuleOptionalParameters policyId(String policyId) {
+ this.policyId = policyId;
+ return this;
+ }
+ }
+
/**
* Update a CSM Threats Agent rule.
*
* See {@link #updateCSMThreatsAgentRuleWithHttpInfo}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
- * @param body New definition of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param body New definition of the Agent rule (required)
* @return CloudWorkloadSecurityAgentRuleResponse
* @throws ApiException if fails to make API call
*/
public CloudWorkloadSecurityAgentRuleResponse updateCSMThreatsAgentRule(
String agentRuleId, CloudWorkloadSecurityAgentRuleUpdateRequest body) throws ApiException {
- return updateCSMThreatsAgentRuleWithHttpInfo(agentRuleId, body).getData();
+ return updateCSMThreatsAgentRuleWithHttpInfo(
+ agentRuleId, body, new UpdateCSMThreatsAgentRuleOptionalParameters())
+ .getData();
}
/**
@@ -1536,13 +2446,54 @@ public CloudWorkloadSecurityAgentRuleResponse updateCSMThreatsAgentRule(
*
*
See {@link #updateCSMThreatsAgentRuleWithHttpInfoAsync}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
- * @param body New definition of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param body New definition of the Agent rule (required)
* @return CompletableFuture<CloudWorkloadSecurityAgentRuleResponse>
*/
public CompletableFuture updateCSMThreatsAgentRuleAsync(
String agentRuleId, CloudWorkloadSecurityAgentRuleUpdateRequest body) {
- return updateCSMThreatsAgentRuleWithHttpInfoAsync(agentRuleId, body)
+ return updateCSMThreatsAgentRuleWithHttpInfoAsync(
+ agentRuleId, body, new UpdateCSMThreatsAgentRuleOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Update a CSM Threats Agent rule.
+ *
+ * See {@link #updateCSMThreatsAgentRuleWithHttpInfo}.
+ *
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param body New definition of the Agent rule (required)
+ * @param parameters Optional parameters for the request.
+ * @return CloudWorkloadSecurityAgentRuleResponse
+ * @throws ApiException if fails to make API call
+ */
+ public CloudWorkloadSecurityAgentRuleResponse updateCSMThreatsAgentRule(
+ String agentRuleId,
+ CloudWorkloadSecurityAgentRuleUpdateRequest body,
+ UpdateCSMThreatsAgentRuleOptionalParameters parameters)
+ throws ApiException {
+ return updateCSMThreatsAgentRuleWithHttpInfo(agentRuleId, body, parameters).getData();
+ }
+
+ /**
+ * Update a CSM Threats Agent rule.
+ *
+ *
See {@link #updateCSMThreatsAgentRuleWithHttpInfoAsync}.
+ *
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param body New definition of the Agent rule (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<CloudWorkloadSecurityAgentRuleResponse>
+ */
+ public CompletableFuture updateCSMThreatsAgentRuleAsync(
+ String agentRuleId,
+ CloudWorkloadSecurityAgentRuleUpdateRequest body,
+ UpdateCSMThreatsAgentRuleOptionalParameters parameters) {
+ return updateCSMThreatsAgentRuleWithHttpInfoAsync(agentRuleId, body, parameters)
.thenApply(
response -> {
return response.getData();
@@ -1553,8 +2504,9 @@ public CompletableFuture updateCSMThreat
* Update a specific Cloud Security Management Threats Agent rule. Returns the Agent rule object
* when the request is successful.
*
- * @param agentRuleId The ID of the Agent rule. (required)
- * @param body New definition of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param body New definition of the Agent rule (required)
+ * @param parameters Optional parameters for the request.
* @return ApiResponse<CloudWorkloadSecurityAgentRuleResponse>
* @throws ApiException if fails to make API call
* @http.response.details
@@ -1570,7 +2522,10 @@ public CompletableFuture updateCSMThreat
*
*/
public ApiResponse updateCSMThreatsAgentRuleWithHttpInfo(
- String agentRuleId, CloudWorkloadSecurityAgentRuleUpdateRequest body) throws ApiException {
+ String agentRuleId,
+ CloudWorkloadSecurityAgentRuleUpdateRequest body,
+ UpdateCSMThreatsAgentRuleOptionalParameters parameters)
+ throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'agentRuleId' is set
@@ -1585,19 +2540,23 @@ public ApiResponse updateCSMThreatsAgent
throw new ApiException(
400, "Missing the required parameter 'body' when calling updateCSMThreatsAgentRule");
}
+ String policyId = parameters.policyId;
// create path and map variables
String localVarPath =
"/api/v2/remote_config/products/cws/agent_rules/{agent_rule_id}"
.replaceAll(
"\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString()));
+ List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "policy_id", policyId));
+
Invocation.Builder builder =
apiClient.createBuilder(
"v2.CsmThreatsApi.updateCSMThreatsAgentRule",
localVarPath,
- new ArrayList(),
+ localVarQueryParams,
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
@@ -1618,13 +2577,16 @@ public ApiResponse updateCSMThreatsAgent
*
* See {@link #updateCSMThreatsAgentRuleWithHttpInfo}.
*
- * @param agentRuleId The ID of the Agent rule. (required)
- * @param body New definition of the Agent rule. (required)
+ * @param agentRuleId The ID of the Agent rule (required)
+ * @param body New definition of the Agent rule (required)
+ * @param parameters Optional parameters for the request.
* @return CompletableFuture<ApiResponse<CloudWorkloadSecurityAgentRuleResponse>>
*/
public CompletableFuture>
updateCSMThreatsAgentRuleWithHttpInfoAsync(
- String agentRuleId, CloudWorkloadSecurityAgentRuleUpdateRequest body) {
+ String agentRuleId,
+ CloudWorkloadSecurityAgentRuleUpdateRequest body,
+ UpdateCSMThreatsAgentRuleOptionalParameters parameters) {
Object localVarPostBody = body;
// verify the required parameter 'agentRuleId' is set
@@ -1648,21 +2610,25 @@ public ApiResponse updateCSMThreatsAgent
400, "Missing the required parameter 'body' when calling updateCSMThreatsAgentRule"));
return result;
}
+ String policyId = parameters.policyId;
// create path and map variables
String localVarPath =
"/api/v2/remote_config/products/cws/agent_rules/{agent_rule_id}"
.replaceAll(
"\\{" + "agent_rule_id" + "\\}", apiClient.escapeString(agentRuleId.toString()));
+ List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "policy_id", policyId));
+
Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v2.CsmThreatsApi.updateCSMThreatsAgentRule",
localVarPath,
- new ArrayList(),
+ localVarQueryParams,
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPoliciesListResponse.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPoliciesListResponse.java
new file mode 100644
index 00000000000..f45ad383361
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPoliciesListResponse.java
@@ -0,0 +1,155 @@
+/*
+ * 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.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** Response object that includes a list of Agent policies */
+@JsonPropertyOrder({CloudWorkloadSecurityAgentPoliciesListResponse.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CloudWorkloadSecurityAgentPoliciesListResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private List data = null;
+
+ public CloudWorkloadSecurityAgentPoliciesListResponse data(
+ List data) {
+ this.data = data;
+ for (CloudWorkloadSecurityAgentPolicyData item : data) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public CloudWorkloadSecurityAgentPoliciesListResponse addDataItem(
+ CloudWorkloadSecurityAgentPolicyData dataItem) {
+ if (this.data == null) {
+ this.data = new ArrayList<>();
+ }
+ this.data.add(dataItem);
+ this.unparsed |= dataItem.unparsed;
+ return this;
+ }
+
+ /**
+ * A list of Agent policy objects
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getData() {
+ return data;
+ }
+
+ public void setData(List data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return CloudWorkloadSecurityAgentPoliciesListResponse
+ */
+ @JsonAnySetter
+ public CloudWorkloadSecurityAgentPoliciesListResponse putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this CloudWorkloadSecurityAgentPoliciesListResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CloudWorkloadSecurityAgentPoliciesListResponse cloudWorkloadSecurityAgentPoliciesListResponse =
+ (CloudWorkloadSecurityAgentPoliciesListResponse) o;
+ return Objects.equals(this.data, cloudWorkloadSecurityAgentPoliciesListResponse.data)
+ && Objects.equals(
+ this.additionalProperties,
+ cloudWorkloadSecurityAgentPoliciesListResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CloudWorkloadSecurityAgentPoliciesListResponse {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyAttributes.java
new file mode 100644
index 00000000000..6ec7e528c76
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyAttributes.java
@@ -0,0 +1,568 @@
+/*
+ * 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.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** A Cloud Workload Security Agent policy returned by the API */
+@JsonPropertyOrder({
+ CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_BLOCKING_RULES_COUNT,
+ CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_DATADOG_MANAGED,
+ CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_DESCRIPTION,
+ CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_DISABLED_RULES_COUNT,
+ CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_ENABLED,
+ CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_HOST_TAGS,
+ CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_HOST_TAGS_LISTS,
+ CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_MONITORING_RULES_COUNT,
+ CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_NAME,
+ CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_POLICY_VERSION,
+ CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_PRIORITY,
+ CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_RULE_COUNT,
+ CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_UPDATE_DATE,
+ CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_UPDATED_AT,
+ CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_UPDATER
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CloudWorkloadSecurityAgentPolicyAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_BLOCKING_RULES_COUNT = "blockingRulesCount";
+ private Integer blockingRulesCount;
+
+ public static final String JSON_PROPERTY_DATADOG_MANAGED = "datadogManaged";
+ private Boolean datadogManaged;
+
+ public static final String JSON_PROPERTY_DESCRIPTION = "description";
+ private String description;
+
+ public static final String JSON_PROPERTY_DISABLED_RULES_COUNT = "disabledRulesCount";
+ private Integer disabledRulesCount;
+
+ public static final String JSON_PROPERTY_ENABLED = "enabled";
+ private Boolean enabled;
+
+ public static final String JSON_PROPERTY_HOST_TAGS = "hostTags";
+ private List hostTags = null;
+
+ public static final String JSON_PROPERTY_HOST_TAGS_LISTS = "hostTagsLists";
+ private List> hostTagsLists = null;
+
+ public static final String JSON_PROPERTY_MONITORING_RULES_COUNT = "monitoringRulesCount";
+ private Integer monitoringRulesCount;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public static final String JSON_PROPERTY_POLICY_VERSION = "policyVersion";
+ private String policyVersion;
+
+ public static final String JSON_PROPERTY_PRIORITY = "priority";
+ private Long priority;
+
+ public static final String JSON_PROPERTY_RULE_COUNT = "ruleCount";
+ private Integer ruleCount;
+
+ public static final String JSON_PROPERTY_UPDATE_DATE = "updateDate";
+ private Long updateDate;
+
+ public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt";
+ private Long updatedAt;
+
+ public static final String JSON_PROPERTY_UPDATER = "updater";
+ private CloudWorkloadSecurityAgentPolicyUpdaterAttributes updater;
+
+ public CloudWorkloadSecurityAgentPolicyAttributes blockingRulesCount(Integer blockingRulesCount) {
+ this.blockingRulesCount = blockingRulesCount;
+ return this;
+ }
+
+ /**
+ * The number of rules with the blocking feature in this policy maximum: 2147483647
+ *
+ * @return blockingRulesCount
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_BLOCKING_RULES_COUNT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Integer getBlockingRulesCount() {
+ return blockingRulesCount;
+ }
+
+ public void setBlockingRulesCount(Integer blockingRulesCount) {
+ this.blockingRulesCount = blockingRulesCount;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes datadogManaged(Boolean datadogManaged) {
+ this.datadogManaged = datadogManaged;
+ return this;
+ }
+
+ /**
+ * Whether the policy is managed by Datadog
+ *
+ * @return datadogManaged
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATADOG_MANAGED)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getDatadogManaged() {
+ return datadogManaged;
+ }
+
+ public void setDatadogManaged(Boolean datadogManaged) {
+ this.datadogManaged = datadogManaged;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * The description of the policy
+ *
+ * @return description
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DESCRIPTION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes disabledRulesCount(Integer disabledRulesCount) {
+ this.disabledRulesCount = disabledRulesCount;
+ return this;
+ }
+
+ /**
+ * The number of rules that are disabled in this policy maximum: 2147483647
+ *
+ * @return disabledRulesCount
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DISABLED_RULES_COUNT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Integer getDisabledRulesCount() {
+ return disabledRulesCount;
+ }
+
+ public void setDisabledRulesCount(Integer disabledRulesCount) {
+ this.disabledRulesCount = disabledRulesCount;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes enabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Whether the Agent policy is enabled
+ *
+ * @return enabled
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ENABLED)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getEnabled() {
+ return enabled;
+ }
+
+ public void setEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes hostTags(List hostTags) {
+ this.hostTags = hostTags;
+ return this;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes addHostTagsItem(String hostTagsItem) {
+ if (this.hostTags == null) {
+ this.hostTags = new ArrayList<>();
+ }
+ this.hostTags.add(hostTagsItem);
+ return this;
+ }
+
+ /**
+ * The host tags defining where this policy is deployed
+ *
+ * @return hostTags
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_HOST_TAGS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getHostTags() {
+ return hostTags;
+ }
+
+ public void setHostTags(List hostTags) {
+ this.hostTags = hostTags;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes hostTagsLists(
+ List> hostTagsLists) {
+ this.hostTagsLists = hostTagsLists;
+ return this;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes addHostTagsListsItem(
+ List hostTagsListsItem) {
+ if (this.hostTagsLists == null) {
+ this.hostTagsLists = new ArrayList<>();
+ }
+ this.hostTagsLists.add(hostTagsListsItem);
+ return this;
+ }
+
+ /**
+ * The host tags defining where this policy is deployed, the inner values are linked with AND, the
+ * outer values are linked with OR
+ *
+ * @return hostTagsLists
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_HOST_TAGS_LISTS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List> getHostTagsLists() {
+ return hostTagsLists;
+ }
+
+ public void setHostTagsLists(List> hostTagsLists) {
+ this.hostTagsLists = hostTagsLists;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes monitoringRulesCount(
+ Integer monitoringRulesCount) {
+ this.monitoringRulesCount = monitoringRulesCount;
+ return this;
+ }
+
+ /**
+ * The number of rules in the monitoring state in this policy maximum: 2147483647
+ *
+ * @return monitoringRulesCount
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_MONITORING_RULES_COUNT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Integer getMonitoringRulesCount() {
+ return monitoringRulesCount;
+ }
+
+ public void setMonitoringRulesCount(Integer monitoringRulesCount) {
+ this.monitoringRulesCount = monitoringRulesCount;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The name of the policy
+ *
+ * @return name
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes policyVersion(String policyVersion) {
+ this.policyVersion = policyVersion;
+ return this;
+ }
+
+ /**
+ * The version of the policy
+ *
+ * @return policyVersion
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_POLICY_VERSION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getPolicyVersion() {
+ return policyVersion;
+ }
+
+ public void setPolicyVersion(String policyVersion) {
+ this.policyVersion = policyVersion;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes priority(Long priority) {
+ this.priority = priority;
+ return this;
+ }
+
+ /**
+ * The priority of the policy
+ *
+ * @return priority
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_PRIORITY)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Long getPriority() {
+ return priority;
+ }
+
+ public void setPriority(Long priority) {
+ this.priority = priority;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes ruleCount(Integer ruleCount) {
+ this.ruleCount = ruleCount;
+ return this;
+ }
+
+ /**
+ * The number of rules in this policy maximum: 2147483647
+ *
+ * @return ruleCount
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_RULE_COUNT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Integer getRuleCount() {
+ return ruleCount;
+ }
+
+ public void setRuleCount(Integer ruleCount) {
+ this.ruleCount = ruleCount;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes updateDate(Long updateDate) {
+ this.updateDate = updateDate;
+ return this;
+ }
+
+ /**
+ * Timestamp in milliseconds when the policy was last updated
+ *
+ * @return updateDate
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_UPDATE_DATE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Long getUpdateDate() {
+ return updateDate;
+ }
+
+ public void setUpdateDate(Long updateDate) {
+ this.updateDate = updateDate;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes updatedAt(Long updatedAt) {
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+ /**
+ * When the policy was last updated, timestamp in milliseconds
+ *
+ * @return updatedAt
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_UPDATED_AT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Long getUpdatedAt() {
+ return updatedAt;
+ }
+
+ public void setUpdatedAt(Long updatedAt) {
+ this.updatedAt = updatedAt;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyAttributes updater(
+ CloudWorkloadSecurityAgentPolicyUpdaterAttributes updater) {
+ this.updater = updater;
+ this.unparsed |= updater.unparsed;
+ return this;
+ }
+
+ /**
+ * The attributes of the user who last updated the policy
+ *
+ * @return updater
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_UPDATER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public CloudWorkloadSecurityAgentPolicyUpdaterAttributes getUpdater() {
+ return updater;
+ }
+
+ public void setUpdater(CloudWorkloadSecurityAgentPolicyUpdaterAttributes updater) {
+ this.updater = updater;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return CloudWorkloadSecurityAgentPolicyAttributes
+ */
+ @JsonAnySetter
+ public CloudWorkloadSecurityAgentPolicyAttributes putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this CloudWorkloadSecurityAgentPolicyAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CloudWorkloadSecurityAgentPolicyAttributes cloudWorkloadSecurityAgentPolicyAttributes =
+ (CloudWorkloadSecurityAgentPolicyAttributes) o;
+ return Objects.equals(
+ this.blockingRulesCount, cloudWorkloadSecurityAgentPolicyAttributes.blockingRulesCount)
+ && Objects.equals(
+ this.datadogManaged, cloudWorkloadSecurityAgentPolicyAttributes.datadogManaged)
+ && Objects.equals(this.description, cloudWorkloadSecurityAgentPolicyAttributes.description)
+ && Objects.equals(
+ this.disabledRulesCount, cloudWorkloadSecurityAgentPolicyAttributes.disabledRulesCount)
+ && Objects.equals(this.enabled, cloudWorkloadSecurityAgentPolicyAttributes.enabled)
+ && Objects.equals(this.hostTags, cloudWorkloadSecurityAgentPolicyAttributes.hostTags)
+ && Objects.equals(
+ this.hostTagsLists, cloudWorkloadSecurityAgentPolicyAttributes.hostTagsLists)
+ && Objects.equals(
+ this.monitoringRulesCount,
+ cloudWorkloadSecurityAgentPolicyAttributes.monitoringRulesCount)
+ && Objects.equals(this.name, cloudWorkloadSecurityAgentPolicyAttributes.name)
+ && Objects.equals(
+ this.policyVersion, cloudWorkloadSecurityAgentPolicyAttributes.policyVersion)
+ && Objects.equals(this.priority, cloudWorkloadSecurityAgentPolicyAttributes.priority)
+ && Objects.equals(this.ruleCount, cloudWorkloadSecurityAgentPolicyAttributes.ruleCount)
+ && Objects.equals(this.updateDate, cloudWorkloadSecurityAgentPolicyAttributes.updateDate)
+ && Objects.equals(this.updatedAt, cloudWorkloadSecurityAgentPolicyAttributes.updatedAt)
+ && Objects.equals(this.updater, cloudWorkloadSecurityAgentPolicyAttributes.updater)
+ && Objects.equals(
+ this.additionalProperties,
+ cloudWorkloadSecurityAgentPolicyAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ blockingRulesCount,
+ datadogManaged,
+ description,
+ disabledRulesCount,
+ enabled,
+ hostTags,
+ hostTagsLists,
+ monitoringRulesCount,
+ name,
+ policyVersion,
+ priority,
+ ruleCount,
+ updateDate,
+ updatedAt,
+ updater,
+ additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CloudWorkloadSecurityAgentPolicyAttributes {\n");
+ sb.append(" blockingRulesCount: ").append(toIndentedString(blockingRulesCount)).append("\n");
+ sb.append(" datadogManaged: ").append(toIndentedString(datadogManaged)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" disabledRulesCount: ").append(toIndentedString(disabledRulesCount)).append("\n");
+ sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n");
+ sb.append(" hostTags: ").append(toIndentedString(hostTags)).append("\n");
+ sb.append(" hostTagsLists: ").append(toIndentedString(hostTagsLists)).append("\n");
+ sb.append(" monitoringRulesCount: ")
+ .append(toIndentedString(monitoringRulesCount))
+ .append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" policyVersion: ").append(toIndentedString(policyVersion)).append("\n");
+ sb.append(" priority: ").append(toIndentedString(priority)).append("\n");
+ sb.append(" ruleCount: ").append(toIndentedString(ruleCount)).append("\n");
+ sb.append(" updateDate: ").append(toIndentedString(updateDate)).append("\n");
+ sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
+ sb.append(" updater: ").append(toIndentedString(updater)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyCreateAttributes.java
new file mode 100644
index 00000000000..184831c20ee
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyCreateAttributes.java
@@ -0,0 +1,281 @@
+/*
+ * 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.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** Create a new Cloud Workload Security Agent policy */
+@JsonPropertyOrder({
+ CloudWorkloadSecurityAgentPolicyCreateAttributes.JSON_PROPERTY_DESCRIPTION,
+ CloudWorkloadSecurityAgentPolicyCreateAttributes.JSON_PROPERTY_ENABLED,
+ CloudWorkloadSecurityAgentPolicyCreateAttributes.JSON_PROPERTY_HOST_TAGS,
+ CloudWorkloadSecurityAgentPolicyCreateAttributes.JSON_PROPERTY_HOST_TAGS_LISTS,
+ CloudWorkloadSecurityAgentPolicyCreateAttributes.JSON_PROPERTY_NAME
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CloudWorkloadSecurityAgentPolicyCreateAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DESCRIPTION = "description";
+ private String description;
+
+ public static final String JSON_PROPERTY_ENABLED = "enabled";
+ private Boolean enabled;
+
+ public static final String JSON_PROPERTY_HOST_TAGS = "hostTags";
+ private List hostTags = null;
+
+ public static final String JSON_PROPERTY_HOST_TAGS_LISTS = "hostTagsLists";
+ private List> hostTagsLists = null;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public CloudWorkloadSecurityAgentPolicyCreateAttributes() {}
+
+ @JsonCreator
+ public CloudWorkloadSecurityAgentPolicyCreateAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) {
+ this.name = name;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyCreateAttributes description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * The description of the policy
+ *
+ * @return description
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DESCRIPTION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyCreateAttributes enabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Whether the policy is enabled
+ *
+ * @return enabled
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ENABLED)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getEnabled() {
+ return enabled;
+ }
+
+ public void setEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyCreateAttributes hostTags(List hostTags) {
+ this.hostTags = hostTags;
+ return this;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyCreateAttributes addHostTagsItem(String hostTagsItem) {
+ if (this.hostTags == null) {
+ this.hostTags = new ArrayList<>();
+ }
+ this.hostTags.add(hostTagsItem);
+ return this;
+ }
+
+ /**
+ * The host tags defining where this policy is deployed
+ *
+ * @return hostTags
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_HOST_TAGS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getHostTags() {
+ return hostTags;
+ }
+
+ public void setHostTags(List hostTags) {
+ this.hostTags = hostTags;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyCreateAttributes hostTagsLists(
+ List> hostTagsLists) {
+ this.hostTagsLists = hostTagsLists;
+ return this;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyCreateAttributes addHostTagsListsItem(
+ List hostTagsListsItem) {
+ if (this.hostTagsLists == null) {
+ this.hostTagsLists = new ArrayList<>();
+ }
+ this.hostTagsLists.add(hostTagsListsItem);
+ return this;
+ }
+
+ /**
+ * The host tags defining where this policy is deployed, the inner values are linked with AND, the
+ * outer values are linked with OR
+ *
+ * @return hostTagsLists
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_HOST_TAGS_LISTS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List> getHostTagsLists() {
+ return hostTagsLists;
+ }
+
+ public void setHostTagsLists(List> hostTagsLists) {
+ this.hostTagsLists = hostTagsLists;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyCreateAttributes name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The name of the policy
+ *
+ * @return name
+ */
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return CloudWorkloadSecurityAgentPolicyCreateAttributes
+ */
+ @JsonAnySetter
+ public CloudWorkloadSecurityAgentPolicyCreateAttributes putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this CloudWorkloadSecurityAgentPolicyCreateAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CloudWorkloadSecurityAgentPolicyCreateAttributes
+ cloudWorkloadSecurityAgentPolicyCreateAttributes =
+ (CloudWorkloadSecurityAgentPolicyCreateAttributes) o;
+ return Objects.equals(
+ this.description, cloudWorkloadSecurityAgentPolicyCreateAttributes.description)
+ && Objects.equals(this.enabled, cloudWorkloadSecurityAgentPolicyCreateAttributes.enabled)
+ && Objects.equals(this.hostTags, cloudWorkloadSecurityAgentPolicyCreateAttributes.hostTags)
+ && Objects.equals(
+ this.hostTagsLists, cloudWorkloadSecurityAgentPolicyCreateAttributes.hostTagsLists)
+ && Objects.equals(this.name, cloudWorkloadSecurityAgentPolicyCreateAttributes.name)
+ && Objects.equals(
+ this.additionalProperties,
+ cloudWorkloadSecurityAgentPolicyCreateAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(description, enabled, hostTags, hostTagsLists, name, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CloudWorkloadSecurityAgentPolicyCreateAttributes {\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n");
+ sb.append(" hostTags: ").append(toIndentedString(hostTags)).append("\n");
+ sb.append(" hostTagsLists: ").append(toIndentedString(hostTagsLists)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyCreateData.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyCreateData.java
new file mode 100644
index 00000000000..daee5ccc573
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyCreateData.java
@@ -0,0 +1,188 @@
+/*
+ * 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.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Object for a single Agent rule */
+@JsonPropertyOrder({
+ CloudWorkloadSecurityAgentPolicyCreateData.JSON_PROPERTY_ATTRIBUTES,
+ CloudWorkloadSecurityAgentPolicyCreateData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CloudWorkloadSecurityAgentPolicyCreateData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private CloudWorkloadSecurityAgentPolicyCreateAttributes attributes;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private CloudWorkloadSecurityAgentPolicyType type = CloudWorkloadSecurityAgentPolicyType.POLICY;
+
+ public CloudWorkloadSecurityAgentPolicyCreateData() {}
+
+ @JsonCreator
+ public CloudWorkloadSecurityAgentPolicyCreateData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ CloudWorkloadSecurityAgentPolicyCreateAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
+ CloudWorkloadSecurityAgentPolicyType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public CloudWorkloadSecurityAgentPolicyCreateData attributes(
+ CloudWorkloadSecurityAgentPolicyCreateAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Create a new Cloud Workload Security Agent policy
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public CloudWorkloadSecurityAgentPolicyCreateAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(CloudWorkloadSecurityAgentPolicyCreateAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyCreateData type(
+ CloudWorkloadSecurityAgentPolicyType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * The type of the resource, must always be policy
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public CloudWorkloadSecurityAgentPolicyType getType() {
+ return type;
+ }
+
+ public void setType(CloudWorkloadSecurityAgentPolicyType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return CloudWorkloadSecurityAgentPolicyCreateData
+ */
+ @JsonAnySetter
+ public CloudWorkloadSecurityAgentPolicyCreateData putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this CloudWorkloadSecurityAgentPolicyCreateData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CloudWorkloadSecurityAgentPolicyCreateData cloudWorkloadSecurityAgentPolicyCreateData =
+ (CloudWorkloadSecurityAgentPolicyCreateData) o;
+ return Objects.equals(this.attributes, cloudWorkloadSecurityAgentPolicyCreateData.attributes)
+ && Objects.equals(this.type, cloudWorkloadSecurityAgentPolicyCreateData.type)
+ && Objects.equals(
+ this.additionalProperties,
+ cloudWorkloadSecurityAgentPolicyCreateData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CloudWorkloadSecurityAgentPolicyCreateData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyCreateRequest.java
new file mode 100644
index 00000000000..6d4b6bb78fa
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyCreateRequest.java
@@ -0,0 +1,151 @@
+/*
+ * 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.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Request object that includes the Agent policy to create */
+@JsonPropertyOrder({CloudWorkloadSecurityAgentPolicyCreateRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CloudWorkloadSecurityAgentPolicyCreateRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private CloudWorkloadSecurityAgentPolicyCreateData data;
+
+ public CloudWorkloadSecurityAgentPolicyCreateRequest() {}
+
+ @JsonCreator
+ public CloudWorkloadSecurityAgentPolicyCreateRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ CloudWorkloadSecurityAgentPolicyCreateData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyCreateRequest data(
+ CloudWorkloadSecurityAgentPolicyCreateData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Object for a single Agent rule
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public CloudWorkloadSecurityAgentPolicyCreateData getData() {
+ return data;
+ }
+
+ public void setData(CloudWorkloadSecurityAgentPolicyCreateData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return CloudWorkloadSecurityAgentPolicyCreateRequest
+ */
+ @JsonAnySetter
+ public CloudWorkloadSecurityAgentPolicyCreateRequest putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this CloudWorkloadSecurityAgentPolicyCreateRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CloudWorkloadSecurityAgentPolicyCreateRequest cloudWorkloadSecurityAgentPolicyCreateRequest =
+ (CloudWorkloadSecurityAgentPolicyCreateRequest) o;
+ return Objects.equals(this.data, cloudWorkloadSecurityAgentPolicyCreateRequest.data)
+ && Objects.equals(
+ this.additionalProperties,
+ cloudWorkloadSecurityAgentPolicyCreateRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CloudWorkloadSecurityAgentPolicyCreateRequest {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyData.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyData.java
new file mode 100644
index 00000000000..f08fad627af
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyData.java
@@ -0,0 +1,199 @@
+/*
+ * 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.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Object for a single Agent policy */
+@JsonPropertyOrder({
+ CloudWorkloadSecurityAgentPolicyData.JSON_PROPERTY_ATTRIBUTES,
+ CloudWorkloadSecurityAgentPolicyData.JSON_PROPERTY_ID,
+ CloudWorkloadSecurityAgentPolicyData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CloudWorkloadSecurityAgentPolicyData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private CloudWorkloadSecurityAgentPolicyAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private CloudWorkloadSecurityAgentPolicyType type = CloudWorkloadSecurityAgentPolicyType.POLICY;
+
+ public CloudWorkloadSecurityAgentPolicyData attributes(
+ CloudWorkloadSecurityAgentPolicyAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * A Cloud Workload Security Agent policy returned by the API
+ *
+ * @return attributes
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public CloudWorkloadSecurityAgentPolicyAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(CloudWorkloadSecurityAgentPolicyAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The ID of the Agent policy
+ *
+ * @return id
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public CloudWorkloadSecurityAgentPolicyData type(CloudWorkloadSecurityAgentPolicyType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * The type of the resource, must always be policy
+ *
+ * @return type
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public CloudWorkloadSecurityAgentPolicyType getType() {
+ return type;
+ }
+
+ public void setType(CloudWorkloadSecurityAgentPolicyType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return CloudWorkloadSecurityAgentPolicyData
+ */
+ @JsonAnySetter
+ public CloudWorkloadSecurityAgentPolicyData putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map