Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CSM Coverage Analysis API specs #437

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-12-19 07:26:20.419256",
"spec_repo_commit": "5dd2cbe4"
"regenerated": "2024-12-19 17:42:48.576224",
"spec_repo_commit": "601229dc"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-12-19 07:26:20.435562",
"spec_repo_commit": "5dd2cbe4"
"regenerated": "2024-12-19 17:42:48.591690",
"spec_repo_commit": "601229dc"
}
}
}
209 changes: 209 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7159,6 +7159,140 @@ components:
meta:
$ref: '#/components/schemas/CSMAgentsMetadata'
type: object
CsmCloudAccountsCoverageAnalysisAttributes:
description: CSM Cloud Accounts Coverage Analysis attributes.
properties:
aws_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
azure_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
gcp_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
org_id:
description: The ID of your organization.
example: 123456
format: int64
type: integer
total_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
type: object
CsmCloudAccountsCoverageAnalysisData:
description: CSM Cloud Accounts Coverage Analysis data.
properties:
attributes:
$ref: '#/components/schemas/CsmCloudAccountsCoverageAnalysisAttributes'
id:
description: The ID of your organization.
example: 66b3c6b5-5c9a-457e-b1c3-f247ca23afa3
type: string
type:
default: get_cloud_accounts_coverage_analysis_response_public_v0
description: The type of the resource. The value should always be `get_cloud_accounts_coverage_analysis_response_public_v0`.
example: get_cloud_accounts_coverage_analysis_response_public_v0
type: string
type: object
CsmCloudAccountsCoverageAnalysisResponse:
description: CSM Cloud Accounts Coverage Analysis response.
properties:
data:
$ref: '#/components/schemas/CsmCloudAccountsCoverageAnalysisData'
type: object
CsmCoverageAnalysis:
description: CSM Coverage Analysis.
properties:
configured_resources_count:
description: The number of fully configured resources.
example: 8
format: int64
type: integer
coverage:
description: The coverage percentage.
example: 0.8
format: double
type: number
partially_configured_resources_count:
description: The number of partially configured resources.
example: 0
format: int64
type: integer
total_resources_count:
description: The total number of resources.
example: 10
format: int64
type: integer
type: object
CsmHostsAndContainersCoverageAnalysisAttributes:
description: CSM Hosts and Containers Coverage Analysis attributes.
properties:
cspm_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
cws_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
org_id:
description: The ID of your organization.
example: 123456
format: int64
type: integer
total_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
vm_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
type: object
CsmHostsAndContainersCoverageAnalysisData:
description: CSM Hosts and Containers Coverage Analysis data.
properties:
attributes:
$ref: '#/components/schemas/CsmHostsAndContainersCoverageAnalysisAttributes'
id:
description: The ID of your organization.
example: 66b3c6b5-5c9a-457e-b1c3-f247ca23afa3
type: string
type:
default: get_hosts_and_containers_coverage_analysis_response_public_v0
description: The type of the resource. The value should always be `get_hosts_and_containers_coverage_analysis_response_public_v0`.
example: get_hosts_and_containers_coverage_analysis_response_public_v0
type: string
type: object
CsmHostsAndContainersCoverageAnalysisResponse:
description: CSM Hosts and Containers Coverage Analysis response.
properties:
data:
$ref: '#/components/schemas/CsmHostsAndContainersCoverageAnalysisData'
type: object
CsmServerlessCoverageAnalysisAttributes:
description: CSM Serverless Resources Coverage Analysis attributes.
properties:
cws_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
org_id:
description: The ID of your organization.
example: 123456
format: int64
type: integer
total_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
type: object
CsmServerlessCoverageAnalysisData:
description: CSM Serverless Resources Coverage Analysis data.
properties:
attributes:
$ref: '#/components/schemas/CsmServerlessCoverageAnalysisAttributes'
id:
description: The ID of your organization.
example: 66b3c6b5-5c9a-457e-b1c3-f247ca23afa3
type: string
type:
default: get_serverless_coverage_analysis_response_public_v0
description: The type of the resource. The value should always be `get_serverless_coverage_analysis_response_public_v0`.
example: get_serverless_coverage_analysis_response_public_v0
type: string
type: object
CsmServerlessCoverageAnalysisResponse:
description: CSM Serverless Resources Coverage Analysis response.
properties:
data:
$ref: '#/components/schemas/CsmServerlessCoverageAnalysisData'
type: object
CustomConnection:
description: The definition of `CustomConnection` object.
properties:
Expand Down Expand Up @@ -32844,6 +32978,72 @@ paths:
summary: Get all CSM Agents
tags:
- CSM Agents
/api/v2/csm/onboarding/coverage_analysis/cloud_accounts:
get:
description: 'Get the CSM Coverage Analysis of your Cloud Accounts.

This is calculated based on the number of your Cloud Accounts that are

scanned for security issues.'
operationId: GetCSMCloudAccountsCoverageAnalysis
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CsmCloudAccountsCoverageAnalysisResponse'
description: OK
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get the CSM Cloud Accounts Coverage Analysis
tags:
- CSM Coverage Analysis
/api/v2/csm/onboarding/coverage_analysis/hosts_and_containers:
get:
description: 'Get the CSM Coverage Analysis of your Hosts and Containers.

This is calculated based on the number of agents running on your Hosts

and Containers with CSM feature(s) enabled.'
operationId: GetCSMHostsAndContainersCoverageAnalysis
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CsmHostsAndContainersCoverageAnalysisResponse'
description: OK
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get the CSM Hosts and Containers Coverage Analysis
tags:
- CSM Coverage Analysis
/api/v2/csm/onboarding/coverage_analysis/serverless:
get:
description: 'Get the CSM Coverage Analysis of your Serverless Resources.

This is calculated based on the number of agents running on your Serverless

Resources with CSM feature(s) enabled.'
operationId: GetCSMServerlessCoverageAnalysis
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CsmServerlessCoverageAnalysisResponse'
description: OK
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get the CSM Serverless Coverage Analysis
tags:
- CSM Coverage Analysis
/api/v2/csm/onboarding/serverless/agents:
get:
description: Get the list of all CSM Serverless Agents running on your hosts
Expand Down Expand Up @@ -46613,6 +46813,15 @@ tags:

Go to https://docs.datadoghq.com/security/cloud_security_management to learn more'
name: CSM Agents
- 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 Coverage Analysis
- 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Get the CSM Cloud Accounts Coverage Analysis returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_csm_coverage_analysis::CSMCoverageAnalysisAPI;

#[tokio::main]
async fn main() {
let configuration = datadog::Configuration::new();
let api = CSMCoverageAnalysisAPI::with_config(configuration);
let resp = api.get_csm_cloud_accounts_coverage_analysis().await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Get the CSM Hosts and Containers Coverage Analysis returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_csm_coverage_analysis::CSMCoverageAnalysisAPI;

#[tokio::main]
async fn main() {
let configuration = datadog::Configuration::new();
let api = CSMCoverageAnalysisAPI::with_config(configuration);
let resp = api.get_csm_hosts_and_containers_coverage_analysis().await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Get the CSM Serverless Coverage Analysis returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_csm_coverage_analysis::CSMCoverageAnalysisAPI;

#[tokio::main]
async fn main() {
let configuration = datadog::Configuration::new();
let api = CSMCoverageAnalysisAPI::with_config(configuration);
let resp = api.get_csm_serverless_coverage_analysis().await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
Loading
Loading