Skip to content

Commit

Permalink
Regenerate client from commit 5efabbe7 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Mar 1, 2024
1 parent eac267b commit 084c573
Show file tree
Hide file tree
Showing 11 changed files with 572 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-02-29 14:49:25.092326",
"spec_repo_commit": "bb5305bc"
"regenerated": "2024-03-01 10:51:12.170900",
"spec_repo_commit": "5efabbe7"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-02-29 14:49:25.138459",
"spec_repo_commit": "bb5305bc"
"regenerated": "2024-03-01 10:51:12.184733",
"spec_repo_commit": "5efabbe7"
}
}
}
128 changes: 128 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29578,6 +29578,129 @@ paths:
We are gradually onboarding support for more sources. If you have any

feedback, contact [Datadog Support](https://docs.datadoghq.com/help/).'
/api/v2/remote_config/products/cws/agent_rules:
get:
description: Get the list of Cloud Security Management Threats Agent rules.
operationId: ListCSMThreatsAgentRules
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRulesListResponse'
description: OK
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get all CSM Threats Agent rules
tags:
- Cloud Workload Security
post:
description: Create a new Cloud Security Management Threats Agent rule with
the given parameters.
operationId: CreateCSMThreatsAgentRule
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreateRequest'
description: The definition of the new Agent rule.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse'
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 rule
tags:
- Cloud Workload Security
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.
operationId: DeleteCSMThreatsAgentRule
parameters:
- $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
responses:
'204':
description: OK
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Delete a CSM Threats Agent rule
tags:
- Cloud Workload Security
get:
description: Get the details of a specific Cloud Security Management Threats
Agent rule.
operationId: GetCSMThreatsAgentRule
parameters:
- $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse'
description: OK
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get a CSM Threats Agent rule
tags:
- Cloud Workload Security
patch:
description: 'Update a specific Cloud Security Management Threats Agent rule.

Returns the Agent rule object when the request is successful.'
operationId: UpdateCSMThreatsAgentRule
parameters:
- $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdateRequest'
description: New definition of the Agent rule.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse'
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 rule
tags:
- Cloud Workload Security
x-codegen-request-body-name: body
/api/v2/restriction_policy/{resource_id}:
delete:
description: Deletes the restriction policy associated with a specified resource.
Expand Down Expand Up @@ -34817,6 +34940,11 @@ tags:
[Test Visibility in Datadog page](https://docs.datadoghq.com/tests/) for more
information.
name: CI Visibility Tests
- description: Cloud Security Management Threats (CSM Threats) monitors file, network,
and process activity across your environment to detect real-time threats to your
infrastructure. See the [Setting up CSM Threats page](https://docs.datadoghq.com/security/threats/)
for more information.
name: CSM Threats
- description: View and manage cases and projects within Case Management. See the
[Case Management page](https://docs.datadoghq.com/service_management/case_management/)
for more information.
Expand Down
35 changes: 35 additions & 0 deletions examples/v2/cloud-workload-security/CreateCSMThreatsAgentRule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""
Create a CSM Threats Agent rule returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.cloud_workload_security_api import CloudWorkloadSecurityApi
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_create_attributes import (
CloudWorkloadSecurityAgentRuleCreateAttributes,
)
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_create_data import (
CloudWorkloadSecurityAgentRuleCreateData,
)
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_create_request import (
CloudWorkloadSecurityAgentRuleCreateRequest,
)
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_type import CloudWorkloadSecurityAgentRuleType

body = CloudWorkloadSecurityAgentRuleCreateRequest(
data=CloudWorkloadSecurityAgentRuleCreateData(
attributes=CloudWorkloadSecurityAgentRuleCreateAttributes(
description="My Agent rule",
enabled=True,
expression='exec.file.name == \\"sh\\"',
name="my_agent_rule",
),
type=CloudWorkloadSecurityAgentRuleType.AGENT_RULE,
),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = CloudWorkloadSecurityApi(api_client)
response = api_instance.create_csm_threats_agent_rule(body=body)

print(response)
13 changes: 13 additions & 0 deletions examples/v2/cloud-workload-security/DeleteCSMThreatsAgentRule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""
Delete a CSM Threats Agent rule returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.cloud_workload_security_api import CloudWorkloadSecurityApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = CloudWorkloadSecurityApi(api_client)
api_instance.delete_csm_threats_agent_rule(
agent_rule_id="agent_rule_id",
)
15 changes: 15 additions & 0 deletions examples/v2/cloud-workload-security/GetCSMThreatsAgentRule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
Get a CSM Threats Agent rule returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.cloud_workload_security_api import CloudWorkloadSecurityApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = CloudWorkloadSecurityApi(api_client)
response = api_instance.get_csm_threats_agent_rule(
agent_rule_id="agent_rule_id",
)

print(response)
13 changes: 13 additions & 0 deletions examples/v2/cloud-workload-security/ListCSMThreatsAgentRules.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""
Get all CSM Threats Agent rules returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.cloud_workload_security_api import CloudWorkloadSecurityApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = CloudWorkloadSecurityApi(api_client)
response = api_instance.list_csm_threats_agent_rules()

print(response)
34 changes: 34 additions & 0 deletions examples/v2/cloud-workload-security/UpdateCSMThreatsAgentRule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""
Update a CSM Threats Agent rule returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.cloud_workload_security_api import CloudWorkloadSecurityApi
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_type import CloudWorkloadSecurityAgentRuleType
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_update_attributes import (
CloudWorkloadSecurityAgentRuleUpdateAttributes,
)
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_update_data import (
CloudWorkloadSecurityAgentRuleUpdateData,
)
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_update_request import (
CloudWorkloadSecurityAgentRuleUpdateRequest,
)

body = CloudWorkloadSecurityAgentRuleUpdateRequest(
data=CloudWorkloadSecurityAgentRuleUpdateData(
attributes=CloudWorkloadSecurityAgentRuleUpdateAttributes(
description="My Agent rule",
enabled=True,
expression='exec.file.name == \\"sh\\"',
),
type=CloudWorkloadSecurityAgentRuleType.AGENT_RULE,
),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = CloudWorkloadSecurityApi(api_client)
response = api_instance.update_csm_threats_agent_rule(agent_rule_id="agent_rule_id", body=body)

print(response)
Loading

0 comments on commit 084c573

Please sign in to comment.