Skip to content

Commit

Permalink
Regenerate client from commit 504115dd of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Dec 13, 2024
1 parent 51358ec commit cae423e
Show file tree
Hide file tree
Showing 16 changed files with 904 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-12-12 15:23:57.766531",
"spec_repo_commit": "222e1f81"
"regenerated": "2024-12-13 13:02:05.403517",
"spec_repo_commit": "504115dd"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-12-12 15:23:57.785483",
"spec_repo_commit": "222e1f81"
"regenerated": "2024-12-13 13:02:05.422968",
"spec_repo_commit": "504115dd"
}
}
}
189 changes: 189 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4339,6 +4339,34 @@ components:
from the other indexes
type: string
type: object
CSMAgentsMetadata:
description: Metadata related to the paginated response.
properties:
page_index:
description: The index of the current page in the paginated results.
example: 0
format: int64
type: integer
page_size:
description: The number of items per page in the paginated results.
example: 10
format: int64
type: integer
total_filtered:
description: Total number of items that match the filter criteria.
example: 128697
format: int64
type: integer
type: object
CSMAgentsType:
default: datadog_agent
description: The type of the resource. The value should always be `datadog_agent`.
enum:
- datadog_agent
example: datadog_agent
type: string
x-enum-varnames:
- DATADOG_AGENT
CalculatedField:
description: Calculated field.
properties:
Expand Down Expand Up @@ -6630,6 +6658,95 @@ components:
nullable: true
type: string
type: object
CsmAgentData:
description: Single Agent Data.
properties:
attributes:
$ref: '#/components/schemas/CsmAgentsAttributes'
id:
description: The ID of the Agent.
example: fffffc5505f6a006fdf7cf5aae053653
type: string
type:
$ref: '#/components/schemas/CSMAgentsType'
type: object
CsmAgentsAttributes:
description: A CSM Agent returned by the API.
properties:
Agent_version:
description: Version of the Datadog Agent.
type: string
aws_fargate:
description: AWS Fargate details.
type: string
cluster_name:
description: List of cluster names associated with the Agent.
items:
type: string
type: array
datadog_agent:
description: Unique identifier for the Datadog Agent.
type: string
ecs_fargate_task_arn:
description: ARN of the ECS Fargate task.
type: string
envs:
description: List of environments associated with the Agent.
items:
type: string
type: array
host_id:
description: ID of the host.
format: int64
type: integer
hostname:
description: Name of the host.
type: string
install_method_installer_version:
description: Version of the installer used for installing the Datadog Agent.
type: string
install_method_tool:
description: Tool used for installing the Datadog Agent.
type: string
is_csm_vm_containers_enabled:
description: Indicates if CSM VM Containers is enabled.
nullable: true
type: boolean
is_csm_vm_hosts_enabled:
description: Indicates if CSM VM Hosts is enabled.
nullable: true
type: boolean
is_cspm_enabled:
description: Indicates if CSPM is enabled.
nullable: true
type: boolean
is_cws_enabled:
description: Indicates if CWS is enabled.
nullable: true
type: boolean
is_cws_remote_configuration_enabled:
description: Indicates if CWS Remote Configuration is enabled.
nullable: true
type: boolean
is_remote_configuration_enabled:
description: Indicates if Remote Configuration is enabled.
nullable: true
type: boolean
os:
description: Operating system of the host.
type: string
type: object
CsmAgentsResponse:
description: Response object that includes a list of CSM Agents.
properties:
data:
description: A list of Agents.
items:
$ref: '#/components/schemas/CsmAgentData'
type: array
meta:
$ref: '#/components/schemas/CSMAgentsMetadata'
type: object
CustomCostGetResponseMeta:
description: Meta for the response from the Get Custom Costs endpoints.
properties:
Expand Down Expand Up @@ -17704,6 +17821,16 @@ components:
required:
- data
type: object
OrderDirection:
description: The sort direction for results.
enum:
- asc
- desc
example: asc
type: string
x-enum-varnames:
- ASC
- DESC
OrgConfigGetResponse:
description: A response with a single Org Config.
properties:
Expand Down Expand Up @@ -30922,6 +31049,59 @@ paths:
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/csm/onboarding/agents:
get:
description: Get the list of all CSM Agents running on your hosts and containers.
operationId: ListAllCSMAgents
parameters:
- description: The page index for pagination (zero-based).
in: query
name: page
required: false
schema:
example: 2
format: int32
maximum: 1000000
minimum: 0
type: integer
- description: The number of items to include in a single page.
in: query
name: size
required: false
schema:
example: 12
format: int32
maximum: 100
minimum: 0
type: integer
- description: A search query string to filter results (for example, `hostname:COMP-T2H4J27423`).
in: query
name: query
required: false
schema:
example: hostname:COMP-T2H4J27423
type: string
- description: The sort direction for results. Use `asc` for ascending or `desc`
for descending.
in: query
name: order_direction
required: false
schema:
$ref: '#/components/schemas/OrderDirection'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CsmAgentsResponse'
description: OK
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get all CSM Agents
tags:
- CSM Agents
/api/v2/current_user/application_keys:
get:
description: List all application keys available for current user
Expand Down Expand Up @@ -44617,6 +44797,15 @@ tags:
[Test Visibility in Datadog page](https://docs.datadoghq.com/tests/) for more
information.
name: CI Visibility Tests
- description: 'Datadog Cloud Security Management (CSM) delivers real-time threat
detection

and continuous configuration audits across your entire cloud infrastructure,

all in a unified view for seamless collaboration and faster remediation.

Go to https://docs.datadoghq.com/security/cloud_security_management to learn more'
name: CSM Agents
- 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 [Cloud Security Management Threats](https://docs.datadoghq.com/security/threats/)
Expand Down
17 changes: 17 additions & 0 deletions examples/v2/csm-agents/ListAllCSMAgents.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Get all CSM Agents returns "OK" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.CSMAgentsApi(configuration);

apiInstance
.listAllCSMAgents()
.then((data: v2.CsmAgentsResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
19 changes: 19 additions & 0 deletions features/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3313,6 +3313,25 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
},
"operationResponseType": "ProjectedCostResponse",
},
"v2.ListAllCSMAgents": {
"page": {
"type": "number",
"format": "int32",
},
"size": {
"type": "number",
"format": "int32",
},
"query": {
"type": "string",
"format": "",
},
"orderDirection": {
"type": "OrderDirection",
"format": "",
},
"operationResponseType": "CsmAgentsResponse",
},
"v2.DeleteDashboardListItems": {
"dashboardListId": {
"type": "number",
Expand Down
20 changes: 20 additions & 0 deletions features/v2/csm_agents.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@endpoint(csm-agents) @endpoint(csm-agents-v2)
Feature: CSM Agents
Datadog Cloud Security Management (CSM) delivers real-time threat
detection and continuous configuration audits across your entire cloud
infrastructure, all in a unified view for seamless collaboration and
faster remediation. Go to
https://docs.datadoghq.com/security/cloud_security_management to learn
more

@team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
Scenario: Get all CSM Agents returns "OK" response
Given there is a valid "csm_agent" in the system
And a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "CSMAgents" API
And new "ListAllCSMAgents" request
When the request is sent
Then the response status is 200 OK
And the response "data.type" is equal to "datadog_agent"
And the response "data.attributes.hostname" is equal to "i-0b36df8bd65f53d1f"
12 changes: 12 additions & 0 deletions features/v2/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@
"tag": "Software Catalog",
"operationId": "UpsertCatalogEntity"
},
{
"parameters": [
{
"name": "body",
"value": "{\n \"data\": [\n {\n \"id\": \"ff9f607ae783153d87f37f68e64df6f8\",\n \"type\": \"datadog_agent\",\n \"attributes\": {\n \"agent_version\": \"7.61.0-rc.4\",\n \"aws_fargate\": \"\",\n \"cluster_name\": [\n \"whiscash\"\n ],\n \"ecs_fargate_task_arn\": \"\",\n \"envs\": [\n \"prod\"\n ],\n \"host_id\": 34940187,\n \"hostname\": \"i-0b36df8bd65f53d1f\",\n \"install_method_installer_version\": \"v1.11.0-rc.2\",\n \"install_method_tool\": \"datadog-operator\",\n \"is_csm_vm_containers_enabled\": true,\n \"is_csm_vm_hosts_enabled\": true,\n \"is_cspm_enabled\": true,\n \"is_cws_enabled\": true,\n \"is_cws_remote_configuration_enabled\": true,\n \"is_remote_configuration_enabled\": true,\n \"os\": \"GNU/Linux\"\n }\n }\n ],\n \"meta\": {\n \"total_filtered\": 1,\n \"page_index\": 0,\n \"page_size\": 1\n }\n}"
}
],
"step": "there is a valid \"csm_agent\" in the system",
"key": "csm_agent",
"tag": "CSM Agents",
"operationId": "ListAllCSMAgents"
},
{
"parameters": [
{
Expand Down
6 changes: 6 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,12 @@
"type": "safe"
}
},
"ListAllCSMAgents": {
"tag": "CSM Agents",
"undo": {
"type": "safe"
}
},
"ListCurrentUserApplicationKeys": {
"tag": "Key Management",
"undo": {
Expand Down
Loading

0 comments on commit cae423e

Please sign in to comment.