From e11450221dfe8b93a5bbdf626c3097e2f9a7825a Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 19 Dec 2024 17:44:19 +0000 Subject: [PATCH] Regenerate client from commit 601229dc of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 209 ++++++++++ .../frozen.json | 1 + .../recording.har | 57 +++ .../frozen.json | 1 + .../recording.har | 57 +++ .../frozen.json | 1 + .../recording.har | 57 +++ .../GetCSMCloudAccountsCoverageAnalysis.ts | 17 + ...etCSMHostsAndContainersCoverageAnalysis.ts | 17 + .../GetCSMServerlessCoverageAnalysis.ts | 17 + features/support/scenarios_model_mapping.ts | 9 + features/v2/csm_coverage_analysis.feature | 31 ++ features/v2/undo.json | 18 + .../apis/CSMCoverageAnalysisApi.ts | 365 ++++++++++++++++++ packages/datadog-api-client-v2/index.ts | 12 + ...CloudAccountsCoverageAnalysisAttributes.ts | 86 +++++ .../CsmCloudAccountsCoverageAnalysisData.ts | 69 ++++ ...smCloudAccountsCoverageAnalysisResponse.ts | 53 +++ .../models/CsmCoverageAnalysis.ts | 80 ++++ ...AndContainersCoverageAnalysisAttributes.ts | 86 +++++ ...mHostsAndContainersCoverageAnalysisData.ts | 69 ++++ ...tsAndContainersCoverageAnalysisResponse.ts | 53 +++ ...CsmServerlessCoverageAnalysisAttributes.ts | 70 ++++ .../CsmServerlessCoverageAnalysisData.ts | 69 ++++ .../CsmServerlessCoverageAnalysisResponse.ts | 53 +++ .../models/ObjectSerializer.ts | 26 ++ 27 files changed, 1587 insertions(+), 4 deletions(-) create mode 100644 cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Cloud-Accounts-Coverage-Analysis-returns-OK-response_2510629898/frozen.json create mode 100644 cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Cloud-Accounts-Coverage-Analysis-returns-OK-response_2510629898/recording.har create mode 100644 cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Hosts-and-Containers-Coverage-Analysis-returns-OK-response_1932535387/frozen.json create mode 100644 cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Hosts-and-Containers-Coverage-Analysis-returns-OK-response_1932535387/recording.har create mode 100644 cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Serverless-Coverage-Analysis-returns-OK-response_2184424131/frozen.json create mode 100644 cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Serverless-Coverage-Analysis-returns-OK-response_2184424131/recording.har create mode 100644 examples/v2/csm-coverage-analysis/GetCSMCloudAccountsCoverageAnalysis.ts create mode 100644 examples/v2/csm-coverage-analysis/GetCSMHostsAndContainersCoverageAnalysis.ts create mode 100644 examples/v2/csm-coverage-analysis/GetCSMServerlessCoverageAnalysis.ts create mode 100644 features/v2/csm_coverage_analysis.feature create mode 100644 packages/datadog-api-client-v2/apis/CSMCoverageAnalysisApi.ts create mode 100644 packages/datadog-api-client-v2/models/CsmCloudAccountsCoverageAnalysisAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/CsmCloudAccountsCoverageAnalysisData.ts create mode 100644 packages/datadog-api-client-v2/models/CsmCloudAccountsCoverageAnalysisResponse.ts create mode 100644 packages/datadog-api-client-v2/models/CsmCoverageAnalysis.ts create mode 100644 packages/datadog-api-client-v2/models/CsmHostsAndContainersCoverageAnalysisAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/CsmHostsAndContainersCoverageAnalysisData.ts create mode 100644 packages/datadog-api-client-v2/models/CsmHostsAndContainersCoverageAnalysisResponse.ts create mode 100644 packages/datadog-api-client-v2/models/CsmServerlessCoverageAnalysisAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/CsmServerlessCoverageAnalysisData.ts create mode 100644 packages/datadog-api-client-v2/models/CsmServerlessCoverageAnalysisResponse.ts diff --git a/.apigentools-info b/.apigentools-info index c9142bf33415..cdb46f767e8b 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-19 07:26:26.500720", - "spec_repo_commit": "5dd2cbe4" + "regenerated": "2024-12-19 17:42:50.130297", + "spec_repo_commit": "601229dc" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-19 07:26:26.515806", - "spec_repo_commit": "5dd2cbe4" + "regenerated": "2024-12-19 17:42:50.145484", + "spec_repo_commit": "601229dc" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 3480f9db3a70..f8565ef668ba 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -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: @@ -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 @@ -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/) diff --git a/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Cloud-Accounts-Coverage-Analysis-returns-OK-response_2510629898/frozen.json b/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Cloud-Accounts-Coverage-Analysis-returns-OK-response_2510629898/frozen.json new file mode 100644 index 000000000000..4342bb23ca0b --- /dev/null +++ b/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Cloud-Accounts-Coverage-Analysis-returns-OK-response_2510629898/frozen.json @@ -0,0 +1 @@ +"2024-12-19T17:17:10.296Z" diff --git a/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Cloud-Accounts-Coverage-Analysis-returns-OK-response_2510629898/recording.har b/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Cloud-Accounts-Coverage-Analysis-returns-OK-response_2510629898/recording.har new file mode 100644 index 000000000000..84d95c7d977b --- /dev/null +++ b/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Cloud-Accounts-Coverage-Analysis-returns-OK-response_2510629898/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "CSM Coverage Analysis/Get the CSM Cloud Accounts Coverage Analysis returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "f1570efe40b47cebfbcdace56479e8bc", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 563, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/csm/onboarding/coverage_analysis/cloud_accounts" + }, + "response": { + "bodySize": 691, + "content": { + "mimeType": "application/vnd.api+json", + "size": 691, + "text": "{\"data\":{\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\",\"type\":\"get_cloud_accounts_coverage_analysis_response_public_v0\",\"attributes\":{\"aws_coverage\":{\"partially_configured_resources_count\":0,\"configured_resources_count\":4,\"total_resources_count\":10,\"coverage\":0.4},\"azure_coverage\":{\"partially_configured_resources_count\":0,\"configured_resources_count\":2,\"total_resources_count\":6,\"coverage\":0.3333333333333333},\"gcp_coverage\":{\"partially_configured_resources_count\":0,\"configured_resources_count\":2,\"total_resources_count\":4,\"coverage\":0.5},\"org_id\":321813,\"total_coverage\":{\"partially_configured_resources_count\":0,\"configured_resources_count\":8,\"total_resources_count\":20,\"coverage\":0.4}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-12-19T17:17:10.491Z", + "time": 205 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Hosts-and-Containers-Coverage-Analysis-returns-OK-response_1932535387/frozen.json b/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Hosts-and-Containers-Coverage-Analysis-returns-OK-response_1932535387/frozen.json new file mode 100644 index 000000000000..e6267104bde6 --- /dev/null +++ b/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Hosts-and-Containers-Coverage-Analysis-returns-OK-response_1932535387/frozen.json @@ -0,0 +1 @@ +"2024-12-19T17:17:10.704Z" diff --git a/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Hosts-and-Containers-Coverage-Analysis-returns-OK-response_1932535387/recording.har b/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Hosts-and-Containers-Coverage-Analysis-returns-OK-response_1932535387/recording.har new file mode 100644 index 000000000000..58b3fb0a3181 --- /dev/null +++ b/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Hosts-and-Containers-Coverage-Analysis-returns-OK-response_1932535387/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "CSM Coverage Analysis/Get the CSM Hosts and Containers Coverage Analysis returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "ac8b113561fd9c48abee7e0b772938dc", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 574, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/csm/onboarding/coverage_analysis/hosts_and_containers" + }, + "response": { + "bodySize": 657, + "content": { + "mimeType": "application/vnd.api+json", + "size": 657, + "text": "{\"data\":{\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\",\"type\":\"get_hosts_and_containers_coverage_analysis_response_public_v0\",\"attributes\":{\"cspm_coverage\":{\"partially_configured_resources_count\":0,\"configured_resources_count\":0,\"total_resources_count\":9,\"coverage\":0},\"cws_coverage\":{\"partially_configured_resources_count\":0,\"configured_resources_count\":0,\"total_resources_count\":9,\"coverage\":0},\"org_id\":321813,\"total_coverage\":{\"partially_configured_resources_count\":0,\"configured_resources_count\":0,\"total_resources_count\":9,\"coverage\":0},\"vm_coverage\":{\"partially_configured_resources_count\":0,\"configured_resources_count\":0,\"total_resources_count\":0}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-12-19T17:17:10.707Z", + "time": 524 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Serverless-Coverage-Analysis-returns-OK-response_2184424131/frozen.json b/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Serverless-Coverage-Analysis-returns-OK-response_2184424131/frozen.json new file mode 100644 index 000000000000..7ac0b29ab1ec --- /dev/null +++ b/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Serverless-Coverage-Analysis-returns-OK-response_2184424131/frozen.json @@ -0,0 +1 @@ +"2024-12-19T17:17:11.235Z" diff --git a/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Serverless-Coverage-Analysis-returns-OK-response_2184424131/recording.har b/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Serverless-Coverage-Analysis-returns-OK-response_2184424131/recording.har new file mode 100644 index 000000000000..34b017b9a262 --- /dev/null +++ b/cassettes/v2/CSM-Coverage-Analysis_717494718/Get-the-CSM-Serverless-Coverage-Analysis-returns-OK-response_2184424131/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "CSM Coverage Analysis/Get the CSM Serverless Coverage Analysis returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "226ecbeeb2e488354e36711fa9438384", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 556, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/csm/onboarding/coverage_analysis/serverless" + }, + "response": { + "bodySize": 373, + "content": { + "mimeType": "application/vnd.api+json", + "size": 373, + "text": "{\"data\":{\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\",\"type\":\"get_serverless_coverage_analysis_response_public_v0\",\"attributes\":{\"cws_coverage\":{\"partially_configured_resources_count\":0,\"configured_resources_count\":0,\"total_resources_count\":0},\"org_id\":0,\"total_coverage\":{\"partially_configured_resources_count\":0,\"configured_resources_count\":0,\"total_resources_count\":0}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-12-19T17:17:11.237Z", + "time": 250 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/csm-coverage-analysis/GetCSMCloudAccountsCoverageAnalysis.ts b/examples/v2/csm-coverage-analysis/GetCSMCloudAccountsCoverageAnalysis.ts new file mode 100644 index 000000000000..02ac213ca287 --- /dev/null +++ b/examples/v2/csm-coverage-analysis/GetCSMCloudAccountsCoverageAnalysis.ts @@ -0,0 +1,17 @@ +/** + * Get the CSM Cloud Accounts Coverage Analysis returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CSMCoverageAnalysisApi(configuration); + +apiInstance + .getCSMCloudAccountsCoverageAnalysis() + .then((data: v2.CsmCloudAccountsCoverageAnalysisResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/csm-coverage-analysis/GetCSMHostsAndContainersCoverageAnalysis.ts b/examples/v2/csm-coverage-analysis/GetCSMHostsAndContainersCoverageAnalysis.ts new file mode 100644 index 000000000000..dc7b0cfd334f --- /dev/null +++ b/examples/v2/csm-coverage-analysis/GetCSMHostsAndContainersCoverageAnalysis.ts @@ -0,0 +1,17 @@ +/** + * Get the CSM Hosts and Containers Coverage Analysis returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CSMCoverageAnalysisApi(configuration); + +apiInstance + .getCSMHostsAndContainersCoverageAnalysis() + .then((data: v2.CsmHostsAndContainersCoverageAnalysisResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/csm-coverage-analysis/GetCSMServerlessCoverageAnalysis.ts b/examples/v2/csm-coverage-analysis/GetCSMServerlessCoverageAnalysis.ts new file mode 100644 index 000000000000..32b70bd2d334 --- /dev/null +++ b/examples/v2/csm-coverage-analysis/GetCSMServerlessCoverageAnalysis.ts @@ -0,0 +1,17 @@ +/** + * Get the CSM Serverless Coverage Analysis returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CSMCoverageAnalysisApi(configuration); + +apiInstance + .getCSMServerlessCoverageAnalysis() + .then((data: v2.CsmServerlessCoverageAnalysisResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index d9333e2391e5..89e40e0704ca 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -3447,6 +3447,15 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "CsmAgentsResponse", }, + "v2.GetCSMCloudAccountsCoverageAnalysis": { + "operationResponseType": "CsmCloudAccountsCoverageAnalysisResponse", + }, + "v2.GetCSMHostsAndContainersCoverageAnalysis": { + "operationResponseType": "CsmHostsAndContainersCoverageAnalysisResponse", + }, + "v2.GetCSMServerlessCoverageAnalysis": { + "operationResponseType": "CsmServerlessCoverageAnalysisResponse", + }, "v2.DeleteDashboardListItems": { "dashboardListId": { "type": "number", diff --git a/features/v2/csm_coverage_analysis.feature b/features/v2/csm_coverage_analysis.feature new file mode 100644 index 000000000000..8c3689dbfa71 --- /dev/null +++ b/features/v2/csm_coverage_analysis.feature @@ -0,0 +1,31 @@ +@endpoint(csm-coverage-analysis) @endpoint(csm-coverage-analysis-v2) +Feature: CSM Coverage Analysis + 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. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "CSMCoverageAnalysis" API + + @team:DataDog/k9-cloud-security-platform + Scenario: Get the CSM Cloud Accounts Coverage Analysis returns "OK" response + Given new "GetCSMCloudAccountsCoverageAnalysis" request + When the request is sent + Then the response status is 200 OK + + @team:DataDog/k9-cloud-security-platform + Scenario: Get the CSM Hosts and Containers Coverage Analysis returns "OK" response + Given new "GetCSMHostsAndContainersCoverageAnalysis" request + When the request is sent + Then the response status is 200 OK + + @team:DataDog/k9-cloud-security-platform + Scenario: Get the CSM Serverless Coverage Analysis returns "OK" response + Given new "GetCSMServerlessCoverageAnalysis" request + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index b1ed2db693d9..de5bae7429e3 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -535,6 +535,24 @@ "type": "safe" } }, + "GetCSMCloudAccountsCoverageAnalysis": { + "tag": "CSM Coverage Analysis", + "undo": { + "type": "safe" + } + }, + "GetCSMHostsAndContainersCoverageAnalysis": { + "tag": "CSM Coverage Analysis", + "undo": { + "type": "safe" + } + }, + "GetCSMServerlessCoverageAnalysis": { + "tag": "CSM Coverage Analysis", + "undo": { + "type": "safe" + } + }, "ListAllCSMServerlessAgents": { "tag": "CSM Agents", "undo": { diff --git a/packages/datadog-api-client-v2/apis/CSMCoverageAnalysisApi.ts b/packages/datadog-api-client-v2/apis/CSMCoverageAnalysisApi.ts new file mode 100644 index 000000000000..8514e2876f3d --- /dev/null +++ b/packages/datadog-api-client-v2/apis/CSMCoverageAnalysisApi.ts @@ -0,0 +1,365 @@ +import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { CsmCloudAccountsCoverageAnalysisResponse } from "../models/CsmCloudAccountsCoverageAnalysisResponse"; +import { CsmHostsAndContainersCoverageAnalysisResponse } from "../models/CsmHostsAndContainersCoverageAnalysisResponse"; +import { CsmServerlessCoverageAnalysisResponse } from "../models/CsmServerlessCoverageAnalysisResponse"; + +export class CSMCoverageAnalysisApiRequestFactory extends BaseAPIRequestFactory { + public async getCSMCloudAccountsCoverageAnalysis( + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // Path Params + const localVarPath = + "/api/v2/csm/onboarding/coverage_analysis/cloud_accounts"; + + // Make Request Context + const requestContext = _config + .getServer( + "v2.CSMCoverageAnalysisApi.getCSMCloudAccountsCoverageAnalysis" + ) + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getCSMHostsAndContainersCoverageAnalysis( + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // Path Params + const localVarPath = + "/api/v2/csm/onboarding/coverage_analysis/hosts_and_containers"; + + // Make Request Context + const requestContext = _config + .getServer( + "v2.CSMCoverageAnalysisApi.getCSMHostsAndContainersCoverageAnalysis" + ) + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getCSMServerlessCoverageAnalysis( + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // Path Params + const localVarPath = "/api/v2/csm/onboarding/coverage_analysis/serverless"; + + // Make Request Context + const requestContext = _config + .getServer("v2.CSMCoverageAnalysisApi.getCSMServerlessCoverageAnalysis") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class CSMCoverageAnalysisApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCSMCloudAccountsCoverageAnalysis + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCSMCloudAccountsCoverageAnalysis( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: CsmCloudAccountsCoverageAnalysisResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CsmCloudAccountsCoverageAnalysisResponse" + ) as CsmCloudAccountsCoverageAnalysisResponse; + return body; + } + if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CsmCloudAccountsCoverageAnalysisResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CsmCloudAccountsCoverageAnalysisResponse", + "" + ) as CsmCloudAccountsCoverageAnalysisResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCSMHostsAndContainersCoverageAnalysis + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCSMHostsAndContainersCoverageAnalysis( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: CsmHostsAndContainersCoverageAnalysisResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CsmHostsAndContainersCoverageAnalysisResponse" + ) as CsmHostsAndContainersCoverageAnalysisResponse; + return body; + } + if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CsmHostsAndContainersCoverageAnalysisResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CsmHostsAndContainersCoverageAnalysisResponse", + "" + ) as CsmHostsAndContainersCoverageAnalysisResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getCSMServerlessCoverageAnalysis + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCSMServerlessCoverageAnalysis( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: CsmServerlessCoverageAnalysisResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CsmServerlessCoverageAnalysisResponse" + ) as CsmServerlessCoverageAnalysisResponse; + return body; + } + if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CsmServerlessCoverageAnalysisResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CsmServerlessCoverageAnalysisResponse", + "" + ) as CsmServerlessCoverageAnalysisResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export class CSMCoverageAnalysisApi { + private requestFactory: CSMCoverageAnalysisApiRequestFactory; + private responseProcessor: CSMCoverageAnalysisApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: CSMCoverageAnalysisApiRequestFactory, + responseProcessor?: CSMCoverageAnalysisApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new CSMCoverageAnalysisApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new CSMCoverageAnalysisApiResponseProcessor(); + } + + /** + * 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. + * @param param The request object + */ + public getCSMCloudAccountsCoverageAnalysis( + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.getCSMCloudAccountsCoverageAnalysis(options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getCSMCloudAccountsCoverageAnalysis( + responseContext + ); + }); + }); + } + + /** + * 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. + * @param param The request object + */ + public getCSMHostsAndContainersCoverageAnalysis( + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.getCSMHostsAndContainersCoverageAnalysis(options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getCSMHostsAndContainersCoverageAnalysis( + responseContext + ); + }); + }); + } + + /** + * 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. + * @param param The request object + */ + public getCSMServerlessCoverageAnalysis( + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.getCSMServerlessCoverageAnalysis(options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getCSMServerlessCoverageAnalysis( + responseContext + ); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index a24acd5fb609..ae5a69cc17c3 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -79,6 +79,8 @@ export { CSMAgentsApi, } from "./apis/CSMAgentsApi"; +export { CSMCoverageAnalysisApi } from "./apis/CSMCoverageAnalysisApi"; + export { CSMThreatsApiCreateCSMThreatsAgentRuleRequest, CSMThreatsApiCreateCloudWorkloadSecurityAgentRuleRequest, @@ -1003,6 +1005,16 @@ export { CsmAgentsAttributes } from "./models/CsmAgentsAttributes"; export { CSMAgentsMetadata } from "./models/CSMAgentsMetadata"; export { CsmAgentsResponse } from "./models/CsmAgentsResponse"; export { CSMAgentsType } from "./models/CSMAgentsType"; +export { CsmCloudAccountsCoverageAnalysisAttributes } from "./models/CsmCloudAccountsCoverageAnalysisAttributes"; +export { CsmCloudAccountsCoverageAnalysisData } from "./models/CsmCloudAccountsCoverageAnalysisData"; +export { CsmCloudAccountsCoverageAnalysisResponse } from "./models/CsmCloudAccountsCoverageAnalysisResponse"; +export { CsmCoverageAnalysis } from "./models/CsmCoverageAnalysis"; +export { CsmHostsAndContainersCoverageAnalysisAttributes } from "./models/CsmHostsAndContainersCoverageAnalysisAttributes"; +export { CsmHostsAndContainersCoverageAnalysisData } from "./models/CsmHostsAndContainersCoverageAnalysisData"; +export { CsmHostsAndContainersCoverageAnalysisResponse } from "./models/CsmHostsAndContainersCoverageAnalysisResponse"; +export { CsmServerlessCoverageAnalysisAttributes } from "./models/CsmServerlessCoverageAnalysisAttributes"; +export { CsmServerlessCoverageAnalysisData } from "./models/CsmServerlessCoverageAnalysisData"; +export { CsmServerlessCoverageAnalysisResponse } from "./models/CsmServerlessCoverageAnalysisResponse"; export { CustomConnection } from "./models/CustomConnection"; export { CustomConnectionAttributes } from "./models/CustomConnectionAttributes"; export { CustomConnectionAttributesOnPremRunner } from "./models/CustomConnectionAttributesOnPremRunner"; diff --git a/packages/datadog-api-client-v2/models/CsmCloudAccountsCoverageAnalysisAttributes.ts b/packages/datadog-api-client-v2/models/CsmCloudAccountsCoverageAnalysisAttributes.ts new file mode 100644 index 000000000000..e77c6f9fd7b8 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CsmCloudAccountsCoverageAnalysisAttributes.ts @@ -0,0 +1,86 @@ +/** + * 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 2020-Present Datadog, Inc. + */ +import { CsmCoverageAnalysis } from "./CsmCoverageAnalysis"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * CSM Cloud Accounts Coverage Analysis attributes. + */ +export class CsmCloudAccountsCoverageAnalysisAttributes { + /** + * CSM Coverage Analysis. + */ + "awsCoverage"?: CsmCoverageAnalysis; + /** + * CSM Coverage Analysis. + */ + "azureCoverage"?: CsmCoverageAnalysis; + /** + * CSM Coverage Analysis. + */ + "gcpCoverage"?: CsmCoverageAnalysis; + /** + * The ID of your organization. + */ + "orgId"?: number; + /** + * CSM Coverage Analysis. + */ + "totalCoverage"?: CsmCoverageAnalysis; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + awsCoverage: { + baseName: "aws_coverage", + type: "CsmCoverageAnalysis", + }, + azureCoverage: { + baseName: "azure_coverage", + type: "CsmCoverageAnalysis", + }, + gcpCoverage: { + baseName: "gcp_coverage", + type: "CsmCoverageAnalysis", + }, + orgId: { + baseName: "org_id", + type: "number", + format: "int64", + }, + totalCoverage: { + baseName: "total_coverage", + type: "CsmCoverageAnalysis", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CsmCloudAccountsCoverageAnalysisAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CsmCloudAccountsCoverageAnalysisData.ts b/packages/datadog-api-client-v2/models/CsmCloudAccountsCoverageAnalysisData.ts new file mode 100644 index 000000000000..f546f79945e3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CsmCloudAccountsCoverageAnalysisData.ts @@ -0,0 +1,69 @@ +/** + * 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 2020-Present Datadog, Inc. + */ +import { CsmCloudAccountsCoverageAnalysisAttributes } from "./CsmCloudAccountsCoverageAnalysisAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * CSM Cloud Accounts Coverage Analysis data. + */ +export class CsmCloudAccountsCoverageAnalysisData { + /** + * CSM Cloud Accounts Coverage Analysis attributes. + */ + "attributes"?: CsmCloudAccountsCoverageAnalysisAttributes; + /** + * The ID of your organization. + */ + "id"?: string; + /** + * The type of the resource. The value should always be `get_cloud_accounts_coverage_analysis_response_public_v0`. + */ + "type"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "CsmCloudAccountsCoverageAnalysisAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CsmCloudAccountsCoverageAnalysisData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CsmCloudAccountsCoverageAnalysisResponse.ts b/packages/datadog-api-client-v2/models/CsmCloudAccountsCoverageAnalysisResponse.ts new file mode 100644 index 000000000000..5bebedcc2c29 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CsmCloudAccountsCoverageAnalysisResponse.ts @@ -0,0 +1,53 @@ +/** + * 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 2020-Present Datadog, Inc. + */ +import { CsmCloudAccountsCoverageAnalysisData } from "./CsmCloudAccountsCoverageAnalysisData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * CSM Cloud Accounts Coverage Analysis response. + */ +export class CsmCloudAccountsCoverageAnalysisResponse { + /** + * CSM Cloud Accounts Coverage Analysis data. + */ + "data"?: CsmCloudAccountsCoverageAnalysisData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "CsmCloudAccountsCoverageAnalysisData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CsmCloudAccountsCoverageAnalysisResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CsmCoverageAnalysis.ts b/packages/datadog-api-client-v2/models/CsmCoverageAnalysis.ts new file mode 100644 index 000000000000..a79c86b47807 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CsmCoverageAnalysis.ts @@ -0,0 +1,80 @@ +/** + * 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 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * CSM Coverage Analysis. + */ +export class CsmCoverageAnalysis { + /** + * The number of fully configured resources. + */ + "configuredResourcesCount"?: number; + /** + * The coverage percentage. + */ + "coverage"?: number; + /** + * The number of partially configured resources. + */ + "partiallyConfiguredResourcesCount"?: number; + /** + * The total number of resources. + */ + "totalResourcesCount"?: number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + configuredResourcesCount: { + baseName: "configured_resources_count", + type: "number", + format: "int64", + }, + coverage: { + baseName: "coverage", + type: "number", + format: "double", + }, + partiallyConfiguredResourcesCount: { + baseName: "partially_configured_resources_count", + type: "number", + format: "int64", + }, + totalResourcesCount: { + baseName: "total_resources_count", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CsmCoverageAnalysis.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CsmHostsAndContainersCoverageAnalysisAttributes.ts b/packages/datadog-api-client-v2/models/CsmHostsAndContainersCoverageAnalysisAttributes.ts new file mode 100644 index 000000000000..7d624bbc307d --- /dev/null +++ b/packages/datadog-api-client-v2/models/CsmHostsAndContainersCoverageAnalysisAttributes.ts @@ -0,0 +1,86 @@ +/** + * 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 2020-Present Datadog, Inc. + */ +import { CsmCoverageAnalysis } from "./CsmCoverageAnalysis"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * CSM Hosts and Containers Coverage Analysis attributes. + */ +export class CsmHostsAndContainersCoverageAnalysisAttributes { + /** + * CSM Coverage Analysis. + */ + "cspmCoverage"?: CsmCoverageAnalysis; + /** + * CSM Coverage Analysis. + */ + "cwsCoverage"?: CsmCoverageAnalysis; + /** + * The ID of your organization. + */ + "orgId"?: number; + /** + * CSM Coverage Analysis. + */ + "totalCoverage"?: CsmCoverageAnalysis; + /** + * CSM Coverage Analysis. + */ + "vmCoverage"?: CsmCoverageAnalysis; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + cspmCoverage: { + baseName: "cspm_coverage", + type: "CsmCoverageAnalysis", + }, + cwsCoverage: { + baseName: "cws_coverage", + type: "CsmCoverageAnalysis", + }, + orgId: { + baseName: "org_id", + type: "number", + format: "int64", + }, + totalCoverage: { + baseName: "total_coverage", + type: "CsmCoverageAnalysis", + }, + vmCoverage: { + baseName: "vm_coverage", + type: "CsmCoverageAnalysis", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CsmHostsAndContainersCoverageAnalysisAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CsmHostsAndContainersCoverageAnalysisData.ts b/packages/datadog-api-client-v2/models/CsmHostsAndContainersCoverageAnalysisData.ts new file mode 100644 index 000000000000..02c06dc82c90 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CsmHostsAndContainersCoverageAnalysisData.ts @@ -0,0 +1,69 @@ +/** + * 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 2020-Present Datadog, Inc. + */ +import { CsmHostsAndContainersCoverageAnalysisAttributes } from "./CsmHostsAndContainersCoverageAnalysisAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * CSM Hosts and Containers Coverage Analysis data. + */ +export class CsmHostsAndContainersCoverageAnalysisData { + /** + * CSM Hosts and Containers Coverage Analysis attributes. + */ + "attributes"?: CsmHostsAndContainersCoverageAnalysisAttributes; + /** + * The ID of your organization. + */ + "id"?: string; + /** + * The type of the resource. The value should always be `get_hosts_and_containers_coverage_analysis_response_public_v0`. + */ + "type"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "CsmHostsAndContainersCoverageAnalysisAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CsmHostsAndContainersCoverageAnalysisData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CsmHostsAndContainersCoverageAnalysisResponse.ts b/packages/datadog-api-client-v2/models/CsmHostsAndContainersCoverageAnalysisResponse.ts new file mode 100644 index 000000000000..afe22daa6a35 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CsmHostsAndContainersCoverageAnalysisResponse.ts @@ -0,0 +1,53 @@ +/** + * 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 2020-Present Datadog, Inc. + */ +import { CsmHostsAndContainersCoverageAnalysisData } from "./CsmHostsAndContainersCoverageAnalysisData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * CSM Hosts and Containers Coverage Analysis response. + */ +export class CsmHostsAndContainersCoverageAnalysisResponse { + /** + * CSM Hosts and Containers Coverage Analysis data. + */ + "data"?: CsmHostsAndContainersCoverageAnalysisData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "CsmHostsAndContainersCoverageAnalysisData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CsmHostsAndContainersCoverageAnalysisResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CsmServerlessCoverageAnalysisAttributes.ts b/packages/datadog-api-client-v2/models/CsmServerlessCoverageAnalysisAttributes.ts new file mode 100644 index 000000000000..048240071a0a --- /dev/null +++ b/packages/datadog-api-client-v2/models/CsmServerlessCoverageAnalysisAttributes.ts @@ -0,0 +1,70 @@ +/** + * 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 2020-Present Datadog, Inc. + */ +import { CsmCoverageAnalysis } from "./CsmCoverageAnalysis"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * CSM Serverless Resources Coverage Analysis attributes. + */ +export class CsmServerlessCoverageAnalysisAttributes { + /** + * CSM Coverage Analysis. + */ + "cwsCoverage"?: CsmCoverageAnalysis; + /** + * The ID of your organization. + */ + "orgId"?: number; + /** + * CSM Coverage Analysis. + */ + "totalCoverage"?: CsmCoverageAnalysis; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + cwsCoverage: { + baseName: "cws_coverage", + type: "CsmCoverageAnalysis", + }, + orgId: { + baseName: "org_id", + type: "number", + format: "int64", + }, + totalCoverage: { + baseName: "total_coverage", + type: "CsmCoverageAnalysis", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CsmServerlessCoverageAnalysisAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CsmServerlessCoverageAnalysisData.ts b/packages/datadog-api-client-v2/models/CsmServerlessCoverageAnalysisData.ts new file mode 100644 index 000000000000..829083ec1e41 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CsmServerlessCoverageAnalysisData.ts @@ -0,0 +1,69 @@ +/** + * 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 2020-Present Datadog, Inc. + */ +import { CsmServerlessCoverageAnalysisAttributes } from "./CsmServerlessCoverageAnalysisAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * CSM Serverless Resources Coverage Analysis data. + */ +export class CsmServerlessCoverageAnalysisData { + /** + * CSM Serverless Resources Coverage Analysis attributes. + */ + "attributes"?: CsmServerlessCoverageAnalysisAttributes; + /** + * The ID of your organization. + */ + "id"?: string; + /** + * The type of the resource. The value should always be `get_serverless_coverage_analysis_response_public_v0`. + */ + "type"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "CsmServerlessCoverageAnalysisAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CsmServerlessCoverageAnalysisData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CsmServerlessCoverageAnalysisResponse.ts b/packages/datadog-api-client-v2/models/CsmServerlessCoverageAnalysisResponse.ts new file mode 100644 index 000000000000..bd16a62c2d69 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CsmServerlessCoverageAnalysisResponse.ts @@ -0,0 +1,53 @@ +/** + * 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 2020-Present Datadog, Inc. + */ +import { CsmServerlessCoverageAnalysisData } from "./CsmServerlessCoverageAnalysisData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * CSM Serverless Resources Coverage Analysis response. + */ +export class CsmServerlessCoverageAnalysisResponse { + /** + * CSM Serverless Resources Coverage Analysis data. + */ + "data"?: CsmServerlessCoverageAnalysisData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "CsmServerlessCoverageAnalysisData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CsmServerlessCoverageAnalysisResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 3e70904b9deb..af5ddfd25893 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -297,6 +297,16 @@ import { Creator } from "./Creator"; import { CsmAgentData } from "./CsmAgentData"; import { CsmAgentsAttributes } from "./CsmAgentsAttributes"; import { CsmAgentsResponse } from "./CsmAgentsResponse"; +import { CsmCloudAccountsCoverageAnalysisAttributes } from "./CsmCloudAccountsCoverageAnalysisAttributes"; +import { CsmCloudAccountsCoverageAnalysisData } from "./CsmCloudAccountsCoverageAnalysisData"; +import { CsmCloudAccountsCoverageAnalysisResponse } from "./CsmCloudAccountsCoverageAnalysisResponse"; +import { CsmCoverageAnalysis } from "./CsmCoverageAnalysis"; +import { CsmHostsAndContainersCoverageAnalysisAttributes } from "./CsmHostsAndContainersCoverageAnalysisAttributes"; +import { CsmHostsAndContainersCoverageAnalysisData } from "./CsmHostsAndContainersCoverageAnalysisData"; +import { CsmHostsAndContainersCoverageAnalysisResponse } from "./CsmHostsAndContainersCoverageAnalysisResponse"; +import { CsmServerlessCoverageAnalysisAttributes } from "./CsmServerlessCoverageAnalysisAttributes"; +import { CsmServerlessCoverageAnalysisData } from "./CsmServerlessCoverageAnalysisData"; +import { CsmServerlessCoverageAnalysisResponse } from "./CsmServerlessCoverageAnalysisResponse"; import { CustomConnection } from "./CustomConnection"; import { CustomConnectionAttributes } from "./CustomConnectionAttributes"; import { CustomConnectionAttributesOnPremRunner } from "./CustomConnectionAttributesOnPremRunner"; @@ -2509,6 +2519,22 @@ const typeMap: { [index: string]: any } = { CsmAgentData: CsmAgentData, CsmAgentsAttributes: CsmAgentsAttributes, CsmAgentsResponse: CsmAgentsResponse, + CsmCloudAccountsCoverageAnalysisAttributes: + CsmCloudAccountsCoverageAnalysisAttributes, + CsmCloudAccountsCoverageAnalysisData: CsmCloudAccountsCoverageAnalysisData, + CsmCloudAccountsCoverageAnalysisResponse: + CsmCloudAccountsCoverageAnalysisResponse, + CsmCoverageAnalysis: CsmCoverageAnalysis, + CsmHostsAndContainersCoverageAnalysisAttributes: + CsmHostsAndContainersCoverageAnalysisAttributes, + CsmHostsAndContainersCoverageAnalysisData: + CsmHostsAndContainersCoverageAnalysisData, + CsmHostsAndContainersCoverageAnalysisResponse: + CsmHostsAndContainersCoverageAnalysisResponse, + CsmServerlessCoverageAnalysisAttributes: + CsmServerlessCoverageAnalysisAttributes, + CsmServerlessCoverageAnalysisData: CsmServerlessCoverageAnalysisData, + CsmServerlessCoverageAnalysisResponse: CsmServerlessCoverageAnalysisResponse, CustomConnection: CustomConnection, CustomConnectionAttributes: CustomConnectionAttributes, CustomConnectionAttributesOnPremRunner: