From 11feaf9c02c2efe9548c460c547476481357131d Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 1 Oct 2025 14:18:08 +0000 Subject: [PATCH] Regenerate client from commit ba47c96 of spec repo --- .generator/schemas/v2/openapi.yaml | 255 +++++++++ .../frozen.json | 1 + .../recording.har | 109 ++++ .../frozen.json | 1 + .../recording.har | 57 ++ features/v2/agentless_scanning.feature | 28 + features/v2/undo.json | 31 ++ .../src/support/scenarios_model_mapping.ts | 28 + .../src/v2/AgentlessScanningApi.ts | 527 ++++++++++++++++++ services/agentless_scanning/src/v2/index.ts | 12 + .../src/v2/models/AzureScanOptions.ts | 46 ++ .../src/v2/models/AzureScanOptionsArray.ts | 47 ++ .../src/v2/models/AzureScanOptionsData.ts | 65 +++ .../models/AzureScanOptionsDataAttributes.ts | 52 ++ .../src/v2/models/AzureScanOptionsDataType.ts | 9 + .../v2/models/AzureScanOptionsInputUpdate.ts | 46 ++ .../models/AzureScanOptionsInputUpdateData.ts | 65 +++ ...ureScanOptionsInputUpdateDataAttributes.ts | 52 ++ .../AzureScanOptionsInputUpdateDataType.ts | 9 + .../src/v2/models/TypingInfo.ts | 17 + 20 files changed, 1457 insertions(+) create mode 100644 cassettes/v2/Agentless-Scanning_730042230/Create-azure-scan-options-returns-Created-response_1871665817/frozen.json create mode 100644 cassettes/v2/Agentless-Scanning_730042230/Create-azure-scan-options-returns-Created-response_1871665817/recording.har create mode 100644 cassettes/v2/Agentless-Scanning_730042230/List-azure-scan-options-returns-OK-response_3188596895/frozen.json create mode 100644 cassettes/v2/Agentless-Scanning_730042230/List-azure-scan-options-returns-OK-response_3188596895/recording.har create mode 100644 services/agentless_scanning/src/v2/models/AzureScanOptions.ts create mode 100644 services/agentless_scanning/src/v2/models/AzureScanOptionsArray.ts create mode 100644 services/agentless_scanning/src/v2/models/AzureScanOptionsData.ts create mode 100644 services/agentless_scanning/src/v2/models/AzureScanOptionsDataAttributes.ts create mode 100644 services/agentless_scanning/src/v2/models/AzureScanOptionsDataType.ts create mode 100644 services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdate.ts create mode 100644 services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdateData.ts create mode 100644 services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdateDataAttributes.ts create mode 100644 services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdateDataType.ts diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index d4dfe8ead6bc..d3505929ef55 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -5879,6 +5879,115 @@ components: required: - type type: object + AzureScanOptions: + description: The definition of `AzureScanOptions` object. + example: + data: + attributes: + vuln_containers_os: true + vuln_host_os: true + id: 12345678-90ab-cdef-1234-567890abcdef + type: azure_scan_options + properties: + data: + $ref: '#/components/schemas/AzureScanOptionsData' + type: object + AzureScanOptionsArray: + description: The definition of `AzureScanOptionsArray` object. + example: + data: + - attributes: + vuln_containers_os: true + vuln_host_os: true + id: 12345678-90ab-cdef-1234-567890abcdef + type: azure_scan_options + properties: + data: + description: The `AzureScanOptionsArray` `data`. + items: + $ref: '#/components/schemas/AzureScanOptionsData' + type: array + required: + - data + type: object + AzureScanOptionsData: + description: The definition of `AzureScanOptionsData` object. + properties: + attributes: + $ref: '#/components/schemas/AzureScanOptionsDataAttributes' + id: + description: The `AzureScanOptionsData` `id`. + example: '' + type: string + type: + $ref: '#/components/schemas/AzureScanOptionsDataType' + required: + - type + - id + type: object + AzureScanOptionsDataAttributes: + description: The definition of `AzureScanOptionsDataAttributes` object. + properties: + vuln_containers_os: + description: The `attributes` `vuln_containers_os`. + type: boolean + vuln_host_os: + description: The `attributes` `vuln_host_os`. + type: boolean + type: object + AzureScanOptionsDataType: + default: azure_scan_options + description: The type of the resource. The value should always be `azure_scan_options`. + enum: + - azure_scan_options + example: azure_scan_options + type: string + x-enum-varnames: + - AZURE_SCAN_OPTIONS + AzureScanOptionsInputUpdate: + description: The definition of `AzureScanOptionsInputUpdate` object. + example: + data: + id: 12345678-90ab-cdef-1234-567890abcdef + type: azure_scan_options + properties: + data: + $ref: '#/components/schemas/AzureScanOptionsInputUpdateData' + type: object + AzureScanOptionsInputUpdateData: + description: The definition of `AzureScanOptionsInputUpdateData` object. + properties: + attributes: + $ref: '#/components/schemas/AzureScanOptionsInputUpdateDataAttributes' + id: + description: The `AzureScanOptionsInputUpdateData` `id`. + example: '' + type: string + type: + $ref: '#/components/schemas/AzureScanOptionsInputUpdateDataType' + required: + - type + - id + type: object + AzureScanOptionsInputUpdateDataAttributes: + description: The definition of `AzureScanOptionsInputUpdateDataAttributes` object. + properties: + vuln_containers_os: + description: The `attributes` `vuln_containers_os`. + type: boolean + vuln_host_os: + description: The `attributes` `vuln_host_os`. + type: boolean + type: object + AzureScanOptionsInputUpdateDataType: + default: azure_scan_options + description: Azure scan options resource type. + enum: + - azure_scan_options + example: azure_scan_options + type: string + x-enum-varnames: + - AZURE_SCAN_OPTIONS AzureStorageDestination: description: The `azure_storage` destination forwards logs to an Azure Blob Storage container. @@ -51570,6 +51679,11 @@ paths: $ref: '#/components/responses/NotAuthorizedResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_findings_read summary: List AWS Scan Options tags: - Agentless Scanning @@ -51598,6 +51712,11 @@ paths: $ref: '#/components/responses/ConflictResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_management summary: Post AWS Scan Options tags: - Agentless Scanning @@ -51619,6 +51738,11 @@ paths: $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_management summary: Delete AWS Scan Options tags: - Agentless Scanning @@ -51642,6 +51766,11 @@ paths: $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_findings_read summary: Get AWS scan options tags: - Agentless Scanning @@ -51668,10 +51797,121 @@ paths: $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_management summary: Patch AWS Scan Options tags: - Agentless Scanning x-codegen-request-body-name: body + /api/v2/agentless_scanning/accounts/azure: + get: + description: Fetches the scan options configured for Azure accounts. + operationId: ListAzureScanOptions + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureScanOptionsArray' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_findings_read + summary: List azure scan options + tags: + - Agentless Scanning + post: + description: Activate Agentless scan options for an Azure subscription. + operationId: CreateAzureScanOptions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureScanOptions' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureScanOptions' + description: Created + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_management + summary: Create azure scan options + tags: + - Agentless Scanning + /api/v2/agentless_scanning/accounts/azure/{subscription_id}: + delete: + description: Delete Agentless scan options for an Azure subscription. + operationId: DeleteAzureScanOptions + parameters: + - description: The Azure subscription ID. + in: path + name: subscription_id + required: true + schema: + example: 12345678-90ab-cdef-1234-567890abcdef + type: string + responses: + '204': + description: No Content + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_management + summary: Delete azure scan options + tags: + - Agentless Scanning + patch: + description: Update the Agentless scan options for an activated subscription. + operationId: UpdateAzureScanOptions + parameters: + - description: The Azure subscription ID. + in: path + name: subscription_id + required: true + schema: + example: 12345678-90ab-cdef-1234-567890abcdef + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureScanOptionsInputUpdate' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureScanOptions' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_management + summary: Update azure scan options + tags: + - Agentless Scanning /api/v2/agentless_scanning/ondemand/aws: get: description: Fetches the most recent 1000 AWS on demand tasks. @@ -51687,6 +51927,11 @@ paths: $ref: '#/components/responses/NotAuthorizedResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_findings_read summary: Get AWS On Demand tasks tags: - Agentless Scanning @@ -51719,6 +51964,11 @@ paths: $ref: '#/components/responses/NotAuthorizedResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_management summary: Post an AWS on demand task tags: - Agentless Scanning @@ -51748,6 +51998,11 @@ paths: $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_findings_read summary: Get AWS On Demand task by id tags: - Agentless Scanning diff --git a/cassettes/v2/Agentless-Scanning_730042230/Create-azure-scan-options-returns-Created-response_1871665817/frozen.json b/cassettes/v2/Agentless-Scanning_730042230/Create-azure-scan-options-returns-Created-response_1871665817/frozen.json new file mode 100644 index 000000000000..1af95128625d --- /dev/null +++ b/cassettes/v2/Agentless-Scanning_730042230/Create-azure-scan-options-returns-Created-response_1871665817/frozen.json @@ -0,0 +1 @@ +"2025-09-30T18:30:00.006Z" diff --git a/cassettes/v2/Agentless-Scanning_730042230/Create-azure-scan-options-returns-Created-response_1871665817/recording.har b/cassettes/v2/Agentless-Scanning_730042230/Create-azure-scan-options-returns-Created-response_1871665817/recording.har new file mode 100644 index 000000000000..84543c04a2e2 --- /dev/null +++ b/cassettes/v2/Agentless-Scanning_730042230/Create-azure-scan-options-returns-Created-response_1871665817/recording.har @@ -0,0 +1,109 @@ +{ + "log": { + "_recordingName": "Agentless Scanning/Create azure scan options returns \"Created\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "e519a321b24bb3b9474c63f68735e218", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 143, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 590, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"vuln_containers_os\":true,\"vuln_host_os\":true},\"id\":\"12345678-90ab-cdef-1234-567890abcdef\",\"type\":\"azure_scan_options\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/agentless_scanning/accounts/azure" + }, + "response": { + "bodySize": 143, + "content": { + "mimeType": "application/vnd.api+json", + "size": 143, + "text": "{\"data\":{\"id\":\"12345678-90ab-cdef-1234-567890abcdef\",\"type\":\"azure_scan_options\",\"attributes\":{\"vuln_containers_os\":true,\"vuln_host_os\":true}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-09-30T18:30:00.009Z", + "time": 364 + }, + { + "_id": "f983fb1e25ddf746b6fddda952d7e03c", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 563, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/agentless_scanning/accounts/azure/12345678-90ab-cdef-1234-567890abcdef" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "application/vnd.api+json", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-09-30T18:30:00.385Z", + "time": 362 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Agentless-Scanning_730042230/List-azure-scan-options-returns-OK-response_3188596895/frozen.json b/cassettes/v2/Agentless-Scanning_730042230/List-azure-scan-options-returns-OK-response_3188596895/frozen.json new file mode 100644 index 000000000000..6f9a0b24733a --- /dev/null +++ b/cassettes/v2/Agentless-Scanning_730042230/List-azure-scan-options-returns-OK-response_3188596895/frozen.json @@ -0,0 +1 @@ +"2025-09-30T18:30:00.763Z" diff --git a/cassettes/v2/Agentless-Scanning_730042230/List-azure-scan-options-returns-OK-response_3188596895/recording.har b/cassettes/v2/Agentless-Scanning_730042230/List-azure-scan-options-returns-OK-response_3188596895/recording.har new file mode 100644 index 000000000000..cae1b66a4a0d --- /dev/null +++ b/cassettes/v2/Agentless-Scanning_730042230/List-azure-scan-options-returns-OK-response_3188596895/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Agentless Scanning/List azure scan options returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "ec337ccf4495cbb4bdcb7c7e14d1e55e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 534, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/agentless_scanning/accounts/azure" + }, + "response": { + "bodySize": 11, + "content": { + "mimeType": "application/vnd.api+json", + "size": 11, + "text": "{\"data\":[]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-09-30T18:30:00.766Z", + "time": 103 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/features/v2/agentless_scanning.feature b/features/v2/agentless_scanning.feature index f5f66c57cca0..280cc3413621 100644 --- a/features/v2/agentless_scanning.feature +++ b/features/v2/agentless_scanning.feature @@ -12,6 +12,13 @@ Feature: Agentless Scanning And a valid "appKeyAuth" key in the system And an instance of "AgentlessScanning" API + @skip-validation @team:DataDog/k9-agentless + Scenario: Create azure scan options returns "Created" response + Given new "CreateAzureScanOptions" request + And body with value {"data": {"attributes": {"vuln_containers_os": true, "vuln_host_os": true}, "id": "12345678-90ab-cdef-1234-567890abcdef", "type": "azure_scan_options"}} + When the request is sent + Then the response status is 201 Created + @team:DataDog/k9-agentless Scenario: Delete AWS Scan Options returns "Bad Request" response Given new "DeleteAwsScanOptions" request @@ -33,6 +40,13 @@ Feature: Agentless Scanning When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/k9-agentless + Scenario: Delete azure scan options returns "No Content" response + Given new "DeleteAzureScanOptions" request + And request contains "subscription_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + @team:DataDog/k9-agentless Scenario: Get AWS On Demand task by id returns "Bad Request" response Given new "GetAwsOnDemandTask" request @@ -92,6 +106,12 @@ Feature: Agentless Scanning When the request is sent Then the response status is 200 OK + @team:DataDog/k9-agentless + Scenario: List azure scan options returns "OK" response + Given new "ListAzureScanOptions" request + When the request is sent + Then the response status is 200 OK + @skip @team:DataDog/k9-agentless Scenario: Patch AWS Scan Options returns "Bad Request" response Given new "UpdateAwsScanOptions" request @@ -159,3 +179,11 @@ Feature: Agentless Scanning And body with value {"data": {"attributes": {"arn": "invalid-arn"}, "type": "aws_resource"}} When the request is sent Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-agentless + Scenario: Update azure scan options returns "OK" response + Given new "UpdateAzureScanOptions" request + And request contains "subscription_id" parameter from "REPLACE.ME" + And body with value {"data": {"id": "12345678-90ab-cdef-1234-567890abcdef", "type": "azure_scan_options"}} + 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 92c07fe002e0..6fcf52fcedc9 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -152,6 +152,37 @@ "type": "idempotent" } }, + "ListAzureScanOptions": { + "tag": "Agentless Scanning", + "undo": { + "type": "safe" + } + }, + "CreateAzureScanOptions": { + "tag": "Agentless Scanning", + "undo": { + "operationId": "DeleteAzureScanOptions", + "parameters": [ + { + "name": "subscription_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteAzureScanOptions": { + "tag": "Agentless Scanning", + "undo": { + "type": "idempotent" + } + }, + "UpdateAzureScanOptions": { + "tag": "Agentless Scanning", + "undo": { + "type": "idempotent" + } + }, "ListAwsOnDemandTasks": { "tag": "Agentless Scanning", "undo": { diff --git a/private/bdd_runner/src/support/scenarios_model_mapping.ts b/private/bdd_runner/src/support/scenarios_model_mapping.ts index 6438d3aae191..04263f64b149 100644 --- a/private/bdd_runner/src/support/scenarios_model_mapping.ts +++ b/private/bdd_runner/src/support/scenarios_model_mapping.ts @@ -2544,6 +2544,34 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = { }, operationResponseType: "{}", }, + "AgentlessScanningApi.V2.ListAzureScanOptions": { + operationResponseType: "AzureScanOptionsArray", + }, + "AgentlessScanningApi.V2.CreateAzureScanOptions": { + body: { + type: "AzureScanOptions", + format: "", + }, + operationResponseType: "AzureScanOptions", + }, + "AgentlessScanningApi.V2.DeleteAzureScanOptions": { + subscriptionId: { + type: "string", + format: "", + }, + operationResponseType: "{}", + }, + "AgentlessScanningApi.V2.UpdateAzureScanOptions": { + subscriptionId: { + type: "string", + format: "", + }, + body: { + type: "AzureScanOptionsInputUpdate", + format: "", + }, + operationResponseType: "AzureScanOptions", + }, "AgentlessScanningApi.V2.ListAwsOnDemandTasks": { operationResponseType: "AwsOnDemandListResponse", }, diff --git a/services/agentless_scanning/src/v2/AgentlessScanningApi.ts b/services/agentless_scanning/src/v2/AgentlessScanningApi.ts index b6bc45bc4896..c47e8e9052bc 100644 --- a/services/agentless_scanning/src/v2/AgentlessScanningApi.ts +++ b/services/agentless_scanning/src/v2/AgentlessScanningApi.ts @@ -30,6 +30,9 @@ import { AwsScanOptionsCreateRequest } from "./models/AwsScanOptionsCreateReques import { AwsScanOptionsListResponse } from "./models/AwsScanOptionsListResponse"; import { AwsScanOptionsResponse } from "./models/AwsScanOptionsResponse"; import { AwsScanOptionsUpdateRequest } from "./models/AwsScanOptionsUpdateRequest"; +import { AzureScanOptions } from "./models/AzureScanOptions"; +import { AzureScanOptionsArray } from "./models/AzureScanOptionsArray"; +import { AzureScanOptionsInputUpdate } from "./models/AzureScanOptionsInputUpdate"; import { version } from "../version"; export class AgentlessScanningApiRequestFactory extends BaseAPIRequestFactory { @@ -86,6 +89,7 @@ export class AgentlessScanningApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; @@ -136,6 +140,58 @@ export class AgentlessScanningApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async createAzureScanOptions( + body: AzureScanOptions, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createAzureScanOptions"); + } + + // Path Params + const localVarPath = "/api/v2/agentless_scanning/accounts/azure"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "AgentlessScanningApi.v2.createAzureScanOptions", + AgentlessScanningApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "AzureScanOptions", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", ]); return requestContext; @@ -181,6 +237,53 @@ export class AgentlessScanningApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async deleteAzureScanOptions( + subscriptionId: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'subscriptionId' is not null or undefined + if (subscriptionId === null || subscriptionId === undefined) { + throw new RequiredError("subscriptionId", "deleteAzureScanOptions"); + } + + // Path Params + const localVarPath = + "/api/v2/agentless_scanning/accounts/azure/{subscription_id}".replace( + "{subscription_id}", + encodeURIComponent(String(subscriptionId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "AgentlessScanningApi.v2.deleteAzureScanOptions", + AgentlessScanningApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.DELETE, + overrides, + ); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", ]); return requestContext; @@ -226,6 +329,7 @@ export class AgentlessScanningApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; @@ -271,6 +375,7 @@ export class AgentlessScanningApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; @@ -306,6 +411,7 @@ export class AgentlessScanningApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; @@ -341,6 +447,43 @@ export class AgentlessScanningApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async listAzureScanOptions( + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + // Path Params + const localVarPath = "/api/v2/agentless_scanning/accounts/azure"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "AgentlessScanningApi.v2.listAzureScanOptions", + AgentlessScanningApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", ]); return requestContext; @@ -401,6 +544,68 @@ export class AgentlessScanningApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async updateAzureScanOptions( + subscriptionId: string, + body: AzureScanOptionsInputUpdate, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'subscriptionId' is not null or undefined + if (subscriptionId === null || subscriptionId === undefined) { + throw new RequiredError("subscriptionId", "updateAzureScanOptions"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateAzureScanOptions"); + } + + // Path Params + const localVarPath = + "/api/v2/agentless_scanning/accounts/azure/{subscription_id}".replace( + "{subscription_id}", + encodeURIComponent(String(subscriptionId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "AgentlessScanningApi.v2.updateAzureScanOptions", + AgentlessScanningApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.PATCH, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "AzureScanOptionsInputUpdate", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", ]); return requestContext; @@ -529,6 +734,62 @@ export class AgentlessScanningApiResponseProcessor { ); } + /** + * 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 createAzureScanOptions + * @throws ApiException if the response code was not in [200, 299] + */ + public async createAzureScanOptions( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 201) { + const body: AzureScanOptions = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "AzureScanOptions", + ) as AzureScanOptions; + return body; + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "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: AzureScanOptions = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "AzureScanOptions", + "", + ) as AzureScanOptions; + 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 @@ -577,6 +838,51 @@ export class AgentlessScanningApiResponseProcessor { ); } + /** + * 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 deleteAzureScanOptions + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteAzureScanOptions( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 204) { + return; + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "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) { + return; + } + + 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 @@ -811,6 +1117,62 @@ export class AgentlessScanningApiResponseProcessor { ); } + /** + * 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 listAzureScanOptions + * @throws ApiException if the response code was not in [200, 299] + */ + public async listAzureScanOptions( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: AzureScanOptionsArray = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "AzureScanOptionsArray", + ) as AzureScanOptionsArray; + return body; + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "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: AzureScanOptionsArray = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "AzureScanOptionsArray", + "", + ) as AzureScanOptionsArray; + 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 @@ -858,6 +1220,62 @@ export class AgentlessScanningApiResponseProcessor { '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 updateAzureScanOptions + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateAzureScanOptions( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: AzureScanOptions = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "AzureScanOptions", + ) as AzureScanOptions; + return body; + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "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: AzureScanOptions = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "AzureScanOptions", + "", + ) as AzureScanOptions; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } } export interface AgentlessScanningApiCreateAwsOnDemandTaskRequest { @@ -876,6 +1294,13 @@ export interface AgentlessScanningApiCreateAwsScanOptionsRequest { body: AwsScanOptionsCreateRequest; } +export interface AgentlessScanningApiCreateAzureScanOptionsRequest { + /** + * @type AzureScanOptions + */ + body: AzureScanOptions; +} + export interface AgentlessScanningApiDeleteAwsScanOptionsRequest { /** * The ID of an AWS account. @@ -884,6 +1309,14 @@ export interface AgentlessScanningApiDeleteAwsScanOptionsRequest { accountId: string; } +export interface AgentlessScanningApiDeleteAzureScanOptionsRequest { + /** + * The Azure subscription ID. + * @type string + */ + subscriptionId: string; +} + export interface AgentlessScanningApiGetAwsOnDemandTaskRequest { /** * The UUID of the task. @@ -913,6 +1346,18 @@ export interface AgentlessScanningApiUpdateAwsScanOptionsRequest { body: AwsScanOptionsUpdateRequest; } +export interface AgentlessScanningApiUpdateAzureScanOptionsRequest { + /** + * The Azure subscription ID. + * @type string + */ + subscriptionId: string; + /** + * @type AzureScanOptionsInputUpdate + */ + body: AzureScanOptionsInputUpdate; +} + export class AgentlessScanningApi { private requestFactory: AgentlessScanningApiRequestFactory; private responseProcessor: AgentlessScanningApiResponseProcessor; @@ -975,6 +1420,27 @@ export class AgentlessScanningApi { }); } + /** + * Activate Agentless scan options for an Azure subscription. + * @param param The request object + */ + public createAzureScanOptions( + param: AgentlessScanningApiCreateAzureScanOptionsRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.createAzureScanOptions( + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createAzureScanOptions(responseContext); + }); + }); + } + /** * Delete Agentless scan options for an AWS account. * @param param The request object @@ -996,6 +1462,27 @@ export class AgentlessScanningApi { }); } + /** + * Delete Agentless scan options for an Azure subscription. + * @param param The request object + */ + public deleteAzureScanOptions( + param: AgentlessScanningApiDeleteAzureScanOptionsRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.deleteAzureScanOptions( + param.subscriptionId, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteAzureScanOptions(responseContext); + }); + }); + } + /** * Fetch the data of a specific on demand task. * @param param The request object @@ -1074,6 +1561,24 @@ export class AgentlessScanningApi { }); } + /** + * Fetches the scan options configured for Azure accounts. + * @param param The request object + */ + public listAzureScanOptions( + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.listAzureScanOptions(options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listAzureScanOptions(responseContext); + }); + }); + } + /** * Update the Agentless scan options for an activated account. * @param param The request object @@ -1095,4 +1600,26 @@ export class AgentlessScanningApi { }); }); } + + /** + * Update the Agentless scan options for an activated subscription. + * @param param The request object + */ + public updateAzureScanOptions( + param: AgentlessScanningApiUpdateAzureScanOptionsRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.updateAzureScanOptions( + param.subscriptionId, + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateAzureScanOptions(responseContext); + }); + }); + } } diff --git a/services/agentless_scanning/src/v2/index.ts b/services/agentless_scanning/src/v2/index.ts index a838b42b434b..73d66dcffef9 100644 --- a/services/agentless_scanning/src/v2/index.ts +++ b/services/agentless_scanning/src/v2/index.ts @@ -1,10 +1,13 @@ export { AgentlessScanningApiCreateAwsOnDemandTaskRequest, AgentlessScanningApiCreateAwsScanOptionsRequest, + AgentlessScanningApiCreateAzureScanOptionsRequest, AgentlessScanningApiDeleteAwsScanOptionsRequest, + AgentlessScanningApiDeleteAzureScanOptionsRequest, AgentlessScanningApiGetAwsOnDemandTaskRequest, AgentlessScanningApiGetAwsScanOptionsRequest, AgentlessScanningApiUpdateAwsScanOptionsRequest, + AgentlessScanningApiUpdateAzureScanOptionsRequest, AgentlessScanningApi, } from "./AgentlessScanningApi"; @@ -28,3 +31,12 @@ export { AwsScanOptionsType } from "./models/AwsScanOptionsType"; export { AwsScanOptionsUpdateAttributes } from "./models/AwsScanOptionsUpdateAttributes"; export { AwsScanOptionsUpdateData } from "./models/AwsScanOptionsUpdateData"; export { AwsScanOptionsUpdateRequest } from "./models/AwsScanOptionsUpdateRequest"; +export { AzureScanOptions } from "./models/AzureScanOptions"; +export { AzureScanOptionsArray } from "./models/AzureScanOptionsArray"; +export { AzureScanOptionsData } from "./models/AzureScanOptionsData"; +export { AzureScanOptionsDataAttributes } from "./models/AzureScanOptionsDataAttributes"; +export { AzureScanOptionsDataType } from "./models/AzureScanOptionsDataType"; +export { AzureScanOptionsInputUpdate } from "./models/AzureScanOptionsInputUpdate"; +export { AzureScanOptionsInputUpdateData } from "./models/AzureScanOptionsInputUpdateData"; +export { AzureScanOptionsInputUpdateDataAttributes } from "./models/AzureScanOptionsInputUpdateDataAttributes"; +export { AzureScanOptionsInputUpdateDataType } from "./models/AzureScanOptionsInputUpdateDataType"; diff --git a/services/agentless_scanning/src/v2/models/AzureScanOptions.ts b/services/agentless_scanning/src/v2/models/AzureScanOptions.ts new file mode 100644 index 000000000000..b9d842b5ff43 --- /dev/null +++ b/services/agentless_scanning/src/v2/models/AzureScanOptions.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { AzureScanOptionsData } from "./AzureScanOptionsData"; + +/** + * The definition of `AzureScanOptions` object. + */ +export class AzureScanOptions { + /** + * The definition of `AzureScanOptionsData` object. + */ + "data"?: AzureScanOptionsData; + /** + * 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: "AzureScanOptionsData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AzureScanOptions.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/agentless_scanning/src/v2/models/AzureScanOptionsArray.ts b/services/agentless_scanning/src/v2/models/AzureScanOptionsArray.ts new file mode 100644 index 000000000000..2ee727cb0a01 --- /dev/null +++ b/services/agentless_scanning/src/v2/models/AzureScanOptionsArray.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { AzureScanOptionsData } from "./AzureScanOptionsData"; + +/** + * The definition of `AzureScanOptionsArray` object. + */ +export class AzureScanOptionsArray { + /** + * The `AzureScanOptionsArray` `data`. + */ + "data": Array; + /** + * 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: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AzureScanOptionsArray.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/agentless_scanning/src/v2/models/AzureScanOptionsData.ts b/services/agentless_scanning/src/v2/models/AzureScanOptionsData.ts new file mode 100644 index 000000000000..67f796826ca9 --- /dev/null +++ b/services/agentless_scanning/src/v2/models/AzureScanOptionsData.ts @@ -0,0 +1,65 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { AzureScanOptionsDataAttributes } from "./AzureScanOptionsDataAttributes"; +import { AzureScanOptionsDataType } from "./AzureScanOptionsDataType"; + +/** + * The definition of `AzureScanOptionsData` object. + */ +export class AzureScanOptionsData { + /** + * The definition of `AzureScanOptionsDataAttributes` object. + */ + "attributes"?: AzureScanOptionsDataAttributes; + /** + * The `AzureScanOptionsData` `id`. + */ + "id": string; + /** + * The type of the resource. The value should always be `azure_scan_options`. + */ + "type": AzureScanOptionsDataType; + /** + * 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: "AzureScanOptionsDataAttributes", + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "AzureScanOptionsDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AzureScanOptionsData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/agentless_scanning/src/v2/models/AzureScanOptionsDataAttributes.ts b/services/agentless_scanning/src/v2/models/AzureScanOptionsDataAttributes.ts new file mode 100644 index 000000000000..fc358d6d0161 --- /dev/null +++ b/services/agentless_scanning/src/v2/models/AzureScanOptionsDataAttributes.ts @@ -0,0 +1,52 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The definition of `AzureScanOptionsDataAttributes` object. + */ +export class AzureScanOptionsDataAttributes { + /** + * The `attributes` `vuln_containers_os`. + */ + "vulnContainersOs"?: boolean; + /** + * The `attributes` `vuln_host_os`. + */ + "vulnHostOs"?: boolean; + /** + * 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 = { + vulnContainersOs: { + baseName: "vuln_containers_os", + type: "boolean", + }, + vulnHostOs: { + baseName: "vuln_host_os", + type: "boolean", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AzureScanOptionsDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/agentless_scanning/src/v2/models/AzureScanOptionsDataType.ts b/services/agentless_scanning/src/v2/models/AzureScanOptionsDataType.ts new file mode 100644 index 000000000000..1c7cd3df2481 --- /dev/null +++ b/services/agentless_scanning/src/v2/models/AzureScanOptionsDataType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * The type of the resource. The value should always be `azure_scan_options`. + */ +export type AzureScanOptionsDataType = + | typeof AZURE_SCAN_OPTIONS + | UnparsedObject; +export const AZURE_SCAN_OPTIONS = "azure_scan_options"; diff --git a/services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdate.ts b/services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdate.ts new file mode 100644 index 000000000000..c50458e8adf0 --- /dev/null +++ b/services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdate.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { AzureScanOptionsInputUpdateData } from "./AzureScanOptionsInputUpdateData"; + +/** + * The definition of `AzureScanOptionsInputUpdate` object. + */ +export class AzureScanOptionsInputUpdate { + /** + * The definition of `AzureScanOptionsInputUpdateData` object. + */ + "data"?: AzureScanOptionsInputUpdateData; + /** + * 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: "AzureScanOptionsInputUpdateData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AzureScanOptionsInputUpdate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdateData.ts b/services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdateData.ts new file mode 100644 index 000000000000..bb61cebae7cd --- /dev/null +++ b/services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdateData.ts @@ -0,0 +1,65 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { AzureScanOptionsInputUpdateDataAttributes } from "./AzureScanOptionsInputUpdateDataAttributes"; +import { AzureScanOptionsInputUpdateDataType } from "./AzureScanOptionsInputUpdateDataType"; + +/** + * The definition of `AzureScanOptionsInputUpdateData` object. + */ +export class AzureScanOptionsInputUpdateData { + /** + * The definition of `AzureScanOptionsInputUpdateDataAttributes` object. + */ + "attributes"?: AzureScanOptionsInputUpdateDataAttributes; + /** + * The `AzureScanOptionsInputUpdateData` `id`. + */ + "id": string; + /** + * Azure scan options resource type. + */ + "type": AzureScanOptionsInputUpdateDataType; + /** + * 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: "AzureScanOptionsInputUpdateDataAttributes", + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "AzureScanOptionsInputUpdateDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AzureScanOptionsInputUpdateData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdateDataAttributes.ts b/services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdateDataAttributes.ts new file mode 100644 index 000000000000..bae35fe6e28c --- /dev/null +++ b/services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdateDataAttributes.ts @@ -0,0 +1,52 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The definition of `AzureScanOptionsInputUpdateDataAttributes` object. + */ +export class AzureScanOptionsInputUpdateDataAttributes { + /** + * The `attributes` `vuln_containers_os`. + */ + "vulnContainersOs"?: boolean; + /** + * The `attributes` `vuln_host_os`. + */ + "vulnHostOs"?: boolean; + /** + * 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 = { + vulnContainersOs: { + baseName: "vuln_containers_os", + type: "boolean", + }, + vulnHostOs: { + baseName: "vuln_host_os", + type: "boolean", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AzureScanOptionsInputUpdateDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdateDataType.ts b/services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdateDataType.ts new file mode 100644 index 000000000000..1bb327133910 --- /dev/null +++ b/services/agentless_scanning/src/v2/models/AzureScanOptionsInputUpdateDataType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Azure scan options resource type. + */ +export type AzureScanOptionsInputUpdateDataType = + | typeof AZURE_SCAN_OPTIONS + | UnparsedObject; +export const AZURE_SCAN_OPTIONS = "azure_scan_options"; diff --git a/services/agentless_scanning/src/v2/models/TypingInfo.ts b/services/agentless_scanning/src/v2/models/TypingInfo.ts index 42ed82ca3985..3ad2cf968b46 100644 --- a/services/agentless_scanning/src/v2/models/TypingInfo.ts +++ b/services/agentless_scanning/src/v2/models/TypingInfo.ts @@ -18,11 +18,20 @@ import { AwsScanOptionsResponse } from "./AwsScanOptionsResponse"; import { AwsScanOptionsUpdateAttributes } from "./AwsScanOptionsUpdateAttributes"; import { AwsScanOptionsUpdateData } from "./AwsScanOptionsUpdateData"; import { AwsScanOptionsUpdateRequest } from "./AwsScanOptionsUpdateRequest"; +import { AzureScanOptions } from "./AzureScanOptions"; +import { AzureScanOptionsArray } from "./AzureScanOptionsArray"; +import { AzureScanOptionsData } from "./AzureScanOptionsData"; +import { AzureScanOptionsDataAttributes } from "./AzureScanOptionsDataAttributes"; +import { AzureScanOptionsInputUpdate } from "./AzureScanOptionsInputUpdate"; +import { AzureScanOptionsInputUpdateData } from "./AzureScanOptionsInputUpdateData"; +import { AzureScanOptionsInputUpdateDataAttributes } from "./AzureScanOptionsInputUpdateDataAttributes"; export const TypingInfo: ModelTypingInfo = { enumsMap: { AwsOnDemandType: ["aws_resource"], AwsScanOptionsType: ["aws_scan_options"], + AzureScanOptionsDataType: ["azure_scan_options"], + AzureScanOptionsInputUpdateDataType: ["azure_scan_options"], }, oneOfMap: {}, typeMap: { @@ -44,5 +53,13 @@ export const TypingInfo: ModelTypingInfo = { AwsScanOptionsUpdateAttributes: AwsScanOptionsUpdateAttributes, AwsScanOptionsUpdateData: AwsScanOptionsUpdateData, AwsScanOptionsUpdateRequest: AwsScanOptionsUpdateRequest, + AzureScanOptions: AzureScanOptions, + AzureScanOptionsArray: AzureScanOptionsArray, + AzureScanOptionsData: AzureScanOptionsData, + AzureScanOptionsDataAttributes: AzureScanOptionsDataAttributes, + AzureScanOptionsInputUpdate: AzureScanOptionsInputUpdate, + AzureScanOptionsInputUpdateData: AzureScanOptionsInputUpdateData, + AzureScanOptionsInputUpdateDataAttributes: + AzureScanOptionsInputUpdateDataAttributes, }, };