Skip to content

Commit 084c573

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5efabbe7 of spec repo
1 parent eac267b commit 084c573

File tree

11 files changed

+572
-4
lines changed

11 files changed

+572
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-02-29 14:49:25.092326",
8-
"spec_repo_commit": "bb5305bc"
7+
"regenerated": "2024-03-01 10:51:12.170900",
8+
"spec_repo_commit": "5efabbe7"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-02-29 14:49:25.138459",
13-
"spec_repo_commit": "bb5305bc"
12+
"regenerated": "2024-03-01 10:51:12.184733",
13+
"spec_repo_commit": "5efabbe7"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29578,6 +29578,129 @@ paths:
2957829578
We are gradually onboarding support for more sources. If you have any
2957929579

2958029580
feedback, contact [Datadog Support](https://docs.datadoghq.com/help/).'
29581+
/api/v2/remote_config/products/cws/agent_rules:
29582+
get:
29583+
description: Get the list of Cloud Security Management Threats Agent rules.
29584+
operationId: ListCSMThreatsAgentRules
29585+
responses:
29586+
'200':
29587+
content:
29588+
application/json:
29589+
schema:
29590+
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRulesListResponse'
29591+
description: OK
29592+
'403':
29593+
$ref: '#/components/responses/NotAuthorizedResponse'
29594+
'429':
29595+
$ref: '#/components/responses/TooManyRequestsResponse'
29596+
summary: Get all CSM Threats Agent rules
29597+
tags:
29598+
- Cloud Workload Security
29599+
post:
29600+
description: Create a new Cloud Security Management Threats Agent rule with
29601+
the given parameters.
29602+
operationId: CreateCSMThreatsAgentRule
29603+
requestBody:
29604+
content:
29605+
application/json:
29606+
schema:
29607+
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreateRequest'
29608+
description: The definition of the new Agent rule.
29609+
required: true
29610+
responses:
29611+
'200':
29612+
content:
29613+
application/json:
29614+
schema:
29615+
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse'
29616+
description: OK
29617+
'400':
29618+
$ref: '#/components/responses/BadRequestResponse'
29619+
'403':
29620+
$ref: '#/components/responses/NotAuthorizedResponse'
29621+
'409':
29622+
$ref: '#/components/responses/ConflictResponse'
29623+
'429':
29624+
$ref: '#/components/responses/TooManyRequestsResponse'
29625+
summary: Create a CSM Threats Agent rule
29626+
tags:
29627+
- Cloud Workload Security
29628+
x-codegen-request-body-name: body
29629+
/api/v2/remote_config/products/cws/agent_rules/{agent_rule_id}:
29630+
delete:
29631+
description: Delete a specific Cloud Security Management Threats Agent rule.
29632+
operationId: DeleteCSMThreatsAgentRule
29633+
parameters:
29634+
- $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
29635+
responses:
29636+
'204':
29637+
description: OK
29638+
'403':
29639+
$ref: '#/components/responses/NotAuthorizedResponse'
29640+
'404':
29641+
$ref: '#/components/responses/NotFoundResponse'
29642+
'429':
29643+
$ref: '#/components/responses/TooManyRequestsResponse'
29644+
summary: Delete a CSM Threats Agent rule
29645+
tags:
29646+
- Cloud Workload Security
29647+
get:
29648+
description: Get the details of a specific Cloud Security Management Threats
29649+
Agent rule.
29650+
operationId: GetCSMThreatsAgentRule
29651+
parameters:
29652+
- $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
29653+
responses:
29654+
'200':
29655+
content:
29656+
application/json:
29657+
schema:
29658+
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse'
29659+
description: OK
29660+
'403':
29661+
$ref: '#/components/responses/NotAuthorizedResponse'
29662+
'404':
29663+
$ref: '#/components/responses/NotFoundResponse'
29664+
'429':
29665+
$ref: '#/components/responses/TooManyRequestsResponse'
29666+
summary: Get a CSM Threats Agent rule
29667+
tags:
29668+
- Cloud Workload Security
29669+
patch:
29670+
description: 'Update a specific Cloud Security Management Threats Agent rule.
29671+
29672+
Returns the Agent rule object when the request is successful.'
29673+
operationId: UpdateCSMThreatsAgentRule
29674+
parameters:
29675+
- $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
29676+
requestBody:
29677+
content:
29678+
application/json:
29679+
schema:
29680+
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdateRequest'
29681+
description: New definition of the Agent rule.
29682+
required: true
29683+
responses:
29684+
'200':
29685+
content:
29686+
application/json:
29687+
schema:
29688+
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse'
29689+
description: OK
29690+
'400':
29691+
$ref: '#/components/responses/BadRequestResponse'
29692+
'403':
29693+
$ref: '#/components/responses/NotAuthorizedResponse'
29694+
'404':
29695+
$ref: '#/components/responses/NotFoundResponse'
29696+
'409':
29697+
$ref: '#/components/responses/ConcurrentModificationResponse'
29698+
'429':
29699+
$ref: '#/components/responses/TooManyRequestsResponse'
29700+
summary: Update a CSM Threats Agent rule
29701+
tags:
29702+
- Cloud Workload Security
29703+
x-codegen-request-body-name: body
2958129704
/api/v2/restriction_policy/{resource_id}:
2958229705
delete:
2958329706
description: Deletes the restriction policy associated with a specified resource.
@@ -34817,6 +34940,11 @@ tags:
3481734940
[Test Visibility in Datadog page](https://docs.datadoghq.com/tests/) for more
3481834941
information.
3481934942
name: CI Visibility Tests
34943+
- description: Cloud Security Management Threats (CSM Threats) monitors file, network,
34944+
and process activity across your environment to detect real-time threats to your
34945+
infrastructure. See the [Setting up CSM Threats page](https://docs.datadoghq.com/security/threats/)
34946+
for more information.
34947+
name: CSM Threats
3482034948
- description: View and manage cases and projects within Case Management. See the
3482134949
[Case Management page](https://docs.datadoghq.com/service_management/case_management/)
3482234950
for more information.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"""
2+
Create a CSM Threats Agent rule returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.cloud_workload_security_api import CloudWorkloadSecurityApi
7+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_create_attributes import (
8+
CloudWorkloadSecurityAgentRuleCreateAttributes,
9+
)
10+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_create_data import (
11+
CloudWorkloadSecurityAgentRuleCreateData,
12+
)
13+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_create_request import (
14+
CloudWorkloadSecurityAgentRuleCreateRequest,
15+
)
16+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_type import CloudWorkloadSecurityAgentRuleType
17+
18+
body = CloudWorkloadSecurityAgentRuleCreateRequest(
19+
data=CloudWorkloadSecurityAgentRuleCreateData(
20+
attributes=CloudWorkloadSecurityAgentRuleCreateAttributes(
21+
description="My Agent rule",
22+
enabled=True,
23+
expression='exec.file.name == \\"sh\\"',
24+
name="my_agent_rule",
25+
),
26+
type=CloudWorkloadSecurityAgentRuleType.AGENT_RULE,
27+
),
28+
)
29+
30+
configuration = Configuration()
31+
with ApiClient(configuration) as api_client:
32+
api_instance = CloudWorkloadSecurityApi(api_client)
33+
response = api_instance.create_csm_threats_agent_rule(body=body)
34+
35+
print(response)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Delete a CSM Threats Agent rule returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.cloud_workload_security_api import CloudWorkloadSecurityApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = CloudWorkloadSecurityApi(api_client)
11+
api_instance.delete_csm_threats_agent_rule(
12+
agent_rule_id="agent_rule_id",
13+
)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
Get a CSM Threats Agent rule returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.cloud_workload_security_api import CloudWorkloadSecurityApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = CloudWorkloadSecurityApi(api_client)
11+
response = api_instance.get_csm_threats_agent_rule(
12+
agent_rule_id="agent_rule_id",
13+
)
14+
15+
print(response)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Get all CSM Threats Agent rules returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.cloud_workload_security_api import CloudWorkloadSecurityApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = CloudWorkloadSecurityApi(api_client)
11+
response = api_instance.list_csm_threats_agent_rules()
12+
13+
print(response)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"""
2+
Update a CSM Threats Agent rule returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.cloud_workload_security_api import CloudWorkloadSecurityApi
7+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_type import CloudWorkloadSecurityAgentRuleType
8+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_update_attributes import (
9+
CloudWorkloadSecurityAgentRuleUpdateAttributes,
10+
)
11+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_update_data import (
12+
CloudWorkloadSecurityAgentRuleUpdateData,
13+
)
14+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_update_request import (
15+
CloudWorkloadSecurityAgentRuleUpdateRequest,
16+
)
17+
18+
body = CloudWorkloadSecurityAgentRuleUpdateRequest(
19+
data=CloudWorkloadSecurityAgentRuleUpdateData(
20+
attributes=CloudWorkloadSecurityAgentRuleUpdateAttributes(
21+
description="My Agent rule",
22+
enabled=True,
23+
expression='exec.file.name == \\"sh\\"',
24+
),
25+
type=CloudWorkloadSecurityAgentRuleType.AGENT_RULE,
26+
),
27+
)
28+
29+
configuration = Configuration()
30+
with ApiClient(configuration) as api_client:
31+
api_instance = CloudWorkloadSecurityApi(api_client)
32+
response = api_instance.update_csm_threats_agent_rule(agent_rule_id="agent_rule_id", body=body)
33+
34+
print(response)

0 commit comments

Comments
 (0)