From 160689a217f8b8db8bfb3491cc46c3d8569c6b19 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 16 Oct 2026 16:34:48 +0000 Subject: [PATCH] Regenerate client from commit d1ba91a of spec repo --- .generator/schemas/v2/openapi.yaml | 1572 + ...ancelSecurityMonitoringBatchMigration.java | 27 + ...reateSecurityMonitoringBatchMigration.java | 56 + ...rityMonitoringBatchMigrationResources.java | 65 + ...eleteSecurityMonitoringBatchMigration.java | 34 + ...rityMonitoringBatchMigrationResources.java | 58 + ...rityMonitoringBatchMigrationResources.java | 39 + ...ListSecurityMonitoringBatchMigrations.java | 40 + ...blishSecurityMonitoringBatchMigration.java | 46 + ...StartSecurityMonitoringBatchMigration.java | 27 + ...pdateSecurityMonitoringBatchMigration.java | 52 + ...urityMonitoringBatchMigrationResource.java | 61 + .../com/datadog/api/client/ApiClient.java | 11 + .../client/v2/api/SecurityMonitoringApi.java | 25013 +++++++++------- ...ityMonitoringBatchMigrationAttributes.java | 479 + ...itoringBatchMigrationCreateAttributes.java | 263 + ...ityMonitoringBatchMigrationCreateData.java | 191 + ...MonitoringBatchMigrationCreateRequest.java | 154 + .../SecurityMonitoringBatchMigrationData.java | 217 + ...tyMonitoringBatchMigrationInputSource.java | 70 + ...urityMonitoringBatchMigrationListMeta.java | 146 + ...toringBatchMigrationPublishAttributes.java | 154 + ...tyMonitoringBatchMigrationPublishData.java | 191 + ...onitoringBatchMigrationPublishRequest.java | 154 + ...nitoringBatchMigrationPublishResponse.java | 170 + ...tyMonitoringBatchMigrationPublishType.java | 63 + ...hMigrationPublishedResourceAttributes.java | 217 + ...ngBatchMigrationPublishedResourceData.java | 225 + ...BatchMigrationPublishedResourceStatus.java | 65 + ...ngBatchMigrationPublishedResourceType.java | 65 + ...oringBatchMigrationResourceAttributes.java | 542 + ...oringBatchMigrationResourceCreateItem.java | 246 + ...yMonitoringBatchMigrationResourceData.java | 220 + ...toringBatchMigrationResourceInputType.java | 72 + ...itoringBatchMigrationResourceResponse.java | 155 + ...onitoringBatchMigrationResourceStatus.java | 90 + ...ingBatchMigrationResourceStatusCounts.java | 364 + ...yMonitoringBatchMigrationResourceType.java | 63 + ...atchMigrationResourceUpdateAttributes.java | 180 + ...oringBatchMigrationResourceUpdateData.java | 195 + ...ngBatchMigrationResourceUpdateRequest.java | 157 + ...tchMigrationResourcesCreateAttributes.java | 176 + ...ringBatchMigrationResourcesCreateData.java | 195 + ...gBatchMigrationResourcesCreateRequest.java | 158 + ...BatchMigrationResourcesCreateResponse.java | 173 + ...tchMigrationResourcesDeleteAttributes.java | 164 + ...ringBatchMigrationResourcesDeleteData.java | 195 + ...gBatchMigrationResourcesDeleteRequest.java | 158 + ...ngBatchMigrationResourcesListResponse.java | 209 + ...MonitoringBatchMigrationResourcesType.java | 63 + ...urityMonitoringBatchMigrationResponse.java | 152 + ...ecurityMonitoringBatchMigrationStatus.java | 73 + .../SecurityMonitoringBatchMigrationType.java | 60 + ...itoringBatchMigrationUpdateAttributes.java | 150 + ...ityMonitoringBatchMigrationUpdateData.java | 191 + ...MonitoringBatchMigrationUpdateRequest.java | 154 + ...MonitoringBatchMigrationsListResponse.java | 206 + .../com/datadog/api/client/v2/api/given.json | 25 + .../client/v2/api/security_monitoring.feature | 352 + .../com/datadog/api/client/v2/api/undo.json | 81 + .../test-runner-data/manifest.json | 56 + ...ch-migration-returns-created-response.json | 56 + ...ch-migration-returns-created-response.json | 45 + ...migration-returns-no-content-response.json | 35 + ...migration-returns-no-content-response.json | 52 + ...gration-resources-returns-ok-response.json | 35 + ...-batch-migrations-returns-ok-response.json | 35 + ...igration-resource-returns-ok-response.json | 66 + ...a-batch-migration-returns-ok-response.json | 54 + .../v2/security-monitoring.json | 850 +- 70 files changed, 25015 insertions(+), 11413 deletions(-) create mode 100644 examples/v2/security-monitoring/CancelSecurityMonitoringBatchMigration.java create mode 100644 examples/v2/security-monitoring/CreateSecurityMonitoringBatchMigration.java create mode 100644 examples/v2/security-monitoring/CreateSecurityMonitoringBatchMigrationResources.java create mode 100644 examples/v2/security-monitoring/DeleteSecurityMonitoringBatchMigration.java create mode 100644 examples/v2/security-monitoring/DeleteSecurityMonitoringBatchMigrationResources.java create mode 100644 examples/v2/security-monitoring/ListSecurityMonitoringBatchMigrationResources.java create mode 100644 examples/v2/security-monitoring/ListSecurityMonitoringBatchMigrations.java create mode 100644 examples/v2/security-monitoring/PublishSecurityMonitoringBatchMigration.java create mode 100644 examples/v2/security-monitoring/StartSecurityMonitoringBatchMigration.java create mode 100644 examples/v2/security-monitoring/UpdateSecurityMonitoringBatchMigration.java create mode 100644 examples/v2/security-monitoring/UpdateSecurityMonitoringBatchMigrationResource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationCreateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationCreateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationInputSource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationListMeta.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceStatus.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceCreateItem.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceInputType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceStatus.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceStatusCounts.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceUpdateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceUpdateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceUpdateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesDeleteAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesDeleteData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesDeleteRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesListResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationStatus.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationUpdateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationUpdateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationUpdateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationsListResponse.java create mode 100644 src/test/resources/generated-test/test-runner-data/v2/security-monitoring/add-resources-to-a-batch-migration-returns-created-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/security-monitoring/create-a-batch-migration-returns-created-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/security-monitoring/delete-a-batch-migration-returns-no-content-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/security-monitoring/delete-resources-from-a-batch-migration-returns-no-content-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/security-monitoring/list-batch-migration-resources-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/security-monitoring/list-batch-migrations-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-batch-migration-resource-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-batch-migration-returns-ok-response.json diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 8e540e2cff5..f94599b971a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1942,6 +1942,47 @@ components: required: true schema: type: string + SecurityMonitoringBatchMigrationID: + description: The UUID of the batch migration. + in: path + name: batch_id + required: true + schema: + example: 7cdb3a75-64fb-46ce-9445-41969e78fe8e + format: uuid + type: string + SecurityMonitoringBatchMigrationPageNumber: + description: Specific page number to return, starting at 1. + in: query + name: page[number] + required: false + schema: + default: 1 + example: 1 + format: int64 + minimum: 1 + type: integer + SecurityMonitoringBatchMigrationPageSize: + description: Size for a given page. The maximum allowed value is 500. + in: query + name: page[size] + required: false + schema: + default: 50 + example: 50 + format: int64 + maximum: 500 + minimum: 1 + type: integer + SecurityMonitoringBatchMigrationResourceID: + description: The UUID of the batch migration resource. + in: path + name: resource_id + required: true + schema: + example: c968cf83-56c2-4d54-a993-6c86dfb83527 + format: uuid + type: string SecurityMonitoringCriticalAssetID: description: The ID of the critical asset. in: path @@ -2370,6 +2411,42 @@ components: schema: $ref: "#/components/schemas/APIErrorResponse" description: Method Not Allowed + SecurityMonitoringBatchMigrationBadRequestResponse: + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + SecurityMonitoringBatchMigrationConflictResponse: + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict + SecurityMonitoringBatchMigrationForbiddenResponse: + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + SecurityMonitoringBatchMigrationInternalServerErrorResponse: + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + SecurityMonitoringBatchMigrationNotFoundResponse: + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + SecurityMonitoringBatchMigrationUnauthorizedResponse: + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized SpansBadRequestResponse: content: application/json: @@ -112057,6 +112134,725 @@ components: - subscription_count - error_count type: object + SecurityMonitoringBatchMigrationAttributes: + description: Attributes of a batch migration. + properties: + createdAt: + description: The creation date of the batch migration, in RFC 3339 format. + example: "2026-09-21T12:00:00Z" + format: date-time + type: string + createdBy: + description: The UUID of the user or service account who created the batch migration. + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + type: string + description: + description: The description of the batch migration. + example: Rules imported from Splunk + type: string + inputSource: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationInputSource" + lastUpdatedAt: + description: The last update date of the batch migration, in RFC 3339 format. + example: "2026-09-21T12:00:00Z" + format: date-time + type: string + lastUpdatedBy: + description: |- + The UUID of the user or service account who last updated the batch migration, + or the name of a system actor. + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + type: string + name: + description: The name of the batch migration. + example: Splunk migration + type: string + orgId: + description: The ID of the organization that owns the batch migration. + example: 123456 + format: int64 + type: integer + resourceStatusCounts: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceStatusCounts" + status: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationStatus" + tags: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationTags" + required: + - orgId + - name + - inputSource + - status + - createdAt + - lastUpdatedAt + - tags + - resourceStatusCounts + type: object + SecurityMonitoringBatchMigrationCreateAttributes: + description: Attributes of the batch migration to create. + properties: + description: + description: The description of the batch migration. + example: Rules imported from Splunk + maxLength: 4096 + type: string + name: + description: The name of the batch migration. + example: Splunk migration + maxLength: 512 + type: string + resources: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationCreateResources" + tags: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationTags" + required: + - resources + type: object + SecurityMonitoringBatchMigrationCreateData: + description: Data of the batch migration to create. + properties: + attributes: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationCreateAttributes" + type: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationType" + required: + - type + - attributes + type: object + SecurityMonitoringBatchMigrationCreateRequest: + description: Request to create a batch migration. + properties: + data: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationCreateData" + required: + - data + type: object + SecurityMonitoringBatchMigrationCreateResources: + description: The initial resources of the batch migration. From 1 to 100 resources. + items: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceCreateItem" + maxItems: 100 + minItems: 1 + type: array + SecurityMonitoringBatchMigrationData: + description: A batch migration. + properties: + attributes: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationAttributes" + id: + description: The UUID of the batch migration. + example: 7cdb3a75-64fb-46ce-9445-41969e78fe8e + format: uuid + type: string + type: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationType" + required: + - id + - type + - attributes + type: object + SecurityMonitoringBatchMigrationInputSource: + description: |- + The origin of a batch migration. Always `batch_migration` for batch migrations + created through this API. + enum: + - batch_migration + - threat_hunting + - user + example: batch_migration + type: string + x-enum-varnames: + - BATCH_MIGRATION + - THREAT_HUNTING + - USER + SecurityMonitoringBatchMigrationListMeta: + description: Metadata of a list response. + properties: + totalCount: + description: Total number of items matching the request. + example: 1 + format: int64 + type: integer + required: + - totalCount + type: object + SecurityMonitoringBatchMigrationPublishAttributes: + description: Attributes of the batch migration publish request. + properties: + resourceIds: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishResourceIDs" + type: object + SecurityMonitoringBatchMigrationPublishData: + description: Data of the batch migration publish request. + properties: + attributes: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishAttributes" + type: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishType" + required: + - type + - attributes + type: object + SecurityMonitoringBatchMigrationPublishRequest: + description: Request to publish the resources of a batch migration. + properties: + data: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishData" + required: + - data + type: object + SecurityMonitoringBatchMigrationPublishResourceIDs: + description: |- + Unique UUIDs of the resources to publish. Up to 1000 IDs. When omitted or empty, + every `completed` resource of the batch migration is published. + example: + - c968cf83-56c2-4d54-a993-6c86dfb83527 + items: + format: uuid + type: string + maxItems: 1000 + type: array + uniqueItems: true + SecurityMonitoringBatchMigrationPublishResponse: + description: Response containing the publication outcome of each resource. + properties: + data: + description: The publication outcome of each resource. + items: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishedResourceData" + type: array + required: + - data + type: object + SecurityMonitoringBatchMigrationPublishType: + description: The type of resource for a batch migration publish request. + enum: + - batchMigrationPublish + example: batchMigrationPublish + type: string + x-enum-varnames: + - BATCH_MIGRATION_PUBLISH + SecurityMonitoringBatchMigrationPublishedResourceAttributes: + description: Attributes of the publication outcome of a batch migration resource. + properties: + error: + description: The reason why the resource could not be published. + example: failed to create rule + type: string + ruleId: + description: The ID of the created Cloud SIEM detection rule. + example: abc-def-ghi + type: string + status: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishedResourceStatus" + required: + - status + type: object + SecurityMonitoringBatchMigrationPublishedResourceData: + description: The publication outcome of a batch migration resource. + properties: + attributes: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishedResourceAttributes" + id: + description: The UUID of the batch migration resource. + example: c968cf83-56c2-4d54-a993-6c86dfb83527 + format: uuid + type: string + type: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishedResourceType" + required: + - id + - type + - attributes + type: object + SecurityMonitoringBatchMigrationPublishedResourceStatus: + description: The outcome of publishing a batch migration resource. + enum: + - published + - failed + example: published + type: string + x-enum-varnames: + - PUBLISHED + - FAILED + SecurityMonitoringBatchMigrationPublishedResourceType: + description: The type of resource for a published batch migration resource. + enum: + - batchMigrationPublishedResource + example: batchMigrationPublishedResource + type: string + x-enum-varnames: + - BATCH_MIGRATION_PUBLISHED_RESOURCE + SecurityMonitoringBatchMigrationResourceAttributes: + description: Attributes of a batch migration resource. + properties: + batchId: + description: The UUID of the batch migration that contains the resource. + example: 7cdb3a75-64fb-46ce-9445-41969e78fe8e + format: uuid + type: string + createdAt: + description: The creation date of the resource, in RFC 3339 format. + example: "2026-09-21T12:00:00Z" + format: date-time + type: string + createdBy: + description: The UUID of the user or service account who created the resource. + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + type: string + description: + description: The description of the resource. + example: Detects repeated failed Windows authentication attempts. + type: string + input: + description: The source query or natural language description to translate. + example: index=wineventlog EventCode=4625 + type: string + inputType: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceInputType" + lastUpdatedAt: + description: The last update date of the resource, in RFC 3339 format. + example: "2026-09-21T12:02:00Z" + format: date-time + type: string + lastUpdatedBy: + description: |- + The UUID of the user or service account who last updated the resource, + or the name of a system actor. + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + type: string + name: + description: The name of the resource. + example: Repeated Windows login failures + type: string + output: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceOutput" + outputType: + description: The type of the translation output. Currently always `siem_rule`. + example: siem_rule + type: string + ruleId: + description: The ID of the Cloud SIEM detection rule created when the resource was published. + example: abc-def-ghi + type: string + status: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceStatus" + required: + - batchId + - name + - inputType + - outputType + - status + - input + - output + - createdAt + - lastUpdatedAt + type: object + SecurityMonitoringBatchMigrationResourceCreateItem: + description: A source rule to translate into a Cloud SIEM detection rule. + properties: + description: + description: The description of the resource. + example: Detects repeated failed Windows authentication attempts. + maxLength: 4096 + type: string + input: + description: The source query or natural language description to translate. Must not be blank. + example: index=wineventlog EventCode=4625 + maxLength: 65536 + minLength: 1 + pattern: '^[\s\S]*\S[\s\S]*$' + type: string + inputType: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceInputType" + name: + description: The name of the resource. + example: Repeated Windows login failures + maxLength: 512 + type: string + required: + - inputType + - input + type: object + SecurityMonitoringBatchMigrationResourceCreateItems: + description: The resources to add. From 1 to 1000 resources. + items: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceCreateItem" + maxItems: 1000 + minItems: 1 + type: array + SecurityMonitoringBatchMigrationResourceData: + description: A batch migration resource. + properties: + attributes: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceAttributes" + id: + description: The UUID of the batch migration resource. + example: c968cf83-56c2-4d54-a993-6c86dfb83527 + format: uuid + type: string + type: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceType" + required: + - id + - type + - attributes + type: object + SecurityMonitoringBatchMigrationResourceIDs: + description: Unique UUIDs of batch migration resources. From 1 to 1000 IDs. + example: + - c968cf83-56c2-4d54-a993-6c86dfb83527 + items: + format: uuid + type: string + maxItems: 1000 + minItems: 1 + type: array + SecurityMonitoringBatchMigrationResourceInputType: + description: |- + The type of the source rule: `spl` for a Splunk SPL search or saved search definition, + `natural_language` for a plain-English description of the behavior to detect, or `kql` + for a Microsoft KQL query. SPL inputs must be self-contained, with search macros expanded. + enum: + - natural_language + - spl + - kql + example: spl + type: string + x-enum-varnames: + - NATURAL_LANGUAGE + - SPL + - KQL + SecurityMonitoringBatchMigrationResourceOutput: + additionalProperties: {} + description: |- + The translation output. When the resource is `completed`, a Cloud SIEM detection rule + definition in the same format as the create detection rule API. When the resource is + `failed`, an object with an `error` describing the failure, with `kind` set to + `translation_error` or `internal_error`, and optional `type` and `message`. Otherwise, null. + example: + name: Repeated Windows login failures + type: log_detection + nullable: true + type: object + SecurityMonitoringBatchMigrationResourceResponse: + description: Response containing a batch migration resource. + properties: + data: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceData" + required: + - data + type: object + SecurityMonitoringBatchMigrationResourceStatus: + description: |- + The status of a batch migration resource. `completed` resources have a translation in + `output` that is ready to be published. `duplicate` is reserved for future duplicate rule + detection. + enum: + - pending + - in_progress + - completed + - canceled + - failed + - publishing + - published + - duplicate + example: completed + type: string + x-enum-varnames: + - PENDING + - IN_PROGRESS + - COMPLETED + - CANCELED + - FAILED + - PUBLISHING + - PUBLISHED + - DUPLICATE + SecurityMonitoringBatchMigrationResourceStatusCounts: + description: The number of resources of a batch migration in each status. + properties: + canceled: + description: Number of resources whose translation was canceled. + example: 0 + format: int64 + type: integer + completed: + description: Number of resources translated and ready to be published. + example: 0 + format: int64 + type: integer + duplicate: + description: Number of resources identified as duplicates of an existing rule. Reserved for future use. + example: 0 + format: int64 + type: integer + failed: + description: Number of resources whose translation failed. + example: 0 + format: int64 + type: integer + inProgress: + description: Number of resources being translated. + example: 0 + format: int64 + type: integer + pending: + description: Number of resources waiting to be translated. + example: 1 + format: int64 + type: integer + published: + description: Number of resources published as Cloud SIEM detection rules. + example: 0 + format: int64 + type: integer + publishing: + description: Number of resources being published. + example: 0 + format: int64 + type: integer + required: + - pending + - inProgress + - completed + - canceled + - failed + - publishing + - published + - duplicate + type: object + SecurityMonitoringBatchMigrationResourceType: + description: The type of resource for a batch migration resource. + enum: + - batchMigrationResource + example: batchMigrationResource + type: string + x-enum-varnames: + - BATCH_MIGRATION_RESOURCE + SecurityMonitoringBatchMigrationResourceUpdateAttributes: + additionalProperties: false + description: Attributes of the batch migration resource to update. At least one attribute is required. + minProperties: 1 + properties: + description: + description: The description of the resource. + example: Detects repeated failed Windows authentication attempts. + maxLength: 4096 + type: string + input: + description: The source query or natural language description to translate. Must not be blank. + example: index=wineventlog EventCode=4625 | stats count by user + maxLength: 65536 + minLength: 1 + pattern: '^[\s\S]*\S[\s\S]*$' + type: string + inputType: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceInputType" + name: + description: The name of the resource. + example: Repeated Windows login failures + maxLength: 512 + type: string + type: object + SecurityMonitoringBatchMigrationResourceUpdateData: + description: Data of the batch migration resource to update. + properties: + attributes: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceUpdateAttributes" + type: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceType" + required: + - type + - attributes + type: object + SecurityMonitoringBatchMigrationResourceUpdateRequest: + description: Request to update a batch migration resource. + properties: + data: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceUpdateData" + required: + - data + type: object + SecurityMonitoringBatchMigrationResourcesCreateAttributes: + description: Attributes of the resources to add to a batch migration. + properties: + resources: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceCreateItems" + required: + - resources + type: object + SecurityMonitoringBatchMigrationResourcesCreateData: + description: Data of the resources to add to a batch migration. + properties: + attributes: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourcesCreateAttributes" + type: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourcesType" + required: + - type + - attributes + type: object + SecurityMonitoringBatchMigrationResourcesCreateRequest: + description: Request to add resources to a batch migration. + properties: + data: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourcesCreateData" + required: + - data + type: object + SecurityMonitoringBatchMigrationResourcesCreateResponse: + description: Response containing the batch migration resources that were added. + properties: + data: + description: The added batch migration resources. + items: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceData" + type: array + required: + - data + type: object + SecurityMonitoringBatchMigrationResourcesDeleteAttributes: + description: Attributes of the resources to delete from a batch migration. + properties: + resourceIds: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceIDs" + required: + - resourceIds + type: object + SecurityMonitoringBatchMigrationResourcesDeleteData: + description: Data of the resources to delete from a batch migration. + properties: + attributes: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourcesDeleteAttributes" + type: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourcesType" + required: + - type + - attributes + type: object + SecurityMonitoringBatchMigrationResourcesDeleteRequest: + description: Request to delete resources from a batch migration. + properties: + data: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourcesDeleteData" + required: + - data + type: object + SecurityMonitoringBatchMigrationResourcesListResponse: + description: Response containing batch migration resources. + properties: + data: + description: The batch migration resources. + items: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceData" + type: array + meta: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationListMeta" + required: + - data + - meta + type: object + SecurityMonitoringBatchMigrationResourcesType: + description: The type of resource for a request on a set of batch migration resources. + enum: + - batchMigrationResources + example: batchMigrationResources + type: string + x-enum-varnames: + - BATCH_MIGRATION_RESOURCES + SecurityMonitoringBatchMigrationResponse: + description: Response containing a batch migration. + properties: + data: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationData" + required: + - data + type: object + SecurityMonitoringBatchMigrationStatus: + description: |- + The status of a batch migration. A batch migration is created as `draft` and moves to + `in_progress` when started. It moves to `completed` once no resource is `pending` or + `in_progress`, or to `canceled` when canceled. + enum: + - draft + - in_progress + - canceled + - completed + example: draft + type: string + x-enum-varnames: + - DRAFT + - IN_PROGRESS + - CANCELED + - COMPLETED + SecurityMonitoringBatchMigrationTags: + description: Tags of the batch migration. Up to 50 tags, each up to 256 characters. + example: + - source:splunk + items: + maxLength: 256 + type: string + maxItems: 50 + type: array + SecurityMonitoringBatchMigrationType: + description: The type of resource for a batch migration. + enum: + - batchMigration + example: batchMigration + type: string + x-enum-varnames: + - BATCH_MIGRATION + SecurityMonitoringBatchMigrationUpdateAttributes: + additionalProperties: false + description: Attributes of the batch migration to update. At least one attribute is required. + minProperties: 1 + properties: + description: + description: The description of the batch migration. + example: Rules imported from Splunk + maxLength: 4096 + type: string + name: + description: The name of the batch migration. + example: Splunk migration - Windows + maxLength: 512 + type: string + tags: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationTags" + type: object + SecurityMonitoringBatchMigrationUpdateData: + description: Data of the batch migration to update. + properties: + attributes: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationUpdateAttributes" + type: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationType" + required: + - type + - attributes + type: object + SecurityMonitoringBatchMigrationUpdateRequest: + description: Request to update a batch migration. + properties: + data: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationUpdateData" + required: + - data + type: object + SecurityMonitoringBatchMigrationsListResponse: + description: Response containing a page of batch migrations. + properties: + data: + description: The batch migrations. + items: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationData" + type: array + meta: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationListMeta" + required: + - data + - meta + type: object SecurityMonitoringContentPackActivation: description: The activation status of a content pack. enum: @@ -226113,6 +226909,782 @@ paths: x-unstable: |- **Note**: This endpoint is a private preview. If you are interested in accessing this API, [fill out this form](https://forms.gle/kMYC1sDr6WDUBDsx9). + /api/v2/security_monitoring/batch-migrations: + get: + description: |- + List the batch migrations of your organization. A batch migration groups detection + rules from another SIEM that the Datadog Detection Agent translates into Cloud SIEM + detection rules. To retrieve a single batch migration, filter by its ID with + `filter[query]=id:`. Poll this endpoint to follow the progress of a batch + migration through its `status` and `resourceStatusCounts`. + operationId: ListSecurityMonitoringBatchMigrations + parameters: + - $ref: "#/components/parameters/SecurityMonitoringBatchMigrationPageSize" + - $ref: "#/components/parameters/SecurityMonitoringBatchMigrationPageNumber" + - description: |- + A search query in Datadog search syntax to filter batch migrations, such as + `status:completed`. Filterable attributes are `id`, `name`, `description`, `status`, + `createdBy`, and `lastUpdatedBy`. Free text matches the batch migration name. + in: query + name: filter[query] + required: false + schema: + example: "status:draft" + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + createdAt: "2026-09-21T12:00:00Z" + createdBy: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + description: Rules imported from Splunk + inputSource: batch_migration + lastUpdatedAt: "2026-09-21T12:00:00Z" + lastUpdatedBy: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + name: Splunk migration + orgId: 123456 + resourceStatusCounts: + canceled: 0 + completed: 0 + duplicate: 0 + failed: 0 + inProgress: 0 + pending: 1 + published: 0 + publishing: 0 + status: draft + tags: + - source:splunk + id: 7cdb3a75-64fb-46ce-9445-41969e78fe8e + type: batchMigration + meta: + totalCount: 1 + schema: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationsListResponse" + description: OK + "400": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationBadRequestResponse" + "401": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationUnauthorizedResponse" + "403": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_read + summary: List batch migrations + tags: + - Security Monitoring + "x-permission": + operator: OR + permissions: + - security_monitoring_rules_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + To request access, contact [Datadog support](https://docs.datadoghq.com/help/) or your Customer Success Manager. + post: + description: |- + Create a batch migration in the `draft` status, together with 1 to 100 initial + resources. Each resource holds one source rule to translate into a Cloud SIEM detection + rule. To load more rules, add them with the add resources endpoint before starting the + batch migration. A batch migration can hold up to 1000 resources. The response does not + include the created resources: list the resources of the batch migration to retrieve them. + operationId: CreateSecurityMonitoringBatchMigration + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + description: Rules imported from Splunk + name: Splunk migration + resources: + - description: Detects repeated failed Windows authentication attempts. + input: index=wineventlog EventCode=4625 + inputType: spl + name: Repeated Windows login failures + - input: >- + Alert when PowerShell is launched with a command line that downloads and executes a remote script, such as IEX with Net.WebClient or Invoke-WebRequest. + inputType: natural_language + name: Suspicious PowerShell download cradle + tags: + - source:splunk + type: batchMigration + schema: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + createdAt: "2026-09-21T12:00:00Z" + createdBy: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + description: Rules imported from Splunk + inputSource: batch_migration + lastUpdatedAt: "2026-09-21T12:00:00Z" + lastUpdatedBy: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + name: Splunk migration + orgId: 123456 + resourceStatusCounts: + canceled: 0 + completed: 0 + duplicate: 0 + failed: 0 + inProgress: 0 + pending: 2 + published: 0 + publishing: 0 + status: draft + tags: + - source:splunk + id: 7cdb3a75-64fb-46ce-9445-41969e78fe8e + type: batchMigration + schema: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResponse" + description: Created + "400": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationBadRequestResponse" + "401": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationUnauthorizedResponse" + "403": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_write + summary: Create a batch migration + tags: + - Security Monitoring + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - security_monitoring_rules_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + To request access, contact [Datadog support](https://docs.datadoghq.com/help/) or your Customer Success Manager. + /api/v2/security_monitoring/batch-migrations/{batch_id}: + delete: + description: |- + Delete a batch migration and its resources. Detection rules that were already + published are not deleted. Returns `409 Conflict` while any resource is `in_progress` + or `publishing`: cancel the batch migration, or wait for publishing to finish, and + then try again. + operationId: DeleteSecurityMonitoringBatchMigration + parameters: + - $ref: "#/components/parameters/SecurityMonitoringBatchMigrationID" + responses: + "204": + description: No Content + "400": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationBadRequestResponse" + "401": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationUnauthorizedResponse" + "403": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationForbiddenResponse" + "404": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationNotFoundResponse" + "409": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_write + summary: Delete a batch migration + tags: + - Security Monitoring + "x-permission": + operator: OR + permissions: + - security_monitoring_rules_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + To request access, contact [Datadog support](https://docs.datadoghq.com/help/) or your Customer Success Manager. + patch: + description: |- + Update the name, description, or tags of a batch migration, in any status. At least + one of these attributes must be provided. Omitted attributes are left unchanged, and + `tags` replaces the full list of tags. + operationId: UpdateSecurityMonitoringBatchMigration + parameters: + - $ref: "#/components/parameters/SecurityMonitoringBatchMigrationID" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + name: Splunk migration - Windows + tags: + - source:splunk + - team:secops + type: batchMigration + schema: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + createdAt: "2026-09-21T12:00:00Z" + createdBy: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + description: Rules imported from Splunk + inputSource: batch_migration + lastUpdatedAt: "2026-09-21T12:05:00Z" + lastUpdatedBy: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + name: Splunk migration - Windows + orgId: 123456 + resourceStatusCounts: + canceled: 0 + completed: 0 + duplicate: 0 + failed: 0 + inProgress: 0 + pending: 1 + published: 0 + publishing: 0 + status: draft + tags: + - source:splunk + - team:secops + id: 7cdb3a75-64fb-46ce-9445-41969e78fe8e + type: batchMigration + schema: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResponse" + description: OK + "400": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationBadRequestResponse" + "401": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationUnauthorizedResponse" + "403": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationForbiddenResponse" + "404": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationNotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_write + summary: Update a batch migration + tags: + - Security Monitoring + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - security_monitoring_rules_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + To request access, contact [Datadog support](https://docs.datadoghq.com/help/) or your Customer Success Manager. + /api/v2/security_monitoring/batch-migrations/{batch_id}/cancel: + post: + description: |- + Cancel an `in_progress` batch migration. Resources that are `pending` or `in_progress` + become `canceled`. Resources that are already `completed` or `failed` keep their status + and output, so completed resources can still be published. Canceling a `canceled` batch + migration succeeds, so the request can be safely retried. Returns `409 Conflict` if the + batch migration is `draft` or `completed`. + operationId: CancelSecurityMonitoringBatchMigration + parameters: + - $ref: "#/components/parameters/SecurityMonitoringBatchMigrationID" + responses: + "202": + description: Accepted + "400": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationBadRequestResponse" + "401": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationUnauthorizedResponse" + "403": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationForbiddenResponse" + "404": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationNotFoundResponse" + "409": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_write + summary: Cancel a batch migration + tags: + - Security Monitoring + "x-permission": + operator: OR + permissions: + - security_monitoring_rules_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + To request access, contact [Datadog support](https://docs.datadoghq.com/help/) or your Customer Success Manager. + /api/v2/security_monitoring/batch-migrations/{batch_id}/publish: + post: + description: |- + Create a Cloud SIEM detection rule from the `output` of each selected `completed` + resource of a batch migration. Completed resources can be published while the rest of + the batch migration is still being translated. When `resourceIds` is omitted or empty, + every `completed` resource is published. Published rules are created disabled. + + Every requested resource must be publishable: `completed`, or left in `publishing` for + more than one minute after an uncertain result. Otherwise, the request returns + `409 Conflict` and nothing is published. Already published resources are not publishable. + + The response reports the outcome of each resource, and some resources can be published + while others fail. A `failed` result that contains a `ruleId` means the rule was created: + do not retry that resource. Publishing a rule with a `block_ip` or `block_user` action + requires the `appsec_protect_write` permission. + operationId: PublishSecurityMonitoringBatchMigration + parameters: + - $ref: "#/components/parameters/SecurityMonitoringBatchMigrationID" + requestBody: + content: + application/json: + examples: + all_completed: + summary: Publish every completed resource + value: + data: + attributes: {} + type: batchMigrationPublish + default: + value: + data: + attributes: + resourceIds: + - c968cf83-56c2-4d54-a993-6c86dfb83527 + type: batchMigrationPublish + schema: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + ruleId: abc-def-ghi + status: published + id: c968cf83-56c2-4d54-a993-6c86dfb83527 + type: batchMigrationPublishedResource + schema: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishResponse" + description: OK + "400": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationBadRequestResponse" + "401": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationUnauthorizedResponse" + "403": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationForbiddenResponse" + "404": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationNotFoundResponse" + "409": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_write + summary: Publish a batch migration + tags: + - Security Monitoring + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - security_monitoring_rules_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + To request access, contact [Datadog support](https://docs.datadoghq.com/help/) or your Customer Success Manager. + /api/v2/security_monitoring/batch-migrations/{batch_id}/resources: + delete: + description: |- + Delete resources from a batch migration. The request is all-or-nothing: it returns + `404 Not Found` if any resource does not exist, and `409 Conflict` if any resource is + `in_progress` or `publishing`. In both cases nothing is deleted. Duplicate resource IDs + are ignored. Detection rules already published from the deleted resources are not deleted. + operationId: DeleteSecurityMonitoringBatchMigrationResources + parameters: + - $ref: "#/components/parameters/SecurityMonitoringBatchMigrationID" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + resourceIds: + - c968cf83-56c2-4d54-a993-6c86dfb83527 + type: batchMigrationResources + schema: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourcesDeleteRequest" + required: true + responses: + "204": + description: No Content + "400": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationBadRequestResponse" + "401": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationUnauthorizedResponse" + "403": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationForbiddenResponse" + "404": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationNotFoundResponse" + "409": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_write + summary: Delete resources from a batch migration + tags: + - Security Monitoring + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - security_monitoring_rules_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + To request access, contact [Datadog support](https://docs.datadoghq.com/help/) or your Customer Success Manager. + get: + description: |- + List the resources of a batch migration, including the input of each source rule and, + once translated, the proposed Cloud SIEM detection rule in `output`. + operationId: ListSecurityMonitoringBatchMigrationResources + parameters: + - $ref: "#/components/parameters/SecurityMonitoringBatchMigrationID" + - $ref: "#/components/parameters/SecurityMonitoringBatchMigrationPageSize" + - $ref: "#/components/parameters/SecurityMonitoringBatchMigrationPageNumber" + - description: |- + A search query in Datadog search syntax to filter resources, such as + `status:completed`. Filterable attributes are `id`, `name`, `description`, `inputType`, + `status`, `input`, `createdBy`, and `lastUpdatedBy`. Free text matches the resource name. + in: query + name: filter[query] + required: false + schema: + example: "status:completed inputType:spl" + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + batchId: 7cdb3a75-64fb-46ce-9445-41969e78fe8e + createdAt: "2026-09-21T12:00:00Z" + createdBy: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + description: Detects repeated failed Windows authentication attempts. + input: index=wineventlog EventCode=4625 + inputType: spl + lastUpdatedAt: "2026-09-21T12:02:00Z" + lastUpdatedBy: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + name: Repeated Windows login failures + output: + cases: + - condition: failed_logins >= 5 + name: Repeated failures + notifications: [] + status: medium + isEnabled: false + message: Repeated failed Windows login attempts were detected. + name: Repeated Windows login failures + options: + evaluationWindow: 300 + keepAlive: 3600 + maxSignalDuration: 86400 + queries: + - aggregation: count + groupByFields: + - "@usr.name" + - "@network.client.ip" + name: failed_logins + query: "source:windows @evt.id:4625" + tags: + - source:windows + - migration:splunk + type: log_detection + outputType: siem_rule + status: completed + id: c968cf83-56c2-4d54-a993-6c86dfb83527 + type: batchMigrationResource + meta: + totalCount: 1 + schema: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourcesListResponse" + description: OK + "400": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationBadRequestResponse" + "401": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationUnauthorizedResponse" + "403": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationForbiddenResponse" + "404": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationNotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_read + summary: List batch migration resources + tags: + - Security Monitoring + "x-permission": + operator: OR + permissions: + - security_monitoring_rules_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + To request access, contact [Datadog support](https://docs.datadoghq.com/help/) or your Customer Success Manager. + post: + description: |- + Add 1 to 1000 resources to a `draft` batch migration. Returns `409 Conflict` if the + batch migration is not `draft`, and `400 Bad Request` if the batch migration would + contain more than 1000 resources. + operationId: CreateSecurityMonitoringBatchMigrationResources + parameters: + - $ref: "#/components/parameters/SecurityMonitoringBatchMigrationID" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + resources: + - input: index=linux process=sudo "authentication failure" | stats count by user, host + inputType: spl + name: Linux sudo abuse + type: batchMigrationResources + schema: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourcesCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + - attributes: + batchId: 7cdb3a75-64fb-46ce-9445-41969e78fe8e + createdAt: "2026-09-21T12:10:00Z" + createdBy: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + input: index=linux process=sudo "authentication failure" | stats count by user, host + inputType: spl + lastUpdatedAt: "2026-09-21T12:10:00Z" + lastUpdatedBy: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + name: Linux sudo abuse + output: + outputType: siem_rule + status: pending + id: 0b3f5e5c-8a2b-4a8f-9f0e-3c1d2e4f5a6b + type: batchMigrationResource + schema: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourcesCreateResponse" + description: Created + "400": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationBadRequestResponse" + "401": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationUnauthorizedResponse" + "403": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationForbiddenResponse" + "404": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationNotFoundResponse" + "409": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_write + summary: Add resources to a batch migration + tags: + - Security Monitoring + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - security_monitoring_rules_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + To request access, contact [Datadog support](https://docs.datadoghq.com/help/) or your Customer Success Manager. + /api/v2/security_monitoring/batch-migrations/{batch_id}/resources/{resource_id}: + patch: + description: |- + Update a resource of a batch migration. At least one of `name`, `description`, + `inputType`, or `input` must be provided. `name` and `description` can be updated at + any time. `inputType` and `input` can only be updated while the resource is `pending`; + otherwise, the request returns `409 Conflict`. The translated `output` cannot be edited. + operationId: UpdateSecurityMonitoringBatchMigrationResource + parameters: + - $ref: "#/components/parameters/SecurityMonitoringBatchMigrationID" + - $ref: "#/components/parameters/SecurityMonitoringBatchMigrationResourceID" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + input: index=wineventlog EventCode=4625 | stats count by user + type: batchMigrationResource + schema: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + batchId: 7cdb3a75-64fb-46ce-9445-41969e78fe8e + createdAt: "2026-09-21T12:00:00Z" + createdBy: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + input: index=wineventlog EventCode=4625 | stats count by user + inputType: spl + lastUpdatedAt: "2026-09-21T12:15:00Z" + lastUpdatedBy: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + name: Repeated Windows login failures + output: + outputType: siem_rule + status: pending + id: c968cf83-56c2-4d54-a993-6c86dfb83527 + type: batchMigrationResource + schema: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationResourceResponse" + description: OK + "400": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationBadRequestResponse" + "401": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationUnauthorizedResponse" + "403": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationForbiddenResponse" + "404": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationNotFoundResponse" + "409": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_write + summary: Update a batch migration resource + tags: + - Security Monitoring + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - security_monitoring_rules_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + To request access, contact [Datadog support](https://docs.datadoghq.com/help/) or your Customer Success Manager. + /api/v2/security_monitoring/batch-migrations/{batch_id}/start: + post: + description: |- + Start translating the `pending` resources of a `draft` batch migration into Cloud SIEM + detection rules. The batch migration moves to `in_progress`, and its resources are + translated asynchronously. Once no resource is `pending` or `in_progress`, the batch + migration moves to `completed`. Starting an `in_progress` batch migration again does not + queue duplicate work, so the request can be safely retried, including after a timeout or + a `5xx` error. Returns `409 Conflict` if the batch migration is `completed` or `canceled`. + + An organization can translate up to 2000 resources in total across all of its batch + migrations. Resources that were already processed count toward this limit even after + they are deleted, and `pending` resources of `in_progress` batch migrations reserve + capacity. Returns `409 Conflict` if starting the batch migration would exceed this limit. + To request a higher limit for your organization, contact + [Datadog support](https://docs.datadoghq.com/help/). + operationId: StartSecurityMonitoringBatchMigration + parameters: + - $ref: "#/components/parameters/SecurityMonitoringBatchMigrationID" + responses: + "202": + description: Accepted + "400": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationBadRequestResponse" + "401": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationUnauthorizedResponse" + "403": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationForbiddenResponse" + "404": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationNotFoundResponse" + "409": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + $ref: "#/components/responses/SecurityMonitoringBatchMigrationInternalServerErrorResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_write + summary: Start a batch migration + tags: + - Security Monitoring + "x-permission": + operator: OR + permissions: + - security_monitoring_rules_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + To request access, contact [Datadog support](https://docs.datadoghq.com/help/) or your Customer Success Manager. /api/v2/security_monitoring/cloud_workload_security/agent_rules: get: description: |- diff --git a/examples/v2/security-monitoring/CancelSecurityMonitoringBatchMigration.java b/examples/v2/security-monitoring/CancelSecurityMonitoringBatchMigration.java new file mode 100644 index 00000000000..554f20d5507 --- /dev/null +++ b/examples/v2/security-monitoring/CancelSecurityMonitoringBatchMigration.java @@ -0,0 +1,27 @@ +// Cancel a batch migration returns "Accepted" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.cancelSecurityMonitoringBatchMigration", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + try { + apiInstance.cancelSecurityMonitoringBatchMigration( + UUID.fromString("7cdb3a75-64fb-46ce-9445-41969e78fe8e")); + } catch (ApiException e) { + System.err.println( + "Exception when calling SecurityMonitoringApi#cancelSecurityMonitoringBatchMigration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringBatchMigration.java b/examples/v2/security-monitoring/CreateSecurityMonitoringBatchMigration.java new file mode 100644 index 00000000000..8664d66b7d2 --- /dev/null +++ b/examples/v2/security-monitoring/CreateSecurityMonitoringBatchMigration.java @@ -0,0 +1,56 @@ +// Create a batch migration returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationCreateAttributes; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationCreateData; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationCreateRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourceCreateItem; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourceInputType; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResponse; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationType; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.createSecurityMonitoringBatchMigration", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + SecurityMonitoringBatchMigrationCreateRequest body = + new SecurityMonitoringBatchMigrationCreateRequest() + .data( + new SecurityMonitoringBatchMigrationCreateData() + .type(SecurityMonitoringBatchMigrationType.BATCH_MIGRATION) + .attributes( + new SecurityMonitoringBatchMigrationCreateAttributes() + .name("Example-Security-Monitoring") + .description("Rules imported from Splunk") + .tags(Collections.singletonList("source:splunk")) + .resources( + Collections.singletonList( + new SecurityMonitoringBatchMigrationResourceCreateItem() + .name("Repeated Windows login failures") + .description( + "Detects repeated failed Windows authentication" + + " attempts.") + .inputType( + SecurityMonitoringBatchMigrationResourceInputType.SPL) + .input("index=wineventlog EventCode=4625"))))); + + try { + SecurityMonitoringBatchMigrationResponse result = + apiInstance.createSecurityMonitoringBatchMigration(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling SecurityMonitoringApi#createSecurityMonitoringBatchMigration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringBatchMigrationResources.java b/examples/v2/security-monitoring/CreateSecurityMonitoringBatchMigrationResources.java new file mode 100644 index 00000000000..a7bfba37cc2 --- /dev/null +++ b/examples/v2/security-monitoring/CreateSecurityMonitoringBatchMigrationResources.java @@ -0,0 +1,65 @@ +// Add resources to a batch migration returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourceCreateItem; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourceInputType; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourcesCreateAttributes; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourcesCreateData; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourcesCreateRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourcesCreateResponse; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourcesType; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled( + "v2.createSecurityMonitoringBatchMigrationResources", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + // there is a valid "batch_migration" in the system + UUID BATCH_MIGRATION_DATA_ID = null; + try { + BATCH_MIGRATION_DATA_ID = UUID.fromString(System.getenv("BATCH_MIGRATION_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + SecurityMonitoringBatchMigrationResourcesCreateRequest body = + new SecurityMonitoringBatchMigrationResourcesCreateRequest() + .data( + new SecurityMonitoringBatchMigrationResourcesCreateData() + .type(SecurityMonitoringBatchMigrationResourcesType.BATCH_MIGRATION_RESOURCES) + .attributes( + new SecurityMonitoringBatchMigrationResourcesCreateAttributes() + .resources( + Collections.singletonList( + new SecurityMonitoringBatchMigrationResourceCreateItem() + .name("Linux sudo abuse") + .inputType( + SecurityMonitoringBatchMigrationResourceInputType.SPL) + .input( + """ +index=linux process=sudo "authentication failure" | stats count by user, host +"""))))); + + try { + SecurityMonitoringBatchMigrationResourcesCreateResponse result = + apiInstance.createSecurityMonitoringBatchMigrationResources( + BATCH_MIGRATION_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " SecurityMonitoringApi#createSecurityMonitoringBatchMigrationResources"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/DeleteSecurityMonitoringBatchMigration.java b/examples/v2/security-monitoring/DeleteSecurityMonitoringBatchMigration.java new file mode 100644 index 00000000000..14e1eb80678 --- /dev/null +++ b/examples/v2/security-monitoring/DeleteSecurityMonitoringBatchMigration.java @@ -0,0 +1,34 @@ +// Delete a batch migration returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.deleteSecurityMonitoringBatchMigration", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + // there is a valid "batch_migration" in the system + UUID BATCH_MIGRATION_DATA_ID = null; + try { + BATCH_MIGRATION_DATA_ID = UUID.fromString(System.getenv("BATCH_MIGRATION_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + try { + apiInstance.deleteSecurityMonitoringBatchMigration(BATCH_MIGRATION_DATA_ID); + } catch (ApiException e) { + System.err.println( + "Exception when calling SecurityMonitoringApi#deleteSecurityMonitoringBatchMigration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/DeleteSecurityMonitoringBatchMigrationResources.java b/examples/v2/security-monitoring/DeleteSecurityMonitoringBatchMigrationResources.java new file mode 100644 index 00000000000..e27d1dc0293 --- /dev/null +++ b/examples/v2/security-monitoring/DeleteSecurityMonitoringBatchMigrationResources.java @@ -0,0 +1,58 @@ +// Delete resources from a batch migration returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourcesDeleteAttributes; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourcesDeleteData; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourcesDeleteRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourcesType; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled( + "v2.deleteSecurityMonitoringBatchMigrationResources", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + // there is a valid "batch_migration" in the system + UUID BATCH_MIGRATION_DATA_ID = null; + try { + BATCH_MIGRATION_DATA_ID = UUID.fromString(System.getenv("BATCH_MIGRATION_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + // there is a valid "batch_migration_resource" in the system + UUID BATCH_MIGRATION_RESOURCE_ID = null; + try { + BATCH_MIGRATION_RESOURCE_ID = UUID.fromString(System.getenv("BATCH_MIGRATION_RESOURCE_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + SecurityMonitoringBatchMigrationResourcesDeleteRequest body = + new SecurityMonitoringBatchMigrationResourcesDeleteRequest() + .data( + new SecurityMonitoringBatchMigrationResourcesDeleteData() + .type(SecurityMonitoringBatchMigrationResourcesType.BATCH_MIGRATION_RESOURCES) + .attributes( + new SecurityMonitoringBatchMigrationResourcesDeleteAttributes() + .resourceIds(Collections.singletonList(BATCH_MIGRATION_RESOURCE_ID)))); + + try { + apiInstance.deleteSecurityMonitoringBatchMigrationResources(BATCH_MIGRATION_DATA_ID, body); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " SecurityMonitoringApi#deleteSecurityMonitoringBatchMigrationResources"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringBatchMigrationResources.java b/examples/v2/security-monitoring/ListSecurityMonitoringBatchMigrationResources.java new file mode 100644 index 00000000000..d71ba73049e --- /dev/null +++ b/examples/v2/security-monitoring/ListSecurityMonitoringBatchMigrationResources.java @@ -0,0 +1,39 @@ +// List batch migration resources returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourcesListResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled( + "v2.listSecurityMonitoringBatchMigrationResources", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + // there is a valid "batch_migration" in the system + UUID BATCH_MIGRATION_DATA_ID = null; + try { + BATCH_MIGRATION_DATA_ID = UUID.fromString(System.getenv("BATCH_MIGRATION_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + try { + SecurityMonitoringBatchMigrationResourcesListResponse result = + apiInstance.listSecurityMonitoringBatchMigrationResources(BATCH_MIGRATION_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " SecurityMonitoringApi#listSecurityMonitoringBatchMigrationResources"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringBatchMigrations.java b/examples/v2/security-monitoring/ListSecurityMonitoringBatchMigrations.java new file mode 100644 index 00000000000..f929c14b6b9 --- /dev/null +++ b/examples/v2/security-monitoring/ListSecurityMonitoringBatchMigrations.java @@ -0,0 +1,40 @@ +// List batch migrations returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.api.SecurityMonitoringApi.ListSecurityMonitoringBatchMigrationsOptionalParameters; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationsListResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listSecurityMonitoringBatchMigrations", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + // there is a valid "batch_migration" in the system + UUID BATCH_MIGRATION_DATA_ID = null; + try { + BATCH_MIGRATION_DATA_ID = UUID.fromString(System.getenv("BATCH_MIGRATION_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + try { + SecurityMonitoringBatchMigrationsListResponse result = + apiInstance.listSecurityMonitoringBatchMigrations( + new ListSecurityMonitoringBatchMigrationsOptionalParameters() + .filterQuery("id:7cdb3a75-64fb-46ce-9445-41969e78fe8e")); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling SecurityMonitoringApi#listSecurityMonitoringBatchMigrations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/PublishSecurityMonitoringBatchMigration.java b/examples/v2/security-monitoring/PublishSecurityMonitoringBatchMigration.java new file mode 100644 index 00000000000..9d70fc29a08 --- /dev/null +++ b/examples/v2/security-monitoring/PublishSecurityMonitoringBatchMigration.java @@ -0,0 +1,46 @@ +// Publish a batch migration returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationPublishAttributes; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationPublishData; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationPublishRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationPublishResponse; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationPublishType; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.publishSecurityMonitoringBatchMigration", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + SecurityMonitoringBatchMigrationPublishRequest body = + new SecurityMonitoringBatchMigrationPublishRequest() + .data( + new SecurityMonitoringBatchMigrationPublishData() + .attributes( + new SecurityMonitoringBatchMigrationPublishAttributes() + .resourceIds( + Collections.singletonList( + UUID.fromString("c968cf83-56c2-4d54-a993-6c86dfb83527")))) + .type(SecurityMonitoringBatchMigrationPublishType.BATCH_MIGRATION_PUBLISH)); + + try { + SecurityMonitoringBatchMigrationPublishResponse result = + apiInstance.publishSecurityMonitoringBatchMigration( + UUID.fromString("7cdb3a75-64fb-46ce-9445-41969e78fe8e"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling SecurityMonitoringApi#publishSecurityMonitoringBatchMigration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/StartSecurityMonitoringBatchMigration.java b/examples/v2/security-monitoring/StartSecurityMonitoringBatchMigration.java new file mode 100644 index 00000000000..04f7cf120fc --- /dev/null +++ b/examples/v2/security-monitoring/StartSecurityMonitoringBatchMigration.java @@ -0,0 +1,27 @@ +// Start a batch migration returns "Accepted" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.startSecurityMonitoringBatchMigration", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + try { + apiInstance.startSecurityMonitoringBatchMigration( + UUID.fromString("7cdb3a75-64fb-46ce-9445-41969e78fe8e")); + } catch (ApiException e) { + System.err.println( + "Exception when calling SecurityMonitoringApi#startSecurityMonitoringBatchMigration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/UpdateSecurityMonitoringBatchMigration.java b/examples/v2/security-monitoring/UpdateSecurityMonitoringBatchMigration.java new file mode 100644 index 00000000000..be138572405 --- /dev/null +++ b/examples/v2/security-monitoring/UpdateSecurityMonitoringBatchMigration.java @@ -0,0 +1,52 @@ +// Update a batch migration returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResponse; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationType; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationUpdateAttributes; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationUpdateData; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationUpdateRequest; +import java.util.Arrays; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.updateSecurityMonitoringBatchMigration", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + // there is a valid "batch_migration" in the system + UUID BATCH_MIGRATION_DATA_ID = null; + try { + BATCH_MIGRATION_DATA_ID = UUID.fromString(System.getenv("BATCH_MIGRATION_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + SecurityMonitoringBatchMigrationUpdateRequest body = + new SecurityMonitoringBatchMigrationUpdateRequest() + .data( + new SecurityMonitoringBatchMigrationUpdateData() + .type(SecurityMonitoringBatchMigrationType.BATCH_MIGRATION) + .attributes( + new SecurityMonitoringBatchMigrationUpdateAttributes() + .name("Example-Security-Monitoring-updated") + .tags(Arrays.asList("source:splunk", "team:secops")))); + + try { + SecurityMonitoringBatchMigrationResponse result = + apiInstance.updateSecurityMonitoringBatchMigration(BATCH_MIGRATION_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling SecurityMonitoringApi#updateSecurityMonitoringBatchMigration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/UpdateSecurityMonitoringBatchMigrationResource.java b/examples/v2/security-monitoring/UpdateSecurityMonitoringBatchMigrationResource.java new file mode 100644 index 00000000000..0ab365cf6fd --- /dev/null +++ b/examples/v2/security-monitoring/UpdateSecurityMonitoringBatchMigrationResource.java @@ -0,0 +1,61 @@ +// Update a batch migration resource returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourceResponse; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourceType; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourceUpdateAttributes; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourceUpdateData; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourceUpdateRequest; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled( + "v2.updateSecurityMonitoringBatchMigrationResource", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + // there is a valid "batch_migration" in the system + UUID BATCH_MIGRATION_DATA_ID = null; + try { + BATCH_MIGRATION_DATA_ID = UUID.fromString(System.getenv("BATCH_MIGRATION_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + // there is a valid "batch_migration_resource" in the system + UUID BATCH_MIGRATION_RESOURCE_ID = null; + try { + BATCH_MIGRATION_RESOURCE_ID = UUID.fromString(System.getenv("BATCH_MIGRATION_RESOURCE_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + SecurityMonitoringBatchMigrationResourceUpdateRequest body = + new SecurityMonitoringBatchMigrationResourceUpdateRequest() + .data( + new SecurityMonitoringBatchMigrationResourceUpdateData() + .type(SecurityMonitoringBatchMigrationResourceType.BATCH_MIGRATION_RESOURCE) + .attributes( + new SecurityMonitoringBatchMigrationResourceUpdateAttributes() + .input("index=wineventlog EventCode=4625 | stats count by user"))); + + try { + SecurityMonitoringBatchMigrationResourceResponse result = + apiInstance.updateSecurityMonitoringBatchMigrationResource( + BATCH_MIGRATION_DATA_ID, BATCH_MIGRATION_RESOURCE_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " SecurityMonitoringApi#updateSecurityMonitoringBatchMigrationResource"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index cb71e0f70ef..949bb8d71bb 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1100,6 +1100,7 @@ public class ApiClient { put("v2.bulkCreateSampleLogGenerationSubscriptions", false); put("v2.bulkExportSecurityMonitoringTerraformResources", false); put("v2.cancelHistoricalJob", false); + put("v2.cancelSecurityMonitoringBatchMigration", false); put("v2.convertJobResultToSignal", false); put("v2.convertSecurityMonitoringTerraformResource", false); put("v2.createIoCTriageState", false); @@ -1109,6 +1110,8 @@ public class ApiClient { put("v2.createSecurityFindingsAutomationMuteRule", false); put("v2.createSecurityFindingsAutomationSeverityModifierRule", false); put("v2.createSecurityFindingsAutomationTicketCreationRule", false); + put("v2.createSecurityMonitoringBatchMigration", false); + put("v2.createSecurityMonitoringBatchMigrationResources", false); put("v2.createSecurityMonitoringDataset", false); put("v2.createSecurityMonitoringIntegrationConfig", false); put("v2.createStaticAnalysisAst", false); @@ -1122,6 +1125,8 @@ public class ApiClient { put("v2.deleteSecurityFindingsAutomationMuteRule", false); put("v2.deleteSecurityFindingsAutomationSeverityModifierRule", false); put("v2.deleteSecurityFindingsAutomationTicketCreationRule", false); + put("v2.deleteSecurityMonitoringBatchMigration", false); + put("v2.deleteSecurityMonitoringBatchMigrationResources", false); put("v2.deleteSecurityMonitoringDataset", false); put("v2.deleteSecurityMonitoringIntegrationConfig", false); put("v2.disableSecurityFindingsAutomationDefaultInboxRule", false); @@ -1168,12 +1173,15 @@ public class ApiClient { put("v2.listSecurityFindingsAutomationMuteRules", false); put("v2.listSecurityFindingsAutomationSeverityModifierRules", false); put("v2.listSecurityFindingsAutomationTicketCreationRules", false); + put("v2.listSecurityMonitoringBatchMigrationResources", false); + put("v2.listSecurityMonitoringBatchMigrations", false); put("v2.listSecurityMonitoringDatasets", false); put("v2.listSecurityMonitoringHistsignals", false); put("v2.listSecurityMonitoringIntegrationConfigs", false); put("v2.listStaticAnalysisCodegenRulesets", false); put("v2.listVulnerabilities", false); put("v2.listVulnerableAssets", false); + put("v2.publishSecurityMonitoringBatchMigration", false); put("v2.reorderSecurityFindingsAutomationDueDateRules", false); put("v2.reorderSecurityFindingsAutomationInboxRules", false); put("v2.reorderSecurityFindingsAutomationMuteRules", false); @@ -1182,6 +1190,7 @@ public class ApiClient { put("v2.restoreSecurityMonitoringRule", false); put("v2.runHistoricalJob", false); put("v2.searchSecurityMonitoringHistsignals", false); + put("v2.startSecurityMonitoringBatchMigration", false); put("v2.updateFindingsAssignee", false); put("v2.updateFindingsSeverity", false); put("v2.updateSecurityFindingsAutomationDueDateRule", false); @@ -1189,6 +1198,8 @@ public class ApiClient { put("v2.updateSecurityFindingsAutomationMuteRule", false); put("v2.updateSecurityFindingsAutomationSeverityModifierRule", false); put("v2.updateSecurityFindingsAutomationTicketCreationRule", false); + put("v2.updateSecurityMonitoringBatchMigration", false); + put("v2.updateSecurityMonitoringBatchMigrationResource", false); put("v2.updateSecurityMonitoringDataset", false); put("v2.updateSecurityMonitoringIntegrationConfig", false); put("v2.validateSecurityMonitoringIntegrationConfig", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java index 630f740cd64..b5c88bf4681 100644 --- a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java @@ -112,6 +112,18 @@ import com.datadog.api.client.v2.model.SecurityFindingsSearchRequestDataAttributes; import com.datadog.api.client.v2.model.SecurityFindingsSearchRequestPage; import com.datadog.api.client.v2.model.SecurityFindingsSort; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationCreateRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationPublishRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationPublishResponse; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourceResponse; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourceUpdateRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourcesCreateRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourcesCreateResponse; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourcesDeleteRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResourcesListResponse; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationResponse; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationUpdateRequest; +import com.datadog.api.client.v2.model.SecurityMonitoringBatchMigrationsListResponse; import com.datadog.api.client.v2.model.SecurityMonitoringContentPackStatesResponse; import com.datadog.api.client.v2.model.SecurityMonitoringCriticalAssetCreateRequest; import com.datadog.api.client.v2.model.SecurityMonitoringCriticalAssetResponse; @@ -2730,6 +2742,169 @@ public CompletableFuture> cancelHistoricalJobWithHttpInfoAsync null); } + /** + * Cancel a batch migration. + * + *

See {@link #cancelSecurityMonitoringBatchMigrationWithHttpInfo}. + * + * @param batchId The UUID of the batch migration. (required) + * @throws ApiException if fails to make API call + */ + public void cancelSecurityMonitoringBatchMigration(UUID batchId) throws ApiException { + cancelSecurityMonitoringBatchMigrationWithHttpInfo(batchId); + } + + /** + * Cancel a batch migration. + * + *

See {@link #cancelSecurityMonitoringBatchMigrationWithHttpInfoAsync}. + * + * @param batchId The UUID of the batch migration. (required) + * @return CompletableFuture + */ + public CompletableFuture cancelSecurityMonitoringBatchMigrationAsync(UUID batchId) { + return cancelSecurityMonitoringBatchMigrationWithHttpInfoAsync(batchId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Cancel an in_progress batch migration. Resources that are pending or + * in_progress become canceled. Resources that are already + * completed or failed keep their status and output, so completed resources + * can still be published. Canceling a canceled batch migration succeeds, so the + * request can be safely retried. Returns 409 Conflict if the batch migration is + * draft or completed. + * + * @param batchId The UUID of the batch migration. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
202 Accepted -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse cancelSecurityMonitoringBatchMigrationWithHttpInfo(UUID batchId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "cancelSecurityMonitoringBatchMigration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'batchId' is set + if (batchId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'batchId' when calling" + + " cancelSecurityMonitoringBatchMigration"); + } + // create path and map variables + String localVarPath = + "/api/v2/security_monitoring/batch-migrations/{batch_id}/cancel" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.cancelSecurityMonitoringBatchMigration", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Cancel a batch migration. + * + *

See {@link #cancelSecurityMonitoringBatchMigrationWithHttpInfo}. + * + * @param batchId The UUID of the batch migration. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> + cancelSecurityMonitoringBatchMigrationWithHttpInfoAsync(UUID batchId) { + // Check if unstable operation is enabled + String operationId = "cancelSecurityMonitoringBatchMigration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'batchId' is set + if (batchId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'batchId' when calling" + + " cancelSecurityMonitoringBatchMigration")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/security_monitoring/batch-migrations/{batch_id}/cancel" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.cancelSecurityMonitoringBatchMigration", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + /** * Convert an existing rule from JSON to Terraform. * @@ -5169,31 +5344,31 @@ public TicketCreationRuleResponse createSecurityFindingsAutomationTicketCreation } /** - * Create a critical asset. + * Create a batch migration. * - *

See {@link #createSecurityMonitoringCriticalAssetWithHttpInfo}. + *

See {@link #createSecurityMonitoringBatchMigrationWithHttpInfo}. * - * @param body The definition of the new critical asset. (required) - * @return SecurityMonitoringCriticalAssetResponse + * @param body (required) + * @return SecurityMonitoringBatchMigrationResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringCriticalAssetResponse createSecurityMonitoringCriticalAsset( - SecurityMonitoringCriticalAssetCreateRequest body) throws ApiException { - return createSecurityMonitoringCriticalAssetWithHttpInfo(body).getData(); + public SecurityMonitoringBatchMigrationResponse createSecurityMonitoringBatchMigration( + SecurityMonitoringBatchMigrationCreateRequest body) throws ApiException { + return createSecurityMonitoringBatchMigrationWithHttpInfo(body).getData(); } /** - * Create a critical asset. + * Create a batch migration. * - *

See {@link #createSecurityMonitoringCriticalAssetWithHttpInfoAsync}. + *

See {@link #createSecurityMonitoringBatchMigrationWithHttpInfoAsync}. * - * @param body The definition of the new critical asset. (required) - * @return CompletableFuture<SecurityMonitoringCriticalAssetResponse> + * @param body (required) + * @return CompletableFuture<SecurityMonitoringBatchMigrationResponse> */ - public CompletableFuture - createSecurityMonitoringCriticalAssetAsync( - SecurityMonitoringCriticalAssetCreateRequest body) { - return createSecurityMonitoringCriticalAssetWithHttpInfoAsync(body) + public CompletableFuture + createSecurityMonitoringBatchMigrationAsync( + SecurityMonitoringBatchMigrationCreateRequest body) { + return createSecurityMonitoringBatchMigrationWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -5201,25 +5376,36 @@ public SecurityMonitoringCriticalAssetResponse createSecurityMonitoringCriticalA } /** - * Create a new critical asset. + * Create a batch migration in the draft status, together with 1 to 100 initial + * resources. Each resource holds one source rule to translate into a Cloud SIEM detection rule. + * To load more rules, add them with the add resources endpoint before starting the batch + * migration. A batch migration can hold up to 1000 resources. The response does not include the + * created resources: list the resources of the batch migration to retrieve them. * - * @param body The definition of the new critical asset. (required) - * @return ApiResponse<SecurityMonitoringCriticalAssetResponse> + * @param body (required) + * @return ApiResponse<SecurityMonitoringBatchMigrationResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * - * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
201 Created -
400 Bad Request -
403 Not Authorized -
409 Conflict -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse - createSecurityMonitoringCriticalAssetWithHttpInfo( - SecurityMonitoringCriticalAssetCreateRequest body) throws ApiException { + public ApiResponse + createSecurityMonitoringBatchMigrationWithHttpInfo( + SecurityMonitoringBatchMigrationCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createSecurityMonitoringBatchMigration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -5227,16 +5413,16 @@ public SecurityMonitoringCriticalAssetResponse createSecurityMonitoringCriticalA throw new ApiException( 400, "Missing the required parameter 'body' when calling" - + " createSecurityMonitoringCriticalAsset"); + + " createSecurityMonitoringBatchMigration"); } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/critical_assets"; + String localVarPath = "/api/v2/security_monitoring/batch-migrations"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSecurityMonitoringCriticalAsset", + "v2.SecurityMonitoringApi.createSecurityMonitoringBatchMigration", localVarPath, new ArrayList(), localVarHeaderParams, @@ -5251,35 +5437,46 @@ public SecurityMonitoringCriticalAssetResponse createSecurityMonitoringCriticalA localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create a critical asset. + * Create a batch migration. * - *

See {@link #createSecurityMonitoringCriticalAssetWithHttpInfo}. + *

See {@link #createSecurityMonitoringBatchMigrationWithHttpInfo}. * - * @param body The definition of the new critical asset. (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringCriticalAssetResponse>> + * @param body (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringBatchMigrationResponse>> */ - public CompletableFuture> - createSecurityMonitoringCriticalAssetWithHttpInfoAsync( - SecurityMonitoringCriticalAssetCreateRequest body) { + public CompletableFuture> + createSecurityMonitoringBatchMigrationWithHttpInfoAsync( + SecurityMonitoringBatchMigrationCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createSecurityMonitoringBatchMigration"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling" - + " createSecurityMonitoringCriticalAsset")); + + " createSecurityMonitoringBatchMigration")); return result; } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/critical_assets"; + String localVarPath = "/api/v2/security_monitoring/batch-migrations"; Map localVarHeaderParams = new HashMap(); @@ -5287,7 +5484,7 @@ public SecurityMonitoringCriticalAssetResponse createSecurityMonitoringCriticalA try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSecurityMonitoringCriticalAsset", + "v2.SecurityMonitoringApi.createSecurityMonitoringBatchMigration", localVarPath, new ArrayList(), localVarHeaderParams, @@ -5295,7 +5492,7 @@ public SecurityMonitoringCriticalAssetResponse createSecurityMonitoringCriticalA new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -5308,34 +5505,39 @@ public SecurityMonitoringCriticalAssetResponse createSecurityMonitoringCriticalA localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create a dataset. + * Add resources to a batch migration. * - *

See {@link #createSecurityMonitoringDatasetWithHttpInfo}. + *

See {@link #createSecurityMonitoringBatchMigrationResourcesWithHttpInfo}. * + * @param batchId The UUID of the batch migration. (required) * @param body (required) - * @return SecurityMonitoringDatasetCreateResponse + * @return SecurityMonitoringBatchMigrationResourcesCreateResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringDatasetCreateResponse createSecurityMonitoringDataset( - SecurityMonitoringDatasetCreateRequest body) throws ApiException { - return createSecurityMonitoringDatasetWithHttpInfo(body).getData(); + public SecurityMonitoringBatchMigrationResourcesCreateResponse + createSecurityMonitoringBatchMigrationResources( + UUID batchId, SecurityMonitoringBatchMigrationResourcesCreateRequest body) + throws ApiException { + return createSecurityMonitoringBatchMigrationResourcesWithHttpInfo(batchId, body).getData(); } /** - * Create a dataset. + * Add resources to a batch migration. * - *

See {@link #createSecurityMonitoringDatasetWithHttpInfoAsync}. + *

See {@link #createSecurityMonitoringBatchMigrationResourcesWithHttpInfoAsync}. * + * @param batchId The UUID of the batch migration. (required) * @param body (required) - * @return CompletableFuture<SecurityMonitoringDatasetCreateResponse> + * @return CompletableFuture<SecurityMonitoringBatchMigrationResourcesCreateResponse> */ - public CompletableFuture - createSecurityMonitoringDatasetAsync(SecurityMonitoringDatasetCreateRequest body) { - return createSecurityMonitoringDatasetWithHttpInfoAsync(body) + public CompletableFuture + createSecurityMonitoringBatchMigrationResourcesAsync( + UUID batchId, SecurityMonitoringBatchMigrationResourcesCreateRequest body) { + return createSecurityMonitoringBatchMigrationResourcesWithHttpInfoAsync(batchId, body) .thenApply( response -> { return response.getData(); @@ -5343,11 +5545,13 @@ public SecurityMonitoringDatasetCreateResponse createSecurityMonitoringDataset( } /** - * Create a new Cloud SIEM dataset. A dataset bundles a data source, a set of indexes, and a - * search query that can be referenced from detection rules. + * Add 1 to 1000 resources to a draft batch migration. Returns 409 Conflict + * if the batch migration is not draft, and 400 Bad Request if + * the batch migration would contain more than 1000 resources. * + * @param batchId The UUID of the batch migration. (required) * @param body (required) - * @return ApiResponse<SecurityMonitoringDatasetCreateResponse> + * @return ApiResponse<SecurityMonitoringBatchMigrationResourcesCreateResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -5355,16 +5559,19 @@ public SecurityMonitoringDatasetCreateResponse createSecurityMonitoringDataset( * * * + * * + * * * *
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too many requests -
*/ - public ApiResponse - createSecurityMonitoringDatasetWithHttpInfo(SecurityMonitoringDatasetCreateRequest body) + public ApiResponse + createSecurityMonitoringBatchMigrationResourcesWithHttpInfo( + UUID batchId, SecurityMonitoringBatchMigrationResourcesCreateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "createSecurityMonitoringDataset"; + String operationId = "createSecurityMonitoringBatchMigrationResources"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -5372,20 +5579,31 @@ public SecurityMonitoringDatasetCreateResponse createSecurityMonitoringDataset( } Object localVarPostBody = body; + // verify the required parameter 'batchId' is set + if (batchId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'batchId' when calling" + + " createSecurityMonitoringBatchMigrationResources"); + } + // verify the required parameter 'body' is set if (body == null) { throw new ApiException( 400, - "Missing the required parameter 'body' when calling createSecurityMonitoringDataset"); + "Missing the required parameter 'body' when calling" + + " createSecurityMonitoringBatchMigrationResources"); } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/datasets"; + String localVarPath = + "/api/v2/security_monitoring/batch-migrations/{batch_id}/resources" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSecurityMonitoringDataset", + "v2.SecurityMonitoringApi.createSecurityMonitoringBatchMigrationResources", localVarPath, new ArrayList(), localVarHeaderParams, @@ -5400,46 +5618,62 @@ public SecurityMonitoringDatasetCreateResponse createSecurityMonitoringDataset( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create a dataset. + * Add resources to a batch migration. * - *

See {@link #createSecurityMonitoringDatasetWithHttpInfo}. + *

See {@link #createSecurityMonitoringBatchMigrationResourcesWithHttpInfo}. * + * @param batchId The UUID of the batch migration. (required) * @param body (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringDatasetCreateResponse>> + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringBatchMigrationResourcesCreateResponse>> */ - public CompletableFuture> - createSecurityMonitoringDatasetWithHttpInfoAsync( - SecurityMonitoringDatasetCreateRequest body) { + public CompletableFuture> + createSecurityMonitoringBatchMigrationResourcesWithHttpInfoAsync( + UUID batchId, SecurityMonitoringBatchMigrationResourcesCreateRequest body) { // Check if unstable operation is enabled - String operationId = "createSecurityMonitoringDataset"; + String operationId = "createSecurityMonitoringBatchMigrationResources"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> + result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; + // verify the required parameter 'batchId' is set + if (batchId == null) { + CompletableFuture> + result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'batchId' when calling" + + " createSecurityMonitoringBatchMigrationResources")); + return result; + } + // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> + result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling" - + " createSecurityMonitoringDataset")); + + " createSecurityMonitoringBatchMigrationResources")); return result; } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/datasets"; + String localVarPath = + "/api/v2/security_monitoring/batch-migrations/{batch_id}/resources" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); Map localVarHeaderParams = new HashMap(); @@ -5447,7 +5681,7 @@ public SecurityMonitoringDatasetCreateResponse createSecurityMonitoringDataset( try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSecurityMonitoringDataset", + "v2.SecurityMonitoringApi.createSecurityMonitoringBatchMigrationResources", localVarPath, new ArrayList(), localVarHeaderParams, @@ -5455,8 +5689,8 @@ public SecurityMonitoringDatasetCreateResponse createSecurityMonitoringDataset( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> + result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -5468,35 +5702,35 @@ public SecurityMonitoringDatasetCreateResponse createSecurityMonitoringDataset( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an entity context sync configuration. + * Create a critical asset. * - *

See {@link #createSecurityMonitoringIntegrationConfigWithHttpInfo}. + *

See {@link #createSecurityMonitoringCriticalAssetWithHttpInfo}. * - * @param body The definition of the new integration configuration. (required) - * @return SecurityMonitoringIntegrationConfigResponse + * @param body The definition of the new critical asset. (required) + * @return SecurityMonitoringCriticalAssetResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringIntegrationConfigResponse createSecurityMonitoringIntegrationConfig( - SecurityMonitoringIntegrationConfigCreateRequest body) throws ApiException { - return createSecurityMonitoringIntegrationConfigWithHttpInfo(body).getData(); + public SecurityMonitoringCriticalAssetResponse createSecurityMonitoringCriticalAsset( + SecurityMonitoringCriticalAssetCreateRequest body) throws ApiException { + return createSecurityMonitoringCriticalAssetWithHttpInfo(body).getData(); } /** - * Create an entity context sync configuration. + * Create a critical asset. * - *

See {@link #createSecurityMonitoringIntegrationConfigWithHttpInfoAsync}. + *

See {@link #createSecurityMonitoringCriticalAssetWithHttpInfoAsync}. * - * @param body The definition of the new integration configuration. (required) - * @return CompletableFuture<SecurityMonitoringIntegrationConfigResponse> + * @param body The definition of the new critical asset. (required) + * @return CompletableFuture<SecurityMonitoringCriticalAssetResponse> */ - public CompletableFuture - createSecurityMonitoringIntegrationConfigAsync( - SecurityMonitoringIntegrationConfigCreateRequest body) { - return createSecurityMonitoringIntegrationConfigWithHttpInfoAsync(body) + public CompletableFuture + createSecurityMonitoringCriticalAssetAsync( + SecurityMonitoringCriticalAssetCreateRequest body) { + return createSecurityMonitoringCriticalAssetWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -5504,12 +5738,10 @@ public SecurityMonitoringIntegrationConfigResponse createSecurityMonitoringInteg } /** - * Create a new entity context sync configuration so Cloud SIEM can ingest entities from an - * external source. The credentials provided in secrets are validated against the - * source before the configuration is stored and never returned in subsequent responses. + * Create a new critical asset. * - * @param body The definition of the new integration configuration. (required) - * @return ApiResponse<SecurityMonitoringIntegrationConfigResponse> + * @param body The definition of the new critical asset. (required) + * @return ApiResponse<SecurityMonitoringCriticalAssetResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -5518,19 +5750,13 @@ public SecurityMonitoringIntegrationConfigResponse createSecurityMonitoringInteg * * * + * * *
200 OK -
400 Bad Request -
403 Not Authorized -
409 Conflict -
429 Too many requests -
*/ - public ApiResponse - createSecurityMonitoringIntegrationConfigWithHttpInfo( - SecurityMonitoringIntegrationConfigCreateRequest body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "createSecurityMonitoringIntegrationConfig"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse + createSecurityMonitoringCriticalAssetWithHttpInfo( + SecurityMonitoringCriticalAssetCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -5538,16 +5764,16 @@ public SecurityMonitoringIntegrationConfigResponse createSecurityMonitoringInteg throw new ApiException( 400, "Missing the required parameter 'body' when calling" - + " createSecurityMonitoringIntegrationConfig"); + + " createSecurityMonitoringCriticalAsset"); } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/integration_config"; + String localVarPath = "/api/v2/security_monitoring/configuration/critical_assets"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSecurityMonitoringIntegrationConfig", + "v2.SecurityMonitoringApi.createSecurityMonitoringCriticalAsset", localVarPath, new ArrayList(), localVarHeaderParams, @@ -5562,46 +5788,35 @@ public SecurityMonitoringIntegrationConfigResponse createSecurityMonitoringInteg localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create an entity context sync configuration. + * Create a critical asset. * - *

See {@link #createSecurityMonitoringIntegrationConfigWithHttpInfo}. + *

See {@link #createSecurityMonitoringCriticalAssetWithHttpInfo}. * - * @param body The definition of the new integration configuration. (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringIntegrationConfigResponse>> + * @param body The definition of the new critical asset. (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringCriticalAssetResponse>> */ - public CompletableFuture> - createSecurityMonitoringIntegrationConfigWithHttpInfoAsync( - SecurityMonitoringIntegrationConfigCreateRequest body) { - // Check if unstable operation is enabled - String operationId = "createSecurityMonitoringIntegrationConfig"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> + createSecurityMonitoringCriticalAssetWithHttpInfoAsync( + SecurityMonitoringCriticalAssetCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling" - + " createSecurityMonitoringIntegrationConfig")); + + " createSecurityMonitoringCriticalAsset")); return result; } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/integration_config"; + String localVarPath = "/api/v2/security_monitoring/configuration/critical_assets"; Map localVarHeaderParams = new HashMap(); @@ -5609,7 +5824,7 @@ public SecurityMonitoringIntegrationConfigResponse createSecurityMonitoringInteg try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSecurityMonitoringIntegrationConfig", + "v2.SecurityMonitoringApi.createSecurityMonitoringCriticalAsset", localVarPath, new ArrayList(), localVarHeaderParams, @@ -5617,7 +5832,7 @@ public SecurityMonitoringIntegrationConfigResponse createSecurityMonitoringInteg new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -5630,34 +5845,34 @@ public SecurityMonitoringIntegrationConfigResponse createSecurityMonitoringInteg localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create a detection rule. + * Create a dataset. * - *

See {@link #createSecurityMonitoringRuleWithHttpInfo}. + *

See {@link #createSecurityMonitoringDatasetWithHttpInfo}. * * @param body (required) - * @return SecurityMonitoringRuleResponse + * @return SecurityMonitoringDatasetCreateResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringRuleResponse createSecurityMonitoringRule( - SecurityMonitoringRuleCreatePayload body) throws ApiException { - return createSecurityMonitoringRuleWithHttpInfo(body).getData(); + public SecurityMonitoringDatasetCreateResponse createSecurityMonitoringDataset( + SecurityMonitoringDatasetCreateRequest body) throws ApiException { + return createSecurityMonitoringDatasetWithHttpInfo(body).getData(); } /** - * Create a detection rule. + * Create a dataset. * - *

See {@link #createSecurityMonitoringRuleWithHttpInfoAsync}. + *

See {@link #createSecurityMonitoringDatasetWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<SecurityMonitoringRuleResponse> + * @return CompletableFuture<SecurityMonitoringDatasetCreateResponse> */ - public CompletableFuture createSecurityMonitoringRuleAsync( - SecurityMonitoringRuleCreatePayload body) { - return createSecurityMonitoringRuleWithHttpInfoAsync(body) + public CompletableFuture + createSecurityMonitoringDatasetAsync(SecurityMonitoringDatasetCreateRequest body) { + return createSecurityMonitoringDatasetWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -5665,38 +5880,49 @@ public CompletableFuture createSecurityMonitorin } /** - * Create a detection rule. + * Create a new Cloud SIEM dataset. A dataset bundles a data source, a set of indexes, and a + * search query that can be referenced from detection rules. * * @param body (required) - * @return ApiResponse<SecurityMonitoringRuleResponse> + * @return ApiResponse<SecurityMonitoringDatasetCreateResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
201 Created -
400 Bad Request -
403 Not Authorized -
403 Forbidden -
409 Conflict -
429 Too many requests -
*/ - public ApiResponse createSecurityMonitoringRuleWithHttpInfo( - SecurityMonitoringRuleCreatePayload body) throws ApiException { + public ApiResponse + createSecurityMonitoringDatasetWithHttpInfo(SecurityMonitoringDatasetCreateRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "createSecurityMonitoringDataset"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling createSecurityMonitoringRule"); + 400, + "Missing the required parameter 'body' when calling createSecurityMonitoringDataset"); } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/rules"; + String localVarPath = "/api/v2/security_monitoring/datasets"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSecurityMonitoringRule", + "v2.SecurityMonitoringApi.createSecurityMonitoringDataset", localVarPath, new ArrayList(), localVarHeaderParams, @@ -5711,33 +5937,46 @@ public ApiResponse createSecurityMonitoringRuleW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create a detection rule. + * Create a dataset. * - *

See {@link #createSecurityMonitoringRuleWithHttpInfo}. + *

See {@link #createSecurityMonitoringDatasetWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleResponse>> + * @return CompletableFuture<ApiResponse<SecurityMonitoringDatasetCreateResponse>> */ - public CompletableFuture> - createSecurityMonitoringRuleWithHttpInfoAsync(SecurityMonitoringRuleCreatePayload body) { + public CompletableFuture> + createSecurityMonitoringDatasetWithHttpInfoAsync( + SecurityMonitoringDatasetCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createSecurityMonitoringDataset"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling createSecurityMonitoringRule")); + "Missing the required parameter 'body' when calling" + + " createSecurityMonitoringDataset")); return result; } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/rules"; + String localVarPath = "/api/v2/security_monitoring/datasets"; Map localVarHeaderParams = new HashMap(); @@ -5745,7 +5984,7 @@ public ApiResponse createSecurityMonitoringRuleW try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSecurityMonitoringRule", + "v2.SecurityMonitoringApi.createSecurityMonitoringDataset", localVarPath, new ArrayList(), localVarHeaderParams, @@ -5753,7 +5992,7 @@ public ApiResponse createSecurityMonitoringRuleW new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -5766,34 +6005,35 @@ public ApiResponse createSecurityMonitoringRuleW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create a suppression rule. + * Create an entity context sync configuration. * - *

See {@link #createSecurityMonitoringSuppressionWithHttpInfo}. + *

See {@link #createSecurityMonitoringIntegrationConfigWithHttpInfo}. * - * @param body The definition of the new suppression rule. (required) - * @return SecurityMonitoringSuppressionResponse + * @param body The definition of the new integration configuration. (required) + * @return SecurityMonitoringIntegrationConfigResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringSuppressionResponse createSecurityMonitoringSuppression( - SecurityMonitoringSuppressionCreateRequest body) throws ApiException { - return createSecurityMonitoringSuppressionWithHttpInfo(body).getData(); + public SecurityMonitoringIntegrationConfigResponse createSecurityMonitoringIntegrationConfig( + SecurityMonitoringIntegrationConfigCreateRequest body) throws ApiException { + return createSecurityMonitoringIntegrationConfigWithHttpInfo(body).getData(); } /** - * Create a suppression rule. + * Create an entity context sync configuration. * - *

See {@link #createSecurityMonitoringSuppressionWithHttpInfoAsync}. + *

See {@link #createSecurityMonitoringIntegrationConfigWithHttpInfoAsync}. * - * @param body The definition of the new suppression rule. (required) - * @return CompletableFuture<SecurityMonitoringSuppressionResponse> + * @param body The definition of the new integration configuration. (required) + * @return CompletableFuture<SecurityMonitoringIntegrationConfigResponse> */ - public CompletableFuture - createSecurityMonitoringSuppressionAsync(SecurityMonitoringSuppressionCreateRequest body) { - return createSecurityMonitoringSuppressionWithHttpInfoAsync(body) + public CompletableFuture + createSecurityMonitoringIntegrationConfigAsync( + SecurityMonitoringIntegrationConfigCreateRequest body) { + return createSecurityMonitoringIntegrationConfigWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -5801,10 +6041,12 @@ public SecurityMonitoringSuppressionResponse createSecurityMonitoringSuppression } /** - * Create a new suppression rule. + * Create a new entity context sync configuration so Cloud SIEM can ingest entities from an + * external source. The credentials provided in secrets are validated against the + * source before the configuration is stored and never returned in subsequent responses. * - * @param body The definition of the new suppression rule. (required) - * @return ApiResponse<SecurityMonitoringSuppressionResponse> + * @param body The definition of the new integration configuration. (required) + * @return ApiResponse<SecurityMonitoringIntegrationConfigResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -5813,29 +6055,36 @@ public SecurityMonitoringSuppressionResponse createSecurityMonitoringSuppression * * * - * * *
200 OK -
400 Bad Request -
403 Not Authorized -
409 Conflict -
429 Too many requests -
*/ - public ApiResponse - createSecurityMonitoringSuppressionWithHttpInfo( - SecurityMonitoringSuppressionCreateRequest body) throws ApiException { + public ApiResponse + createSecurityMonitoringIntegrationConfigWithHttpInfo( + SecurityMonitoringIntegrationConfigCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createSecurityMonitoringIntegrationConfig"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( 400, - "Missing the required parameter 'body' when calling createSecurityMonitoringSuppression"); + "Missing the required parameter 'body' when calling" + + " createSecurityMonitoringIntegrationConfig"); } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/suppressions"; + String localVarPath = "/api/v2/security_monitoring/configuration/integration_config"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSecurityMonitoringSuppression", + "v2.SecurityMonitoringApi.createSecurityMonitoringIntegrationConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -5850,35 +6099,46 @@ public SecurityMonitoringSuppressionResponse createSecurityMonitoringSuppression localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create a suppression rule. + * Create an entity context sync configuration. * - *

See {@link #createSecurityMonitoringSuppressionWithHttpInfo}. + *

See {@link #createSecurityMonitoringIntegrationConfigWithHttpInfo}. * - * @param body The definition of the new suppression rule. (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringSuppressionResponse>> + * @param body The definition of the new integration configuration. (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringIntegrationConfigResponse>> */ - public CompletableFuture> - createSecurityMonitoringSuppressionWithHttpInfoAsync( - SecurityMonitoringSuppressionCreateRequest body) { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + public CompletableFuture> + createSecurityMonitoringIntegrationConfigWithHttpInfoAsync( + SecurityMonitoringIntegrationConfigCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createSecurityMonitoringIntegrationConfig"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling" - + " createSecurityMonitoringSuppression")); + + " createSecurityMonitoringIntegrationConfig")); return result; } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/suppressions"; + String localVarPath = "/api/v2/security_monitoring/configuration/integration_config"; Map localVarHeaderParams = new HashMap(); @@ -5886,7 +6146,7 @@ public SecurityMonitoringSuppressionResponse createSecurityMonitoringSuppression try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSecurityMonitoringSuppression", + "v2.SecurityMonitoringApi.createSecurityMonitoringIntegrationConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -5894,7 +6154,7 @@ public SecurityMonitoringSuppressionResponse createSecurityMonitoringSuppression new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -5907,34 +6167,34 @@ public SecurityMonitoringSuppressionResponse createSecurityMonitoringSuppression localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create ServiceNow tickets for security findings. + * Create a detection rule. * - *

See {@link #createServiceNowTicketsWithHttpInfo}. + *

See {@link #createSecurityMonitoringRuleWithHttpInfo}. * * @param body (required) - * @return FindingCaseResponseArray + * @return SecurityMonitoringRuleResponse * @throws ApiException if fails to make API call */ - public FindingCaseResponseArray createServiceNowTickets(CreateServiceNowTicketRequestArray body) - throws ApiException { - return createServiceNowTicketsWithHttpInfo(body).getData(); + public SecurityMonitoringRuleResponse createSecurityMonitoringRule( + SecurityMonitoringRuleCreatePayload body) throws ApiException { + return createSecurityMonitoringRuleWithHttpInfo(body).getData(); } /** - * Create ServiceNow tickets for security findings. + * Create a detection rule. * - *

See {@link #createServiceNowTicketsWithHttpInfoAsync}. + *

See {@link #createSecurityMonitoringRuleWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<FindingCaseResponseArray> + * @return CompletableFuture<SecurityMonitoringRuleResponse> */ - public CompletableFuture createServiceNowTicketsAsync( - CreateServiceNowTicketRequestArray body) { - return createServiceNowTicketsWithHttpInfoAsync(body) + public CompletableFuture createSecurityMonitoringRuleAsync( + SecurityMonitoringRuleCreatePayload body) { + return createSecurityMonitoringRuleWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -5942,43 +6202,38 @@ public CompletableFuture createServiceNowTicketsAsync( } /** - * Create ServiceNow tickets for security findings. This operation creates a case in Datadog and a - * ServiceNow ticket linked to that case for bidirectional sync between Datadog and ServiceNow. - * You can create up to 50 ServiceNow tickets per request and associate up to 50 security findings - * per ServiceNow ticket. Security findings that are already attached to another ServiceNow ticket - * will be detached from their previous ServiceNow ticket and attached to the newly created - * ServiceNow ticket. + * Create a detection rule. * * @param body (required) - * @return ApiResponse<FindingCaseResponseArray> + * @return ApiResponse<SecurityMonitoringRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * + * * *
Response details
Status Code Description Response Headers
201 Created -
200 OK -
400 Bad Request -
404 Not Found -
403 Not Authorized -
429 Too many requests -
*/ - public ApiResponse createServiceNowTicketsWithHttpInfo( - CreateServiceNowTicketRequestArray body) throws ApiException { + public ApiResponse createSecurityMonitoringRuleWithHttpInfo( + SecurityMonitoringRuleCreatePayload body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling createServiceNowTickets"); + 400, "Missing the required parameter 'body' when calling createSecurityMonitoringRule"); } // create path and map variables - String localVarPath = "/api/v2/security/findings/servicenow_tickets"; + String localVarPath = "/api/v2/security_monitoring/rules"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createServiceNowTickets", + "v2.SecurityMonitoringApi.createSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -5993,31 +6248,33 @@ public ApiResponse createServiceNowTicketsWithHttpInfo localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create ServiceNow tickets for security findings. + * Create a detection rule. * - *

See {@link #createServiceNowTicketsWithHttpInfo}. + *

See {@link #createSecurityMonitoringRuleWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<FindingCaseResponseArray>> + * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleResponse>> */ - public CompletableFuture> - createServiceNowTicketsWithHttpInfoAsync(CreateServiceNowTicketRequestArray body) { + public CompletableFuture> + createSecurityMonitoringRuleWithHttpInfoAsync(SecurityMonitoringRuleCreatePayload body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling createServiceNowTickets")); + 400, + "Missing the required parameter 'body' when calling createSecurityMonitoringRule")); return result; } // create path and map variables - String localVarPath = "/api/v2/security/findings/servicenow_tickets"; + String localVarPath = "/api/v2/security_monitoring/rules"; Map localVarHeaderParams = new HashMap(); @@ -6025,7 +6282,7 @@ public ApiResponse createServiceNowTicketsWithHttpInfo try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createServiceNowTickets", + "v2.SecurityMonitoringApi.createSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -6033,7 +6290,8 @@ public ApiResponse createServiceNowTicketsWithHttpInfo new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -6045,38 +6303,34 @@ public ApiResponse createServiceNowTicketsWithHttpInfo localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create a new signal-based notification rule. + * Create a suppression rule. * - *

See {@link #createSignalNotificationRuleWithHttpInfo}. + *

See {@link #createSecurityMonitoringSuppressionWithHttpInfo}. * - * @param body The body of the create notification rule request is composed of the rule type and - * the rule attributes: the rule name, the selectors, the notification targets, and the rule - * enabled status. (required) - * @return NotificationRuleResponse + * @param body The definition of the new suppression rule. (required) + * @return SecurityMonitoringSuppressionResponse * @throws ApiException if fails to make API call */ - public NotificationRuleResponse createSignalNotificationRule( - CreateNotificationRuleParameters body) throws ApiException { - return createSignalNotificationRuleWithHttpInfo(body).getData(); + public SecurityMonitoringSuppressionResponse createSecurityMonitoringSuppression( + SecurityMonitoringSuppressionCreateRequest body) throws ApiException { + return createSecurityMonitoringSuppressionWithHttpInfo(body).getData(); } /** - * Create a new signal-based notification rule. + * Create a suppression rule. * - *

See {@link #createSignalNotificationRuleWithHttpInfoAsync}. + *

See {@link #createSecurityMonitoringSuppressionWithHttpInfoAsync}. * - * @param body The body of the create notification rule request is composed of the rule type and - * the rule attributes: the rule name, the selectors, the notification targets, and the rule - * enabled status. (required) - * @return CompletableFuture<NotificationRuleResponse> + * @param body The definition of the new suppression rule. (required) + * @return CompletableFuture<SecurityMonitoringSuppressionResponse> */ - public CompletableFuture createSignalNotificationRuleAsync( - CreateNotificationRuleParameters body) { - return createSignalNotificationRuleWithHttpInfoAsync(body) + public CompletableFuture + createSecurityMonitoringSuppressionAsync(SecurityMonitoringSuppressionCreateRequest body) { + return createSecurityMonitoringSuppressionWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -6084,40 +6338,41 @@ public CompletableFuture createSignalNotificationRuleA } /** - * Create a new notification rule for security signals and return the created rule. + * Create a new suppression rule. * - * @param body The body of the create notification rule request is composed of the rule type and - * the rule attributes: the rule name, the selectors, the notification targets, and the rule - * enabled status. (required) - * @return ApiResponse<NotificationRuleResponse> + * @param body The definition of the new suppression rule. (required) + * @return ApiResponse<SecurityMonitoringSuppressionResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * + * + * * *
Response details
Status Code Description Response Headers
201 Successfully created the notification rule. -
200 OK -
400 Bad Request -
403 Forbidden -
403 Not Authorized -
409 Conflict -
429 Too many requests -
*/ - public ApiResponse createSignalNotificationRuleWithHttpInfo( - CreateNotificationRuleParameters body) throws ApiException { + public ApiResponse + createSecurityMonitoringSuppressionWithHttpInfo( + SecurityMonitoringSuppressionCreateRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling createSignalNotificationRule"); + 400, + "Missing the required parameter 'body' when calling createSecurityMonitoringSuppression"); } // create path and map variables - String localVarPath = "/api/v2/security/signals/notification_rules"; + String localVarPath = "/api/v2/security_monitoring/configuration/suppressions"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSignalNotificationRule", + "v2.SecurityMonitoringApi.createSecurityMonitoringSuppression", localVarPath, new ArrayList(), localVarHeaderParams, @@ -6132,34 +6387,35 @@ public ApiResponse createSignalNotificationRuleWithHtt localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create a new signal-based notification rule. + * Create a suppression rule. * - *

See {@link #createSignalNotificationRuleWithHttpInfo}. + *

See {@link #createSecurityMonitoringSuppressionWithHttpInfo}. * - * @param body The body of the create notification rule request is composed of the rule type and - * the rule attributes: the rule name, the selectors, the notification targets, and the rule - * enabled status. (required) - * @return CompletableFuture<ApiResponse<NotificationRuleResponse>> + * @param body The definition of the new suppression rule. (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringSuppressionResponse>> */ - public CompletableFuture> - createSignalNotificationRuleWithHttpInfoAsync(CreateNotificationRuleParameters body) { + public CompletableFuture> + createSecurityMonitoringSuppressionWithHttpInfoAsync( + SecurityMonitoringSuppressionCreateRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling createSignalNotificationRule")); + "Missing the required parameter 'body' when calling" + + " createSecurityMonitoringSuppression")); return result; } // create path and map variables - String localVarPath = "/api/v2/security/signals/notification_rules"; + String localVarPath = "/api/v2/security_monitoring/configuration/suppressions"; Map localVarHeaderParams = new HashMap(); @@ -6167,7 +6423,7 @@ public ApiResponse createSignalNotificationRuleWithHtt try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createSignalNotificationRule", + "v2.SecurityMonitoringApi.createSecurityMonitoringSuppression", localVarPath, new ArrayList(), localVarHeaderParams, @@ -6175,7 +6431,8 @@ public ApiResponse createSignalNotificationRuleWithHtt new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -6187,32 +6444,34 @@ public ApiResponse createSignalNotificationRuleWithHtt localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get AST for source code. + * Create ServiceNow tickets for security findings. * - *

See {@link #createStaticAnalysisAstWithHttpInfo}. + *

See {@link #createServiceNowTicketsWithHttpInfo}. * * @param body (required) - * @return GetAstResponse + * @return FindingCaseResponseArray * @throws ApiException if fails to make API call */ - public GetAstResponse createStaticAnalysisAst(GetAstRequest body) throws ApiException { - return createStaticAnalysisAstWithHttpInfo(body).getData(); + public FindingCaseResponseArray createServiceNowTickets(CreateServiceNowTicketRequestArray body) + throws ApiException { + return createServiceNowTicketsWithHttpInfo(body).getData(); } /** - * Get AST for source code. + * Create ServiceNow tickets for security findings. * - *

See {@link #createStaticAnalysisAstWithHttpInfoAsync}. + *

See {@link #createServiceNowTicketsWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<GetAstResponse> + * @return CompletableFuture<FindingCaseResponseArray> */ - public CompletableFuture createStaticAnalysisAstAsync(GetAstRequest body) { - return createStaticAnalysisAstWithHttpInfoAsync(body) + public CompletableFuture createServiceNowTicketsAsync( + CreateServiceNowTicketRequestArray body) { + return createServiceNowTicketsWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -6220,45 +6479,43 @@ public CompletableFuture createStaticAnalysisAstAsync(GetAstRequ } /** - * Parse source code into an abstract syntax tree (AST) for the specified language. + * Create ServiceNow tickets for security findings. This operation creates a case in Datadog and a + * ServiceNow ticket linked to that case for bidirectional sync between Datadog and ServiceNow. + * You can create up to 50 ServiceNow tickets per request and associate up to 50 security findings + * per ServiceNow ticket. Security findings that are already attached to another ServiceNow ticket + * will be detached from their previous ServiceNow ticket and attached to the newly created + * ServiceNow ticket. * * @param body (required) - * @return ApiResponse<GetAstResponse> + * @return ApiResponse<FindingCaseResponseArray> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * + * * *
Response details
Status Code Description Response Headers
200 OK -
201 Created -
400 Bad Request -
401 Unauthorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse createStaticAnalysisAstWithHttpInfo(GetAstRequest body) - throws ApiException { - // Check if unstable operation is enabled - String operationId = "createStaticAnalysisAst"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse createServiceNowTicketsWithHttpInfo( + CreateServiceNowTicketRequestArray body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling createStaticAnalysisAst"); + 400, "Missing the required parameter 'body' when calling createServiceNowTickets"); } // create path and map variables - String localVarPath = "/api/v2/static-analysis/static-analysis-server/get-ast"; + String localVarPath = "/api/v2/security/findings/servicenow_tickets"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createStaticAnalysisAst", + "v2.SecurityMonitoringApi.createServiceNowTickets", localVarPath, new ArrayList(), localVarHeaderParams, @@ -6273,41 +6530,31 @@ public ApiResponse createStaticAnalysisAstWithHttpInfo(GetAstReq localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get AST for source code. + * Create ServiceNow tickets for security findings. * - *

See {@link #createStaticAnalysisAstWithHttpInfo}. + *

See {@link #createServiceNowTicketsWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<GetAstResponse>> + * @return CompletableFuture<ApiResponse<FindingCaseResponseArray>> */ - public CompletableFuture> createStaticAnalysisAstWithHttpInfoAsync( - GetAstRequest body) { - // Check if unstable operation is enabled - String operationId = "createStaticAnalysisAst"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> + createServiceNowTicketsWithHttpInfoAsync(CreateServiceNowTicketRequestArray body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling createStaticAnalysisAst")); + 400, "Missing the required parameter 'body' when calling createServiceNowTickets")); return result; } // create path and map variables - String localVarPath = "/api/v2/static-analysis/static-analysis-server/get-ast"; + String localVarPath = "/api/v2/security/findings/servicenow_tickets"; Map localVarHeaderParams = new HashMap(); @@ -6315,7 +6562,7 @@ public CompletableFuture> createStaticAnalysisAstWit try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createStaticAnalysisAst", + "v2.SecurityMonitoringApi.createServiceNowTickets", localVarPath, new ArrayList(), localVarHeaderParams, @@ -6323,7 +6570,7 @@ public CompletableFuture> createStaticAnalysisAstWit new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -6335,34 +6582,38 @@ public CompletableFuture> createStaticAnalysisAstWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Analyze code. + * Create a new signal-based notification rule. * - *

See {@link #createStaticAnalysisServerAnalysisWithHttpInfo}. + *

See {@link #createSignalNotificationRuleWithHttpInfo}. * - * @param body (required) - * @return AnalysisResponse + * @param body The body of the create notification rule request is composed of the rule type and + * the rule attributes: the rule name, the selectors, the notification targets, and the rule + * enabled status. (required) + * @return NotificationRuleResponse * @throws ApiException if fails to make API call */ - public AnalysisResponse createStaticAnalysisServerAnalysis(AnalysisRequest body) - throws ApiException { - return createStaticAnalysisServerAnalysisWithHttpInfo(body).getData(); + public NotificationRuleResponse createSignalNotificationRule( + CreateNotificationRuleParameters body) throws ApiException { + return createSignalNotificationRuleWithHttpInfo(body).getData(); } /** - * Analyze code. + * Create a new signal-based notification rule. * - *

See {@link #createStaticAnalysisServerAnalysisWithHttpInfoAsync}. + *

See {@link #createSignalNotificationRuleWithHttpInfoAsync}. * - * @param body (required) - * @return CompletableFuture<AnalysisResponse> + * @param body The body of the create notification rule request is composed of the rule type and + * the rule attributes: the rule name, the selectors, the notification targets, and the rule + * enabled status. (required) + * @return CompletableFuture<NotificationRuleResponse> */ - public CompletableFuture createStaticAnalysisServerAnalysisAsync( - AnalysisRequest body) { - return createStaticAnalysisServerAnalysisWithHttpInfoAsync(body) + public CompletableFuture createSignalNotificationRuleAsync( + CreateNotificationRuleParameters body) { + return createSignalNotificationRuleWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -6370,46 +6621,40 @@ public CompletableFuture createStaticAnalysisServerAnalysisAsy } /** - * Run static analysis rules against a source code file and return violations found. + * Create a new notification rule for security signals and return the created rule. * - * @param body (required) - * @return ApiResponse<AnalysisResponse> + * @param body The body of the create notification rule request is composed of the rule type and + * the rule attributes: the rule name, the selectors, the notification targets, and the rule + * enabled status. (required) + * @return ApiResponse<NotificationRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * + * * *
Response details
Status Code Description Response Headers
200 OK -
201 Successfully created the notification rule. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse createStaticAnalysisServerAnalysisWithHttpInfo( - AnalysisRequest body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "createStaticAnalysisServerAnalysis"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse createSignalNotificationRuleWithHttpInfo( + CreateNotificationRuleParameters body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'body' when calling createStaticAnalysisServerAnalysis"); + 400, "Missing the required parameter 'body' when calling createSignalNotificationRule"); } // create path and map variables - String localVarPath = "/api/v2/static-analysis/static-analysis-server/analyze"; + String localVarPath = "/api/v2/security/signals/notification_rules"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createStaticAnalysisServerAnalysis", + "v2.SecurityMonitoringApi.createSignalNotificationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -6424,43 +6669,34 @@ public ApiResponse createStaticAnalysisServerAnalysisWithHttpI localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Analyze code. + * Create a new signal-based notification rule. * - *

See {@link #createStaticAnalysisServerAnalysisWithHttpInfo}. + *

See {@link #createSignalNotificationRuleWithHttpInfo}. * - * @param body (required) - * @return CompletableFuture<ApiResponse<AnalysisResponse>> + * @param body The body of the create notification rule request is composed of the rule type and + * the rule attributes: the rule name, the selectors, the notification targets, and the rule + * enabled status. (required) + * @return CompletableFuture<ApiResponse<NotificationRuleResponse>> */ - public CompletableFuture> - createStaticAnalysisServerAnalysisWithHttpInfoAsync(AnalysisRequest body) { - // Check if unstable operation is enabled - String operationId = "createStaticAnalysisServerAnalysis"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> + createSignalNotificationRuleWithHttpInfoAsync(CreateNotificationRuleParameters body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling" - + " createStaticAnalysisServerAnalysis")); + "Missing the required parameter 'body' when calling createSignalNotificationRule")); return result; } // create path and map variables - String localVarPath = "/api/v2/static-analysis/static-analysis-server/analyze"; + String localVarPath = "/api/v2/security/signals/notification_rules"; Map localVarHeaderParams = new HashMap(); @@ -6468,7 +6704,7 @@ public ApiResponse createStaticAnalysisServerAnalysisWithHttpI try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createStaticAnalysisServerAnalysis", + "v2.SecurityMonitoringApi.createSignalNotificationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -6476,7 +6712,7 @@ public ApiResponse createStaticAnalysisServerAnalysisWithHttpI new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -6488,38 +6724,32 @@ public ApiResponse createStaticAnalysisServerAnalysisWithHttpI localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create a new vulnerability-based notification rule. + * Get AST for source code. * - *

See {@link #createVulnerabilityNotificationRuleWithHttpInfo}. + *

See {@link #createStaticAnalysisAstWithHttpInfo}. * - * @param body The body of the create notification rule request is composed of the rule type and - * the rule attributes: the rule name, the selectors, the notification targets, and the rule - * enabled status. (required) - * @return NotificationRuleResponse + * @param body (required) + * @return GetAstResponse * @throws ApiException if fails to make API call */ - public NotificationRuleResponse createVulnerabilityNotificationRule( - CreateNotificationRuleParameters body) throws ApiException { - return createVulnerabilityNotificationRuleWithHttpInfo(body).getData(); + public GetAstResponse createStaticAnalysisAst(GetAstRequest body) throws ApiException { + return createStaticAnalysisAstWithHttpInfo(body).getData(); } /** - * Create a new vulnerability-based notification rule. + * Get AST for source code. * - *

See {@link #createVulnerabilityNotificationRuleWithHttpInfoAsync}. + *

See {@link #createStaticAnalysisAstWithHttpInfoAsync}. * - * @param body The body of the create notification rule request is composed of the rule type and - * the rule attributes: the rule name, the selectors, the notification targets, and the rule - * enabled status. (required) - * @return CompletableFuture<NotificationRuleResponse> + * @param body (required) + * @return CompletableFuture<GetAstResponse> */ - public CompletableFuture createVulnerabilityNotificationRuleAsync( - CreateNotificationRuleParameters body) { - return createVulnerabilityNotificationRuleWithHttpInfoAsync(body) + public CompletableFuture createStaticAnalysisAstAsync(GetAstRequest body) { + return createStaticAnalysisAstWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -6527,41 +6757,45 @@ public CompletableFuture createVulnerabilityNotificati } /** - * Create a new notification rule for security vulnerabilities and return the created rule. + * Parse source code into an abstract syntax tree (AST) for the specified language. * - * @param body The body of the create notification rule request is composed of the rule type and - * the rule attributes: the rule name, the selectors, the notification targets, and the rule - * enabled status. (required) - * @return ApiResponse<NotificationRuleResponse> + * @param body (required) + * @return ApiResponse<GetAstResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * + * * *
Response details
Status Code Description Response Headers
201 Successfully created the notification rule. -
200 OK -
400 Bad Request -
403 Forbidden -
401 Unauthorized -
429 Too many requests -
*/ - public ApiResponse createVulnerabilityNotificationRuleWithHttpInfo( - CreateNotificationRuleParameters body) throws ApiException { + public ApiResponse createStaticAnalysisAstWithHttpInfo(GetAstRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "createStaticAnalysisAst"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'body' when calling createVulnerabilityNotificationRule"); + 400, "Missing the required parameter 'body' when calling createStaticAnalysisAst"); } // create path and map variables - String localVarPath = "/api/v2/security/vulnerabilities/notification_rules"; + String localVarPath = "/api/v2/static-analysis/static-analysis-server/get-ast"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createVulnerabilityNotificationRule", + "v2.SecurityMonitoringApi.createStaticAnalysisAst", localVarPath, new ArrayList(), localVarHeaderParams, @@ -6576,35 +6810,41 @@ public ApiResponse createVulnerabilityNotificationRule localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create a new vulnerability-based notification rule. + * Get AST for source code. * - *

See {@link #createVulnerabilityNotificationRuleWithHttpInfo}. + *

See {@link #createStaticAnalysisAstWithHttpInfo}. * - * @param body The body of the create notification rule request is composed of the rule type and - * the rule attributes: the rule name, the selectors, the notification targets, and the rule - * enabled status. (required) - * @return CompletableFuture<ApiResponse<NotificationRuleResponse>> + * @param body (required) + * @return CompletableFuture<ApiResponse<GetAstResponse>> */ - public CompletableFuture> - createVulnerabilityNotificationRuleWithHttpInfoAsync(CreateNotificationRuleParameters body) { + public CompletableFuture> createStaticAnalysisAstWithHttpInfoAsync( + GetAstRequest body) { + // Check if unstable operation is enabled + String operationId = "createStaticAnalysisAst"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " createVulnerabilityNotificationRule")); + 400, "Missing the required parameter 'body' when calling createStaticAnalysisAst")); return result; } // create path and map variables - String localVarPath = "/api/v2/security/vulnerabilities/notification_rules"; + String localVarPath = "/api/v2/static-analysis/static-analysis-server/get-ast"; Map localVarHeaderParams = new HashMap(); @@ -6612,7 +6852,7 @@ public ApiResponse createVulnerabilityNotificationRule try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.createVulnerabilityNotificationRule", + "v2.SecurityMonitoringApi.createStaticAnalysisAst", localVarPath, new ArrayList(), localVarHeaderParams, @@ -6620,7 +6860,7 @@ public ApiResponse createVulnerabilityNotificationRule new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -6632,33 +6872,34 @@ public ApiResponse createVulnerabilityNotificationRule localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Deactivate content pack. + * Analyze code. * - *

See {@link #deactivateContentPackWithHttpInfo}. + *

See {@link #createStaticAnalysisServerAnalysisWithHttpInfo}. * - * @param contentPackId The ID of the content pack to deactivate (for example, - * aws-cloudtrail). (required) + * @param body (required) + * @return AnalysisResponse * @throws ApiException if fails to make API call */ - public void deactivateContentPack(String contentPackId) throws ApiException { - deactivateContentPackWithHttpInfo(contentPackId); + public AnalysisResponse createStaticAnalysisServerAnalysis(AnalysisRequest body) + throws ApiException { + return createStaticAnalysisServerAnalysisWithHttpInfo(body).getData(); } /** - * Deactivate content pack. + * Analyze code. * - *

See {@link #deactivateContentPackWithHttpInfoAsync}. + *

See {@link #createStaticAnalysisServerAnalysisWithHttpInfoAsync}. * - * @param contentPackId The ID of the content pack to deactivate (for example, - * aws-cloudtrail). (required) - * @return CompletableFuture + * @param body (required) + * @return CompletableFuture<AnalysisResponse> */ - public CompletableFuture deactivateContentPackAsync(String contentPackId) { - return deactivateContentPackWithHttpInfoAsync(contentPackId) + public CompletableFuture createStaticAnalysisServerAnalysisAsync( + AnalysisRequest body) { + return createStaticAnalysisServerAnalysisWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -6666,106 +6907,97 @@ public CompletableFuture deactivateContentPackAsync(String contentPackId) } /** - * Deactivate a Cloud SIEM content pack. This operation removes the content pack's configuration - * from log filters or security filters and updates the content pack activation state. + * Run static analysis rules against a source code file and return violations found. * - * @param contentPackId The ID of the content pack to deactivate (for example, - * aws-cloudtrail). (required) - * @return ApiResponse<Void> + * @param body (required) + * @return ApiResponse<AnalysisResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * - * + * + * + * * *
Response details
Status Code Description Response Headers
202 Accepted -
403 Forbidden -
404 Not Found -
200 OK -
400 Bad Request -
401 Unauthorized -
429 Too many requests -
*/ - public ApiResponse deactivateContentPackWithHttpInfo(String contentPackId) - throws ApiException { + public ApiResponse createStaticAnalysisServerAnalysisWithHttpInfo( + AnalysisRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "deactivateContentPack"; + String operationId = "createStaticAnalysisServerAnalysis"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'contentPackId' is set - if (contentPackId == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'contentPackId' when calling deactivateContentPack"); + 400, + "Missing the required parameter 'body' when calling createStaticAnalysisServerAnalysis"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/content_packs/{content_pack_id}/deactivate" - .replaceAll( - "\\{" + "content_pack_id" + "\\}", - apiClient.escapeString(contentPackId.toString())); + String localVarPath = "/api/v2/static-analysis/static-analysis-server/analyze"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deactivateContentPack", + "v2.SecurityMonitoringApi.createStaticAnalysisServerAnalysis", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "PUT", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Deactivate content pack. + * Analyze code. * - *

See {@link #deactivateContentPackWithHttpInfo}. + *

See {@link #createStaticAnalysisServerAnalysisWithHttpInfo}. * - * @param contentPackId The ID of the content pack to deactivate (for example, - * aws-cloudtrail). (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param body (required) + * @return CompletableFuture<ApiResponse<AnalysisResponse>> */ - public CompletableFuture> deactivateContentPackWithHttpInfoAsync( - String contentPackId) { + public CompletableFuture> + createStaticAnalysisServerAnalysisWithHttpInfoAsync(AnalysisRequest body) { // Check if unstable operation is enabled - String operationId = "deactivateContentPack"; + String operationId = "createStaticAnalysisServerAnalysis"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'contentPackId' is set - if (contentPackId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'contentPackId' when calling deactivateContentPack")); + "Missing the required parameter 'body' when calling" + + " createStaticAnalysisServerAnalysis")); return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/content_packs/{content_pack_id}/deactivate" - .replaceAll( - "\\{" + "content_pack_id" + "\\}", - apiClient.escapeString(contentPackId.toString())); + String localVarPath = "/api/v2/static-analysis/static-analysis-server/analyze"; Map localVarHeaderParams = new HashMap(); @@ -6773,56 +7005,58 @@ public CompletableFuture> deactivateContentPackWithHttpInfoAsy try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deactivateContentPack", + "v2.SecurityMonitoringApi.createStaticAnalysisServerAnalysis", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PUT", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Deactivate an entity context sync integration. + * Create a new vulnerability-based notification rule. * - *

See {@link #deactivateIntegrationWithHttpInfo}. + *

See {@link #createVulnerabilityNotificationRuleWithHttpInfo}. * - * @param integrationType The integration type to deactivate (for example, entra_id). - * (required) - * @return SecurityMonitoringIntegrationConfigResponse + * @param body The body of the create notification rule request is composed of the rule type and + * the rule attributes: the rule name, the selectors, the notification targets, and the rule + * enabled status. (required) + * @return NotificationRuleResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringIntegrationConfigResponse deactivateIntegration(String integrationType) - throws ApiException { - return deactivateIntegrationWithHttpInfo(integrationType).getData(); + public NotificationRuleResponse createVulnerabilityNotificationRule( + CreateNotificationRuleParameters body) throws ApiException { + return createVulnerabilityNotificationRuleWithHttpInfo(body).getData(); } /** - * Deactivate an entity context sync integration. + * Create a new vulnerability-based notification rule. * - *

See {@link #deactivateIntegrationWithHttpInfoAsync}. + *

See {@link #createVulnerabilityNotificationRuleWithHttpInfoAsync}. * - * @param integrationType The integration type to deactivate (for example, entra_id). - * (required) - * @return CompletableFuture<SecurityMonitoringIntegrationConfigResponse> + * @param body The body of the create notification rule request is composed of the rule type and + * the rule attributes: the rule name, the selectors, the notification targets, and the rule + * enabled status. (required) + * @return CompletableFuture<NotificationRuleResponse> */ - public CompletableFuture deactivateIntegrationAsync( - String integrationType) { - return deactivateIntegrationWithHttpInfoAsync(integrationType) + public CompletableFuture createVulnerabilityNotificationRuleAsync( + CreateNotificationRuleParameters body) { + return createVulnerabilityNotificationRuleWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -6830,52 +7064,41 @@ public CompletableFuture deactivate } /** - * Deactivate all active entity context sync integrations of the given source type (for example, - * Entra ID). + * Create a new notification rule for security vulnerabilities and return the created rule. * - * @param integrationType The integration type to deactivate (for example, entra_id). - * (required) - * @return ApiResponse<SecurityMonitoringIntegrationConfigResponse> + * @param body The body of the create notification rule request is composed of the rule type and + * the rule attributes: the rule name, the selectors, the notification targets, and the rule + * enabled status. (required) + * @return ApiResponse<NotificationRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * - * + * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
404 Not Found -
201 Successfully created the notification rule. -
400 Bad Request -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse deactivateIntegrationWithHttpInfo( - String integrationType) throws ApiException { - // Check if unstable operation is enabled - String operationId = "deactivateIntegration"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = null; + public ApiResponse createVulnerabilityNotificationRuleWithHttpInfo( + CreateNotificationRuleParameters body) throws ApiException { + Object localVarPostBody = body; - // verify the required parameter 'integrationType' is set - if (integrationType == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( 400, - "Missing the required parameter 'integrationType' when calling deactivateIntegration"); + "Missing the required parameter 'body' when calling createVulnerabilityNotificationRule"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/configuration/integration_config/{integration_type}/deactivate" - .replaceAll( - "\\{" + "integration_type" + "\\}", - apiClient.escapeString(integrationType.toString())); + String localVarPath = "/api/v2/security/vulnerabilities/notification_rules"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deactivateIntegration", + "v2.SecurityMonitoringApi.createVulnerabilityNotificationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -6886,54 +7109,39 @@ public ApiResponse deactivateIntegr "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Deactivate an entity context sync integration. + * Create a new vulnerability-based notification rule. * - *

See {@link #deactivateIntegrationWithHttpInfo}. + *

See {@link #createVulnerabilityNotificationRuleWithHttpInfo}. * - * @param integrationType The integration type to deactivate (for example, entra_id). - * (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringIntegrationConfigResponse>> + * @param body The body of the create notification rule request is composed of the rule type and + * the rule attributes: the rule name, the selectors, the notification targets, and the rule + * enabled status. (required) + * @return CompletableFuture<ApiResponse<NotificationRuleResponse>> */ - public CompletableFuture> - deactivateIntegrationWithHttpInfoAsync(String integrationType) { - // Check if unstable operation is enabled - String operationId = "deactivateIntegration"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = null; + public CompletableFuture> + createVulnerabilityNotificationRuleWithHttpInfoAsync(CreateNotificationRuleParameters body) { + Object localVarPostBody = body; - // verify the required parameter 'integrationType' is set - if (integrationType == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'integrationType' when calling" - + " deactivateIntegration")); + "Missing the required parameter 'body' when calling" + + " createVulnerabilityNotificationRule")); return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/configuration/integration_config/{integration_type}/deactivate" - .replaceAll( - "\\{" + "integration_type" + "\\}", - apiClient.escapeString(integrationType.toString())); + String localVarPath = "/api/v2/security/vulnerabilities/notification_rules"; Map localVarHeaderParams = new HashMap(); @@ -6941,7 +7149,7 @@ public ApiResponse deactivateIntegr try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deactivateIntegration", + "v2.SecurityMonitoringApi.createVulnerabilityNotificationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -6949,8 +7157,7 @@ public ApiResponse deactivateIntegr new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -6958,40 +7165,37 @@ public ApiResponse deactivateIntegr "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Delete a custom framework. + * Deactivate content pack. * - *

See {@link #deleteCustomFrameworkWithHttpInfo}. + *

See {@link #deactivateContentPackWithHttpInfo}. * - * @param handle The framework handle (required) - * @param version The framework version (required) - * @return DeleteCustomFrameworkResponse + * @param contentPackId The ID of the content pack to deactivate (for example, + * aws-cloudtrail). (required) * @throws ApiException if fails to make API call */ - public DeleteCustomFrameworkResponse deleteCustomFramework(String handle, String version) - throws ApiException { - return deleteCustomFrameworkWithHttpInfo(handle, version).getData(); + public void deactivateContentPack(String contentPackId) throws ApiException { + deactivateContentPackWithHttpInfo(contentPackId); } /** - * Delete a custom framework. + * Deactivate content pack. * - *

See {@link #deleteCustomFrameworkWithHttpInfoAsync}. + *

See {@link #deactivateContentPackWithHttpInfoAsync}. * - * @param handle The framework handle (required) - * @param version The framework version (required) - * @return CompletableFuture<DeleteCustomFrameworkResponse> + * @param contentPackId The ID of the content pack to deactivate (for example, + * aws-cloudtrail). (required) + * @return CompletableFuture */ - public CompletableFuture deleteCustomFrameworkAsync( - String handle, String version) { - return deleteCustomFrameworkWithHttpInfoAsync(handle, version) + public CompletableFuture deactivateContentPackAsync(String contentPackId) { + return deactivateContentPackWithHttpInfoAsync(contentPackId) .thenApply( response -> { return response.getData(); @@ -6999,102 +7203,106 @@ public CompletableFuture deleteCustomFrameworkAsy } /** - * Delete a custom framework. + * Deactivate a Cloud SIEM content pack. This operation removes the content pack's configuration + * from log filters or security filters and updates the content pack activation state. * - * @param handle The framework handle (required) - * @param version The framework version (required) - * @return ApiResponse<DeleteCustomFrameworkResponse> + * @param contentPackId The ID of the content pack to deactivate (for example, + * aws-cloudtrail). (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * + * * - * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
202 Accepted -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Bad Request -
*/ - public ApiResponse deleteCustomFrameworkWithHttpInfo( - String handle, String version) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'handle' is set - if (handle == null) { - throw new ApiException( - 400, "Missing the required parameter 'handle' when calling deleteCustomFramework"); + public ApiResponse deactivateContentPackWithHttpInfo(String contentPackId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deactivateContentPack"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } + Object localVarPostBody = null; - // verify the required parameter 'version' is set - if (version == null) { + // verify the required parameter 'contentPackId' is set + if (contentPackId == null) { throw new ApiException( - 400, "Missing the required parameter 'version' when calling deleteCustomFramework"); + 400, "Missing the required parameter 'contentPackId' when calling deactivateContentPack"); } // create path and map variables String localVarPath = - "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" - .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) - .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + "/api/v2/security_monitoring/content_packs/{content_pack_id}/deactivate" + .replaceAll( + "\\{" + "content_pack_id" + "\\}", + apiClient.escapeString(contentPackId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteCustomFramework", + "v2.SecurityMonitoringApi.deactivateContentPack", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "DELETE", + "PUT", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Delete a custom framework. + * Deactivate content pack. * - *

See {@link #deleteCustomFrameworkWithHttpInfo}. + *

See {@link #deactivateContentPackWithHttpInfo}. * - * @param handle The framework handle (required) - * @param version The framework version (required) - * @return CompletableFuture<ApiResponse<DeleteCustomFrameworkResponse>> + * @param contentPackId The ID of the content pack to deactivate (for example, + * aws-cloudtrail). (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - deleteCustomFrameworkWithHttpInfoAsync(String handle, String version) { - Object localVarPostBody = null; - - // verify the required parameter 'handle' is set - if (handle == null) { - CompletableFuture> result = - new CompletableFuture<>(); + public CompletableFuture> deactivateContentPackWithHttpInfoAsync( + String contentPackId) { + // Check if unstable operation is enabled + String operationId = "deactivateContentPack"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'handle' when calling deleteCustomFramework")); + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } + Object localVarPostBody = null; - // verify the required parameter 'version' is set - if (version == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'contentPackId' is set + if (contentPackId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'version' when calling deleteCustomFramework")); + 400, + "Missing the required parameter 'contentPackId' when calling deactivateContentPack")); return result; } // create path and map variables String localVarPath = - "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" - .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) - .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + "/api/v2/security_monitoring/content_packs/{content_pack_id}/deactivate" + .replaceAll( + "\\{" + "content_pack_id" + "\\}", + apiClient.escapeString(contentPackId.toString())); Map localVarHeaderParams = new HashMap(); @@ -7102,52 +7310,56 @@ public ApiResponse deleteCustomFrameworkWithHttpI try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteCustomFramework", + "v2.SecurityMonitoringApi.deactivateContentPack", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "PUT", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Delete an existing job. + * Deactivate an entity context sync integration. * - *

See {@link #deleteHistoricalJobWithHttpInfo}. + *

See {@link #deactivateIntegrationWithHttpInfo}. * - * @param jobId The ID of the job. (required) + * @param integrationType The integration type to deactivate (for example, entra_id). + * (required) + * @return SecurityMonitoringIntegrationConfigResponse * @throws ApiException if fails to make API call */ - public void deleteHistoricalJob(String jobId) throws ApiException { - deleteHistoricalJobWithHttpInfo(jobId); + public SecurityMonitoringIntegrationConfigResponse deactivateIntegration(String integrationType) + throws ApiException { + return deactivateIntegrationWithHttpInfo(integrationType).getData(); } /** - * Delete an existing job. + * Deactivate an entity context sync integration. * - *

See {@link #deleteHistoricalJobWithHttpInfoAsync}. + *

See {@link #deactivateIntegrationWithHttpInfoAsync}. * - * @param jobId The ID of the job. (required) - * @return CompletableFuture + * @param integrationType The integration type to deactivate (for example, entra_id). + * (required) + * @return CompletableFuture<SecurityMonitoringIntegrationConfigResponse> */ - public CompletableFuture deleteHistoricalJobAsync(String jobId) { - return deleteHistoricalJobWithHttpInfoAsync(jobId) + public CompletableFuture deactivateIntegrationAsync( + String integrationType) { + return deactivateIntegrationWithHttpInfoAsync(integrationType) .thenApply( response -> { return response.getData(); @@ -7155,27 +7367,27 @@ public CompletableFuture deleteHistoricalJobAsync(String jobId) { } /** - * Delete an existing job. + * Deactivate all active entity context sync integrations of the given source type (for example, + * Entra ID). * - * @param jobId The ID of the job. (required) - * @return ApiResponse<Void> + * @param integrationType The integration type to deactivate (for example, entra_id). + * (required) + * @return ApiResponse<SecurityMonitoringIntegrationConfigResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * - * + * * * - * * *
Response details
Status Code Description Response Headers
204 OK -
400 Bad Request -
401 Concurrent Modification -
200 OK -
403 Not Authorized -
404 Not Found -
409 Conflict -
429 Too many requests -
*/ - public ApiResponse deleteHistoricalJobWithHttpInfo(String jobId) throws ApiException { + public ApiResponse deactivateIntegrationWithHttpInfo( + String integrationType) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteHistoricalJob"; + String operationId = "deactivateIntegration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -7183,71 +7395,82 @@ public ApiResponse deleteHistoricalJobWithHttpInfo(String jobId) throws Ap } Object localVarPostBody = null; - // verify the required parameter 'jobId' is set - if (jobId == null) { + // verify the required parameter 'integrationType' is set + if (integrationType == null) { throw new ApiException( - 400, "Missing the required parameter 'jobId' when calling deleteHistoricalJob"); + 400, + "Missing the required parameter 'integrationType' when calling deactivateIntegration"); } // create path and map variables String localVarPath = - "/api/v2/siem-historical-detections/jobs/{job_id}" - .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); + "/api/v2/security_monitoring/configuration/integration_config/{integration_type}/deactivate" + .replaceAll( + "\\{" + "integration_type" + "\\}", + apiClient.escapeString(integrationType.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteHistoricalJob", + "v2.SecurityMonitoringApi.deactivateIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "DELETE", + "POST", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an existing job. + * Deactivate an entity context sync integration. * - *

See {@link #deleteHistoricalJobWithHttpInfo}. + *

See {@link #deactivateIntegrationWithHttpInfo}. * - * @param jobId The ID of the job. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param integrationType The integration type to deactivate (for example, entra_id). + * (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringIntegrationConfigResponse>> */ - public CompletableFuture> deleteHistoricalJobWithHttpInfoAsync(String jobId) { + public CompletableFuture> + deactivateIntegrationWithHttpInfoAsync(String integrationType) { // Check if unstable operation is enabled - String operationId = "deleteHistoricalJob"; + String operationId = "deactivateIntegration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'jobId' is set - if (jobId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'integrationType' is set + if (integrationType == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'jobId' when calling deleteHistoricalJob")); + 400, + "Missing the required parameter 'integrationType' when calling" + + " deactivateIntegration")); return result; } // create path and map variables String localVarPath = - "/api/v2/siem-historical-detections/jobs/{job_id}" - .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); + "/api/v2/security_monitoring/configuration/integration_config/{integration_type}/deactivate" + .replaceAll( + "\\{" + "integration_type" + "\\}", + apiClient.escapeString(integrationType.toString())); Map localVarHeaderParams = new HashMap(); @@ -7255,56 +7478,57 @@ public CompletableFuture> deleteHistoricalJobWithHttpInfoAsync try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteHistoricalJob", + "v2.SecurityMonitoringApi.deactivateIntegration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "POST", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Unsubscribe from sample log generation. + * Delete a custom framework. * - *

See {@link #deleteSampleLogGenerationSubscriptionWithHttpInfo}. + *

See {@link #deleteCustomFrameworkWithHttpInfo}. * - * @param contentPackId The identifier of the Cloud SIEM content pack to operate on (for example, - * aws-cloudtrail). (required) - * @return SampleLogGenerationSubscriptionResponse + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return DeleteCustomFrameworkResponse * @throws ApiException if fails to make API call */ - public SampleLogGenerationSubscriptionResponse deleteSampleLogGenerationSubscription( - String contentPackId) throws ApiException { - return deleteSampleLogGenerationSubscriptionWithHttpInfo(contentPackId).getData(); + public DeleteCustomFrameworkResponse deleteCustomFramework(String handle, String version) + throws ApiException { + return deleteCustomFrameworkWithHttpInfo(handle, version).getData(); } /** - * Unsubscribe from sample log generation. + * Delete a custom framework. * - *

See {@link #deleteSampleLogGenerationSubscriptionWithHttpInfoAsync}. + *

See {@link #deleteCustomFrameworkWithHttpInfoAsync}. * - * @param contentPackId The identifier of the Cloud SIEM content pack to operate on (for example, - * aws-cloudtrail). (required) - * @return CompletableFuture<SampleLogGenerationSubscriptionResponse> + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return CompletableFuture<DeleteCustomFrameworkResponse> */ - public CompletableFuture - deleteSampleLogGenerationSubscriptionAsync(String contentPackId) { - return deleteSampleLogGenerationSubscriptionWithHttpInfoAsync(contentPackId) + public CompletableFuture deleteCustomFrameworkAsync( + String handle, String version) { + return deleteCustomFrameworkWithHttpInfoAsync(handle, version) .thenApply( response -> { return response.getData(); @@ -7312,17 +7536,11 @@ public SampleLogGenerationSubscriptionResponse deleteSampleLogGenerationSubscrip } /** - * Unsubscribe from sample log generation for a Cloud SIEM content pack. After unsubscribing, no - * more sample logs are generated for the requested content pack. - * - *

Availability: this endpoint is restricted to Cloud SIEM trial organizations - * on an eligible pricing model. Non-trial orgs receive 403 Forbidden, the feature - * flag may also reject requests with 400 Bad Request, and legacy pricing tiers - * receive a response with status: not_available. + * Delete a custom framework. * - * @param contentPackId The identifier of the Cloud SIEM content pack to operate on (for example, - * aws-cloudtrail). (required) - * @return ApiResponse<SampleLogGenerationSubscriptionResponse> + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return ApiResponse<DeleteCustomFrameworkResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -7330,40 +7548,36 @@ public SampleLogGenerationSubscriptionResponse deleteSampleLogGenerationSubscrip * * * - * * + * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
500 Bad Request -
*/ - public ApiResponse - deleteSampleLogGenerationSubscriptionWithHttpInfo(String contentPackId) throws ApiException { - // Check if unstable operation is enabled - String operationId = "deleteSampleLogGenerationSubscription"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse deleteCustomFrameworkWithHttpInfo( + String handle, String version) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'contentPackId' is set - if (contentPackId == null) { + // verify the required parameter 'handle' is set + if (handle == null) { throw new ApiException( - 400, - "Missing the required parameter 'contentPackId' when calling" - + " deleteSampleLogGenerationSubscription"); + 400, "Missing the required parameter 'handle' when calling deleteCustomFramework"); + } + + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException( + 400, "Missing the required parameter 'version' when calling deleteCustomFramework"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/sample_log_generation/subscriptions/{content_pack_id}" - .replaceAll( - "\\{" + "content_pack_id" + "\\}", - apiClient.escapeString(contentPackId.toString())); + "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" + .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSampleLogGenerationSubscription", + "v2.SecurityMonitoringApi.deleteCustomFramework", localVarPath, new ArrayList(), localVarHeaderParams, @@ -7378,50 +7592,46 @@ public SampleLogGenerationSubscriptionResponse deleteSampleLogGenerationSubscrip localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Unsubscribe from sample log generation. + * Delete a custom framework. * - *

See {@link #deleteSampleLogGenerationSubscriptionWithHttpInfo}. + *

See {@link #deleteCustomFrameworkWithHttpInfo}. * - * @param contentPackId The identifier of the Cloud SIEM content pack to operate on (for example, - * aws-cloudtrail). (required) - * @return CompletableFuture<ApiResponse<SampleLogGenerationSubscriptionResponse>> + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return CompletableFuture<ApiResponse<DeleteCustomFrameworkResponse>> */ - public CompletableFuture> - deleteSampleLogGenerationSubscriptionWithHttpInfoAsync(String contentPackId) { - // Check if unstable operation is enabled - String operationId = "deleteSampleLogGenerationSubscription"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = + public CompletableFuture> + deleteCustomFrameworkWithHttpInfoAsync(String handle, String version) { + Object localVarPostBody = null; + + // verify the required parameter 'handle' is set + if (handle == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + new ApiException( + 400, "Missing the required parameter 'handle' when calling deleteCustomFramework")); return result; } - Object localVarPostBody = null; - // verify the required parameter 'contentPackId' is set - if (contentPackId == null) { - CompletableFuture> result = + // verify the required parameter 'version' is set + if (version == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'contentPackId' when calling" - + " deleteSampleLogGenerationSubscription")); + 400, "Missing the required parameter 'version' when calling deleteCustomFramework")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/sample_log_generation/subscriptions/{content_pack_id}" - .replaceAll( - "\\{" + "content_pack_id" + "\\}", - apiClient.escapeString(contentPackId.toString())); + "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" + .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); Map localVarHeaderParams = new HashMap(); @@ -7429,7 +7639,7 @@ public SampleLogGenerationSubscriptionResponse deleteSampleLogGenerationSubscrip try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSampleLogGenerationSubscription", + "v2.SecurityMonitoringApi.deleteCustomFramework", localVarPath, new ArrayList(), localVarHeaderParams, @@ -7437,7 +7647,7 @@ public SampleLogGenerationSubscriptionResponse deleteSampleLogGenerationSubscrip new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -7450,31 +7660,31 @@ public SampleLogGenerationSubscriptionResponse deleteSampleLogGenerationSubscrip localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Delete a security filter. + * Delete an existing job. * - *

See {@link #deleteSecurityFilterWithHttpInfo}. + *

See {@link #deleteHistoricalJobWithHttpInfo}. * - * @param securityFilterId The ID of the security filter. (required) + * @param jobId The ID of the job. (required) * @throws ApiException if fails to make API call */ - public void deleteSecurityFilter(String securityFilterId) throws ApiException { - deleteSecurityFilterWithHttpInfo(securityFilterId); + public void deleteHistoricalJob(String jobId) throws ApiException { + deleteHistoricalJobWithHttpInfo(jobId); } /** - * Delete a security filter. + * Delete an existing job. * - *

See {@link #deleteSecurityFilterWithHttpInfoAsync}. + *

See {@link #deleteHistoricalJobWithHttpInfoAsync}. * - * @param securityFilterId The ID of the security filter. (required) + * @param jobId The ID of the job. (required) * @return CompletableFuture */ - public CompletableFuture deleteSecurityFilterAsync(String securityFilterId) { - return deleteSecurityFilterWithHttpInfoAsync(securityFilterId) + public CompletableFuture deleteHistoricalJobAsync(String jobId) { + return deleteHistoricalJobWithHttpInfoAsync(jobId) .thenApply( response -> { return response.getData(); @@ -7482,9 +7692,9 @@ public CompletableFuture deleteSecurityFilterAsync(String securityFilterId } /** - * Delete a specific security filter. + * Delete an existing job. * - * @param securityFilterId The ID of the security filter. (required) + * @param jobId The ID of the job. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details @@ -7492,33 +7702,39 @@ public CompletableFuture deleteSecurityFilterAsync(String securityFilterId * Response details * Status Code Description Response Headers * 204 OK - + * 400 Bad Request - + * 401 Concurrent Modification - * 403 Not Authorized - * 404 Not Found - + * 409 Conflict - * 429 Too many requests - * */ - public ApiResponse deleteSecurityFilterWithHttpInfo(String securityFilterId) - throws ApiException { + public ApiResponse deleteHistoricalJobWithHttpInfo(String jobId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteHistoricalJob"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; - // verify the required parameter 'securityFilterId' is set - if (securityFilterId == null) { + // verify the required parameter 'jobId' is set + if (jobId == null) { throw new ApiException( - 400, - "Missing the required parameter 'securityFilterId' when calling deleteSecurityFilter"); + 400, "Missing the required parameter 'jobId' when calling deleteHistoricalJob"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" - .replaceAll( - "\\{" + "security_filter_id" + "\\}", - apiClient.escapeString(securityFilterId.toString())); + "/api/v2/siem-historical-detections/jobs/{job_id}" + .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityFilter", + "v2.SecurityMonitoringApi.deleteHistoricalJob", localVarPath, new ArrayList(), localVarHeaderParams, @@ -7537,33 +7753,38 @@ public ApiResponse deleteSecurityFilterWithHttpInfo(String securityFilterI } /** - * Delete a security filter. + * Delete an existing job. * - *

See {@link #deleteSecurityFilterWithHttpInfo}. + *

See {@link #deleteHistoricalJobWithHttpInfo}. * - * @param securityFilterId The ID of the security filter. (required) + * @param jobId The ID of the job. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteSecurityFilterWithHttpInfoAsync( - String securityFilterId) { + public CompletableFuture> deleteHistoricalJobWithHttpInfoAsync(String jobId) { + // Check if unstable operation is enabled + String operationId = "deleteHistoricalJob"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; - // verify the required parameter 'securityFilterId' is set - if (securityFilterId == null) { + // verify the required parameter 'jobId' is set + if (jobId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'securityFilterId' when calling" - + " deleteSecurityFilter")); + 400, "Missing the required parameter 'jobId' when calling deleteHistoricalJob")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" - .replaceAll( - "\\{" + "security_filter_id" + "\\}", - apiClient.escapeString(securityFilterId.toString())); + "/api/v2/siem-historical-detections/jobs/{job_id}" + .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); Map localVarHeaderParams = new HashMap(); @@ -7571,7 +7792,7 @@ public CompletableFuture> deleteSecurityFilterWithHttpInfoAsyn try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityFilter", + "v2.SecurityMonitoringApi.deleteHistoricalJob", localVarPath, new ArrayList(), localVarHeaderParams, @@ -7595,27 +7816,32 @@ public CompletableFuture> deleteSecurityFilterWithHttpInfoAsyn } /** - * Delete a due date rule. + * Unsubscribe from sample log generation. * - *

See {@link #deleteSecurityFindingsAutomationDueDateRuleWithHttpInfo}. + *

See {@link #deleteSampleLogGenerationSubscriptionWithHttpInfo}. * - * @param ruleId The ID of the due date rule. (required) + * @param contentPackId The identifier of the Cloud SIEM content pack to operate on (for example, + * aws-cloudtrail). (required) + * @return SampleLogGenerationSubscriptionResponse * @throws ApiException if fails to make API call */ - public void deleteSecurityFindingsAutomationDueDateRule(UUID ruleId) throws ApiException { - deleteSecurityFindingsAutomationDueDateRuleWithHttpInfo(ruleId); + public SampleLogGenerationSubscriptionResponse deleteSampleLogGenerationSubscription( + String contentPackId) throws ApiException { + return deleteSampleLogGenerationSubscriptionWithHttpInfo(contentPackId).getData(); } /** - * Delete a due date rule. + * Unsubscribe from sample log generation. * - *

See {@link #deleteSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync}. + *

See {@link #deleteSampleLogGenerationSubscriptionWithHttpInfoAsync}. * - * @param ruleId The ID of the due date rule. (required) - * @return CompletableFuture + * @param contentPackId The identifier of the Cloud SIEM content pack to operate on (for example, + * aws-cloudtrail). (required) + * @return CompletableFuture<SampleLogGenerationSubscriptionResponse> */ - public CompletableFuture deleteSecurityFindingsAutomationDueDateRuleAsync(UUID ruleId) { - return deleteSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync(ruleId) + public CompletableFuture + deleteSampleLogGenerationSubscriptionAsync(String contentPackId) { + return deleteSampleLogGenerationSubscriptionWithHttpInfoAsync(contentPackId) .thenApply( response -> { return response.getData(); @@ -7623,25 +7849,32 @@ public CompletableFuture deleteSecurityFindingsAutomationDueDateRuleAsync( } /** - * Delete a due date rule by ID. + * Unsubscribe from sample log generation for a Cloud SIEM content pack. After unsubscribing, no + * more sample logs are generated for the requested content pack. * - * @param ruleId The ID of the due date rule. (required) - * @return ApiResponse<Void> + *

Availability: this endpoint is restricted to Cloud SIEM trial organizations + * on an eligible pricing model. Non-trial orgs receive 403 Forbidden, the feature + * flag may also reject requests with 400 Bad Request, and legacy pricing tiers + * receive a response with status: not_available. + * + * @param contentPackId The identifier of the Cloud SIEM content pack to operate on (for example, + * aws-cloudtrail). (required) + * @return ApiResponse<SampleLogGenerationSubscriptionResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * - * + * + * + * * *
Response details
Status Code Description Response Headers
204 Successfully deleted the due date rule -
403 Forbidden -
404 Not Found -
200 OK -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
*/ - public ApiResponse deleteSecurityFindingsAutomationDueDateRuleWithHttpInfo(UUID ruleId) - throws ApiException { + public ApiResponse + deleteSampleLogGenerationSubscriptionWithHttpInfo(String contentPackId) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteSecurityFindingsAutomationDueDateRule"; + String operationId = "deleteSampleLogGenerationSubscription"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -7649,28 +7882,30 @@ public ApiResponse deleteSecurityFindingsAutomationDueDateRuleWithHttpInfo } Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'contentPackId' is set + if (contentPackId == null) { throw new ApiException( 400, - "Missing the required parameter 'ruleId' when calling" - + " deleteSecurityFindingsAutomationDueDateRule"); + "Missing the required parameter 'contentPackId' when calling" + + " deleteSampleLogGenerationSubscription"); } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/due_date_rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/sample_log_generation/subscriptions/{content_pack_id}" + .replaceAll( + "\\{" + "content_pack_id" + "\\}", + apiClient.escapeString(contentPackId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationDueDateRule", + "v2.SecurityMonitoringApi.deleteSampleLogGenerationSubscription", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( "DELETE", @@ -7680,45 +7915,50 @@ public ApiResponse deleteSecurityFindingsAutomationDueDateRuleWithHttpInfo localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete a due date rule. + * Unsubscribe from sample log generation. * - *

See {@link #deleteSecurityFindingsAutomationDueDateRuleWithHttpInfo}. + *

See {@link #deleteSampleLogGenerationSubscriptionWithHttpInfo}. * - * @param ruleId The ID of the due date rule. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param contentPackId The identifier of the Cloud SIEM content pack to operate on (for example, + * aws-cloudtrail). (required) + * @return CompletableFuture<ApiResponse<SampleLogGenerationSubscriptionResponse>> */ - public CompletableFuture> - deleteSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync(UUID ruleId) { + public CompletableFuture> + deleteSampleLogGenerationSubscriptionWithHttpInfoAsync(String contentPackId) { // Check if unstable operation is enabled - String operationId = "deleteSecurityFindingsAutomationDueDateRule"; + String operationId = "deleteSampleLogGenerationSubscription"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'contentPackId' is set + if (contentPackId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'ruleId' when calling" - + " deleteSecurityFindingsAutomationDueDateRule")); + "Missing the required parameter 'contentPackId' when calling" + + " deleteSampleLogGenerationSubscription")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/due_date_rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/sample_log_generation/subscriptions/{content_pack_id}" + .replaceAll( + "\\{" + "content_pack_id" + "\\}", + apiClient.escapeString(contentPackId.toString())); Map localVarHeaderParams = new HashMap(); @@ -7726,15 +7966,16 @@ public ApiResponse deleteSecurityFindingsAutomationDueDateRuleWithHttpInfo try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationDueDateRule", + "v2.SecurityMonitoringApi.deleteSampleLogGenerationSubscription", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -7746,31 +7987,31 @@ public ApiResponse deleteSecurityFindingsAutomationDueDateRuleWithHttpInfo localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete an inbox rule. + * Delete a security filter. * - *

See {@link #deleteSecurityFindingsAutomationInboxRuleWithHttpInfo}. + *

See {@link #deleteSecurityFilterWithHttpInfo}. * - * @param ruleId The ID of the inbox rule. (required) + * @param securityFilterId The ID of the security filter. (required) * @throws ApiException if fails to make API call */ - public void deleteSecurityFindingsAutomationInboxRule(UUID ruleId) throws ApiException { - deleteSecurityFindingsAutomationInboxRuleWithHttpInfo(ruleId); + public void deleteSecurityFilter(String securityFilterId) throws ApiException { + deleteSecurityFilterWithHttpInfo(securityFilterId); } /** - * Delete an inbox rule. + * Delete a security filter. * - *

See {@link #deleteSecurityFindingsAutomationInboxRuleWithHttpInfoAsync}. + *

See {@link #deleteSecurityFilterWithHttpInfoAsync}. * - * @param ruleId The ID of the inbox rule. (required) + * @param securityFilterId The ID of the security filter. (required) * @return CompletableFuture */ - public CompletableFuture deleteSecurityFindingsAutomationInboxRuleAsync(UUID ruleId) { - return deleteSecurityFindingsAutomationInboxRuleWithHttpInfoAsync(ruleId) + public CompletableFuture deleteSecurityFilterAsync(String securityFilterId) { + return deleteSecurityFilterWithHttpInfoAsync(securityFilterId) .thenApply( response -> { return response.getData(); @@ -7778,49 +8019,43 @@ public CompletableFuture deleteSecurityFindingsAutomationInboxRuleAsync(UU } /** - * Delete an inbox rule by ID. + * Delete a specific security filter. * - * @param ruleId The ID of the inbox rule. (required) + * @param securityFilterId The ID of the security filter. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * * * *
Response details
Status Code Description Response Headers
204 Successfully deleted the inbox rule -
403 Forbidden -
204 OK -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse deleteSecurityFindingsAutomationInboxRuleWithHttpInfo(UUID ruleId) + public ApiResponse deleteSecurityFilterWithHttpInfo(String securityFilterId) throws ApiException { - // Check if unstable operation is enabled - String operationId = "deleteSecurityFindingsAutomationInboxRule"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'securityFilterId' is set + if (securityFilterId == null) { throw new ApiException( 400, - "Missing the required parameter 'ruleId' when calling" - + " deleteSecurityFindingsAutomationInboxRule"); + "Missing the required parameter 'securityFilterId' when calling deleteSecurityFilter"); } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/inbox_rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" + .replaceAll( + "\\{" + "security_filter_id" + "\\}", + apiClient.escapeString(securityFilterId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationInboxRule", + "v2.SecurityMonitoringApi.deleteSecurityFilter", localVarPath, new ArrayList(), localVarHeaderParams, @@ -7839,41 +8074,33 @@ public ApiResponse deleteSecurityFindingsAutomationInboxRuleWithHttpInfo(U } /** - * Delete an inbox rule. + * Delete a security filter. * - *

See {@link #deleteSecurityFindingsAutomationInboxRuleWithHttpInfo}. + *

See {@link #deleteSecurityFilterWithHttpInfo}. * - * @param ruleId The ID of the inbox rule. (required) + * @param securityFilterId The ID of the security filter. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - deleteSecurityFindingsAutomationInboxRuleWithHttpInfoAsync(UUID ruleId) { - // Check if unstable operation is enabled - String operationId = "deleteSecurityFindingsAutomationInboxRule"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> deleteSecurityFilterWithHttpInfoAsync( + String securityFilterId) { Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'securityFilterId' is set + if (securityFilterId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'ruleId' when calling" - + " deleteSecurityFindingsAutomationInboxRule")); + "Missing the required parameter 'securityFilterId' when calling" + + " deleteSecurityFilter")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/inbox_rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" + .replaceAll( + "\\{" + "security_filter_id" + "\\}", + apiClient.escapeString(securityFilterId.toString())); Map localVarHeaderParams = new HashMap(); @@ -7881,7 +8108,7 @@ public ApiResponse deleteSecurityFindingsAutomationInboxRuleWithHttpInfo(U try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationInboxRule", + "v2.SecurityMonitoringApi.deleteSecurityFilter", localVarPath, new ArrayList(), localVarHeaderParams, @@ -7905,27 +8132,27 @@ public ApiResponse deleteSecurityFindingsAutomationInboxRuleWithHttpInfo(U } /** - * Delete a mute rule. + * Delete a due date rule. * - *

See {@link #deleteSecurityFindingsAutomationMuteRuleWithHttpInfo}. + *

See {@link #deleteSecurityFindingsAutomationDueDateRuleWithHttpInfo}. * - * @param ruleId The ID of the mute rule. (required) + * @param ruleId The ID of the due date rule. (required) * @throws ApiException if fails to make API call */ - public void deleteSecurityFindingsAutomationMuteRule(UUID ruleId) throws ApiException { - deleteSecurityFindingsAutomationMuteRuleWithHttpInfo(ruleId); + public void deleteSecurityFindingsAutomationDueDateRule(UUID ruleId) throws ApiException { + deleteSecurityFindingsAutomationDueDateRuleWithHttpInfo(ruleId); } /** - * Delete a mute rule. + * Delete a due date rule. * - *

See {@link #deleteSecurityFindingsAutomationMuteRuleWithHttpInfoAsync}. + *

See {@link #deleteSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync}. * - * @param ruleId The ID of the mute rule. (required) + * @param ruleId The ID of the due date rule. (required) * @return CompletableFuture */ - public CompletableFuture deleteSecurityFindingsAutomationMuteRuleAsync(UUID ruleId) { - return deleteSecurityFindingsAutomationMuteRuleWithHttpInfoAsync(ruleId) + public CompletableFuture deleteSecurityFindingsAutomationDueDateRuleAsync(UUID ruleId) { + return deleteSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -7933,25 +8160,25 @@ public CompletableFuture deleteSecurityFindingsAutomationMuteRuleAsync(UUI } /** - * Delete a mute rule by ID. + * Delete a due date rule by ID. * - * @param ruleId The ID of the mute rule. (required) + * @param ruleId The ID of the due date rule. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * *
Response details
Status Code Description Response Headers
204 Successfully deleted the mute rule -
204 Successfully deleted the due date rule -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse deleteSecurityFindingsAutomationMuteRuleWithHttpInfo(UUID ruleId) + public ApiResponse deleteSecurityFindingsAutomationDueDateRuleWithHttpInfo(UUID ruleId) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteSecurityFindingsAutomationMuteRule"; + String operationId = "deleteSecurityFindingsAutomationDueDateRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -7964,18 +8191,18 @@ public ApiResponse deleteSecurityFindingsAutomationMuteRuleWithHttpInfo(UU throw new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " deleteSecurityFindingsAutomationMuteRule"); + + " deleteSecurityFindingsAutomationDueDateRule"); } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/mute_rules/{rule_id}" + "/api/v2/security/findings/automation/due_date_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationMuteRule", + "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationDueDateRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -7994,17 +8221,17 @@ public ApiResponse deleteSecurityFindingsAutomationMuteRuleWithHttpInfo(UU } /** - * Delete a mute rule. + * Delete a due date rule. * - *

See {@link #deleteSecurityFindingsAutomationMuteRuleWithHttpInfo}. + *

See {@link #deleteSecurityFindingsAutomationDueDateRuleWithHttpInfo}. * - * @param ruleId The ID of the mute rule. (required) + * @param ruleId The ID of the due date rule. (required) * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> - deleteSecurityFindingsAutomationMuteRuleWithHttpInfoAsync(UUID ruleId) { + deleteSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync(UUID ruleId) { // Check if unstable operation is enabled - String operationId = "deleteSecurityFindingsAutomationMuteRule"; + String operationId = "deleteSecurityFindingsAutomationDueDateRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -8022,12 +8249,12 @@ public ApiResponse deleteSecurityFindingsAutomationMuteRuleWithHttpInfo(UU new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " deleteSecurityFindingsAutomationMuteRule")); + + " deleteSecurityFindingsAutomationDueDateRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/mute_rules/{rule_id}" + "/api/v2/security/findings/automation/due_date_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -8036,7 +8263,7 @@ public ApiResponse deleteSecurityFindingsAutomationMuteRuleWithHttpInfo(UU try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationMuteRule", + "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationDueDateRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -8060,29 +8287,27 @@ public ApiResponse deleteSecurityFindingsAutomationMuteRuleWithHttpInfo(UU } /** - * Delete a severity modifier rule. + * Delete an inbox rule. * - *

See {@link #deleteSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo}. + *

See {@link #deleteSecurityFindingsAutomationInboxRuleWithHttpInfo}. * - * @param ruleId The ID of the severity modifier rule. (required) + * @param ruleId The ID of the inbox rule. (required) * @throws ApiException if fails to make API call */ - public void deleteSecurityFindingsAutomationSeverityModifierRule(UUID ruleId) - throws ApiException { - deleteSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo(ruleId); + public void deleteSecurityFindingsAutomationInboxRule(UUID ruleId) throws ApiException { + deleteSecurityFindingsAutomationInboxRuleWithHttpInfo(ruleId); } /** - * Delete a severity modifier rule. + * Delete an inbox rule. * - *

See {@link #deleteSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync}. + *

See {@link #deleteSecurityFindingsAutomationInboxRuleWithHttpInfoAsync}. * - * @param ruleId The ID of the severity modifier rule. (required) + * @param ruleId The ID of the inbox rule. (required) * @return CompletableFuture */ - public CompletableFuture deleteSecurityFindingsAutomationSeverityModifierRuleAsync( - UUID ruleId) { - return deleteSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync(ruleId) + public CompletableFuture deleteSecurityFindingsAutomationInboxRuleAsync(UUID ruleId) { + return deleteSecurityFindingsAutomationInboxRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -8090,26 +8315,25 @@ public CompletableFuture deleteSecurityFindingsAutomationSeverityModifierR } /** - * Delete a severity modifier rule by ID. + * Delete an inbox rule by ID. * - * @param ruleId The ID of the severity modifier rule. (required) + * @param ruleId The ID of the inbox rule. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * - * * *
Response details
Status Code Description Response Headers
204 Successfully deleted the severity modifier rule -
204 Successfully deleted the inbox rule -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
429 Too many requests -
*/ - public ApiResponse deleteSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo( - UUID ruleId) throws ApiException { + public ApiResponse deleteSecurityFindingsAutomationInboxRuleWithHttpInfo(UUID ruleId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteSecurityFindingsAutomationSeverityModifierRule"; + String operationId = "deleteSecurityFindingsAutomationInboxRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -8122,18 +8346,18 @@ public ApiResponse deleteSecurityFindingsAutomationSeverityModifierRuleWit throw new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " deleteSecurityFindingsAutomationSeverityModifierRule"); + + " deleteSecurityFindingsAutomationInboxRule"); } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/severity_modifier_rules/{rule_id}" + "/api/v2/security/findings/automation/inbox_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationSeverityModifierRule", + "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationInboxRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -8152,17 +8376,17 @@ public ApiResponse deleteSecurityFindingsAutomationSeverityModifierRuleWit } /** - * Delete a severity modifier rule. + * Delete an inbox rule. * - *

See {@link #deleteSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo}. + *

See {@link #deleteSecurityFindingsAutomationInboxRuleWithHttpInfo}. * - * @param ruleId The ID of the severity modifier rule. (required) + * @param ruleId The ID of the inbox rule. (required) * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> - deleteSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync(UUID ruleId) { + deleteSecurityFindingsAutomationInboxRuleWithHttpInfoAsync(UUID ruleId) { // Check if unstable operation is enabled - String operationId = "deleteSecurityFindingsAutomationSeverityModifierRule"; + String operationId = "deleteSecurityFindingsAutomationInboxRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -8180,12 +8404,12 @@ public ApiResponse deleteSecurityFindingsAutomationSeverityModifierRuleWit new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " deleteSecurityFindingsAutomationSeverityModifierRule")); + + " deleteSecurityFindingsAutomationInboxRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/severity_modifier_rules/{rule_id}" + "/api/v2/security/findings/automation/inbox_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -8194,7 +8418,7 @@ public ApiResponse deleteSecurityFindingsAutomationSeverityModifierRuleWit try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationSeverityModifierRule", + "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationInboxRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -8218,28 +8442,27 @@ public ApiResponse deleteSecurityFindingsAutomationSeverityModifierRuleWit } /** - * Delete a ticket creation rule. + * Delete a mute rule. * - *

See {@link #deleteSecurityFindingsAutomationTicketCreationRuleWithHttpInfo}. + *

See {@link #deleteSecurityFindingsAutomationMuteRuleWithHttpInfo}. * - * @param ruleId The ID of the ticket creation rule. (required) + * @param ruleId The ID of the mute rule. (required) * @throws ApiException if fails to make API call */ - public void deleteSecurityFindingsAutomationTicketCreationRule(UUID ruleId) throws ApiException { - deleteSecurityFindingsAutomationTicketCreationRuleWithHttpInfo(ruleId); + public void deleteSecurityFindingsAutomationMuteRule(UUID ruleId) throws ApiException { + deleteSecurityFindingsAutomationMuteRuleWithHttpInfo(ruleId); } /** - * Delete a ticket creation rule. + * Delete a mute rule. * - *

See {@link #deleteSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync}. + *

See {@link #deleteSecurityFindingsAutomationMuteRuleWithHttpInfoAsync}. * - * @param ruleId The ID of the ticket creation rule. (required) + * @param ruleId The ID of the mute rule. (required) * @return CompletableFuture */ - public CompletableFuture deleteSecurityFindingsAutomationTicketCreationRuleAsync( - UUID ruleId) { - return deleteSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync(ruleId) + public CompletableFuture deleteSecurityFindingsAutomationMuteRuleAsync(UUID ruleId) { + return deleteSecurityFindingsAutomationMuteRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -8247,25 +8470,25 @@ public CompletableFuture deleteSecurityFindingsAutomationTicketCreationRul } /** - * Delete a ticket creation rule by ID. + * Delete a mute rule by ID. * - * @param ruleId The ID of the ticket creation rule. (required) + * @param ruleId The ID of the mute rule. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * *
Response details
Status Code Description Response Headers
204 Successfully deleted the ticket creation rule -
204 Successfully deleted the mute rule -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse deleteSecurityFindingsAutomationTicketCreationRuleWithHttpInfo( - UUID ruleId) throws ApiException { + public ApiResponse deleteSecurityFindingsAutomationMuteRuleWithHttpInfo(UUID ruleId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteSecurityFindingsAutomationTicketCreationRule"; + String operationId = "deleteSecurityFindingsAutomationMuteRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -8278,18 +8501,18 @@ public ApiResponse deleteSecurityFindingsAutomationTicketCreationRuleWithH throw new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " deleteSecurityFindingsAutomationTicketCreationRule"); + + " deleteSecurityFindingsAutomationMuteRule"); } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/ticket_creation_rules/{rule_id}" + "/api/v2/security/findings/automation/mute_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationTicketCreationRule", + "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationMuteRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -8308,17 +8531,17 @@ public ApiResponse deleteSecurityFindingsAutomationTicketCreationRuleWithH } /** - * Delete a ticket creation rule. + * Delete a mute rule. * - *

See {@link #deleteSecurityFindingsAutomationTicketCreationRuleWithHttpInfo}. + *

See {@link #deleteSecurityFindingsAutomationMuteRuleWithHttpInfo}. * - * @param ruleId The ID of the ticket creation rule. (required) + * @param ruleId The ID of the mute rule. (required) * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> - deleteSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync(UUID ruleId) { + deleteSecurityFindingsAutomationMuteRuleWithHttpInfoAsync(UUID ruleId) { // Check if unstable operation is enabled - String operationId = "deleteSecurityFindingsAutomationTicketCreationRule"; + String operationId = "deleteSecurityFindingsAutomationMuteRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -8336,12 +8559,12 @@ public ApiResponse deleteSecurityFindingsAutomationTicketCreationRuleWithH new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " deleteSecurityFindingsAutomationTicketCreationRule")); + + " deleteSecurityFindingsAutomationMuteRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/ticket_creation_rules/{rule_id}" + "/api/v2/security/findings/automation/mute_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -8350,7 +8573,7 @@ public ApiResponse deleteSecurityFindingsAutomationTicketCreationRuleWithH try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationTicketCreationRule", + "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationMuteRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -8374,28 +8597,29 @@ public ApiResponse deleteSecurityFindingsAutomationTicketCreationRuleWithH } /** - * Delete a critical asset. + * Delete a severity modifier rule. * - *

See {@link #deleteSecurityMonitoringCriticalAssetWithHttpInfo}. + *

See {@link #deleteSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo}. * - * @param criticalAssetId The ID of the critical asset. (required) + * @param ruleId The ID of the severity modifier rule. (required) * @throws ApiException if fails to make API call */ - public void deleteSecurityMonitoringCriticalAsset(String criticalAssetId) throws ApiException { - deleteSecurityMonitoringCriticalAssetWithHttpInfo(criticalAssetId); + public void deleteSecurityFindingsAutomationSeverityModifierRule(UUID ruleId) + throws ApiException { + deleteSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo(ruleId); } /** - * Delete a critical asset. + * Delete a severity modifier rule. * - *

See {@link #deleteSecurityMonitoringCriticalAssetWithHttpInfoAsync}. + *

See {@link #deleteSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync}. * - * @param criticalAssetId The ID of the critical asset. (required) + * @param ruleId The ID of the severity modifier rule. (required) * @return CompletableFuture */ - public CompletableFuture deleteSecurityMonitoringCriticalAssetAsync( - String criticalAssetId) { - return deleteSecurityMonitoringCriticalAssetWithHttpInfoAsync(criticalAssetId) + public CompletableFuture deleteSecurityFindingsAutomationSeverityModifierRuleAsync( + UUID ruleId) { + return deleteSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -8403,44 +8627,50 @@ public CompletableFuture deleteSecurityMonitoringCriticalAssetAsync( } /** - * Delete a specific critical asset. + * Delete a severity modifier rule by ID. * - * @param criticalAssetId The ID of the critical asset. (required) + * @param ruleId The ID of the severity modifier rule. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * * + * * *
Response details
Status Code Description Response Headers
204 OK -
403 Not Authorized -
204 Successfully deleted the severity modifier rule -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
429 Too many requests -
*/ - public ApiResponse deleteSecurityMonitoringCriticalAssetWithHttpInfo(String criticalAssetId) - throws ApiException { + public ApiResponse deleteSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo( + UUID ruleId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteSecurityFindingsAutomationSeverityModifierRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; - // verify the required parameter 'criticalAssetId' is set - if (criticalAssetId == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( 400, - "Missing the required parameter 'criticalAssetId' when calling" - + " deleteSecurityMonitoringCriticalAsset"); + "Missing the required parameter 'ruleId' when calling" + + " deleteSecurityFindingsAutomationSeverityModifierRule"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/critical_assets/{critical_asset_id}" - .replaceAll( - "\\{" + "critical_asset_id" + "\\}", - apiClient.escapeString(criticalAssetId.toString())); + "/api/v2/security/findings/automation/severity_modifier_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityMonitoringCriticalAsset", + "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationSeverityModifierRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -8459,33 +8689,41 @@ public ApiResponse deleteSecurityMonitoringCriticalAssetWithHttpInfo(Strin } /** - * Delete a critical asset. + * Delete a severity modifier rule. * - *

See {@link #deleteSecurityMonitoringCriticalAssetWithHttpInfo}. + *

See {@link #deleteSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo}. * - * @param criticalAssetId The ID of the critical asset. (required) + * @param ruleId The ID of the severity modifier rule. (required) * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> - deleteSecurityMonitoringCriticalAssetWithHttpInfoAsync(String criticalAssetId) { + deleteSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync(UUID ruleId) { + // Check if unstable operation is enabled + String operationId = "deleteSecurityFindingsAutomationSeverityModifierRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; - // verify the required parameter 'criticalAssetId' is set - if (criticalAssetId == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'criticalAssetId' when calling" - + " deleteSecurityMonitoringCriticalAsset")); + "Missing the required parameter 'ruleId' when calling" + + " deleteSecurityFindingsAutomationSeverityModifierRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/critical_assets/{critical_asset_id}" - .replaceAll( - "\\{" + "critical_asset_id" + "\\}", - apiClient.escapeString(criticalAssetId.toString())); + "/api/v2/security/findings/automation/severity_modifier_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -8493,7 +8731,7 @@ public ApiResponse deleteSecurityMonitoringCriticalAssetWithHttpInfo(Strin try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityMonitoringCriticalAsset", + "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationSeverityModifierRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -8517,27 +8755,28 @@ public ApiResponse deleteSecurityMonitoringCriticalAssetWithHttpInfo(Strin } /** - * Delete a dataset. + * Delete a ticket creation rule. * - *

See {@link #deleteSecurityMonitoringDatasetWithHttpInfo}. + *

See {@link #deleteSecurityFindingsAutomationTicketCreationRuleWithHttpInfo}. * - * @param datasetId The UUID of the dataset. (required) + * @param ruleId The ID of the ticket creation rule. (required) * @throws ApiException if fails to make API call */ - public void deleteSecurityMonitoringDataset(String datasetId) throws ApiException { - deleteSecurityMonitoringDatasetWithHttpInfo(datasetId); + public void deleteSecurityFindingsAutomationTicketCreationRule(UUID ruleId) throws ApiException { + deleteSecurityFindingsAutomationTicketCreationRuleWithHttpInfo(ruleId); } /** - * Delete a dataset. + * Delete a ticket creation rule. * - *

See {@link #deleteSecurityMonitoringDatasetWithHttpInfoAsync}. + *

See {@link #deleteSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync}. * - * @param datasetId The UUID of the dataset. (required) + * @param ruleId The ID of the ticket creation rule. (required) * @return CompletableFuture */ - public CompletableFuture deleteSecurityMonitoringDatasetAsync(String datasetId) { - return deleteSecurityMonitoringDatasetWithHttpInfoAsync(datasetId) + public CompletableFuture deleteSecurityFindingsAutomationTicketCreationRuleAsync( + UUID ruleId) { + return deleteSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -8545,27 +8784,25 @@ public CompletableFuture deleteSecurityMonitoringDatasetAsync(String datas } /** - * Delete a Cloud SIEM dataset. Out-of-the-box datasets cannot be deleted and deleting a dataset - * that is referenced by a detection rule is rejected. + * Delete a ticket creation rule by ID. * - * @param datasetId The UUID of the dataset. (required) + * @param ruleId The ID of the ticket creation rule. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * * * * *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
204 Successfully deleted the ticket creation rule -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse deleteSecurityMonitoringDatasetWithHttpInfo(String datasetId) - throws ApiException { + public ApiResponse deleteSecurityFindingsAutomationTicketCreationRuleWithHttpInfo( + UUID ruleId) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteSecurityMonitoringDataset"; + String operationId = "deleteSecurityFindingsAutomationTicketCreationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -8573,23 +8810,23 @@ public ApiResponse deleteSecurityMonitoringDatasetWithHttpInfo(String data } Object localVarPostBody = null; - // verify the required parameter 'datasetId' is set - if (datasetId == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( 400, - "Missing the required parameter 'datasetId' when calling" - + " deleteSecurityMonitoringDataset"); + "Missing the required parameter 'ruleId' when calling" + + " deleteSecurityFindingsAutomationTicketCreationRule"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/datasets/{dataset_id}" - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/security/findings/automation/ticket_creation_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityMonitoringDataset", + "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationTicketCreationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -8608,17 +8845,17 @@ public ApiResponse deleteSecurityMonitoringDatasetWithHttpInfo(String data } /** - * Delete a dataset. + * Delete a ticket creation rule. * - *

See {@link #deleteSecurityMonitoringDatasetWithHttpInfo}. + *

See {@link #deleteSecurityFindingsAutomationTicketCreationRuleWithHttpInfo}. * - * @param datasetId The UUID of the dataset. (required) + * @param ruleId The ID of the ticket creation rule. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteSecurityMonitoringDatasetWithHttpInfoAsync( - String datasetId) { + public CompletableFuture> + deleteSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync(UUID ruleId) { // Check if unstable operation is enabled - String operationId = "deleteSecurityMonitoringDataset"; + String operationId = "deleteSecurityFindingsAutomationTicketCreationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -8629,20 +8866,20 @@ public CompletableFuture> deleteSecurityMonitoringDatasetWithH } Object localVarPostBody = null; - // verify the required parameter 'datasetId' is set - if (datasetId == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'datasetId' when calling" - + " deleteSecurityMonitoringDataset")); + "Missing the required parameter 'ruleId' when calling" + + " deleteSecurityFindingsAutomationTicketCreationRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/datasets/{dataset_id}" - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/security/findings/automation/ticket_creation_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -8650,7 +8887,7 @@ public CompletableFuture> deleteSecurityMonitoringDatasetWithH try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityMonitoringDataset", + "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationTicketCreationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -8674,29 +8911,27 @@ public CompletableFuture> deleteSecurityMonitoringDatasetWithH } /** - * Delete an entity context sync configuration. + * Delete a batch migration. * - *

See {@link #deleteSecurityMonitoringIntegrationConfigWithHttpInfo}. + *

See {@link #deleteSecurityMonitoringBatchMigrationWithHttpInfo}. * - * @param integrationConfigId The ID of the entity context sync configuration. (required) + * @param batchId The UUID of the batch migration. (required) * @throws ApiException if fails to make API call */ - public void deleteSecurityMonitoringIntegrationConfig(String integrationConfigId) - throws ApiException { - deleteSecurityMonitoringIntegrationConfigWithHttpInfo(integrationConfigId); + public void deleteSecurityMonitoringBatchMigration(UUID batchId) throws ApiException { + deleteSecurityMonitoringBatchMigrationWithHttpInfo(batchId); } /** - * Delete an entity context sync configuration. + * Delete a batch migration. * - *

See {@link #deleteSecurityMonitoringIntegrationConfigWithHttpInfoAsync}. + *

See {@link #deleteSecurityMonitoringBatchMigrationWithHttpInfoAsync}. * - * @param integrationConfigId The ID of the entity context sync configuration. (required) + * @param batchId The UUID of the batch migration. (required) * @return CompletableFuture */ - public CompletableFuture deleteSecurityMonitoringIntegrationConfigAsync( - String integrationConfigId) { - return deleteSecurityMonitoringIntegrationConfigWithHttpInfoAsync(integrationConfigId) + public CompletableFuture deleteSecurityMonitoringBatchMigrationAsync(UUID batchId) { + return deleteSecurityMonitoringBatchMigrationWithHttpInfoAsync(batchId) .thenApply( response -> { return response.getData(); @@ -8704,26 +8939,31 @@ public CompletableFuture deleteSecurityMonitoringIntegrationConfigAsync( } /** - * Delete an entity context sync configuration. Cloud SIEM stops ingesting entities from this - * source, and the credentials stored for the configuration are removed from the secrets store. + * Delete a batch migration and its resources. Detection rules that were already published are not + * deleted. Returns 409 Conflict while any resource is in_progress or + * publishing: cancel the batch migration, or wait for publishing to finish, and then + * try again. * - * @param integrationConfigId The ID of the entity context sync configuration. (required) + * @param batchId The UUID of the batch migration. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * + * + * * + * * *
Response details
Status Code Description Response Headers
204 OK -
403 Not Authorized -
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too many requests -
*/ - public ApiResponse deleteSecurityMonitoringIntegrationConfigWithHttpInfo( - String integrationConfigId) throws ApiException { + public ApiResponse deleteSecurityMonitoringBatchMigrationWithHttpInfo(UUID batchId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteSecurityMonitoringIntegrationConfig"; + String operationId = "deleteSecurityMonitoringBatchMigration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -8731,25 +8971,23 @@ public ApiResponse deleteSecurityMonitoringIntegrationConfigWithHttpInfo( } Object localVarPostBody = null; - // verify the required parameter 'integrationConfigId' is set - if (integrationConfigId == null) { + // verify the required parameter 'batchId' is set + if (batchId == null) { throw new ApiException( 400, - "Missing the required parameter 'integrationConfigId' when calling" - + " deleteSecurityMonitoringIntegrationConfig"); + "Missing the required parameter 'batchId' when calling" + + " deleteSecurityMonitoringBatchMigration"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/integration_config/{integration_config_id}" - .replaceAll( - "\\{" + "integration_config_id" + "\\}", - apiClient.escapeString(integrationConfigId.toString())); + "/api/v2/security_monitoring/batch-migrations/{batch_id}" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityMonitoringIntegrationConfig", + "v2.SecurityMonitoringApi.deleteSecurityMonitoringBatchMigration", localVarPath, new ArrayList(), localVarHeaderParams, @@ -8768,17 +9006,17 @@ public ApiResponse deleteSecurityMonitoringIntegrationConfigWithHttpInfo( } /** - * Delete an entity context sync configuration. + * Delete a batch migration. * - *

See {@link #deleteSecurityMonitoringIntegrationConfigWithHttpInfo}. + *

See {@link #deleteSecurityMonitoringBatchMigrationWithHttpInfo}. * - * @param integrationConfigId The ID of the entity context sync configuration. (required) + * @param batchId The UUID of the batch migration. (required) * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> - deleteSecurityMonitoringIntegrationConfigWithHttpInfoAsync(String integrationConfigId) { + deleteSecurityMonitoringBatchMigrationWithHttpInfoAsync(UUID batchId) { // Check if unstable operation is enabled - String operationId = "deleteSecurityMonitoringIntegrationConfig"; + String operationId = "deleteSecurityMonitoringBatchMigration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -8789,22 +9027,20 @@ public ApiResponse deleteSecurityMonitoringIntegrationConfigWithHttpInfo( } Object localVarPostBody = null; - // verify the required parameter 'integrationConfigId' is set - if (integrationConfigId == null) { + // verify the required parameter 'batchId' is set + if (batchId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'integrationConfigId' when calling" - + " deleteSecurityMonitoringIntegrationConfig")); + "Missing the required parameter 'batchId' when calling" + + " deleteSecurityMonitoringBatchMigration")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/integration_config/{integration_config_id}" - .replaceAll( - "\\{" + "integration_config_id" + "\\}", - apiClient.escapeString(integrationConfigId.toString())); + "/api/v2/security_monitoring/batch-migrations/{batch_id}" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); Map localVarHeaderParams = new HashMap(); @@ -8812,7 +9048,7 @@ public ApiResponse deleteSecurityMonitoringIntegrationConfigWithHttpInfo( try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityMonitoringIntegrationConfig", + "v2.SecurityMonitoringApi.deleteSecurityMonitoringBatchMigration", localVarPath, new ArrayList(), localVarHeaderParams, @@ -8836,27 +9072,32 @@ public ApiResponse deleteSecurityMonitoringIntegrationConfigWithHttpInfo( } /** - * Delete an existing rule. + * Delete resources from a batch migration. * - *

See {@link #deleteSecurityMonitoringRuleWithHttpInfo}. + *

See {@link #deleteSecurityMonitoringBatchMigrationResourcesWithHttpInfo}. * - * @param ruleId The ID of the rule. (required) + * @param batchId The UUID of the batch migration. (required) + * @param body (required) * @throws ApiException if fails to make API call */ - public void deleteSecurityMonitoringRule(String ruleId) throws ApiException { - deleteSecurityMonitoringRuleWithHttpInfo(ruleId); + public void deleteSecurityMonitoringBatchMigrationResources( + UUID batchId, SecurityMonitoringBatchMigrationResourcesDeleteRequest body) + throws ApiException { + deleteSecurityMonitoringBatchMigrationResourcesWithHttpInfo(batchId, body); } /** - * Delete an existing rule. + * Delete resources from a batch migration. * - *

See {@link #deleteSecurityMonitoringRuleWithHttpInfoAsync}. + *

See {@link #deleteSecurityMonitoringBatchMigrationResourcesWithHttpInfoAsync}. * - * @param ruleId The ID of the rule. (required) + * @param batchId The UUID of the batch migration. (required) + * @param body (required) * @return CompletableFuture */ - public CompletableFuture deleteSecurityMonitoringRuleAsync(String ruleId) { - return deleteSecurityMonitoringRuleWithHttpInfoAsync(ruleId) + public CompletableFuture deleteSecurityMonitoringBatchMigrationResourcesAsync( + UUID batchId, SecurityMonitoringBatchMigrationResourcesDeleteRequest body) { + return deleteSecurityMonitoringBatchMigrationResourcesWithHttpInfoAsync(batchId, body) .thenApply( response -> { return response.getData(); @@ -8864,40 +9105,66 @@ public CompletableFuture deleteSecurityMonitoringRuleAsync(String ruleId) } /** - * Delete an existing rule. Default rules cannot be deleted. + * Delete resources from a batch migration. The request is all-or-nothing: it returns + * 404 Not Found if any resource does not exist, and 409 Conflict if any + * resource is in_progress or publishing. In both cases nothing is + * deleted. Duplicate resource IDs are ignored. Detection rules already published from the deleted + * resources are not deleted. * - * @param ruleId The ID of the rule. (required) + * @param batchId The UUID of the batch migration. (required) + * @param body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * + * + * * + * * *
Response details
Status Code Description Response Headers
204 OK -
403 Not Authorized -
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too many requests -
*/ - public ApiResponse deleteSecurityMonitoringRuleWithHttpInfo(String ruleId) + public ApiResponse deleteSecurityMonitoringBatchMigrationResourcesWithHttpInfo( + UUID batchId, SecurityMonitoringBatchMigrationResourcesDeleteRequest body) throws ApiException { - Object localVarPostBody = null; + // Check if unstable operation is enabled + String operationId = "deleteSecurityMonitoringBatchMigrationResources"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'batchId' is set + if (batchId == null) { throw new ApiException( - 400, "Missing the required parameter 'ruleId' when calling deleteSecurityMonitoringRule"); + 400, + "Missing the required parameter 'batchId' when calling" + + " deleteSecurityMonitoringBatchMigrationResources"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " deleteSecurityMonitoringBatchMigrationResources"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/batch-migrations/{batch_id}/resources" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityMonitoringRule", + "v2.SecurityMonitoringApi.deleteSecurityMonitoringBatchMigrationResources", localVarPath, new ArrayList(), localVarHeaderParams, @@ -8908,7 +9175,7 @@ public ApiResponse deleteSecurityMonitoringRuleWithHttpInfo(String ruleId) "DELETE", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, @@ -8916,30 +9183,54 @@ public ApiResponse deleteSecurityMonitoringRuleWithHttpInfo(String ruleId) } /** - * Delete an existing rule. + * Delete resources from a batch migration. * - *

See {@link #deleteSecurityMonitoringRuleWithHttpInfo}. + *

See {@link #deleteSecurityMonitoringBatchMigrationResourcesWithHttpInfo}. * - * @param ruleId The ID of the rule. (required) + * @param batchId The UUID of the batch migration. (required) + * @param body (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteSecurityMonitoringRuleWithHttpInfoAsync( - String ruleId) { - Object localVarPostBody = null; + public CompletableFuture> + deleteSecurityMonitoringBatchMigrationResourcesWithHttpInfoAsync( + UUID batchId, SecurityMonitoringBatchMigrationResourcesDeleteRequest body) { + // Check if unstable operation is enabled + String operationId = "deleteSecurityMonitoringBatchMigrationResources"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'batchId' is set + if (batchId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'ruleId' when calling deleteSecurityMonitoringRule")); + "Missing the required parameter 'batchId' when calling" + + " deleteSecurityMonitoringBatchMigrationResources")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " deleteSecurityMonitoringBatchMigrationResources")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/batch-migrations/{batch_id}/resources" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); Map localVarHeaderParams = new HashMap(); @@ -8947,7 +9238,7 @@ public CompletableFuture> deleteSecurityMonitoringRuleWithHttp try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityMonitoringRule", + "v2.SecurityMonitoringApi.deleteSecurityMonitoringBatchMigrationResources", localVarPath, new ArrayList(), localVarHeaderParams, @@ -8963,7 +9254,7 @@ public CompletableFuture> deleteSecurityMonitoringRuleWithHttp "DELETE", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, @@ -8971,27 +9262,28 @@ public CompletableFuture> deleteSecurityMonitoringRuleWithHttp } /** - * Delete a suppression rule. + * Delete a critical asset. * - *

See {@link #deleteSecurityMonitoringSuppressionWithHttpInfo}. + *

See {@link #deleteSecurityMonitoringCriticalAssetWithHttpInfo}. * - * @param suppressionId The ID of the suppression rule (required) + * @param criticalAssetId The ID of the critical asset. (required) * @throws ApiException if fails to make API call */ - public void deleteSecurityMonitoringSuppression(String suppressionId) throws ApiException { - deleteSecurityMonitoringSuppressionWithHttpInfo(suppressionId); + public void deleteSecurityMonitoringCriticalAsset(String criticalAssetId) throws ApiException { + deleteSecurityMonitoringCriticalAssetWithHttpInfo(criticalAssetId); } /** - * Delete a suppression rule. + * Delete a critical asset. * - *

See {@link #deleteSecurityMonitoringSuppressionWithHttpInfoAsync}. + *

See {@link #deleteSecurityMonitoringCriticalAssetWithHttpInfoAsync}. * - * @param suppressionId The ID of the suppression rule (required) + * @param criticalAssetId The ID of the critical asset. (required) * @return CompletableFuture */ - public CompletableFuture deleteSecurityMonitoringSuppressionAsync(String suppressionId) { - return deleteSecurityMonitoringSuppressionWithHttpInfoAsync(suppressionId) + public CompletableFuture deleteSecurityMonitoringCriticalAssetAsync( + String criticalAssetId) { + return deleteSecurityMonitoringCriticalAssetWithHttpInfoAsync(criticalAssetId) .thenApply( response -> { return response.getData(); @@ -8999,9 +9291,9 @@ public CompletableFuture deleteSecurityMonitoringSuppressionAsync(String s } /** - * Delete a specific suppression rule. + * Delete a specific critical asset. * - * @param suppressionId The ID of the suppression rule (required) + * @param criticalAssetId The ID of the critical asset. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details @@ -9014,28 +9306,29 @@ public CompletableFuture deleteSecurityMonitoringSuppressionAsync(String s * 429 Too many requests - * */ - public ApiResponse deleteSecurityMonitoringSuppressionWithHttpInfo(String suppressionId) + public ApiResponse deleteSecurityMonitoringCriticalAssetWithHttpInfo(String criticalAssetId) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'suppressionId' is set - if (suppressionId == null) { + // verify the required parameter 'criticalAssetId' is set + if (criticalAssetId == null) { throw new ApiException( 400, - "Missing the required parameter 'suppressionId' when calling" - + " deleteSecurityMonitoringSuppression"); + "Missing the required parameter 'criticalAssetId' when calling" + + " deleteSecurityMonitoringCriticalAsset"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/suppressions/{suppression_id}" + "/api/v2/security_monitoring/configuration/critical_assets/{critical_asset_id}" .replaceAll( - "\\{" + "suppression_id" + "\\}", apiClient.escapeString(suppressionId.toString())); + "\\{" + "critical_asset_id" + "\\}", + apiClient.escapeString(criticalAssetId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityMonitoringSuppression", + "v2.SecurityMonitoringApi.deleteSecurityMonitoringCriticalAsset", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9054,32 +9347,33 @@ public ApiResponse deleteSecurityMonitoringSuppressionWithHttpInfo(String } /** - * Delete a suppression rule. + * Delete a critical asset. * - *

See {@link #deleteSecurityMonitoringSuppressionWithHttpInfo}. + *

See {@link #deleteSecurityMonitoringCriticalAssetWithHttpInfo}. * - * @param suppressionId The ID of the suppression rule (required) + * @param criticalAssetId The ID of the critical asset. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteSecurityMonitoringSuppressionWithHttpInfoAsync( - String suppressionId) { + public CompletableFuture> + deleteSecurityMonitoringCriticalAssetWithHttpInfoAsync(String criticalAssetId) { Object localVarPostBody = null; - // verify the required parameter 'suppressionId' is set - if (suppressionId == null) { + // verify the required parameter 'criticalAssetId' is set + if (criticalAssetId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'suppressionId' when calling" - + " deleteSecurityMonitoringSuppression")); + "Missing the required parameter 'criticalAssetId' when calling" + + " deleteSecurityMonitoringCriticalAsset")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/suppressions/{suppression_id}" + "/api/v2/security_monitoring/configuration/critical_assets/{critical_asset_id}" .replaceAll( - "\\{" + "suppression_id" + "\\}", apiClient.escapeString(suppressionId.toString())); + "\\{" + "critical_asset_id" + "\\}", + apiClient.escapeString(criticalAssetId.toString())); Map localVarHeaderParams = new HashMap(); @@ -9087,7 +9381,7 @@ public CompletableFuture> deleteSecurityMonitoringSuppressionW try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSecurityMonitoringSuppression", + "v2.SecurityMonitoringApi.deleteSecurityMonitoringCriticalAsset", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9111,27 +9405,27 @@ public CompletableFuture> deleteSecurityMonitoringSuppressionW } /** - * Delete a signal-based notification rule. + * Delete a dataset. * - *

See {@link #deleteSignalNotificationRuleWithHttpInfo}. + *

See {@link #deleteSecurityMonitoringDatasetWithHttpInfo}. * - * @param id ID of the notification rule. (required) + * @param datasetId The UUID of the dataset. (required) * @throws ApiException if fails to make API call */ - public void deleteSignalNotificationRule(String id) throws ApiException { - deleteSignalNotificationRuleWithHttpInfo(id); + public void deleteSecurityMonitoringDataset(String datasetId) throws ApiException { + deleteSecurityMonitoringDatasetWithHttpInfo(datasetId); } /** - * Delete a signal-based notification rule. + * Delete a dataset. * - *

See {@link #deleteSignalNotificationRuleWithHttpInfoAsync}. + *

See {@link #deleteSecurityMonitoringDatasetWithHttpInfoAsync}. * - * @param id ID of the notification rule. (required) + * @param datasetId The UUID of the dataset. (required) * @return CompletableFuture */ - public CompletableFuture deleteSignalNotificationRuleAsync(String id) { - return deleteSignalNotificationRuleWithHttpInfoAsync(id) + public CompletableFuture deleteSecurityMonitoringDatasetAsync(String datasetId) { + return deleteSecurityMonitoringDatasetWithHttpInfoAsync(datasetId) .thenApply( response -> { return response.getData(); @@ -9139,39 +9433,51 @@ public CompletableFuture deleteSignalNotificationRuleAsync(String id) { } /** - * Delete a notification rule for security signals. + * Delete a Cloud SIEM dataset. Out-of-the-box datasets cannot be deleted and deleting a dataset + * that is referenced by a detection rule is rejected. * - * @param id ID of the notification rule. (required) + * @param datasetId The UUID of the dataset. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * + * * * * *
Response details
Status Code Description Response Headers
204 Rule successfully deleted. -
204 No Content -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse deleteSignalNotificationRuleWithHttpInfo(String id) throws ApiException { + public ApiResponse deleteSecurityMonitoringDatasetWithHttpInfo(String datasetId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteSecurityMonitoringDataset"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; - // verify the required parameter 'id' is set - if (id == null) { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { throw new ApiException( - 400, "Missing the required parameter 'id' when calling deleteSignalNotificationRule"); + 400, + "Missing the required parameter 'datasetId' when calling" + + " deleteSecurityMonitoringDataset"); } // create path and map variables String localVarPath = - "/api/v2/security/signals/notification_rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/security_monitoring/datasets/{dataset_id}" + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSignalNotificationRule", + "v2.SecurityMonitoringApi.deleteSecurityMonitoringDataset", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9190,30 +9496,41 @@ public ApiResponse deleteSignalNotificationRuleWithHttpInfo(String id) thr } /** - * Delete a signal-based notification rule. + * Delete a dataset. * - *

See {@link #deleteSignalNotificationRuleWithHttpInfo}. + *

See {@link #deleteSecurityMonitoringDatasetWithHttpInfo}. * - * @param id ID of the notification rule. (required) + * @param datasetId The UUID of the dataset. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteSignalNotificationRuleWithHttpInfoAsync( - String id) { + public CompletableFuture> deleteSecurityMonitoringDatasetWithHttpInfoAsync( + String datasetId) { + // Check if unstable operation is enabled + String operationId = "deleteSecurityMonitoringDataset"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; - // verify the required parameter 'id' is set - if (id == null) { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'id' when calling deleteSignalNotificationRule")); + "Missing the required parameter 'datasetId' when calling" + + " deleteSecurityMonitoringDataset")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/signals/notification_rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/security_monitoring/datasets/{dataset_id}" + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); Map localVarHeaderParams = new HashMap(); @@ -9221,7 +9538,7 @@ public CompletableFuture> deleteSignalNotificationRuleWithHttp try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteSignalNotificationRule", + "v2.SecurityMonitoringApi.deleteSecurityMonitoringDataset", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9245,69 +9562,82 @@ public CompletableFuture> deleteSignalNotificationRuleWithHttp } /** - * Delete a vulnerability-based notification rule. + * Delete an entity context sync configuration. * - *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfo}. + *

See {@link #deleteSecurityMonitoringIntegrationConfigWithHttpInfo}. * - * @param id ID of the notification rule. (required) + * @param integrationConfigId The ID of the entity context sync configuration. (required) * @throws ApiException if fails to make API call */ - public void deleteVulnerabilityNotificationRule(String id) throws ApiException { - deleteVulnerabilityNotificationRuleWithHttpInfo(id); + public void deleteSecurityMonitoringIntegrationConfig(String integrationConfigId) + throws ApiException { + deleteSecurityMonitoringIntegrationConfigWithHttpInfo(integrationConfigId); } /** - * Delete a vulnerability-based notification rule. + * Delete an entity context sync configuration. * - *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfoAsync}. + *

See {@link #deleteSecurityMonitoringIntegrationConfigWithHttpInfoAsync}. * - * @param id ID of the notification rule. (required) + * @param integrationConfigId The ID of the entity context sync configuration. (required) * @return CompletableFuture */ - public CompletableFuture deleteVulnerabilityNotificationRuleAsync(String id) { - return deleteVulnerabilityNotificationRuleWithHttpInfoAsync(id) - .thenApply( + public CompletableFuture deleteSecurityMonitoringIntegrationConfigAsync( + String integrationConfigId) { + return deleteSecurityMonitoringIntegrationConfigWithHttpInfoAsync(integrationConfigId) + .thenApply( response -> { return response.getData(); }); } /** - * Delete a notification rule for security vulnerabilities. + * Delete an entity context sync configuration. Cloud SIEM stops ingesting entities from this + * source, and the credentials stored for the configuration are removed from the secrets store. * - * @param id ID of the notification rule. (required) + * @param integrationConfigId The ID of the entity context sync configuration. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * * * *
Response details
Status Code Description Response Headers
204 Rule successfully deleted. -
403 Forbidden -
204 OK -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse deleteVulnerabilityNotificationRuleWithHttpInfo(String id) - throws ApiException { + public ApiResponse deleteSecurityMonitoringIntegrationConfigWithHttpInfo( + String integrationConfigId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteSecurityMonitoringIntegrationConfig"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; - // verify the required parameter 'id' is set - if (id == null) { + // verify the required parameter 'integrationConfigId' is set + if (integrationConfigId == null) { throw new ApiException( 400, - "Missing the required parameter 'id' when calling deleteVulnerabilityNotificationRule"); + "Missing the required parameter 'integrationConfigId' when calling" + + " deleteSecurityMonitoringIntegrationConfig"); } // create path and map variables String localVarPath = - "/api/v2/security/vulnerabilities/notification_rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/security_monitoring/configuration/integration_config/{integration_config_id}" + .replaceAll( + "\\{" + "integration_config_id" + "\\}", + apiClient.escapeString(integrationConfigId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteVulnerabilityNotificationRule", + "v2.SecurityMonitoringApi.deleteSecurityMonitoringIntegrationConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9326,31 +9656,43 @@ public ApiResponse deleteVulnerabilityNotificationRuleWithHttpInfo(String } /** - * Delete a vulnerability-based notification rule. + * Delete an entity context sync configuration. * - *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfo}. + *

See {@link #deleteSecurityMonitoringIntegrationConfigWithHttpInfo}. * - * @param id ID of the notification rule. (required) + * @param integrationConfigId The ID of the entity context sync configuration. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteVulnerabilityNotificationRuleWithHttpInfoAsync( - String id) { + public CompletableFuture> + deleteSecurityMonitoringIntegrationConfigWithHttpInfoAsync(String integrationConfigId) { + // Check if unstable operation is enabled + String operationId = "deleteSecurityMonitoringIntegrationConfig"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; - // verify the required parameter 'id' is set - if (id == null) { + // verify the required parameter 'integrationConfigId' is set + if (integrationConfigId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'id' when calling" - + " deleteVulnerabilityNotificationRule")); + "Missing the required parameter 'integrationConfigId' when calling" + + " deleteSecurityMonitoringIntegrationConfig")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/vulnerabilities/notification_rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/security_monitoring/configuration/integration_config/{integration_config_id}" + .replaceAll( + "\\{" + "integration_config_id" + "\\}", + apiClient.escapeString(integrationConfigId.toString())); Map localVarHeaderParams = new HashMap(); @@ -9358,7 +9700,7 @@ public CompletableFuture> deleteVulnerabilityNotificationRuleW try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.deleteVulnerabilityNotificationRule", + "v2.SecurityMonitoringApi.deleteSecurityMonitoringIntegrationConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9382,27 +9724,27 @@ public CompletableFuture> deleteVulnerabilityNotificationRuleW } /** - * Detach security findings from their case. + * Delete an existing rule. * - *

See {@link #detachCaseWithHttpInfo}. + *

See {@link #deleteSecurityMonitoringRuleWithHttpInfo}. * - * @param body (required) + * @param ruleId The ID of the rule. (required) * @throws ApiException if fails to make API call */ - public void detachCase(DetachCaseRequest body) throws ApiException { - detachCaseWithHttpInfo(body); + public void deleteSecurityMonitoringRule(String ruleId) throws ApiException { + deleteSecurityMonitoringRuleWithHttpInfo(ruleId); } /** - * Detach security findings from their case. + * Delete an existing rule. * - *

See {@link #detachCaseWithHttpInfoAsync}. + *

See {@link #deleteSecurityMonitoringRuleWithHttpInfoAsync}. * - * @param body (required) + * @param ruleId The ID of the rule. (required) * @return CompletableFuture */ - public CompletableFuture detachCaseAsync(DetachCaseRequest body) { - return detachCaseWithHttpInfoAsync(body) + public CompletableFuture deleteSecurityMonitoringRuleAsync(String ruleId) { + return deleteSecurityMonitoringRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -9410,39 +9752,40 @@ public CompletableFuture detachCaseAsync(DetachCaseRequest body) { } /** - * Detach security findings from their case. This operation dissociates security findings from - * their associated cases without deleting the cases themselves. You can detach security findings - * from multiple different cases in a single request, with a limit of 50 security findings per - * request. Security findings that are not currently attached to any case will be ignored. + * Delete an existing rule. Default rules cannot be deleted. * - * @param body (required) + * @param ruleId The ID of the rule. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * * * *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
204 OK -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse detachCaseWithHttpInfo(DetachCaseRequest body) throws ApiException { - Object localVarPostBody = body; + public ApiResponse deleteSecurityMonitoringRuleWithHttpInfo(String ruleId) + throws ApiException { + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling detachCase"); + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + throw new ApiException( + 400, "Missing the required parameter 'ruleId' when calling deleteSecurityMonitoringRule"); } // create path and map variables - String localVarPath = "/api/v2/security/findings/cases"; + String localVarPath = + "/api/v2/security_monitoring/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.detachCase", + "v2.SecurityMonitoringApi.deleteSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9453,7 +9796,7 @@ public ApiResponse detachCaseWithHttpInfo(DetachCaseRequest body) throws A "DELETE", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, @@ -9461,25 +9804,30 @@ public ApiResponse detachCaseWithHttpInfo(DetachCaseRequest body) throws A } /** - * Detach security findings from their case. + * Delete an existing rule. * - *

See {@link #detachCaseWithHttpInfo}. + *

See {@link #deleteSecurityMonitoringRuleWithHttpInfo}. * - * @param body (required) + * @param ruleId The ID of the rule. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> detachCaseWithHttpInfoAsync(DetachCaseRequest body) { - Object localVarPostBody = body; + public CompletableFuture> deleteSecurityMonitoringRuleWithHttpInfoAsync( + String ruleId) { + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'body' when calling detachCase")); + new ApiException( + 400, + "Missing the required parameter 'ruleId' when calling deleteSecurityMonitoringRule")); return result; } // create path and map variables - String localVarPath = "/api/v2/security/findings/cases"; + String localVarPath = + "/api/v2/security_monitoring/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -9487,7 +9835,7 @@ public CompletableFuture> detachCaseWithHttpInfoAsync(DetachCa try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.detachCase", + "v2.SecurityMonitoringApi.deleteSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9503,7 +9851,7 @@ public CompletableFuture> detachCaseWithHttpInfoAsync(DetachCa "DELETE", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, @@ -9511,42 +9859,27 @@ public CompletableFuture> detachCaseWithHttpInfoAsync(DetachCa } /** - * Disable a default inbox rule. + * Delete a suppression rule. * - *

See {@link #disableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo}. + *

See {@link #deleteSecurityMonitoringSuppressionWithHttpInfo}. * - * @param ruleId The ID of the default inbox rule. Known default rule IDs include: - * identity_risk_default_rule, secret_default_rule, - * library_vulnerability_default_rule, attack_path_default_rule, - * host_and_container_vulnerability_default_rule, - * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule - * , and misconfiguration_default_rule. Datadog can add new default rules - * over time. (required) - * @return DefaultInboxRuleResponse + * @param suppressionId The ID of the suppression rule (required) * @throws ApiException if fails to make API call */ - public DefaultInboxRuleResponse disableSecurityFindingsAutomationDefaultInboxRule(String ruleId) - throws ApiException { - return disableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo(ruleId).getData(); + public void deleteSecurityMonitoringSuppression(String suppressionId) throws ApiException { + deleteSecurityMonitoringSuppressionWithHttpInfo(suppressionId); } /** - * Disable a default inbox rule. + * Delete a suppression rule. * - *

See {@link #disableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync}. + *

See {@link #deleteSecurityMonitoringSuppressionWithHttpInfoAsync}. * - * @param ruleId The ID of the default inbox rule. Known default rule IDs include: - * identity_risk_default_rule, secret_default_rule, - * library_vulnerability_default_rule, attack_path_default_rule, - * host_and_container_vulnerability_default_rule, - * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule - * , and misconfiguration_default_rule. Datadog can add new default rules - * over time. (required) - * @return CompletableFuture<DefaultInboxRuleResponse> + * @param suppressionId The ID of the suppression rule (required) + * @return CompletableFuture */ - public CompletableFuture - disableSecurityFindingsAutomationDefaultInboxRuleAsync(String ruleId) { - return disableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync(ruleId) + public CompletableFuture deleteSecurityMonitoringSuppressionAsync(String suppressionId) { + return deleteSecurityMonitoringSuppressionWithHttpInfoAsync(suppressionId) .thenApply( response -> { return response.getData(); @@ -9554,115 +9887,87 @@ public DefaultInboxRuleResponse disableSecurityFindingsAutomationDefaultInboxRul } /** - * Disable a default inbox rule for the current organization. + * Delete a specific suppression rule. * - * @param ruleId The ID of the default inbox rule. Known default rule IDs include: - * identity_risk_default_rule, secret_default_rule, - * library_vulnerability_default_rule, attack_path_default_rule, - * host_and_container_vulnerability_default_rule, - * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule - * , and misconfiguration_default_rule. Datadog can add new default rules - * over time. (required) - * @return ApiResponse<DefaultInboxRuleResponse> + * @param suppressionId The ID of the suppression rule (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * * * *
Response details
Status Code Description Response Headers
200 Successfully disabled the default inbox rule -
403 Forbidden -
204 OK -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - disableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo(String ruleId) - throws ApiException { - // Check if unstable operation is enabled - String operationId = "disableSecurityFindingsAutomationDefaultInboxRule"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse deleteSecurityMonitoringSuppressionWithHttpInfo(String suppressionId) + throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'suppressionId' is set + if (suppressionId == null) { throw new ApiException( 400, - "Missing the required parameter 'ruleId' when calling" - + " disableSecurityFindingsAutomationDefaultInboxRule"); + "Missing the required parameter 'suppressionId' when calling" + + " deleteSecurityMonitoringSuppression"); } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/default_inbox_rules/{rule_id}/disable" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/configuration/suppressions/{suppression_id}" + .replaceAll( + "\\{" + "suppression_id" + "\\}", apiClient.escapeString(suppressionId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.disableSecurityFindingsAutomationDefaultInboxRule", + "v2.SecurityMonitoringApi.deleteSecurityMonitoringSuppression", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "POST", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Disable a default inbox rule. + * Delete a suppression rule. * - *

See {@link #disableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo}. + *

See {@link #deleteSecurityMonitoringSuppressionWithHttpInfo}. * - * @param ruleId The ID of the default inbox rule. Known default rule IDs include: - * identity_risk_default_rule, secret_default_rule, - * library_vulnerability_default_rule, attack_path_default_rule, - * host_and_container_vulnerability_default_rule, - * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule - * , and misconfiguration_default_rule. Datadog can add new default rules - * over time. (required) - * @return CompletableFuture<ApiResponse<DefaultInboxRuleResponse>> + * @param suppressionId The ID of the suppression rule (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - disableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync(String ruleId) { - // Check if unstable operation is enabled - String operationId = "disableSecurityFindingsAutomationDefaultInboxRule"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> deleteSecurityMonitoringSuppressionWithHttpInfoAsync( + String suppressionId) { Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'suppressionId' is set + if (suppressionId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'ruleId' when calling" - + " disableSecurityFindingsAutomationDefaultInboxRule")); + "Missing the required parameter 'suppressionId' when calling" + + " deleteSecurityMonitoringSuppression")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/default_inbox_rules/{rule_id}/disable" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/configuration/suppressions/{suppression_id}" + .replaceAll( + "\\{" + "suppression_id" + "\\}", apiClient.escapeString(suppressionId.toString())); Map localVarHeaderParams = new HashMap(); @@ -9670,57 +9975,51 @@ public DefaultInboxRuleResponse disableSecurityFindingsAutomationDefaultInboxRul try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.disableSecurityFindingsAutomationDefaultInboxRule", + "v2.SecurityMonitoringApi.deleteSecurityMonitoringSuppression", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "POST", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Update security signal triage state or assignee. + * Delete a signal-based notification rule. * - *

See {@link #editSecurityMonitoringSignalWithHttpInfo}. + *

See {@link #deleteSignalNotificationRuleWithHttpInfo}. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal triage state or assignee update. (required) - * @return SecurityMonitoringSignalTriageUpdateResponse + * @param id ID of the notification rule. (required) * @throws ApiException if fails to make API call */ - public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal( - String signalId, SecurityMonitoringSignalUpdateRequest body) throws ApiException { - return editSecurityMonitoringSignalWithHttpInfo(signalId, body).getData(); + public void deleteSignalNotificationRule(String id) throws ApiException { + deleteSignalNotificationRuleWithHttpInfo(id); } /** - * Update security signal triage state or assignee. + * Delete a signal-based notification rule. * - *

See {@link #editSecurityMonitoringSignalWithHttpInfoAsync}. + *

See {@link #deleteSignalNotificationRuleWithHttpInfoAsync}. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal triage state or assignee update. (required) - * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> + * @param id ID of the notification rule. (required) + * @return CompletableFuture */ - public CompletableFuture - editSecurityMonitoringSignalAsync( - String signalId, SecurityMonitoringSignalUpdateRequest body) { - return editSecurityMonitoringSignalWithHttpInfoAsync(signalId, body) + public CompletableFuture deleteSignalNotificationRuleAsync(String id) { + return deleteSignalNotificationRuleWithHttpInfoAsync(id) .thenApply( response -> { return response.getData(); @@ -9728,108 +10027,81 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal } /** - * Update the triage state or assignee of a security signal. + * Delete a notification rule for security signals. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal triage state or assignee update. (required) - * @return ApiResponse<SecurityMonitoringSignalTriageUpdateResponse> + * @param id ID of the notification rule. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
204 Rule successfully deleted. -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - editSecurityMonitoringSignalWithHttpInfo( - String signalId, SecurityMonitoringSignalUpdateRequest body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'signalId' is set - if (signalId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signalId' when calling editSecurityMonitoringSignal"); - } + public ApiResponse deleteSignalNotificationRuleWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { + // verify the required parameter 'id' is set + if (id == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling editSecurityMonitoringSignal"); + 400, "Missing the required parameter 'id' when calling deleteSignalNotificationRule"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/update" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + "/api/v2/security/signals/notification_rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.editSecurityMonitoringSignal", + "v2.SecurityMonitoringApi.deleteSignalNotificationRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "PATCH", + "DELETE", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Update security signal triage state or assignee. + * Delete a signal-based notification rule. * - *

See {@link #editSecurityMonitoringSignalWithHttpInfo}. + *

See {@link #deleteSignalNotificationRuleWithHttpInfo}. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal triage state or assignee update. (required) - * @return - * CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> + * @param id ID of the notification rule. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - editSecurityMonitoringSignalWithHttpInfoAsync( - String signalId, SecurityMonitoringSignalUpdateRequest body) { - Object localVarPostBody = body; - - // verify the required parameter 'signalId' is set - if (signalId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignal")); - return result; - } + public CompletableFuture> deleteSignalNotificationRuleWithHttpInfoAsync( + String id) { + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling editSecurityMonitoringSignal")); + "Missing the required parameter 'id' when calling deleteSignalNotificationRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/update" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + "/api/v2/security/signals/notification_rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); Map localVarHeaderParams = new HashMap(); @@ -9837,58 +10109,51 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.editSecurityMonitoringSignal", + "v2.SecurityMonitoringApi.deleteSignalNotificationRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PATCH", + "DELETE", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Modify the triage assignee of a security signal. + * Delete a vulnerability-based notification rule. * - *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfo}. + *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfo}. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return SecurityMonitoringSignalTriageUpdateResponse + * @param id ID of the notification rule. (required) * @throws ApiException if fails to make API call */ - public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignalAssignee( - String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) throws ApiException { - return editSecurityMonitoringSignalAssigneeWithHttpInfo(signalId, body).getData(); + public void deleteVulnerabilityNotificationRule(String id) throws ApiException { + deleteVulnerabilityNotificationRuleWithHttpInfo(id); } /** - * Modify the triage assignee of a security signal. + * Delete a vulnerability-based notification rule. * - *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfoAsync}. + *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfoAsync}. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> + * @param id ID of the notification rule. (required) + * @return CompletableFuture */ - public CompletableFuture - editSecurityMonitoringSignalAssigneeAsync( - String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) { - return editSecurityMonitoringSignalAssigneeWithHttpInfoAsync(signalId, body) + public CompletableFuture deleteVulnerabilityNotificationRuleAsync(String id) { + return deleteVulnerabilityNotificationRuleWithHttpInfoAsync(id) .thenApply( response -> { return response.getData(); @@ -9896,112 +10161,84 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal } /** - * Modify the triage assignee of a security signal. + * Delete a notification rule for security vulnerabilities. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return ApiResponse<SecurityMonitoringSignalTriageUpdateResponse> + * @param id ID of the notification rule. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * - * + * + * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
204 Rule successfully deleted. -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - editSecurityMonitoringSignalAssigneeWithHttpInfo( - String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'signalId' is set - if (signalId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalAssignee"); - } + public ApiResponse deleteVulnerabilityNotificationRuleWithHttpInfo(String id) + throws ApiException { + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { + // verify the required parameter 'id' is set + if (id == null) { throw new ApiException( 400, - "Missing the required parameter 'body' when calling" - + " editSecurityMonitoringSignalAssignee"); + "Missing the required parameter 'id' when calling deleteVulnerabilityNotificationRule"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/assignee" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + "/api/v2/security/vulnerabilities/notification_rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.editSecurityMonitoringSignalAssignee", + "v2.SecurityMonitoringApi.deleteVulnerabilityNotificationRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "PATCH", + "DELETE", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Modify the triage assignee of a security signal. + * Delete a vulnerability-based notification rule. * - *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfo}. + *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfo}. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return - * CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> + * @param id ID of the notification rule. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - editSecurityMonitoringSignalAssigneeWithHttpInfoAsync( - String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) { - Object localVarPostBody = body; + public CompletableFuture> deleteVulnerabilityNotificationRuleWithHttpInfoAsync( + String id) { + Object localVarPostBody = null; - // verify the required parameter 'signalId' is set - if (signalId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalAssignee")); - return result; - } - - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling" - + " editSecurityMonitoringSignalAssignee")); + "Missing the required parameter 'id' when calling" + + " deleteVulnerabilityNotificationRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/assignee" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + "/api/v2/security/vulnerabilities/notification_rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); Map localVarHeaderParams = new HashMap(); @@ -10009,58 +10246,51 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.editSecurityMonitoringSignalAssignee", + "v2.SecurityMonitoringApi.deleteVulnerabilityNotificationRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PATCH", + "DELETE", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Change the related incidents of a security signal. + * Detach security findings from their case. * - *

See {@link #editSecurityMonitoringSignalIncidentsWithHttpInfo}. + *

See {@link #detachCaseWithHttpInfo}. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return SecurityMonitoringSignalTriageUpdateResponse + * @param body (required) * @throws ApiException if fails to make API call */ - public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignalIncidents( - String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) throws ApiException { - return editSecurityMonitoringSignalIncidentsWithHttpInfo(signalId, body).getData(); + public void detachCase(DetachCaseRequest body) throws ApiException { + detachCaseWithHttpInfo(body); } /** - * Change the related incidents of a security signal. + * Detach security findings from their case. * - *

See {@link #editSecurityMonitoringSignalIncidentsWithHttpInfoAsync}. + *

See {@link #detachCaseWithHttpInfoAsync}. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> + * @param body (required) + * @return CompletableFuture */ - public CompletableFuture - editSecurityMonitoringSignalIncidentsAsync( - String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) { - return editSecurityMonitoringSignalIncidentsWithHttpInfoAsync(signalId, body) + public CompletableFuture detachCaseAsync(DetachCaseRequest body) { + return detachCaseWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -10068,113 +10298,76 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal } /** - * Change the related incidents for a security signal. + * Detach security findings from their case. This operation dissociates security findings from + * their associated cases without deleting the cases themselves. You can detach security findings + * from multiple different cases in a single request, with a limit of 50 security findings per + * request. Security findings that are not currently attached to any case will be ignored. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return ApiResponse<SecurityMonitoringSignalTriageUpdateResponse> + * @param body (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * * * *
Response details
Status Code Description Response Headers
200 OK -
204 No Content -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - editSecurityMonitoringSignalIncidentsWithHttpInfo( - String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) - throws ApiException { + public ApiResponse detachCaseWithHttpInfo(DetachCaseRequest body) throws ApiException { Object localVarPostBody = body; - // verify the required parameter 'signalId' is set - if (signalId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalIncidents"); - } - // verify the required parameter 'body' is set if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " editSecurityMonitoringSignalIncidents"); + throw new ApiException(400, "Missing the required parameter 'body' when calling detachCase"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/incidents" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v2/security/findings/cases"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.editSecurityMonitoringSignalIncidents", + "v2.SecurityMonitoringApi.detachCase", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "PATCH", + "DELETE", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Change the related incidents of a security signal. + * Detach security findings from their case. * - *

See {@link #editSecurityMonitoringSignalIncidentsWithHttpInfo}. + *

See {@link #detachCaseWithHttpInfo}. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return - * CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> + * @param body (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - editSecurityMonitoringSignalIncidentsWithHttpInfoAsync( - String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) { + public CompletableFuture> detachCaseWithHttpInfoAsync(DetachCaseRequest body) { Object localVarPostBody = body; - // verify the required parameter 'signalId' is set - if (signalId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalIncidents")); - return result; - } - // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " editSecurityMonitoringSignalIncidents")); + new ApiException(400, "Missing the required parameter 'body' when calling detachCase")); return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/incidents" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + String localVarPath = "/api/v2/security/findings/cases"; Map localVarHeaderParams = new HashMap(); @@ -10182,58 +10375,66 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.editSecurityMonitoringSignalIncidents", + "v2.SecurityMonitoringApi.detachCase", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PATCH", + "DELETE", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Change the triage state of a security signal. + * Disable a default inbox rule. * - *

See {@link #editSecurityMonitoringSignalStateWithHttpInfo}. + *

See {@link #disableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo}. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return SecurityMonitoringSignalTriageUpdateResponse + * @param ruleId The ID of the default inbox rule. Known default rule IDs include: + * identity_risk_default_rule, secret_default_rule, + * library_vulnerability_default_rule, attack_path_default_rule, + * host_and_container_vulnerability_default_rule, + * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule + * , and misconfiguration_default_rule. Datadog can add new default rules + * over time. (required) + * @return DefaultInboxRuleResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignalState( - String signalId, SecurityMonitoringSignalStateUpdateRequest body) throws ApiException { - return editSecurityMonitoringSignalStateWithHttpInfo(signalId, body).getData(); + public DefaultInboxRuleResponse disableSecurityFindingsAutomationDefaultInboxRule(String ruleId) + throws ApiException { + return disableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo(ruleId).getData(); } /** - * Change the triage state of a security signal. + * Disable a default inbox rule. * - *

See {@link #editSecurityMonitoringSignalStateWithHttpInfoAsync}. + *

See {@link #disableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync}. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> + * @param ruleId The ID of the default inbox rule. Known default rule IDs include: + * identity_risk_default_rule, secret_default_rule, + * library_vulnerability_default_rule, attack_path_default_rule, + * host_and_container_vulnerability_default_rule, + * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule + * , and misconfiguration_default_rule. Datadog can add new default rules + * over time. (required) + * @return CompletableFuture<DefaultInboxRuleResponse> */ - public CompletableFuture - editSecurityMonitoringSignalStateAsync( - String signalId, SecurityMonitoringSignalStateUpdateRequest body) { - return editSecurityMonitoringSignalStateWithHttpInfoAsync(signalId, body) + public CompletableFuture + disableSecurityFindingsAutomationDefaultInboxRuleAsync(String ruleId) { + return disableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -10241,52 +10442,56 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal } /** - * Change the triage state of a security signal. + * Disable a default inbox rule for the current organization. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return ApiResponse<SecurityMonitoringSignalTriageUpdateResponse> + * @param ruleId The ID of the default inbox rule. Known default rule IDs include: + * identity_risk_default_rule, secret_default_rule, + * library_vulnerability_default_rule, attack_path_default_rule, + * host_and_container_vulnerability_default_rule, + * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule + * , and misconfiguration_default_rule. Datadog can add new default rules + * over time. (required) + * @return ApiResponse<DefaultInboxRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * - * + * + * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
200 Successfully disabled the default inbox rule -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - editSecurityMonitoringSignalStateWithHttpInfo( - String signalId, SecurityMonitoringSignalStateUpdateRequest body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'signalId' is set - if (signalId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalState"); + public ApiResponse + disableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo(String ruleId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "disableSecurityFindingsAutomationDefaultInboxRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( 400, - "Missing the required parameter 'body' when calling editSecurityMonitoringSignalState"); + "Missing the required parameter 'ruleId' when calling" + + " disableSecurityFindingsAutomationDefaultInboxRule"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/state" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + "/api/v2/security/findings/automation/default_inbox_rules/{rule_id}/disable" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.editSecurityMonitoringSignalState", + "v2.SecurityMonitoringApi.disableSecurityFindingsAutomationDefaultInboxRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -10294,58 +10499,58 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "PATCH", + "POST", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Change the triage state of a security signal. + * Disable a default inbox rule. * - *

See {@link #editSecurityMonitoringSignalStateWithHttpInfo}. + *

See {@link #disableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo}. * - * @param signalId The ID of the signal. (required) - * @param body Attributes describing the signal update. (required) - * @return - * CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> + * @param ruleId The ID of the default inbox rule. Known default rule IDs include: + * identity_risk_default_rule, secret_default_rule, + * library_vulnerability_default_rule, attack_path_default_rule, + * host_and_container_vulnerability_default_rule, + * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule + * , and misconfiguration_default_rule. Datadog can add new default rules + * over time. (required) + * @return CompletableFuture<ApiResponse<DefaultInboxRuleResponse>> */ - public CompletableFuture> - editSecurityMonitoringSignalStateWithHttpInfoAsync( - String signalId, SecurityMonitoringSignalStateUpdateRequest body) { - Object localVarPostBody = body; - - // verify the required parameter 'signalId' is set - if (signalId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + public CompletableFuture> + disableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync(String ruleId) { + // Check if unstable operation is enabled + String operationId = "disableSecurityFindingsAutomationDefaultInboxRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " editSecurityMonitoringSignalState")); + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling" - + " editSecurityMonitoringSignalState")); + "Missing the required parameter 'ruleId' when calling" + + " disableSecurityFindingsAutomationDefaultInboxRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/state" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + "/api/v2/security/findings/automation/default_inbox_rules/{rule_id}/disable" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -10353,7 +10558,7 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.editSecurityMonitoringSignalState", + "v2.SecurityMonitoringApi.disableSecurityFindingsAutomationDefaultInboxRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -10361,59 +10566,49 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PATCH", + "POST", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Enable a default inbox rule. + * Update security signal triage state or assignee. * - *

See {@link #enableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo}. + *

See {@link #editSecurityMonitoringSignalWithHttpInfo}. * - * @param ruleId The ID of the default inbox rule. Known default rule IDs include: - * identity_risk_default_rule, secret_default_rule, - * library_vulnerability_default_rule, attack_path_default_rule, - * host_and_container_vulnerability_default_rule, - * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule - * , and misconfiguration_default_rule. Datadog can add new default rules - * over time. (required) - * @return DefaultInboxRuleResponse + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal triage state or assignee update. (required) + * @return SecurityMonitoringSignalTriageUpdateResponse * @throws ApiException if fails to make API call */ - public DefaultInboxRuleResponse enableSecurityFindingsAutomationDefaultInboxRule(String ruleId) - throws ApiException { - return enableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo(ruleId).getData(); + public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal( + String signalId, SecurityMonitoringSignalUpdateRequest body) throws ApiException { + return editSecurityMonitoringSignalWithHttpInfo(signalId, body).getData(); } /** - * Enable a default inbox rule. + * Update security signal triage state or assignee. * - *

See {@link #enableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync}. + *

See {@link #editSecurityMonitoringSignalWithHttpInfoAsync}. * - * @param ruleId The ID of the default inbox rule. Known default rule IDs include: - * identity_risk_default_rule, secret_default_rule, - * library_vulnerability_default_rule, attack_path_default_rule, - * host_and_container_vulnerability_default_rule, - * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule - * , and misconfiguration_default_rule. Datadog can add new default rules - * over time. (required) - * @return CompletableFuture<DefaultInboxRuleResponse> + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal triage state or assignee update. (required) + * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> */ - public CompletableFuture - enableSecurityFindingsAutomationDefaultInboxRuleAsync(String ruleId) { - return enableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync(ruleId) + public CompletableFuture + editSecurityMonitoringSignalAsync( + String signalId, SecurityMonitoringSignalUpdateRequest body) { + return editSecurityMonitoringSignalWithHttpInfoAsync(signalId, body) .thenApply( response -> { return response.getData(); @@ -10421,56 +10616,50 @@ public DefaultInboxRuleResponse enableSecurityFindingsAutomationDefaultInboxRule } /** - * Enable a default inbox rule for the current organization. + * Update the triage state or assignee of a security signal. * - * @param ruleId The ID of the default inbox rule. Known default rule IDs include: - * identity_risk_default_rule, secret_default_rule, - * library_vulnerability_default_rule, attack_path_default_rule, - * host_and_container_vulnerability_default_rule, - * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule - * , and misconfiguration_default_rule. Datadog can add new default rules - * over time. (required) - * @return ApiResponse<DefaultInboxRuleResponse> + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal triage state or assignee update. (required) + * @return ApiResponse<SecurityMonitoringSignalTriageUpdateResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * + * * * * *
Response details
Status Code Description Response Headers
200 Successfully enabled the default inbox rule -
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - enableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo(String ruleId) - throws ApiException { - // Check if unstable operation is enabled - String operationId = "enableSecurityFindingsAutomationDefaultInboxRule"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = null; + public ApiResponse + editSecurityMonitoringSignalWithHttpInfo( + String signalId, SecurityMonitoringSignalUpdateRequest body) throws ApiException { + Object localVarPostBody = body; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'signalId' is set + if (signalId == null) { throw new ApiException( 400, - "Missing the required parameter 'ruleId' when calling" - + " enableSecurityFindingsAutomationDefaultInboxRule"); + "Missing the required parameter 'signalId' when calling editSecurityMonitoringSignal"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling editSecurityMonitoringSignal"); } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/default_inbox_rules/{rule_id}/enable" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/signals/{signal_id}/update" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.enableSecurityFindingsAutomationDefaultInboxRule", + "v2.SecurityMonitoringApi.editSecurityMonitoringSignal", localVarPath, new ArrayList(), localVarHeaderParams, @@ -10478,58 +10667,57 @@ public DefaultInboxRuleResponse enableSecurityFindingsAutomationDefaultInboxRule new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "POST", + "PATCH", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Enable a default inbox rule. + * Update security signal triage state or assignee. * - *

See {@link #enableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo}. + *

See {@link #editSecurityMonitoringSignalWithHttpInfo}. * - * @param ruleId The ID of the default inbox rule. Known default rule IDs include: - * identity_risk_default_rule, secret_default_rule, - * library_vulnerability_default_rule, attack_path_default_rule, - * host_and_container_vulnerability_default_rule, - * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule - * , and misconfiguration_default_rule. Datadog can add new default rules - * over time. (required) - * @return CompletableFuture<ApiResponse<DefaultInboxRuleResponse>> + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal triage state or assignee update. (required) + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> */ - public CompletableFuture> - enableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync(String ruleId) { - // Check if unstable operation is enabled - String operationId = "enableSecurityFindingsAutomationDefaultInboxRule"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); + public CompletableFuture> + editSecurityMonitoringSignalWithHttpInfoAsync( + String signalId, SecurityMonitoringSignalUpdateRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'signalId' is set + if (signalId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + new ApiException( + 400, + "Missing the required parameter 'signalId' when calling" + + " editSecurityMonitoringSignal")); return result; } - Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'ruleId' when calling" - + " enableSecurityFindingsAutomationDefaultInboxRule")); + "Missing the required parameter 'body' when calling editSecurityMonitoringSignal")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/default_inbox_rules/{rule_id}/enable" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/signals/{signal_id}/update" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); Map localVarHeaderParams = new HashMap(); @@ -10537,7 +10725,7 @@ public DefaultInboxRuleResponse enableSecurityFindingsAutomationDefaultInboxRule try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.enableSecurityFindingsAutomationDefaultInboxRule", + "v2.SecurityMonitoringApi.editSecurityMonitoringSignal", localVarPath, new ArrayList(), localVarHeaderParams, @@ -10545,50 +10733,50 @@ public DefaultInboxRuleResponse enableSecurityFindingsAutomationDefaultInboxRule new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "POST", + "PATCH", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Export security monitoring resource to Terraform. + * Modify the triage assignee of a security signal. * - *

See {@link #exportSecurityMonitoringTerraformResourceWithHttpInfo}. + *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfo}. * - * @param resourceType The type of security monitoring resource to export. (required) - * @param resourceId The ID of the security monitoring resource to export. (required) - * @return SecurityMonitoringTerraformExportResponse + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return SecurityMonitoringSignalTriageUpdateResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringTerraformExportResponse exportSecurityMonitoringTerraformResource( - SecurityMonitoringTerraformResourceType resourceType, String resourceId) throws ApiException { - return exportSecurityMonitoringTerraformResourceWithHttpInfo(resourceType, resourceId) - .getData(); + public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignalAssignee( + String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) throws ApiException { + return editSecurityMonitoringSignalAssigneeWithHttpInfo(signalId, body).getData(); } /** - * Export security monitoring resource to Terraform. + * Modify the triage assignee of a security signal. * - *

See {@link #exportSecurityMonitoringTerraformResourceWithHttpInfoAsync}. + *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfoAsync}. * - * @param resourceType The type of security monitoring resource to export. (required) - * @param resourceId The ID of the security monitoring resource to export. (required) - * @return CompletableFuture<SecurityMonitoringTerraformExportResponse> + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> */ - public CompletableFuture - exportSecurityMonitoringTerraformResourceAsync( - SecurityMonitoringTerraformResourceType resourceType, String resourceId) { - return exportSecurityMonitoringTerraformResourceWithHttpInfoAsync(resourceType, resourceId) + public CompletableFuture + editSecurityMonitoringSignalAssigneeAsync( + String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) { + return editSecurityMonitoringSignalAssigneeWithHttpInfoAsync(signalId, body) .thenApply( response -> { return response.getData(); @@ -10596,66 +10784,53 @@ public SecurityMonitoringTerraformExportResponse exportSecurityMonitoringTerrafo } /** - * Export a security monitoring resource to a Terraform configuration. The resource_type - * path parameter specifies the type of resource to export and must be one of - * suppressions, critical_assets, security_filters, or - * rules. For rules, partner rules cannot be exported and return a 400 error. + * Modify the triage assignee of a security signal. * - * @param resourceType The type of security monitoring resource to export. (required) - * @param resourceId The ID of the security monitoring resource to export. (required) - * @return ApiResponse<SecurityMonitoringTerraformExportResponse> + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return ApiResponse<SecurityMonitoringSignalTriageUpdateResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * + * * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - exportSecurityMonitoringTerraformResourceWithHttpInfo( - SecurityMonitoringTerraformResourceType resourceType, String resourceId) - throws ApiException { - // Check if unstable operation is enabled - String operationId = "exportSecurityMonitoringTerraformResource"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = null; + public ApiResponse + editSecurityMonitoringSignalAssigneeWithHttpInfo( + String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) throws ApiException { + Object localVarPostBody = body; - // verify the required parameter 'resourceType' is set - if (resourceType == null) { + // verify the required parameter 'signalId' is set + if (signalId == null) { throw new ApiException( 400, - "Missing the required parameter 'resourceType' when calling" - + " exportSecurityMonitoringTerraformResource"); + "Missing the required parameter 'signalId' when calling" + + " editSecurityMonitoringSignalAssignee"); } - // verify the required parameter 'resourceId' is set - if (resourceId == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( 400, - "Missing the required parameter 'resourceId' when calling" - + " exportSecurityMonitoringTerraformResource"); + "Missing the required parameter 'body' when calling" + + " editSecurityMonitoringSignalAssignee"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/terraform/{resource_type}/{resource_id}" - .replaceAll( - "\\{" + "resource_type" + "\\}", apiClient.escapeString(resourceType.toString())) - .replaceAll( - "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + "/api/v2/security_monitoring/signals/{signal_id}/assignee" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.exportSecurityMonitoringTerraformResource", + "v2.SecurityMonitoringApi.editSecurityMonitoringSignalAssignee", localVarPath, new ArrayList(), localVarHeaderParams, @@ -10663,71 +10838,58 @@ public SecurityMonitoringTerraformExportResponse exportSecurityMonitoringTerrafo new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "PATCH", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Export security monitoring resource to Terraform. + * Modify the triage assignee of a security signal. * - *

See {@link #exportSecurityMonitoringTerraformResourceWithHttpInfo}. + *

See {@link #editSecurityMonitoringSignalAssigneeWithHttpInfo}. * - * @param resourceType The type of security monitoring resource to export. (required) - * @param resourceId The ID of the security monitoring resource to export. (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringTerraformExportResponse>> + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> */ - public CompletableFuture> - exportSecurityMonitoringTerraformResourceWithHttpInfoAsync( - SecurityMonitoringTerraformResourceType resourceType, String resourceId) { - // Check if unstable operation is enabled - String operationId = "exportSecurityMonitoringTerraformResource"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = null; + public CompletableFuture> + editSecurityMonitoringSignalAssigneeWithHttpInfoAsync( + String signalId, SecurityMonitoringSignalAssigneeUpdateRequest body) { + Object localVarPostBody = body; - // verify the required parameter 'resourceType' is set - if (resourceType == null) { - CompletableFuture> result = + // verify the required parameter 'signalId' is set + if (signalId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'resourceType' when calling" - + " exportSecurityMonitoringTerraformResource")); + "Missing the required parameter 'signalId' when calling" + + " editSecurityMonitoringSignalAssignee")); return result; } - // verify the required parameter 'resourceId' is set - if (resourceId == null) { - CompletableFuture> result = + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'resourceId' when calling" - + " exportSecurityMonitoringTerraformResource")); + "Missing the required parameter 'body' when calling" + + " editSecurityMonitoringSignalAssignee")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/terraform/{resource_type}/{resource_id}" - .replaceAll( - "\\{" + "resource_type" + "\\}", apiClient.escapeString(resourceType.toString())) - .replaceAll( - "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + "/api/v2/security_monitoring/signals/{signal_id}/assignee" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); Map localVarHeaderParams = new HashMap(); @@ -10735,7 +10897,7 @@ public SecurityMonitoringTerraformExportResponse exportSecurityMonitoringTerrafo try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.exportSecurityMonitoringTerraformResource", + "v2.SecurityMonitoringApi.editSecurityMonitoringSignalAssignee", localVarPath, new ArrayList(), localVarHeaderParams, @@ -10743,44 +10905,50 @@ public SecurityMonitoringTerraformExportResponse exportSecurityMonitoringTerrafo new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "PATCH", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get content pack states. + * Change the related incidents of a security signal. * - *

See {@link #getContentPacksStatesWithHttpInfo}. + *

See {@link #editSecurityMonitoringSignalIncidentsWithHttpInfo}. * - * @return SecurityMonitoringContentPackStatesResponse + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return SecurityMonitoringSignalTriageUpdateResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringContentPackStatesResponse getContentPacksStates() throws ApiException { - return getContentPacksStatesWithHttpInfo().getData(); + public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignalIncidents( + String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) throws ApiException { + return editSecurityMonitoringSignalIncidentsWithHttpInfo(signalId, body).getData(); } /** - * Get content pack states. + * Change the related incidents of a security signal. * - *

See {@link #getContentPacksStatesWithHttpInfoAsync}. + *

See {@link #editSecurityMonitoringSignalIncidentsWithHttpInfoAsync}. * - * @return CompletableFuture<SecurityMonitoringContentPackStatesResponse> + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> */ - public CompletableFuture - getContentPacksStatesAsync() { - return getContentPacksStatesWithHttpInfoAsync() + public CompletableFuture + editSecurityMonitoringSignalIncidentsAsync( + String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) { + return editSecurityMonitoringSignalIncidentsWithHttpInfoAsync(signalId, body) .thenApply( response -> { return response.getData(); @@ -10788,39 +10956,54 @@ public SecurityMonitoringContentPackStatesResponse getContentPacksStates() throw } /** - * Get the activation state, integration status, and log collection status for all Cloud SIEM - * content packs. + * Change the related incidents for a security signal. * - * @return ApiResponse<SecurityMonitoringContentPackStatesResponse> + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return ApiResponse<SecurityMonitoringSignalTriageUpdateResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * + * + * * * *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - getContentPacksStatesWithHttpInfo() throws ApiException { - // Check if unstable operation is enabled - String operationId = "getContentPacksStates"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + public ApiResponse + editSecurityMonitoringSignalIncidentsWithHttpInfo( + String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) + throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'signalId' is set + if (signalId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'signalId' when calling" + + " editSecurityMonitoringSignalIncidents"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " editSecurityMonitoringSignalIncidents"); } - Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/content_packs/states"; + String localVarPath = + "/api/v2/security_monitoring/signals/{signal_id}/incidents" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getContentPacksStates", + "v2.SecurityMonitoringApi.editSecurityMonitoringSignalIncidents", localVarPath, new ArrayList(), localVarHeaderParams, @@ -10828,47 +11011,66 @@ public SecurityMonitoringContentPackStatesResponse getContentPacksStates() throw new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "PATCH", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get content pack states. + * Change the related incidents of a security signal. * - *

See {@link #getContentPacksStatesWithHttpInfo}. + *

See {@link #editSecurityMonitoringSignalIncidentsWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<SecurityMonitoringContentPackStatesResponse>> + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> */ - public CompletableFuture> - getContentPacksStatesWithHttpInfoAsync() { - // Check if unstable operation is enabled - String operationId = "getContentPacksStates"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = + public CompletableFuture> + editSecurityMonitoringSignalIncidentsWithHttpInfoAsync( + String signalId, SecurityMonitoringSignalIncidentsUpdateRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'signalId' is set + if (signalId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + new ApiException( + 400, + "Missing the required parameter 'signalId' when calling" + + " editSecurityMonitoringSignalIncidents")); return result; } - Object localVarPostBody = null; - // create path and map variables - String localVarPath = "/api/v2/security_monitoring/content_packs/states"; - - Map localVarHeaderParams = new HashMap(); - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.getContentPacksStates", + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " editSecurityMonitoringSignalIncidents")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/security_monitoring/signals/{signal_id}/incidents" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.editSecurityMonitoringSignalIncidents", localVarPath, new ArrayList(), localVarHeaderParams, @@ -10876,47 +11078,50 @@ public SecurityMonitoringContentPackStatesResponse getContentPacksStates() throw new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "PATCH", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get critical assets affecting a specific rule. + * Change the triage state of a security signal. * - *

See {@link #getCriticalAssetsAffectingRuleWithHttpInfo}. + *

See {@link #editSecurityMonitoringSignalStateWithHttpInfo}. * - * @param ruleId The ID of the rule. (required) - * @return SecurityMonitoringCriticalAssetsResponse + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return SecurityMonitoringSignalTriageUpdateResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringCriticalAssetsResponse getCriticalAssetsAffectingRule(String ruleId) - throws ApiException { - return getCriticalAssetsAffectingRuleWithHttpInfo(ruleId).getData(); + public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignalState( + String signalId, SecurityMonitoringSignalStateUpdateRequest body) throws ApiException { + return editSecurityMonitoringSignalStateWithHttpInfo(signalId, body).getData(); } /** - * Get critical assets affecting a specific rule. + * Change the triage state of a security signal. * - *

See {@link #getCriticalAssetsAffectingRuleWithHttpInfoAsync}. + *

See {@link #editSecurityMonitoringSignalStateWithHttpInfoAsync}. * - * @param ruleId The ID of the rule. (required) - * @return CompletableFuture<SecurityMonitoringCriticalAssetsResponse> + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return CompletableFuture<SecurityMonitoringSignalTriageUpdateResponse> */ - public CompletableFuture - getCriticalAssetsAffectingRuleAsync(String ruleId) { - return getCriticalAssetsAffectingRuleWithHttpInfoAsync(ruleId) + public CompletableFuture + editSecurityMonitoringSignalStateAsync( + String signalId, SecurityMonitoringSignalStateUpdateRequest body) { + return editSecurityMonitoringSignalStateWithHttpInfoAsync(signalId, body) .thenApply( response -> { return response.getData(); @@ -10924,41 +11129,52 @@ public SecurityMonitoringCriticalAssetsResponse getCriticalAssetsAffectingRule(S } /** - * Get the list of critical assets that affect a specific existing rule by the rule's ID. + * Change the triage state of a security signal. * - * @param ruleId The ID of the rule. (required) - * @return ApiResponse<SecurityMonitoringCriticalAssetsResponse> + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return ApiResponse<SecurityMonitoringSignalTriageUpdateResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * + * * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - getCriticalAssetsAffectingRuleWithHttpInfo(String ruleId) throws ApiException { - Object localVarPostBody = null; + public ApiResponse + editSecurityMonitoringSignalStateWithHttpInfo( + String signalId, SecurityMonitoringSignalStateUpdateRequest body) throws ApiException { + Object localVarPostBody = body; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'signalId' is set + if (signalId == null) { throw new ApiException( 400, - "Missing the required parameter 'ruleId' when calling getCriticalAssetsAffectingRule"); + "Missing the required parameter 'signalId' when calling" + + " editSecurityMonitoringSignalState"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling editSecurityMonitoringSignalState"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/critical_assets/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/signals/{signal_id}/state" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getCriticalAssetsAffectingRule", + "v2.SecurityMonitoringApi.editSecurityMonitoringSignalState", localVarPath, new ArrayList(), localVarHeaderParams, @@ -10966,43 +11182,58 @@ public SecurityMonitoringCriticalAssetsResponse getCriticalAssetsAffectingRule(S new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "PATCH", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get critical assets affecting a specific rule. + * Change the triage state of a security signal. * - *

See {@link #getCriticalAssetsAffectingRuleWithHttpInfo}. + *

See {@link #editSecurityMonitoringSignalStateWithHttpInfo}. * - * @param ruleId The ID of the rule. (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringCriticalAssetsResponse>> + * @param signalId The ID of the signal. (required) + * @param body Attributes describing the signal update. (required) + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringSignalTriageUpdateResponse>> */ - public CompletableFuture> - getCriticalAssetsAffectingRuleWithHttpInfoAsync(String ruleId) { - Object localVarPostBody = null; + public CompletableFuture> + editSecurityMonitoringSignalStateWithHttpInfoAsync( + String signalId, SecurityMonitoringSignalStateUpdateRequest body) { + Object localVarPostBody = body; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = + // verify the required parameter 'signalId' is set + if (signalId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'ruleId' when calling" - + " getCriticalAssetsAffectingRule")); + "Missing the required parameter 'signalId' when calling" + + " editSecurityMonitoringSignalState")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " editSecurityMonitoringSignalState")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/critical_assets/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/signals/{signal_id}/state" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); Map localVarHeaderParams = new HashMap(); @@ -11010,7 +11241,7 @@ public SecurityMonitoringCriticalAssetsResponse getCriticalAssetsAffectingRule(S try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getCriticalAssetsAffectingRule", + "v2.SecurityMonitoringApi.editSecurityMonitoringSignalState", localVarPath, new ArrayList(), localVarHeaderParams, @@ -11018,49 +11249,59 @@ public SecurityMonitoringCriticalAssetsResponse getCriticalAssetsAffectingRule(S new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "PATCH", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a custom framework. + * Enable a default inbox rule. * - *

See {@link #getCustomFrameworkWithHttpInfo}. + *

See {@link #enableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo}. * - * @param handle The framework handle (required) - * @param version The framework version (required) - * @return GetCustomFrameworkResponse + * @param ruleId The ID of the default inbox rule. Known default rule IDs include: + * identity_risk_default_rule, secret_default_rule, + * library_vulnerability_default_rule, attack_path_default_rule, + * host_and_container_vulnerability_default_rule, + * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule + * , and misconfiguration_default_rule. Datadog can add new default rules + * over time. (required) + * @return DefaultInboxRuleResponse * @throws ApiException if fails to make API call */ - public GetCustomFrameworkResponse getCustomFramework(String handle, String version) + public DefaultInboxRuleResponse enableSecurityFindingsAutomationDefaultInboxRule(String ruleId) throws ApiException { - return getCustomFrameworkWithHttpInfo(handle, version).getData(); + return enableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo(ruleId).getData(); } /** - * Get a custom framework. + * Enable a default inbox rule. * - *

See {@link #getCustomFrameworkWithHttpInfoAsync}. + *

See {@link #enableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync}. * - * @param handle The framework handle (required) - * @param version The framework version (required) - * @return CompletableFuture<GetCustomFrameworkResponse> + * @param ruleId The ID of the default inbox rule. Known default rule IDs include: + * identity_risk_default_rule, secret_default_rule, + * library_vulnerability_default_rule, attack_path_default_rule, + * host_and_container_vulnerability_default_rule, + * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule + * , and misconfiguration_default_rule. Datadog can add new default rules + * over time. (required) + * @return CompletableFuture<DefaultInboxRuleResponse> */ - public CompletableFuture getCustomFrameworkAsync( - String handle, String version) { - return getCustomFrameworkWithHttpInfoAsync(handle, version) + public CompletableFuture + enableSecurityFindingsAutomationDefaultInboxRuleAsync(String ruleId) { + return enableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -11068,48 +11309,56 @@ public CompletableFuture getCustomFrameworkAsync( } /** - * Get a custom framework. + * Enable a default inbox rule for the current organization. * - * @param handle The framework handle (required) - * @param version The framework version (required) - * @return ApiResponse<GetCustomFrameworkResponse> + * @param ruleId The ID of the default inbox rule. Known default rule IDs include: + * identity_risk_default_rule, secret_default_rule, + * library_vulnerability_default_rule, attack_path_default_rule, + * host_and_container_vulnerability_default_rule, + * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule + * , and misconfiguration_default_rule. Datadog can add new default rules + * over time. (required) + * @return ApiResponse<DefaultInboxRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * + * * - * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
200 Successfully enabled the default inbox rule -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Bad Request -
*/ - public ApiResponse getCustomFrameworkWithHttpInfo( - String handle, String version) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'handle' is set - if (handle == null) { - throw new ApiException( - 400, "Missing the required parameter 'handle' when calling getCustomFramework"); + public ApiResponse + enableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo(String ruleId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "enableSecurityFindingsAutomationDefaultInboxRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } + Object localVarPostBody = null; - // verify the required parameter 'version' is set - if (version == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( - 400, "Missing the required parameter 'version' when calling getCustomFramework"); + 400, + "Missing the required parameter 'ruleId' when calling" + + " enableSecurityFindingsAutomationDefaultInboxRule"); } // create path and map variables String localVarPath = - "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" - .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) - .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + "/api/v2/security/findings/automation/default_inbox_rules/{rule_id}/enable" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getCustomFramework", + "v2.SecurityMonitoringApi.enableSecurityFindingsAutomationDefaultInboxRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -11117,51 +11366,58 @@ public ApiResponse getCustomFrameworkWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "POST", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a custom framework. + * Enable a default inbox rule. * - *

See {@link #getCustomFrameworkWithHttpInfo}. + *

See {@link #enableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo}. * - * @param handle The framework handle (required) - * @param version The framework version (required) - * @return CompletableFuture<ApiResponse<GetCustomFrameworkResponse>> + * @param ruleId The ID of the default inbox rule. Known default rule IDs include: + * identity_risk_default_rule, secret_default_rule, + * library_vulnerability_default_rule, attack_path_default_rule, + * host_and_container_vulnerability_default_rule, + * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule + * , and misconfiguration_default_rule. Datadog can add new default rules + * over time. (required) + * @return CompletableFuture<ApiResponse<DefaultInboxRuleResponse>> */ - public CompletableFuture> - getCustomFrameworkWithHttpInfoAsync(String handle, String version) { - Object localVarPostBody = null; - - // verify the required parameter 'handle' is set - if (handle == null) { - CompletableFuture> result = new CompletableFuture<>(); + public CompletableFuture> + enableSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync(String ruleId) { + // Check if unstable operation is enabled + String operationId = "enableSecurityFindingsAutomationDefaultInboxRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'handle' when calling getCustomFramework")); + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } + Object localVarPostBody = null; - // verify the required parameter 'version' is set - if (version == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'version' when calling getCustomFramework")); + 400, + "Missing the required parameter 'ruleId' when calling" + + " enableSecurityFindingsAutomationDefaultInboxRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" - .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) - .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + "/api/v2/security/findings/automation/default_inbox_rules/{rule_id}/enable" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -11169,7 +11425,7 @@ public ApiResponse getCustomFrameworkWithHttpInfo( try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getCustomFramework", + "v2.SecurityMonitoringApi.enableSecurityFindingsAutomationDefaultInboxRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -11177,172 +11433,50 @@ public ApiResponse getCustomFrameworkWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "POST", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to getEntityContext. */ - public static class GetEntityContextOptionalParameters { - private String query; - private EntityContextEntityType entityType; - private String from; - private String to; - private String asOf; - private Long limit; - private String pageToken; - - /** - * Set query. - * - * @param query A free-text query (for example, an email address or principal ID) used to filter - * the entities returned. (optional) - * @return GetEntityContextOptionalParameters - */ - public GetEntityContextOptionalParameters query(String query) { - this.query = query; - return this; - } - - /** - * Set entityType. - * - * @param entityType The type of entity to retrieve. Only siem_entity_identity is - * currently supported. Defaults to siem_entity_identity. (optional, default to - * "siem_entity_identity") - * @return GetEntityContextOptionalParameters - */ - public GetEntityContextOptionalParameters entityType(EntityContextEntityType entityType) { - this.entityType = entityType; - return this; - } - - /** - * Set from. - * - * @param from The start of the time range to query, as an RFC3339 timestamp or a relative time - * (for example, now-7d). Defaults to now-7d. Ignored when - * as_of is set. (optional, default to "now-7d") - * @return GetEntityContextOptionalParameters - */ - public GetEntityContextOptionalParameters from(String from) { - this.from = from; - return this; - } - - /** - * Set to. - * - * @param to The end of the time range to query, as an RFC3339 timestamp or a relative time (for - * example, now). Defaults to now. Ignored when as_of - * is set. (optional, default to "now") - * @return GetEntityContextOptionalParameters - */ - public GetEntityContextOptionalParameters to(String to) { - this.to = to; - return this; - } - - /** - * Set asOf. - * - * @param asOf A point in time at which to query the entity revisions, as an RFC3339 timestamp, - * a Unix timestamp (in seconds), or a relative time (for example, now-1d). - * When set, from and to are ignored. Cannot be combined with - * custom from / to values. (optional) - * @return GetEntityContextOptionalParameters - */ - public GetEntityContextOptionalParameters asOf(String asOf) { - this.asOf = asOf; - return this; - } - - /** - * Set limit. - * - * @param limit The maximum number of entities to return. (optional, default to 250) - * @return GetEntityContextOptionalParameters - */ - public GetEntityContextOptionalParameters limit(Long limit) { - this.limit = limit; - return this; - } - - /** - * Set pageToken. - * - * @param pageToken An opaque token used to fetch the next page of results, as returned in - * meta.page.next_token of a previous response. (optional) - * @return GetEntityContextOptionalParameters - */ - public GetEntityContextOptionalParameters pageToken(String pageToken) { - this.pageToken = pageToken; - return this; - } - } - - /** - * Get entity context. - * - *

See {@link #getEntityContextWithHttpInfo}. - * - * @return EntityContextResponse - * @throws ApiException if fails to make API call - */ - public EntityContextResponse getEntityContext() throws ApiException { - return getEntityContextWithHttpInfo(new GetEntityContextOptionalParameters()).getData(); - } - - /** - * Get entity context. - * - *

See {@link #getEntityContextWithHttpInfoAsync}. - * - * @return CompletableFuture<EntityContextResponse> - */ - public CompletableFuture getEntityContextAsync() { - return getEntityContextWithHttpInfoAsync(new GetEntityContextOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * Get entity context. + * Export security monitoring resource to Terraform. * - *

See {@link #getEntityContextWithHttpInfo}. + *

See {@link #exportSecurityMonitoringTerraformResourceWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return EntityContextResponse + * @param resourceType The type of security monitoring resource to export. (required) + * @param resourceId The ID of the security monitoring resource to export. (required) + * @return SecurityMonitoringTerraformExportResponse * @throws ApiException if fails to make API call */ - public EntityContextResponse getEntityContext(GetEntityContextOptionalParameters parameters) - throws ApiException { - return getEntityContextWithHttpInfo(parameters).getData(); + public SecurityMonitoringTerraformExportResponse exportSecurityMonitoringTerraformResource( + SecurityMonitoringTerraformResourceType resourceType, String resourceId) throws ApiException { + return exportSecurityMonitoringTerraformResourceWithHttpInfo(resourceType, resourceId) + .getData(); } /** - * Get entity context. + * Export security monitoring resource to Terraform. * - *

See {@link #getEntityContextWithHttpInfoAsync}. + *

See {@link #exportSecurityMonitoringTerraformResourceWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<EntityContextResponse> + * @param resourceType The type of security monitoring resource to export. (required) + * @param resourceId The ID of the security monitoring resource to export. (required) + * @return CompletableFuture<SecurityMonitoringTerraformExportResponse> */ - public CompletableFuture getEntityContextAsync( - GetEntityContextOptionalParameters parameters) { - return getEntityContextWithHttpInfoAsync(parameters) + public CompletableFuture + exportSecurityMonitoringTerraformResourceAsync( + SecurityMonitoringTerraformResourceType resourceType, String resourceId) { + return exportSecurityMonitoringTerraformResourceWithHttpInfoAsync(resourceType, resourceId) .thenApply( response -> { return response.getData(); @@ -11350,60 +11484,68 @@ public CompletableFuture getEntityContextAsync( } /** - * Search the Cloud SIEM entity context store for entities that match a query, and return the - * historical revisions of each entity in the requested time range. The endpoint can either return - * revisions across an interval (from / to) or the snapshot of each - * entity at a single point in time (as_of); the two modes are mutually exclusive. + * Export a security monitoring resource to a Terraform configuration. The resource_type + * path parameter specifies the type of resource to export and must be one of + * suppressions, critical_assets, security_filters, or + * rules. For rules, partner rules cannot be exported and return a 400 error. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<EntityContextResponse> + * @param resourceType The type of security monitoring resource to export. (required) + * @param resourceId The ID of the security monitoring resource to export. (required) + * @return ApiResponse<SecurityMonitoringTerraformExportResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * * + * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getEntityContextWithHttpInfo( - GetEntityContextOptionalParameters parameters) throws ApiException { + public ApiResponse + exportSecurityMonitoringTerraformResourceWithHttpInfo( + SecurityMonitoringTerraformResourceType resourceType, String resourceId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "getEntityContext"; + String operationId = "exportSecurityMonitoringTerraformResource"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - String query = parameters.query; - EntityContextEntityType entityType = parameters.entityType; - String from = parameters.from; - String to = parameters.to; - String asOf = parameters.asOf; - Long limit = parameters.limit; - String pageToken = parameters.pageToken; - // create path and map variables - String localVarPath = "/api/v2/security_monitoring/entity_context"; - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + // verify the required parameter 'resourceType' is set + if (resourceType == null) { + throw new ApiException( + 400, + "Missing the required parameter 'resourceType' when calling" + + " exportSecurityMonitoringTerraformResource"); + } - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "as_of", asOf)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_token", pageToken)); + // verify the required parameter 'resourceId' is set + if (resourceId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'resourceId' when calling" + + " exportSecurityMonitoringTerraformResource"); + } + // create path and map variables + String localVarPath = + "/api/v2/security_monitoring/terraform/{resource_type}/{resource_id}" + .replaceAll( + "\\{" + "resource_type" + "\\}", apiClient.escapeString(resourceType.toString())) + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + + Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getEntityContext", + "v2.SecurityMonitoringApi.exportSecurityMonitoringTerraformResource", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -11416,64 +11558,81 @@ public ApiResponse getEntityContextWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get entity context. + * Export security monitoring resource to Terraform. * - *

See {@link #getEntityContextWithHttpInfo}. + *

See {@link #exportSecurityMonitoringTerraformResourceWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<EntityContextResponse>> + * @param resourceType The type of security monitoring resource to export. (required) + * @param resourceId The ID of the security monitoring resource to export. (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringTerraformExportResponse>> */ - public CompletableFuture> getEntityContextWithHttpInfoAsync( - GetEntityContextOptionalParameters parameters) { + public CompletableFuture> + exportSecurityMonitoringTerraformResourceWithHttpInfoAsync( + SecurityMonitoringTerraformResourceType resourceType, String resourceId) { // Check if unstable operation is enabled - String operationId = "getEntityContext"; + String operationId = "exportSecurityMonitoringTerraformResource"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - String query = parameters.query; - EntityContextEntityType entityType = parameters.entityType; - String from = parameters.from; - String to = parameters.to; - String asOf = parameters.asOf; - Long limit = parameters.limit; - String pageToken = parameters.pageToken; + + // verify the required parameter 'resourceType' is set + if (resourceType == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'resourceType' when calling" + + " exportSecurityMonitoringTerraformResource")); + return result; + } + + // verify the required parameter 'resourceId' is set + if (resourceId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'resourceId' when calling" + + " exportSecurityMonitoringTerraformResource")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/entity_context"; + String localVarPath = + "/api/v2/security_monitoring/terraform/{resource_type}/{resource_id}" + .replaceAll( + "\\{" + "resource_type" + "\\}", apiClient.escapeString(resourceType.toString())) + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "as_of", asOf)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_token", pageToken)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getEntityContext", + "v2.SecurityMonitoringApi.exportSecurityMonitoringTerraformResource", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -11485,152 +11644,31 @@ public CompletableFuture> getEntityContextWit localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to getEntityContextRecentlyUpdated. */ - public static class GetEntityContextRecentlyUpdatedOptionalParameters { - private String query; - private EntityContextEntityType entityType; - private String from; - private String to; - private Long limit; - private EntityContextRevisionsMode revisions; - - /** - * Set query. - * - * @param query A free-text query (for example, an email address or principal ID) used to filter - * the entities returned. (optional) - * @return GetEntityContextRecentlyUpdatedOptionalParameters - */ - public GetEntityContextRecentlyUpdatedOptionalParameters query(String query) { - this.query = query; - return this; - } - - /** - * Set entityType. - * - * @param entityType The type of entity to retrieve. Only siem_entity_identity is - * currently supported. Defaults to siem_entity_identity. (optional, default to - * "siem_entity_identity") - * @return GetEntityContextRecentlyUpdatedOptionalParameters - */ - public GetEntityContextRecentlyUpdatedOptionalParameters entityType( - EntityContextEntityType entityType) { - this.entityType = entityType; - return this; - } - - /** - * Set from. - * - * @param from The start of the time range to query, as an RFC3339 timestamp or a relative time - * (for example, now-7d). Defaults to now-7d. (optional, default - * to "now-7d") - * @return GetEntityContextRecentlyUpdatedOptionalParameters - */ - public GetEntityContextRecentlyUpdatedOptionalParameters from(String from) { - this.from = from; - return this; - } - - /** - * Set to. - * - * @param to The end of the time range to query, as an RFC3339 timestamp or a relative time (for - * example, now). Defaults to now. Entities are ranked by their - * most recent revision within [from, to]. (optional, default to "now") - * @return GetEntityContextRecentlyUpdatedOptionalParameters - */ - public GetEntityContextRecentlyUpdatedOptionalParameters to(String to) { - this.to = to; - return this; - } - - /** - * Set limit. - * - * @param limit The number of entities to return. Must be between 1 and 100. (optional, default - * to 50) - * @return GetEntityContextRecentlyUpdatedOptionalParameters - */ - public GetEntityContextRecentlyUpdatedOptionalParameters limit(Long limit) { - this.limit = limit; - return this; - } - - /** - * Set revisions. - * - * @param revisions Which revisions to return for each entity: latest returns only - * the latest revision of each entity as of to, and all returns - * every revision in the requested time range. (optional, default to "latest") - * @return GetEntityContextRecentlyUpdatedOptionalParameters - */ - public GetEntityContextRecentlyUpdatedOptionalParameters revisions( - EntityContextRevisionsMode revisions) { - this.revisions = revisions; - return this; - } - } - - /** - * Get recently updated entity context. - * - *

See {@link #getEntityContextRecentlyUpdatedWithHttpInfo}. - * - * @return RecentlyUpdatedEntitiesResponse - * @throws ApiException if fails to make API call - */ - public RecentlyUpdatedEntitiesResponse getEntityContextRecentlyUpdated() throws ApiException { - return getEntityContextRecentlyUpdatedWithHttpInfo( - new GetEntityContextRecentlyUpdatedOptionalParameters()) - .getData(); - } - - /** - * Get recently updated entity context. - * - *

See {@link #getEntityContextRecentlyUpdatedWithHttpInfoAsync}. - * - * @return CompletableFuture<RecentlyUpdatedEntitiesResponse> - */ - public CompletableFuture getEntityContextRecentlyUpdatedAsync() { - return getEntityContextRecentlyUpdatedWithHttpInfoAsync( - new GetEntityContextRecentlyUpdatedOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * Get recently updated entity context. + * Get content pack states. * - *

See {@link #getEntityContextRecentlyUpdatedWithHttpInfo}. + *

See {@link #getContentPacksStatesWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return RecentlyUpdatedEntitiesResponse + * @return SecurityMonitoringContentPackStatesResponse * @throws ApiException if fails to make API call */ - public RecentlyUpdatedEntitiesResponse getEntityContextRecentlyUpdated( - GetEntityContextRecentlyUpdatedOptionalParameters parameters) throws ApiException { - return getEntityContextRecentlyUpdatedWithHttpInfo(parameters).getData(); + public SecurityMonitoringContentPackStatesResponse getContentPacksStates() throws ApiException { + return getContentPacksStatesWithHttpInfo().getData(); } /** - * Get recently updated entity context. + * Get content pack states. * - *

See {@link #getEntityContextRecentlyUpdatedWithHttpInfoAsync}. + *

See {@link #getContentPacksStatesWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<RecentlyUpdatedEntitiesResponse> + * @return CompletableFuture<SecurityMonitoringContentPackStatesResponse> */ - public CompletableFuture getEntityContextRecentlyUpdatedAsync( - GetEntityContextRecentlyUpdatedOptionalParameters parameters) { - return getEntityContextRecentlyUpdatedWithHttpInfoAsync(parameters) + public CompletableFuture + getContentPacksStatesAsync() { + return getContentPacksStatesWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -11638,57 +11676,41 @@ public CompletableFuture getEntityContextRecent } /** - * Get the entities with the most recent updates in the Cloud SIEM entity context store. Entities - * are ranked by the time of their most recent revision in the requested time range, and the top - * limit entities are returned in that order. This endpoint is not paginated. + * Get the activation state, integration status, and log collection status for all Cloud SIEM + * content packs. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<RecentlyUpdatedEntitiesResponse> + * @return ApiResponse<SecurityMonitoringContentPackStatesResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * - * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getEntityContextRecentlyUpdatedWithHttpInfo( - GetEntityContextRecentlyUpdatedOptionalParameters parameters) throws ApiException { + public ApiResponse + getContentPacksStatesWithHttpInfo() throws ApiException { // Check if unstable operation is enabled - String operationId = "getEntityContextRecentlyUpdated"; + String operationId = "getContentPacksStates"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - String query = parameters.query; - EntityContextEntityType entityType = parameters.entityType; - String from = parameters.from; - String to = parameters.to; - Long limit = parameters.limit; - EntityContextRevisionsMode revisions = parameters.revisions; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/entity_context/recently_updated"; + String localVarPath = "/api/v2/security_monitoring/content_packs/states"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "revisions", revisions)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getEntityContextRecentlyUpdated", + "v2.SecurityMonitoringApi.getContentPacksStates", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -11701,64 +11723,48 @@ public ApiResponse getEntityContextRecentlyUpda localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get recently updated entity context. + * Get content pack states. * - *

See {@link #getEntityContextRecentlyUpdatedWithHttpInfo}. + *

See {@link #getContentPacksStatesWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<RecentlyUpdatedEntitiesResponse>> + * @return CompletableFuture<ApiResponse<SecurityMonitoringContentPackStatesResponse>> */ - public CompletableFuture> - getEntityContextRecentlyUpdatedWithHttpInfoAsync( - GetEntityContextRecentlyUpdatedOptionalParameters parameters) { + public CompletableFuture> + getContentPacksStatesWithHttpInfoAsync() { // Check if unstable operation is enabled - String operationId = "getEntityContextRecentlyUpdated"; + String operationId = "getContentPacksStates"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - String query = parameters.query; - EntityContextEntityType entityType = parameters.entityType; - String from = parameters.from; - String to = parameters.to; - Long limit = parameters.limit; - EntityContextRevisionsMode revisions = parameters.revisions; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/entity_context/recently_updated"; + String localVarPath = "/api/v2/security_monitoring/content_packs/states"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "revisions", revisions)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getEntityContextRecentlyUpdated", + "v2.SecurityMonitoringApi.getContentPacksStates", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -11771,32 +11777,34 @@ public ApiResponse getEntityContextRecentlyUpda localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get Entra ID Azure App Registration prerequisites. + * Get critical assets affecting a specific rule. * - *

See {@link #getEntraIdAzureAppRegistrationsWithHttpInfo}. + *

See {@link #getCriticalAssetsAffectingRuleWithHttpInfo}. * - * @return SecurityMonitoringEntraIdAzureAppRegistrationsResponse + * @param ruleId The ID of the rule. (required) + * @return SecurityMonitoringCriticalAssetsResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringEntraIdAzureAppRegistrationsResponse getEntraIdAzureAppRegistrations() + public SecurityMonitoringCriticalAssetsResponse getCriticalAssetsAffectingRule(String ruleId) throws ApiException { - return getEntraIdAzureAppRegistrationsWithHttpInfo().getData(); + return getCriticalAssetsAffectingRuleWithHttpInfo(ruleId).getData(); } /** - * Get Entra ID Azure App Registration prerequisites. + * Get critical assets affecting a specific rule. * - *

See {@link #getEntraIdAzureAppRegistrationsWithHttpInfoAsync}. + *

See {@link #getCriticalAssetsAffectingRuleWithHttpInfoAsync}. * - * @return CompletableFuture<SecurityMonitoringEntraIdAzureAppRegistrationsResponse> + * @param ruleId The ID of the rule. (required) + * @return CompletableFuture<SecurityMonitoringCriticalAssetsResponse> */ - public CompletableFuture - getEntraIdAzureAppRegistrationsAsync() { - return getEntraIdAzureAppRegistrationsWithHttpInfoAsync() + public CompletableFuture + getCriticalAssetsAffectingRuleAsync(String ruleId) { + return getCriticalAssetsAffectingRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -11804,11 +11812,10 @@ public SecurityMonitoringEntraIdAzureAppRegistrationsResponse getEntraIdAzureApp } /** - * Get the Azure App Registrations discovered for the organization and whether at least one of - * them has resource collection enabled, which is a prerequisite for activating the Entra ID - * entity context sync integration. + * Get the list of critical assets that affect a specific existing rule by the rule's ID. * - * @return ApiResponse<SecurityMonitoringEntraIdAzureAppRegistrationsResponse> + * @param ruleId The ID of the rule. (required) + * @return ApiResponse<SecurityMonitoringCriticalAssetsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -11816,28 +11823,30 @@ public SecurityMonitoringEntraIdAzureAppRegistrationsResponse getEntraIdAzureApp * * * + * * *
Status Code Description Response Headers
200 OK -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - getEntraIdAzureAppRegistrationsWithHttpInfo() throws ApiException { - // Check if unstable operation is enabled - String operationId = "getEntraIdAzureAppRegistrations"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse + getCriticalAssetsAffectingRuleWithHttpInfo(String ruleId) throws ApiException { Object localVarPostBody = null; + + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'ruleId' when calling getCriticalAssetsAffectingRule"); + } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/integration_config/entra_id/azure_app_registrations"; + "/api/v2/security_monitoring/configuration/critical_assets/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getEntraIdAzureAppRegistrations", + "v2.SecurityMonitoringApi.getCriticalAssetsAffectingRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -11852,34 +11861,36 @@ public SecurityMonitoringEntraIdAzureAppRegistrationsResponse getEntraIdAzureApp localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get Entra ID Azure App Registration prerequisites. + * Get critical assets affecting a specific rule. * - *

See {@link #getEntraIdAzureAppRegistrationsWithHttpInfo}. + *

See {@link #getCriticalAssetsAffectingRuleWithHttpInfo}. * - * @return - * CompletableFuture<ApiResponse<SecurityMonitoringEntraIdAzureAppRegistrationsResponse>> + * @param ruleId The ID of the rule. (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringCriticalAssetsResponse>> */ - public CompletableFuture> - getEntraIdAzureAppRegistrationsWithHttpInfoAsync() { - // Check if unstable operation is enabled - String operationId = "getEntraIdAzureAppRegistrations"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> - result = new CompletableFuture<>(); + public CompletableFuture> + getCriticalAssetsAffectingRuleWithHttpInfoAsync(String ruleId) { + Object localVarPostBody = null; + + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + new ApiException( + 400, + "Missing the required parameter 'ruleId' when calling" + + " getCriticalAssetsAffectingRule")); return result; } - Object localVarPostBody = null; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/integration_config/entra_id/azure_app_registrations"; + "/api/v2/security_monitoring/configuration/critical_assets/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -11887,7 +11898,7 @@ public SecurityMonitoringEntraIdAzureAppRegistrationsResponse getEntraIdAzureApp try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getEntraIdAzureAppRegistrations", + "v2.SecurityMonitoringApi.getCriticalAssetsAffectingRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -11895,8 +11906,8 @@ public SecurityMonitoringEntraIdAzureAppRegistrationsResponse getEntraIdAzureApp new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> - result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -11908,82 +11919,36 @@ public SecurityMonitoringEntraIdAzureAppRegistrationsResponse getEntraIdAzureApp localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to getFinding. */ - public static class GetFindingOptionalParameters { - private Long snapshotTimestamp; - - /** - * Set snapshotTimestamp. - * - * @param snapshotTimestamp Return the finding for a given snapshot of time (Unix ms). - * (optional) - * @return GetFindingOptionalParameters - */ - public GetFindingOptionalParameters snapshotTimestamp(Long snapshotTimestamp) { - this.snapshotTimestamp = snapshotTimestamp; - return this; - } - } - - /** - * Get a finding. - * - *

See {@link #getFindingWithHttpInfo}. - * - * @param findingId The ID of the finding. (required) - * @return GetFindingResponse - * @throws ApiException if fails to make API call - */ - public GetFindingResponse getFinding(String findingId) throws ApiException { - return getFindingWithHttpInfo(findingId, new GetFindingOptionalParameters()).getData(); - } - - /** - * Get a finding. - * - *

See {@link #getFindingWithHttpInfoAsync}. - * - * @param findingId The ID of the finding. (required) - * @return CompletableFuture<GetFindingResponse> - */ - public CompletableFuture getFindingAsync(String findingId) { - return getFindingWithHttpInfoAsync(findingId, new GetFindingOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * Get a finding. + * Get a custom framework. * - *

See {@link #getFindingWithHttpInfo}. + *

See {@link #getCustomFrameworkWithHttpInfo}. * - * @param findingId The ID of the finding. (required) - * @param parameters Optional parameters for the request. - * @return GetFindingResponse + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return GetCustomFrameworkResponse * @throws ApiException if fails to make API call */ - public GetFindingResponse getFinding(String findingId, GetFindingOptionalParameters parameters) + public GetCustomFrameworkResponse getCustomFramework(String handle, String version) throws ApiException { - return getFindingWithHttpInfo(findingId, parameters).getData(); + return getCustomFrameworkWithHttpInfo(handle, version).getData(); } /** - * Get a finding. + * Get a custom framework. * - *

See {@link #getFindingWithHttpInfoAsync}. + *

See {@link #getCustomFrameworkWithHttpInfoAsync}. * - * @param findingId The ID of the finding. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<GetFindingResponse> + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return CompletableFuture<GetCustomFrameworkResponse> */ - public CompletableFuture getFindingAsync( - String findingId, GetFindingOptionalParameters parameters) { - return getFindingWithHttpInfoAsync(findingId, parameters) + public CompletableFuture getCustomFrameworkAsync( + String handle, String version) { + return getCustomFrameworkWithHttpInfoAsync(handle, version) .thenApply( response -> { return response.getData(); @@ -11991,56 +11956,50 @@ public CompletableFuture getFindingAsync( } /** - * Returns a single finding with message and resource configuration. + * Get a custom framework. * - * @param findingId The ID of the finding. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<GetFindingResponse> + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return ApiResponse<GetCustomFrameworkResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request: The server cannot process the request due to invalid syntax in the request. -
403 Forbidden: Access denied -
404 Not Found: The requested finding cannot be found. -
429 Too many requests: The rate limit set by the API has been exceeded. -
- */ - public ApiResponse getFindingWithHttpInfo( - String findingId, GetFindingOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "getFinding"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + * 400 Bad Request - + * 429 Too many requests - + * 500 Bad Request - + * + */ + public ApiResponse getCustomFrameworkWithHttpInfo( + String handle, String version) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'findingId' is set - if (findingId == null) { + // verify the required parameter 'handle' is set + if (handle == null) { throw new ApiException( - 400, "Missing the required parameter 'findingId' when calling getFinding"); + 400, "Missing the required parameter 'handle' when calling getCustomFramework"); + } + + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException( + 400, "Missing the required parameter 'version' when calling getCustomFramework"); } - Long snapshotTimestamp = parameters.snapshotTimestamp; // create path and map variables String localVarPath = - "/api/v2/posture_management/findings/{finding_id}" - .replaceAll("\\{" + "finding_id" + "\\}", apiClient.escapeString(findingId.toString())); + "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" + .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getFinding", + "v2.SecurityMonitoringApi.getCustomFramework", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -12053,65 +12012,60 @@ public ApiResponse getFindingWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a finding. + * Get a custom framework. * - *

See {@link #getFindingWithHttpInfo}. + *

See {@link #getCustomFrameworkWithHttpInfo}. * - * @param findingId The ID of the finding. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<GetFindingResponse>> + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return CompletableFuture<ApiResponse<GetCustomFrameworkResponse>> */ - public CompletableFuture> getFindingWithHttpInfoAsync( - String findingId, GetFindingOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "getFinding"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); + public CompletableFuture> + getCustomFrameworkWithHttpInfoAsync(String handle, String version) { + Object localVarPostBody = null; + + // verify the required parameter 'handle' is set + if (handle == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + new ApiException( + 400, "Missing the required parameter 'handle' when calling getCustomFramework")); return result; } - Object localVarPostBody = null; - // verify the required parameter 'findingId' is set - if (findingId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'version' is set + if (version == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'findingId' when calling getFinding")); + 400, "Missing the required parameter 'version' when calling getCustomFramework")); return result; } - Long snapshotTimestamp = parameters.snapshotTimestamp; // create path and map variables String localVarPath = - "/api/v2/posture_management/findings/{finding_id}" - .replaceAll("\\{" + "finding_id" + "\\}", apiClient.escapeString(findingId.toString())); + "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" + .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getFinding", + "v2.SecurityMonitoringApi.getCustomFramework", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -12123,32 +12077,129 @@ public CompletableFuture> getFindingWithHttpInfo localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to getEntityContext. */ + public static class GetEntityContextOptionalParameters { + private String query; + private EntityContextEntityType entityType; + private String from; + private String to; + private String asOf; + private Long limit; + private String pageToken; + + /** + * Set query. + * + * @param query A free-text query (for example, an email address or principal ID) used to filter + * the entities returned. (optional) + * @return GetEntityContextOptionalParameters + */ + public GetEntityContextOptionalParameters query(String query) { + this.query = query; + return this; + } + + /** + * Set entityType. + * + * @param entityType The type of entity to retrieve. Only siem_entity_identity is + * currently supported. Defaults to siem_entity_identity. (optional, default to + * "siem_entity_identity") + * @return GetEntityContextOptionalParameters + */ + public GetEntityContextOptionalParameters entityType(EntityContextEntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Set from. + * + * @param from The start of the time range to query, as an RFC3339 timestamp or a relative time + * (for example, now-7d). Defaults to now-7d. Ignored when + * as_of is set. (optional, default to "now-7d") + * @return GetEntityContextOptionalParameters + */ + public GetEntityContextOptionalParameters from(String from) { + this.from = from; + return this; + } + + /** + * Set to. + * + * @param to The end of the time range to query, as an RFC3339 timestamp or a relative time (for + * example, now). Defaults to now. Ignored when as_of + * is set. (optional, default to "now") + * @return GetEntityContextOptionalParameters + */ + public GetEntityContextOptionalParameters to(String to) { + this.to = to; + return this; + } + + /** + * Set asOf. + * + * @param asOf A point in time at which to query the entity revisions, as an RFC3339 timestamp, + * a Unix timestamp (in seconds), or a relative time (for example, now-1d). + * When set, from and to are ignored. Cannot be combined with + * custom from / to values. (optional) + * @return GetEntityContextOptionalParameters + */ + public GetEntityContextOptionalParameters asOf(String asOf) { + this.asOf = asOf; + return this; + } + + /** + * Set limit. + * + * @param limit The maximum number of entities to return. (optional, default to 250) + * @return GetEntityContextOptionalParameters + */ + public GetEntityContextOptionalParameters limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Set pageToken. + * + * @param pageToken An opaque token used to fetch the next page of results, as returned in + * meta.page.next_token of a previous response. (optional) + * @return GetEntityContextOptionalParameters + */ + public GetEntityContextOptionalParameters pageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } } /** - * Get a job's details. + * Get entity context. * - *

See {@link #getHistoricalJobWithHttpInfo}. + *

See {@link #getEntityContextWithHttpInfo}. * - * @param jobId The ID of the job. (required) - * @return HistoricalJobResponse + * @return EntityContextResponse * @throws ApiException if fails to make API call */ - public HistoricalJobResponse getHistoricalJob(String jobId) throws ApiException { - return getHistoricalJobWithHttpInfo(jobId).getData(); + public EntityContextResponse getEntityContext() throws ApiException { + return getEntityContextWithHttpInfo(new GetEntityContextOptionalParameters()).getData(); } /** - * Get a job's details. + * Get entity context. * - *

See {@link #getHistoricalJobWithHttpInfoAsync}. + *

See {@link #getEntityContextWithHttpInfoAsync}. * - * @param jobId The ID of the job. (required) - * @return CompletableFuture<HistoricalJobResponse> + * @return CompletableFuture<EntityContextResponse> */ - public CompletableFuture getHistoricalJobAsync(String jobId) { - return getHistoricalJobWithHttpInfoAsync(jobId) + public CompletableFuture getEntityContextAsync() { + return getEntityContextWithHttpInfoAsync(new GetEntityContextOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -12156,50 +12207,91 @@ public CompletableFuture getHistoricalJobAsync(String job } /** - * Get a job's details. + * Get entity context. * - * @param jobId The ID of the job. (required) - * @return ApiResponse<HistoricalJobResponse> + *

See {@link #getEntityContextWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return EntityContextResponse * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getHistoricalJobWithHttpInfo(String jobId) + public EntityContextResponse getEntityContext(GetEntityContextOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "getHistoricalJob"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = null; + return getEntityContextWithHttpInfo(parameters).getData(); + } - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException( - 400, "Missing the required parameter 'jobId' when calling getHistoricalJob"); - } - // create path and map variables - String localVarPath = - "/api/v2/siem-historical-detections/jobs/{job_id}" - .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); + /** + * Get entity context. + * + *

See {@link #getEntityContextWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<EntityContextResponse> + */ + public CompletableFuture getEntityContextAsync( + GetEntityContextOptionalParameters parameters) { + return getEntityContextWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search the Cloud SIEM entity context store for entities that match a query, and return the + * historical revisions of each entity in the requested time range. The endpoint can either return + * revisions across an interval (from / to) or the snapshot of each + * entity at a single point in time (as_of); the two modes are mutually exclusive. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<EntityContextResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
+ */ + public ApiResponse getEntityContextWithHttpInfo( + GetEntityContextOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getEntityContext"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + String query = parameters.query; + EntityContextEntityType entityType = parameters.entityType; + String from = parameters.from; + String to = parameters.to; + String asOf = parameters.asOf; + Long limit = parameters.limit; + String pageToken = parameters.pageToken; + // create path and map variables + String localVarPath = "/api/v2/security_monitoring/entity_context"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "as_of", asOf)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_token", pageToken)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getHistoricalJob", + "v2.SecurityMonitoringApi.getEntityContext", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -12212,59 +12304,64 @@ public ApiResponse getHistoricalJobWithHttpInfo(String jo localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a job's details. + * Get entity context. * - *

See {@link #getHistoricalJobWithHttpInfo}. + *

See {@link #getEntityContextWithHttpInfo}. * - * @param jobId The ID of the job. (required) - * @return CompletableFuture<ApiResponse<HistoricalJobResponse>> + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<EntityContextResponse>> */ - public CompletableFuture> getHistoricalJobWithHttpInfoAsync( - String jobId) { + public CompletableFuture> getEntityContextWithHttpInfoAsync( + GetEntityContextOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "getHistoricalJob"; + String operationId = "getEntityContext"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - - // verify the required parameter 'jobId' is set - if (jobId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'jobId' when calling getHistoricalJob")); - return result; - } + String query = parameters.query; + EntityContextEntityType entityType = parameters.entityType; + String from = parameters.from; + String to = parameters.to; + String asOf = parameters.asOf; + Long limit = parameters.limit; + String pageToken = parameters.pageToken; // create path and map variables - String localVarPath = - "/api/v2/siem-historical-detections/jobs/{job_id}" - .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); + String localVarPath = "/api/v2/security_monitoring/entity_context"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "as_of", asOf)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_token", pageToken)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getHistoricalJob", + "v2.SecurityMonitoringApi.getEntityContext", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -12276,97 +12373,121 @@ public CompletableFuture> getHistoricalJobWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to getIndicatorOfCompromise. */ - public static class GetIndicatorOfCompromiseOptionalParameters { - private Boolean ocsf; - private Boolean includeTriageHistory; - private Integer triageHistoryLimit; - private Integer triageHistoryOffset; + /** Manage optional parameters to getEntityContextRecentlyUpdated. */ + public static class GetEntityContextRecentlyUpdatedOptionalParameters { + private String query; + private EntityContextEntityType entityType; + private String from; + private String to; + private Long limit; + private EntityContextRevisionsMode revisions; /** - * Set ocsf. + * Set query. * - * @param ocsf When true, return only OCSF field-based matches. When false, return - * regex/message-based matches. (optional, default to true) - * @return GetIndicatorOfCompromiseOptionalParameters + * @param query A free-text query (for example, an email address or principal ID) used to filter + * the entities returned. (optional) + * @return GetEntityContextRecentlyUpdatedOptionalParameters */ - public GetIndicatorOfCompromiseOptionalParameters ocsf(Boolean ocsf) { - this.ocsf = ocsf; + public GetEntityContextRecentlyUpdatedOptionalParameters query(String query) { + this.query = query; return this; } /** - * Set includeTriageHistory. + * Set entityType. * - * @param includeTriageHistory Include full triage history for the indicator. (optional, default - * to false) - * @return GetIndicatorOfCompromiseOptionalParameters + * @param entityType The type of entity to retrieve. Only siem_entity_identity is + * currently supported. Defaults to siem_entity_identity. (optional, default to + * "siem_entity_identity") + * @return GetEntityContextRecentlyUpdatedOptionalParameters */ - public GetIndicatorOfCompromiseOptionalParameters includeTriageHistory( - Boolean includeTriageHistory) { - this.includeTriageHistory = includeTriageHistory; + public GetEntityContextRecentlyUpdatedOptionalParameters entityType( + EntityContextEntityType entityType) { + this.entityType = entityType; return this; } /** - * Set triageHistoryLimit. + * Set from. * - * @param triageHistoryLimit Maximum number of triage history events returned. Only applied when - * include_triage_history is true. (optional, default to 50) - * @return GetIndicatorOfCompromiseOptionalParameters + * @param from The start of the time range to query, as an RFC3339 timestamp or a relative time + * (for example, now-7d). Defaults to now-7d. (optional, default + * to "now-7d") + * @return GetEntityContextRecentlyUpdatedOptionalParameters */ - public GetIndicatorOfCompromiseOptionalParameters triageHistoryLimit( - Integer triageHistoryLimit) { - this.triageHistoryLimit = triageHistoryLimit; + public GetEntityContextRecentlyUpdatedOptionalParameters from(String from) { + this.from = from; return this; } /** - * Set triageHistoryOffset. + * Set to. * - * @param triageHistoryOffset Pagination offset into the triage history. Only applied when - * include_triage_history is true. (optional, default to 0) - * @return GetIndicatorOfCompromiseOptionalParameters + * @param to The end of the time range to query, as an RFC3339 timestamp or a relative time (for + * example, now). Defaults to now. Entities are ranked by their + * most recent revision within [from, to]. (optional, default to "now") + * @return GetEntityContextRecentlyUpdatedOptionalParameters */ - public GetIndicatorOfCompromiseOptionalParameters triageHistoryOffset( - Integer triageHistoryOffset) { - this.triageHistoryOffset = triageHistoryOffset; + public GetEntityContextRecentlyUpdatedOptionalParameters to(String to) { + this.to = to; + return this; + } + + /** + * Set limit. + * + * @param limit The number of entities to return. Must be between 1 and 100. (optional, default + * to 50) + * @return GetEntityContextRecentlyUpdatedOptionalParameters + */ + public GetEntityContextRecentlyUpdatedOptionalParameters limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Set revisions. + * + * @param revisions Which revisions to return for each entity: latest returns only + * the latest revision of each entity as of to, and all returns + * every revision in the requested time range. (optional, default to "latest") + * @return GetEntityContextRecentlyUpdatedOptionalParameters + */ + public GetEntityContextRecentlyUpdatedOptionalParameters revisions( + EntityContextRevisionsMode revisions) { + this.revisions = revisions; return this; } } /** - * Get an indicator of compromise. + * Get recently updated entity context. * - *

See {@link #getIndicatorOfCompromiseWithHttpInfo}. + *

See {@link #getEntityContextRecentlyUpdatedWithHttpInfo}. * - * @param indicator The indicator value to look up (for example, an IP address or domain). - * (required) - * @return GetIoCIndicatorResponse + * @return RecentlyUpdatedEntitiesResponse * @throws ApiException if fails to make API call */ - public GetIoCIndicatorResponse getIndicatorOfCompromise(String indicator) throws ApiException { - return getIndicatorOfCompromiseWithHttpInfo( - indicator, new GetIndicatorOfCompromiseOptionalParameters()) + public RecentlyUpdatedEntitiesResponse getEntityContextRecentlyUpdated() throws ApiException { + return getEntityContextRecentlyUpdatedWithHttpInfo( + new GetEntityContextRecentlyUpdatedOptionalParameters()) .getData(); } /** - * Get an indicator of compromise. + * Get recently updated entity context. * - *

See {@link #getIndicatorOfCompromiseWithHttpInfoAsync}. + *

See {@link #getEntityContextRecentlyUpdatedWithHttpInfoAsync}. * - * @param indicator The indicator value to look up (for example, an IP address or domain). - * (required) - * @return CompletableFuture<GetIoCIndicatorResponse> + * @return CompletableFuture<RecentlyUpdatedEntitiesResponse> */ - public CompletableFuture getIndicatorOfCompromiseAsync( - String indicator) { - return getIndicatorOfCompromiseWithHttpInfoAsync( - indicator, new GetIndicatorOfCompromiseOptionalParameters()) + public CompletableFuture getEntityContextRecentlyUpdatedAsync() { + return getEntityContextRecentlyUpdatedWithHttpInfoAsync( + new GetEntityContextRecentlyUpdatedOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -12374,34 +12495,30 @@ indicator, new GetIndicatorOfCompromiseOptionalParameters()) } /** - * Get an indicator of compromise. + * Get recently updated entity context. * - *

See {@link #getIndicatorOfCompromiseWithHttpInfo}. + *

See {@link #getEntityContextRecentlyUpdatedWithHttpInfo}. * - * @param indicator The indicator value to look up (for example, an IP address or domain). - * (required) * @param parameters Optional parameters for the request. - * @return GetIoCIndicatorResponse + * @return RecentlyUpdatedEntitiesResponse * @throws ApiException if fails to make API call */ - public GetIoCIndicatorResponse getIndicatorOfCompromise( - String indicator, GetIndicatorOfCompromiseOptionalParameters parameters) throws ApiException { - return getIndicatorOfCompromiseWithHttpInfo(indicator, parameters).getData(); + public RecentlyUpdatedEntitiesResponse getEntityContextRecentlyUpdated( + GetEntityContextRecentlyUpdatedOptionalParameters parameters) throws ApiException { + return getEntityContextRecentlyUpdatedWithHttpInfo(parameters).getData(); } /** - * Get an indicator of compromise. + * Get recently updated entity context. * - *

See {@link #getIndicatorOfCompromiseWithHttpInfoAsync}. + *

See {@link #getEntityContextRecentlyUpdatedWithHttpInfoAsync}. * - * @param indicator The indicator value to look up (for example, an IP address or domain). - * (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<GetIoCIndicatorResponse> + * @return CompletableFuture<RecentlyUpdatedEntitiesResponse> */ - public CompletableFuture getIndicatorOfCompromiseAsync( - String indicator, GetIndicatorOfCompromiseOptionalParameters parameters) { - return getIndicatorOfCompromiseWithHttpInfoAsync(indicator, parameters) + public CompletableFuture getEntityContextRecentlyUpdatedAsync( + GetEntityContextRecentlyUpdatedOptionalParameters parameters) { + return getEntityContextRecentlyUpdatedWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -12409,12 +12526,12 @@ public CompletableFuture getIndicatorOfCompromiseAsync( } /** - * Get detailed information about a specific indicator of compromise (IoC). + * Get the entities with the most recent updates in the Cloud SIEM entity context store. Entities + * are ranked by the time of their most recent revision in the requested time range, and the top + * limit entities are returned in that order. This endpoint is not paginated. * - * @param indicator The indicator value to look up (for example, an IP address or domain). - * (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<GetIoCIndicatorResponse> + * @return ApiResponse<RecentlyUpdatedEntitiesResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -12423,48 +12540,41 @@ public CompletableFuture getIndicatorOfCompromiseAsync( * * * - * * *
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getIndicatorOfCompromiseWithHttpInfo( - String indicator, GetIndicatorOfCompromiseOptionalParameters parameters) throws ApiException { + public ApiResponse getEntityContextRecentlyUpdatedWithHttpInfo( + GetEntityContextRecentlyUpdatedOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "getIndicatorOfCompromise"; + String operationId = "getEntityContextRecentlyUpdated"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - - // verify the required parameter 'indicator' is set - if (indicator == null) { - throw new ApiException( - 400, "Missing the required parameter 'indicator' when calling getIndicatorOfCompromise"); - } - Boolean ocsf = parameters.ocsf; - Boolean includeTriageHistory = parameters.includeTriageHistory; - Integer triageHistoryLimit = parameters.triageHistoryLimit; - Integer triageHistoryOffset = parameters.triageHistoryOffset; + String query = parameters.query; + EntityContextEntityType entityType = parameters.entityType; + String from = parameters.from; + String to = parameters.to; + Long limit = parameters.limit; + EntityContextRevisionsMode revisions = parameters.revisions; // create path and map variables - String localVarPath = "/api/v2/security/siem/ioc-explorer/indicator"; + String localVarPath = "/api/v2/security_monitoring/entity_context/recently_updated"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "indicator", indicator)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "ocsf", ocsf)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_triage_history", includeTriageHistory)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "triage_history_limit", triageHistoryLimit)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "triage_history_offset", triageHistoryOffset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "revisions", revisions)); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getIndicatorOfCompromise", + "v2.SecurityMonitoringApi.getEntityContextRecentlyUpdated", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -12479,67 +12589,56 @@ public ApiResponse getIndicatorOfCompromiseWithHttpInfo localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get an indicator of compromise. + * Get recently updated entity context. * - *

See {@link #getIndicatorOfCompromiseWithHttpInfo}. + *

See {@link #getEntityContextRecentlyUpdatedWithHttpInfo}. * - * @param indicator The indicator value to look up (for example, an IP address or domain). - * (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<GetIoCIndicatorResponse>> + * @return CompletableFuture<ApiResponse<RecentlyUpdatedEntitiesResponse>> */ - public CompletableFuture> - getIndicatorOfCompromiseWithHttpInfoAsync( - String indicator, GetIndicatorOfCompromiseOptionalParameters parameters) { + public CompletableFuture> + getEntityContextRecentlyUpdatedWithHttpInfoAsync( + GetEntityContextRecentlyUpdatedOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "getIndicatorOfCompromise"; + String operationId = "getEntityContextRecentlyUpdated"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - - // verify the required parameter 'indicator' is set - if (indicator == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'indicator' when calling getIndicatorOfCompromise")); - return result; - } - Boolean ocsf = parameters.ocsf; - Boolean includeTriageHistory = parameters.includeTriageHistory; - Integer triageHistoryLimit = parameters.triageHistoryLimit; - Integer triageHistoryOffset = parameters.triageHistoryOffset; + String query = parameters.query; + EntityContextEntityType entityType = parameters.entityType; + String from = parameters.from; + String to = parameters.to; + Long limit = parameters.limit; + EntityContextRevisionsMode revisions = parameters.revisions; // create path and map variables - String localVarPath = "/api/v2/security/siem/ioc-explorer/indicator"; + String localVarPath = "/api/v2/security_monitoring/entity_context/recently_updated"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "indicator", indicator)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "ocsf", ocsf)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_triage_history", includeTriageHistory)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "triage_history_limit", triageHistoryLimit)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "triage_history_offset", triageHistoryOffset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "revisions", revisions)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getIndicatorOfCompromise", + "v2.SecurityMonitoringApi.getEntityContextRecentlyUpdated", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -12547,7 +12646,8 @@ public ApiResponse getIndicatorOfCompromiseWithHttpInfo new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -12559,34 +12659,32 @@ public ApiResponse getIndicatorOfCompromiseWithHttpInfo localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get investigation queries for a signal. + * Get Entra ID Azure App Registration prerequisites. * - *

See {@link #getInvestigationLogQueriesMatchingSignalWithHttpInfo}. + *

See {@link #getEntraIdAzureAppRegistrationsWithHttpInfo}. * - * @param signalId The ID of the signal. (required) - * @return SecurityMonitoringSignalSuggestedActionsResponse + * @return SecurityMonitoringEntraIdAzureAppRegistrationsResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringSignalSuggestedActionsResponse getInvestigationLogQueriesMatchingSignal( - String signalId) throws ApiException { - return getInvestigationLogQueriesMatchingSignalWithHttpInfo(signalId).getData(); + public SecurityMonitoringEntraIdAzureAppRegistrationsResponse getEntraIdAzureAppRegistrations() + throws ApiException { + return getEntraIdAzureAppRegistrationsWithHttpInfo().getData(); } /** - * Get investigation queries for a signal. + * Get Entra ID Azure App Registration prerequisites. * - *

See {@link #getInvestigationLogQueriesMatchingSignalWithHttpInfoAsync}. + *

See {@link #getEntraIdAzureAppRegistrationsWithHttpInfoAsync}. * - * @param signalId The ID of the signal. (required) - * @return CompletableFuture<SecurityMonitoringSignalSuggestedActionsResponse> + * @return CompletableFuture<SecurityMonitoringEntraIdAzureAppRegistrationsResponse> */ - public CompletableFuture - getInvestigationLogQueriesMatchingSignalAsync(String signalId) { - return getInvestigationLogQueriesMatchingSignalWithHttpInfoAsync(signalId) + public CompletableFuture + getEntraIdAzureAppRegistrationsAsync() { + return getEntraIdAzureAppRegistrationsWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -12594,10 +12692,11 @@ public SecurityMonitoringSignalSuggestedActionsResponse getInvestigationLogQueri } /** - * Get the list of investigation log queries available for a given security signal. + * Get the Azure App Registrations discovered for the organization and whether at least one of + * them has resource collection enabled, which is a prerequisite for activating the Entra ID + * entity context sync integration. * - * @param signalId The ID of the signal. (required) - * @return ApiResponse<SecurityMonitoringSignalSuggestedActionsResponse> + * @return ApiResponse<SecurityMonitoringEntraIdAzureAppRegistrationsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -12605,31 +12704,28 @@ public SecurityMonitoringSignalSuggestedActionsResponse getInvestigationLogQueri * * * - * * *
Status Code Description Response Headers
200 OK -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - getInvestigationLogQueriesMatchingSignalWithHttpInfo(String signalId) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'signalId' is set - if (signalId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " getInvestigationLogQueriesMatchingSignal"); + public ApiResponse + getEntraIdAzureAppRegistrationsWithHttpInfo() throws ApiException { + // Check if unstable operation is enabled + String operationId = "getEntraIdAzureAppRegistrations"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } + Object localVarPostBody = null; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/investigation_queries" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + "/api/v2/security_monitoring/configuration/integration_config/entra_id/azure_app_registrations"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getInvestigationLogQueriesMatchingSignal", + "v2.SecurityMonitoringApi.getEntraIdAzureAppRegistrations", localVarPath, new ArrayList(), localVarHeaderParams, @@ -12644,37 +12740,34 @@ public SecurityMonitoringSignalSuggestedActionsResponse getInvestigationLogQueri localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get investigation queries for a signal. + * Get Entra ID Azure App Registration prerequisites. * - *

See {@link #getInvestigationLogQueriesMatchingSignalWithHttpInfo}. + *

See {@link #getEntraIdAzureAppRegistrationsWithHttpInfo}. * - * @param signalId The ID of the signal. (required) * @return - * CompletableFuture<ApiResponse<SecurityMonitoringSignalSuggestedActionsResponse>> + * CompletableFuture<ApiResponse<SecurityMonitoringEntraIdAzureAppRegistrationsResponse>> */ - public CompletableFuture> - getInvestigationLogQueriesMatchingSignalWithHttpInfoAsync(String signalId) { - Object localVarPostBody = null; - - // verify the required parameter 'signalId' is set - if (signalId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + public CompletableFuture> + getEntraIdAzureAppRegistrationsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "getEntraIdAzureAppRegistrations"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> + result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'signalId' when calling" - + " getInvestigationLogQueriesMatchingSignal")); + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } + Object localVarPostBody = null; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/investigation_queries" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + "/api/v2/security_monitoring/configuration/integration_config/entra_id/azure_app_registrations"; Map localVarHeaderParams = new HashMap(); @@ -12682,7 +12775,7 @@ public SecurityMonitoringSignalSuggestedActionsResponse getInvestigationLogQueri try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getInvestigationLogQueriesMatchingSignal", + "v2.SecurityMonitoringApi.getEntraIdAzureAppRegistrations", localVarPath, new ArrayList(), localVarHeaderParams, @@ -12690,8 +12783,8 @@ public SecurityMonitoringSignalSuggestedActionsResponse getInvestigationLogQueri new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> + result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -12703,36 +12796,82 @@ public SecurityMonitoringSignalSuggestedActionsResponse getInvestigationLogQueri localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to getFinding. */ + public static class GetFindingOptionalParameters { + private Long snapshotTimestamp; + + /** + * Set snapshotTimestamp. + * + * @param snapshotTimestamp Return the finding for a given snapshot of time (Unix ms). + * (optional) + * @return GetFindingOptionalParameters + */ + public GetFindingOptionalParameters snapshotTimestamp(Long snapshotTimestamp) { + this.snapshotTimestamp = snapshotTimestamp; + return this; + } } /** - * Get signals matching an event. + * Get a finding. * - *

See {@link #getMatchingSignalsWithHttpInfo}. + *

See {@link #getFindingWithHttpInfo}. * - * @param eventId The ID of the event to find matching signals for. (required) - * @param track The product track that the event belongs to. (required) - * @return MatchingSignalsResponse + * @param findingId The ID of the finding. (required) + * @return GetFindingResponse * @throws ApiException if fails to make API call */ - public MatchingSignalsResponse getMatchingSignals(String eventId, String track) + public GetFindingResponse getFinding(String findingId) throws ApiException { + return getFindingWithHttpInfo(findingId, new GetFindingOptionalParameters()).getData(); + } + + /** + * Get a finding. + * + *

See {@link #getFindingWithHttpInfoAsync}. + * + * @param findingId The ID of the finding. (required) + * @return CompletableFuture<GetFindingResponse> + */ + public CompletableFuture getFindingAsync(String findingId) { + return getFindingWithHttpInfoAsync(findingId, new GetFindingOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a finding. + * + *

See {@link #getFindingWithHttpInfo}. + * + * @param findingId The ID of the finding. (required) + * @param parameters Optional parameters for the request. + * @return GetFindingResponse + * @throws ApiException if fails to make API call + */ + public GetFindingResponse getFinding(String findingId, GetFindingOptionalParameters parameters) throws ApiException { - return getMatchingSignalsWithHttpInfo(eventId, track).getData(); + return getFindingWithHttpInfo(findingId, parameters).getData(); } /** - * Get signals matching an event. + * Get a finding. * - *

See {@link #getMatchingSignalsWithHttpInfoAsync}. + *

See {@link #getFindingWithHttpInfoAsync}. * - * @param eventId The ID of the event to find matching signals for. (required) - * @param track The product track that the event belongs to. (required) - * @return CompletableFuture<MatchingSignalsResponse> + * @param findingId The ID of the finding. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<GetFindingResponse> */ - public CompletableFuture getMatchingSignalsAsync( - String eventId, String track) { - return getMatchingSignalsWithHttpInfoAsync(eventId, track) + public CompletableFuture getFindingAsync( + String findingId, GetFindingOptionalParameters parameters) { + return getFindingWithHttpInfoAsync(findingId, parameters) .thenApply( response -> { return response.getData(); @@ -12740,27 +12879,27 @@ public CompletableFuture getMatchingSignalsAsync( } /** - * Returns the list of security signals that match a given event on the given track. + * Returns a single finding with message and resource configuration. * - * @param eventId The ID of the event to find matching signals for. (required) - * @param track The product track that the event belongs to. (required) - * @return ApiResponse<MatchingSignalsResponse> + * @param findingId The ID of the finding. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<GetFindingResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * - * - * - * + * + * + * + * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
400 Bad Request: The server cannot process the request due to invalid syntax in the request. -
403 Forbidden: Access denied -
404 Not Found: The requested finding cannot be found. -
429 Too many requests: The rate limit set by the API has been exceeded. -
*/ - public ApiResponse getMatchingSignalsWithHttpInfo( - String eventId, String track) throws ApiException { + public ApiResponse getFindingWithHttpInfo( + String findingId, GetFindingOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "getMatchingSignals"; + String operationId = "getFinding"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -12768,30 +12907,26 @@ public ApiResponse getMatchingSignalsWithHttpInfo( } Object localVarPostBody = null; - // verify the required parameter 'eventId' is set - if (eventId == null) { - throw new ApiException( - 400, "Missing the required parameter 'eventId' when calling getMatchingSignals"); - } - - // verify the required parameter 'track' is set - if (track == null) { + // verify the required parameter 'findingId' is set + if (findingId == null) { throw new ApiException( - 400, "Missing the required parameter 'track' when calling getMatchingSignals"); + 400, "Missing the required parameter 'findingId' when calling getFinding"); } + Long snapshotTimestamp = parameters.snapshotTimestamp; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/events/{event_id}/matching_signals" - .replaceAll("\\{" + "event_id" + "\\}", apiClient.escapeString(eventId.toString())); + "/api/v2/posture_management/findings/{finding_id}" + .replaceAll("\\{" + "finding_id" + "\\}", apiClient.escapeString(findingId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "track", track)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp)); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getMatchingSignals", + "v2.SecurityMonitoringApi.getFinding", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -12806,64 +12941,57 @@ public ApiResponse getMatchingSignalsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get signals matching an event. + * Get a finding. * - *

See {@link #getMatchingSignalsWithHttpInfo}. + *

See {@link #getFindingWithHttpInfo}. * - * @param eventId The ID of the event to find matching signals for. (required) - * @param track The product track that the event belongs to. (required) - * @return CompletableFuture<ApiResponse<MatchingSignalsResponse>> + * @param findingId The ID of the finding. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<GetFindingResponse>> */ - public CompletableFuture> - getMatchingSignalsWithHttpInfoAsync(String eventId, String track) { + public CompletableFuture> getFindingWithHttpInfoAsync( + String findingId, GetFindingOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "getMatchingSignals"; + String operationId = "getFinding"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'eventId' is set - if (eventId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'eventId' when calling getMatchingSignals")); - return result; - } - - // verify the required parameter 'track' is set - if (track == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'findingId' is set + if (findingId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'track' when calling getMatchingSignals")); + 400, "Missing the required parameter 'findingId' when calling getFinding")); return result; } + Long snapshotTimestamp = parameters.snapshotTimestamp; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/events/{event_id}/matching_signals" - .replaceAll("\\{" + "event_id" + "\\}", apiClient.escapeString(eventId.toString())); + "/api/v2/posture_management/findings/{finding_id}" + .replaceAll("\\{" + "finding_id" + "\\}", apiClient.escapeString(findingId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "track", track)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getMatchingSignals", + "v2.SecurityMonitoringApi.getFinding", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -12871,7 +12999,7 @@ public ApiResponse getMatchingSignalsWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -12883,107 +13011,32 @@ public ApiResponse getMatchingSignalsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to getResourceEvaluationFilters. */ - public static class GetResourceEvaluationFiltersOptionalParameters { - private String cloudProvider; - private String accountId; - private Boolean skipCache; - - /** - * Set cloudProvider. - * - * @param cloudProvider Filter resource filters by cloud provider (e.g. aws, gcp, azure). - * (optional) - * @return GetResourceEvaluationFiltersOptionalParameters - */ - public GetResourceEvaluationFiltersOptionalParameters cloudProvider(String cloudProvider) { - this.cloudProvider = cloudProvider; - return this; - } - - /** - * Set accountId. - * - * @param accountId Filter resource filters by cloud provider account ID. This parameter is only - * valid when provider is specified. (optional) - * @return GetResourceEvaluationFiltersOptionalParameters - */ - public GetResourceEvaluationFiltersOptionalParameters accountId(String accountId) { - this.accountId = accountId; - return this; - } - - /** - * Set skipCache. - * - * @param skipCache Skip cache for resource filters. (optional) - * @return GetResourceEvaluationFiltersOptionalParameters - */ - public GetResourceEvaluationFiltersOptionalParameters skipCache(Boolean skipCache) { - this.skipCache = skipCache; - return this; - } - } - - /** - * List resource filters. - * - *

See {@link #getResourceEvaluationFiltersWithHttpInfo}. - * - * @return GetResourceEvaluationFiltersResponse - * @throws ApiException if fails to make API call - */ - public GetResourceEvaluationFiltersResponse getResourceEvaluationFilters() throws ApiException { - return getResourceEvaluationFiltersWithHttpInfo( - new GetResourceEvaluationFiltersOptionalParameters()) - .getData(); - } - - /** - * List resource filters. - * - *

See {@link #getResourceEvaluationFiltersWithHttpInfoAsync}. - * - * @return CompletableFuture<GetResourceEvaluationFiltersResponse> - */ - public CompletableFuture - getResourceEvaluationFiltersAsync() { - return getResourceEvaluationFiltersWithHttpInfoAsync( - new GetResourceEvaluationFiltersOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * List resource filters. + * Get a job's details. * - *

See {@link #getResourceEvaluationFiltersWithHttpInfo}. + *

See {@link #getHistoricalJobWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return GetResourceEvaluationFiltersResponse + * @param jobId The ID of the job. (required) + * @return HistoricalJobResponse * @throws ApiException if fails to make API call */ - public GetResourceEvaluationFiltersResponse getResourceEvaluationFilters( - GetResourceEvaluationFiltersOptionalParameters parameters) throws ApiException { - return getResourceEvaluationFiltersWithHttpInfo(parameters).getData(); + public HistoricalJobResponse getHistoricalJob(String jobId) throws ApiException { + return getHistoricalJobWithHttpInfo(jobId).getData(); } /** - * List resource filters. + * Get a job's details. * - *

See {@link #getResourceEvaluationFiltersWithHttpInfoAsync}. + *

See {@link #getHistoricalJobWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<GetResourceEvaluationFiltersResponse> + * @param jobId The ID of the job. (required) + * @return CompletableFuture<HistoricalJobResponse> */ - public CompletableFuture getResourceEvaluationFiltersAsync( - GetResourceEvaluationFiltersOptionalParameters parameters) { - return getResourceEvaluationFiltersWithHttpInfoAsync(parameters) + public CompletableFuture getHistoricalJobAsync(String jobId) { + return getHistoricalJobWithHttpInfoAsync(jobId) .thenApply( response -> { return response.getData(); @@ -12991,10 +13044,10 @@ public CompletableFuture getResourceEvalua } /** - * List resource filters. + * Get a job's details. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<GetResourceEvaluationFiltersResponse> + * @param jobId The ID of the job. (required) + * @return ApiResponse<HistoricalJobResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -13003,30 +13056,38 @@ public CompletableFuture getResourceEvalua * * * + * * *
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getResourceEvaluationFiltersWithHttpInfo( - GetResourceEvaluationFiltersOptionalParameters parameters) throws ApiException { + public ApiResponse getHistoricalJobWithHttpInfo(String jobId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getHistoricalJob"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; - String cloudProvider = parameters.cloudProvider; - String accountId = parameters.accountId; - Boolean skipCache = parameters.skipCache; + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException( + 400, "Missing the required parameter 'jobId' when calling getHistoricalJob"); + } // create path and map variables - String localVarPath = "/api/v2/cloud_security_management/resource_filters"; + String localVarPath = + "/api/v2/siem-historical-detections/jobs/{job_id}" + .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "cloud_provider", cloudProvider)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "account_id", accountId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "skip_cache", skipCache)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getResourceEvaluationFilters", + "v2.SecurityMonitoringApi.getHistoricalJob", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -13039,48 +13100,59 @@ public ApiResponse getResourceEvaluationFi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List resource filters. + * Get a job's details. * - *

See {@link #getResourceEvaluationFiltersWithHttpInfo}. + *

See {@link #getHistoricalJobWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<GetResourceEvaluationFiltersResponse>> + * @param jobId The ID of the job. (required) + * @return CompletableFuture<ApiResponse<HistoricalJobResponse>> */ - public CompletableFuture> - getResourceEvaluationFiltersWithHttpInfoAsync( - GetResourceEvaluationFiltersOptionalParameters parameters) { + public CompletableFuture> getHistoricalJobWithHttpInfoAsync( + String jobId) { + // Check if unstable operation is enabled + String operationId = "getHistoricalJob"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; - String cloudProvider = parameters.cloudProvider; - String accountId = parameters.accountId; - Boolean skipCache = parameters.skipCache; + + // verify the required parameter 'jobId' is set + if (jobId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'jobId' when calling getHistoricalJob")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/cloud_security_management/resource_filters"; + String localVarPath = + "/api/v2/siem-historical-detections/jobs/{job_id}" + .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "cloud_provider", cloudProvider)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "account_id", accountId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "skip_cache", skipCache)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getResourceEvaluationFilters", + "v2.SecurityMonitoringApi.getHistoricalJob", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -13092,64 +13164,97 @@ public ApiResponse getResourceEvaluationFi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to getRuleVersionHistory. */ - public static class GetRuleVersionHistoryOptionalParameters { - private Long pageSize; - private Long pageNumber; + /** Manage optional parameters to getIndicatorOfCompromise. */ + public static class GetIndicatorOfCompromiseOptionalParameters { + private Boolean ocsf; + private Boolean includeTriageHistory; + private Integer triageHistoryLimit; + private Integer triageHistoryOffset; /** - * Set pageSize. + * Set ocsf. * - * @param pageSize Number of items to return per page. The maximum allowed value is 100. - * (optional, default to 10) - * @return GetRuleVersionHistoryOptionalParameters + * @param ocsf When true, return only OCSF field-based matches. When false, return + * regex/message-based matches. (optional, default to true) + * @return GetIndicatorOfCompromiseOptionalParameters */ - public GetRuleVersionHistoryOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; + public GetIndicatorOfCompromiseOptionalParameters ocsf(Boolean ocsf) { + this.ocsf = ocsf; return this; } /** - * Set pageNumber. + * Set includeTriageHistory. * - * @param pageNumber Specific page number to return. (optional, default to 0) - * @return GetRuleVersionHistoryOptionalParameters + * @param includeTriageHistory Include full triage history for the indicator. (optional, default + * to false) + * @return GetIndicatorOfCompromiseOptionalParameters */ - public GetRuleVersionHistoryOptionalParameters pageNumber(Long pageNumber) { - this.pageNumber = pageNumber; + public GetIndicatorOfCompromiseOptionalParameters includeTriageHistory( + Boolean includeTriageHistory) { + this.includeTriageHistory = includeTriageHistory; + return this; + } + + /** + * Set triageHistoryLimit. + * + * @param triageHistoryLimit Maximum number of triage history events returned. Only applied when + * include_triage_history is true. (optional, default to 50) + * @return GetIndicatorOfCompromiseOptionalParameters + */ + public GetIndicatorOfCompromiseOptionalParameters triageHistoryLimit( + Integer triageHistoryLimit) { + this.triageHistoryLimit = triageHistoryLimit; + return this; + } + + /** + * Set triageHistoryOffset. + * + * @param triageHistoryOffset Pagination offset into the triage history. Only applied when + * include_triage_history is true. (optional, default to 0) + * @return GetIndicatorOfCompromiseOptionalParameters + */ + public GetIndicatorOfCompromiseOptionalParameters triageHistoryOffset( + Integer triageHistoryOffset) { + this.triageHistoryOffset = triageHistoryOffset; return this; } } /** - * Get a rule's version history. + * Get an indicator of compromise. * - *

See {@link #getRuleVersionHistoryWithHttpInfo}. + *

See {@link #getIndicatorOfCompromiseWithHttpInfo}. * - * @param ruleId The ID of the rule. (required) - * @return GetRuleVersionHistoryResponse + * @param indicator The indicator value to look up (for example, an IP address or domain). + * (required) + * @return GetIoCIndicatorResponse * @throws ApiException if fails to make API call */ - public GetRuleVersionHistoryResponse getRuleVersionHistory(String ruleId) throws ApiException { - return getRuleVersionHistoryWithHttpInfo(ruleId, new GetRuleVersionHistoryOptionalParameters()) + public GetIoCIndicatorResponse getIndicatorOfCompromise(String indicator) throws ApiException { + return getIndicatorOfCompromiseWithHttpInfo( + indicator, new GetIndicatorOfCompromiseOptionalParameters()) .getData(); } /** - * Get a rule's version history. + * Get an indicator of compromise. * - *

See {@link #getRuleVersionHistoryWithHttpInfoAsync}. + *

See {@link #getIndicatorOfCompromiseWithHttpInfoAsync}. * - * @param ruleId The ID of the rule. (required) - * @return CompletableFuture<GetRuleVersionHistoryResponse> + * @param indicator The indicator value to look up (for example, an IP address or domain). + * (required) + * @return CompletableFuture<GetIoCIndicatorResponse> */ - public CompletableFuture getRuleVersionHistoryAsync( - String ruleId) { - return getRuleVersionHistoryWithHttpInfoAsync( - ruleId, new GetRuleVersionHistoryOptionalParameters()) + public CompletableFuture getIndicatorOfCompromiseAsync( + String indicator) { + return getIndicatorOfCompromiseWithHttpInfoAsync( + indicator, new GetIndicatorOfCompromiseOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -13157,32 +13262,34 @@ ruleId, new GetRuleVersionHistoryOptionalParameters()) } /** - * Get a rule's version history. + * Get an indicator of compromise. * - *

See {@link #getRuleVersionHistoryWithHttpInfo}. + *

See {@link #getIndicatorOfCompromiseWithHttpInfo}. * - * @param ruleId The ID of the rule. (required) + * @param indicator The indicator value to look up (for example, an IP address or domain). + * (required) * @param parameters Optional parameters for the request. - * @return GetRuleVersionHistoryResponse + * @return GetIoCIndicatorResponse * @throws ApiException if fails to make API call */ - public GetRuleVersionHistoryResponse getRuleVersionHistory( - String ruleId, GetRuleVersionHistoryOptionalParameters parameters) throws ApiException { - return getRuleVersionHistoryWithHttpInfo(ruleId, parameters).getData(); + public GetIoCIndicatorResponse getIndicatorOfCompromise( + String indicator, GetIndicatorOfCompromiseOptionalParameters parameters) throws ApiException { + return getIndicatorOfCompromiseWithHttpInfo(indicator, parameters).getData(); } /** - * Get a rule's version history. + * Get an indicator of compromise. * - *

See {@link #getRuleVersionHistoryWithHttpInfoAsync}. + *

See {@link #getIndicatorOfCompromiseWithHttpInfoAsync}. * - * @param ruleId The ID of the rule. (required) + * @param indicator The indicator value to look up (for example, an IP address or domain). + * (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<GetRuleVersionHistoryResponse> + * @return CompletableFuture<GetIoCIndicatorResponse> */ - public CompletableFuture getRuleVersionHistoryAsync( - String ruleId, GetRuleVersionHistoryOptionalParameters parameters) { - return getRuleVersionHistoryWithHttpInfoAsync(ruleId, parameters) + public CompletableFuture getIndicatorOfCompromiseAsync( + String indicator, GetIndicatorOfCompromiseOptionalParameters parameters) { + return getIndicatorOfCompromiseWithHttpInfoAsync(indicator, parameters) .thenApply( response -> { return response.getData(); @@ -13190,11 +13297,12 @@ public CompletableFuture getRuleVersionHistoryAsy } /** - * Get a rule's version history. + * Get detailed information about a specific indicator of compromise (IoC). * - * @param ruleId The ID of the rule. (required) + * @param indicator The indicator value to look up (for example, an IP address or domain). + * (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<GetRuleVersionHistoryResponse> + * @return ApiResponse<GetIoCIndicatorResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -13207,10 +13315,10 @@ public CompletableFuture getRuleVersionHistoryAsy * *
429 Too many requests -
*/ - public ApiResponse getRuleVersionHistoryWithHttpInfo( - String ruleId, GetRuleVersionHistoryOptionalParameters parameters) throws ApiException { + public ApiResponse getIndicatorOfCompromiseWithHttpInfo( + String indicator, GetIndicatorOfCompromiseOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "getRuleVersionHistory"; + String operationId = "getIndicatorOfCompromise"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -13218,27 +13326,33 @@ public ApiResponse getRuleVersionHistoryWithHttpI } Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'indicator' is set + if (indicator == null) { throw new ApiException( - 400, "Missing the required parameter 'ruleId' when calling getRuleVersionHistory"); + 400, "Missing the required parameter 'indicator' when calling getIndicatorOfCompromise"); } - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; + Boolean ocsf = parameters.ocsf; + Boolean includeTriageHistory = parameters.includeTriageHistory; + Integer triageHistoryLimit = parameters.triageHistoryLimit; + Integer triageHistoryOffset = parameters.triageHistoryOffset; // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}/version_history" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/security/siem/ioc-explorer/indicator"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "indicator", indicator)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ocsf", ocsf)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include_triage_history", includeTriageHistory)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "triage_history_limit", triageHistoryLimit)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "triage_history_offset", triageHistoryOffset)); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getRuleVersionHistory", + "v2.SecurityMonitoringApi.getIndicatorOfCompromise", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -13253,61 +13367,67 @@ public ApiResponse getRuleVersionHistoryWithHttpI localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a rule's version history. + * Get an indicator of compromise. * - *

See {@link #getRuleVersionHistoryWithHttpInfo}. + *

See {@link #getIndicatorOfCompromiseWithHttpInfo}. * - * @param ruleId The ID of the rule. (required) + * @param indicator The indicator value to look up (for example, an IP address or domain). + * (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<GetRuleVersionHistoryResponse>> + * @return CompletableFuture<ApiResponse<GetIoCIndicatorResponse>> */ - public CompletableFuture> - getRuleVersionHistoryWithHttpInfoAsync( - String ruleId, GetRuleVersionHistoryOptionalParameters parameters) { + public CompletableFuture> + getIndicatorOfCompromiseWithHttpInfoAsync( + String indicator, GetIndicatorOfCompromiseOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "getRuleVersionHistory"; + String operationId = "getIndicatorOfCompromise"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'indicator' is set + if (indicator == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'ruleId' when calling getRuleVersionHistory")); + 400, + "Missing the required parameter 'indicator' when calling getIndicatorOfCompromise")); return result; } - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; + Boolean ocsf = parameters.ocsf; + Boolean includeTriageHistory = parameters.includeTriageHistory; + Integer triageHistoryLimit = parameters.triageHistoryLimit; + Integer triageHistoryOffset = parameters.triageHistoryOffset; // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}/version_history" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/security/siem/ioc-explorer/indicator"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "indicator", indicator)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ocsf", ocsf)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include_triage_history", includeTriageHistory)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "triage_history_limit", triageHistoryLimit)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "triage_history_offset", triageHistoryOffset)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getRuleVersionHistory", + "v2.SecurityMonitoringApi.getIndicatorOfCompromise", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -13315,8 +13435,7 @@ public ApiResponse getRuleVersionHistoryWithHttpI new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -13328,101 +13447,34 @@ public ApiResponse getRuleVersionHistoryWithHttpI localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to getSBOM. */ - public static class GetSBOMOptionalParameters { - private String filterRepoDigest; - private SBOMFormat extFormat; - - /** - * Set filterRepoDigest. - * - * @param filterRepoDigest The container image repo_digest for the SBOM request. - * When the requested asset type is 'Image', this filter is mandatory. (optional) - * @return GetSBOMOptionalParameters - */ - public GetSBOMOptionalParameters filterRepoDigest(String filterRepoDigest) { - this.filterRepoDigest = filterRepoDigest; - return this; - } - - /** - * Set extFormat. - * - * @param extFormat The standard of the SBOM. (optional) - * @return GetSBOMOptionalParameters - */ - public GetSBOMOptionalParameters extFormat(SBOMFormat extFormat) { - this.extFormat = extFormat; - return this; - } - } - - /** - * Get SBOM. - * - *

See {@link #getSBOMWithHttpInfo}. - * - * @param assetType The type of the asset for the SBOM request. (required) - * @param filterAssetName The name of the asset for the SBOM request. (required) - * @return GetSBOMResponse - * @throws ApiException if fails to make API call - */ - public GetSBOMResponse getSBOM(AssetType assetType, String filterAssetName) throws ApiException { - return getSBOMWithHttpInfo(assetType, filterAssetName, new GetSBOMOptionalParameters()) - .getData(); - } - - /** - * Get SBOM. - * - *

See {@link #getSBOMWithHttpInfoAsync}. - * - * @param assetType The type of the asset for the SBOM request. (required) - * @param filterAssetName The name of the asset for the SBOM request. (required) - * @return CompletableFuture<GetSBOMResponse> - */ - public CompletableFuture getSBOMAsync( - AssetType assetType, String filterAssetName) { - return getSBOMWithHttpInfoAsync(assetType, filterAssetName, new GetSBOMOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * Get SBOM. + * Get investigation queries for a signal. * - *

See {@link #getSBOMWithHttpInfo}. + *

See {@link #getInvestigationLogQueriesMatchingSignalWithHttpInfo}. * - * @param assetType The type of the asset for the SBOM request. (required) - * @param filterAssetName The name of the asset for the SBOM request. (required) - * @param parameters Optional parameters for the request. - * @return GetSBOMResponse + * @param signalId The ID of the signal. (required) + * @return SecurityMonitoringSignalSuggestedActionsResponse * @throws ApiException if fails to make API call */ - public GetSBOMResponse getSBOM( - AssetType assetType, String filterAssetName, GetSBOMOptionalParameters parameters) - throws ApiException { - return getSBOMWithHttpInfo(assetType, filterAssetName, parameters).getData(); + public SecurityMonitoringSignalSuggestedActionsResponse getInvestigationLogQueriesMatchingSignal( + String signalId) throws ApiException { + return getInvestigationLogQueriesMatchingSignalWithHttpInfo(signalId).getData(); } /** - * Get SBOM. + * Get investigation queries for a signal. * - *

See {@link #getSBOMWithHttpInfoAsync}. + *

See {@link #getInvestigationLogQueriesMatchingSignalWithHttpInfoAsync}. * - * @param assetType The type of the asset for the SBOM request. (required) - * @param filterAssetName The name of the asset for the SBOM request. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<GetSBOMResponse> + * @param signalId The ID of the signal. (required) + * @return CompletableFuture<SecurityMonitoringSignalSuggestedActionsResponse> */ - public CompletableFuture getSBOMAsync( - AssetType assetType, String filterAssetName, GetSBOMOptionalParameters parameters) { - return getSBOMWithHttpInfoAsync(assetType, filterAssetName, parameters) + public CompletableFuture + getInvestigationLogQueriesMatchingSignalAsync(String signalId) { + return getInvestigationLogQueriesMatchingSignalWithHttpInfoAsync(signalId) .thenApply( response -> { return response.getData(); @@ -13430,61 +13482,44 @@ public CompletableFuture getSBOMAsync( } /** - * Get a single SBOM related to an asset by its type and name. + * Get the list of investigation log queries available for a given security signal. * - * @param assetType The type of the asset for the SBOM request. (required) - * @param filterAssetName The name of the asset for the SBOM request. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<GetSBOMResponse> + * @param signalId The ID of the signal. (required) + * @return ApiResponse<SecurityMonitoringSignalSuggestedActionsResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * - * - * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad request: The server cannot process the request due to invalid syntax in the request. -
403 Forbidden: Access denied -
404 Not found: asset not found -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getSBOMWithHttpInfo( - AssetType assetType, String filterAssetName, GetSBOMOptionalParameters parameters) - throws ApiException { + public ApiResponse + getInvestigationLogQueriesMatchingSignalWithHttpInfo(String signalId) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'assetType' is set - if (assetType == null) { - throw new ApiException( - 400, "Missing the required parameter 'assetType' when calling getSBOM"); - } - - // verify the required parameter 'filterAssetName' is set - if (filterAssetName == null) { + // verify the required parameter 'signalId' is set + if (signalId == null) { throw new ApiException( - 400, "Missing the required parameter 'filterAssetName' when calling getSBOM"); + 400, + "Missing the required parameter 'signalId' when calling" + + " getInvestigationLogQueriesMatchingSignal"); } - String filterRepoDigest = parameters.filterRepoDigest; - SBOMFormat extFormat = parameters.extFormat; // create path and map variables String localVarPath = - "/api/v2/security/sboms/{asset_type}" - .replaceAll("\\{" + "asset_type" + "\\}", apiClient.escapeString(assetType.toString())); + "/api/v2/security_monitoring/signals/{signal_id}/investigation_queries" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset_name]", filterAssetName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[repo_digest]", filterRepoDigest)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "ext:format", extFormat)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSBOM", + "v2.SecurityMonitoringApi.getInvestigationLogQueriesMatchingSignal", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -13497,68 +13532,54 @@ public ApiResponse getSBOMWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get SBOM. + * Get investigation queries for a signal. * - *

See {@link #getSBOMWithHttpInfo}. + *

See {@link #getInvestigationLogQueriesMatchingSignalWithHttpInfo}. * - * @param assetType The type of the asset for the SBOM request. (required) - * @param filterAssetName The name of the asset for the SBOM request. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<GetSBOMResponse>> + * @param signalId The ID of the signal. (required) + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringSignalSuggestedActionsResponse>> */ - public CompletableFuture> getSBOMWithHttpInfoAsync( - AssetType assetType, String filterAssetName, GetSBOMOptionalParameters parameters) { + public CompletableFuture> + getInvestigationLogQueriesMatchingSignalWithHttpInfoAsync(String signalId) { Object localVarPostBody = null; - // verify the required parameter 'assetType' is set - if (assetType == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'assetType' when calling getSBOM")); - return result; - } - - // verify the required parameter 'filterAssetName' is set - if (filterAssetName == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'signalId' is set + if (signalId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'filterAssetName' when calling getSBOM")); + 400, + "Missing the required parameter 'signalId' when calling" + + " getInvestigationLogQueriesMatchingSignal")); return result; } - String filterRepoDigest = parameters.filterRepoDigest; - SBOMFormat extFormat = parameters.extFormat; // create path and map variables String localVarPath = - "/api/v2/security/sboms/{asset_type}" - .replaceAll("\\{" + "asset_type" + "\\}", apiClient.escapeString(assetType.toString())); + "/api/v2/security_monitoring/signals/{signal_id}/investigation_queries" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset_name]", filterAssetName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[repo_digest]", filterRepoDigest)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "ext:format", extFormat)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSBOM", + "v2.SecurityMonitoringApi.getInvestigationLogQueriesMatchingSignal", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -13570,30 +13591,36 @@ public CompletableFuture> getSBOMWithHttpInfoAsync( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Returns a list of Secrets rules. + * Get signals matching an event. * - *

See {@link #getSecretsRulesWithHttpInfo}. + *

See {@link #getMatchingSignalsWithHttpInfo}. * - * @return SecretRuleArray + * @param eventId The ID of the event to find matching signals for. (required) + * @param track The product track that the event belongs to. (required) + * @return MatchingSignalsResponse * @throws ApiException if fails to make API call */ - public SecretRuleArray getSecretsRules() throws ApiException { - return getSecretsRulesWithHttpInfo().getData(); + public MatchingSignalsResponse getMatchingSignals(String eventId, String track) + throws ApiException { + return getMatchingSignalsWithHttpInfo(eventId, track).getData(); } /** - * Returns a list of Secrets rules. + * Get signals matching an event. * - *

See {@link #getSecretsRulesWithHttpInfoAsync}. + *

See {@link #getMatchingSignalsWithHttpInfoAsync}. * - * @return CompletableFuture<SecretRuleArray> + * @param eventId The ID of the event to find matching signals for. (required) + * @param track The product track that the event belongs to. (required) + * @return CompletableFuture<MatchingSignalsResponse> */ - public CompletableFuture getSecretsRulesAsync() { - return getSecretsRulesWithHttpInfoAsync() + public CompletableFuture getMatchingSignalsAsync( + String eventId, String track) { + return getMatchingSignalsWithHttpInfoAsync(eventId, track) .thenApply( response -> { return response.getData(); @@ -13601,37 +13628,60 @@ public CompletableFuture getSecretsRulesAsync() { } /** - * Returns a list of Secrets rules with ID, Pattern, Description, Priority, and SDS ID. + * Returns the list of security signals that match a given event on the given track. * - * @return ApiResponse<SecretRuleArray> + * @param eventId The ID of the event to find matching signals for. (required) + * @param track The product track that the event belongs to. (required) + * @return ApiResponse<MatchingSignalsResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * + * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getSecretsRulesWithHttpInfo() throws ApiException { + public ApiResponse getMatchingSignalsWithHttpInfo( + String eventId, String track) throws ApiException { // Check if unstable operation is enabled - String operationId = "getSecretsRules"; + String operationId = "getMatchingSignals"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; + + // verify the required parameter 'eventId' is set + if (eventId == null) { + throw new ApiException( + 400, "Missing the required parameter 'eventId' when calling getMatchingSignals"); + } + + // verify the required parameter 'track' is set + if (track == null) { + throw new ApiException( + 400, "Missing the required parameter 'track' when calling getMatchingSignals"); + } // create path and map variables - String localVarPath = "/api/v2/static-analysis/secrets/rules"; + String localVarPath = + "/api/v2/security_monitoring/events/{event_id}/matching_signals" + .replaceAll("\\{" + "event_id" + "\\}", apiClient.escapeString(eventId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "track", track)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecretsRules", + "v2.SecurityMonitoringApi.getMatchingSignals", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -13644,46 +13694,72 @@ public ApiResponse getSecretsRulesWithHttpInfo() throws ApiExce localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Returns a list of Secrets rules. + * Get signals matching an event. * - *

See {@link #getSecretsRulesWithHttpInfo}. + *

See {@link #getMatchingSignalsWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<SecretRuleArray>> + * @param eventId The ID of the event to find matching signals for. (required) + * @param track The product track that the event belongs to. (required) + * @return CompletableFuture<ApiResponse<MatchingSignalsResponse>> */ - public CompletableFuture> getSecretsRulesWithHttpInfoAsync() { + public CompletableFuture> + getMatchingSignalsWithHttpInfoAsync(String eventId, String track) { // Check if unstable operation is enabled - String operationId = "getSecretsRules"; + String operationId = "getMatchingSignals"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; + + // verify the required parameter 'eventId' is set + if (eventId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'eventId' when calling getMatchingSignals")); + return result; + } + + // verify the required parameter 'track' is set + if (track == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'track' when calling getMatchingSignals")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/static-analysis/secrets/rules"; + String localVarPath = + "/api/v2/security_monitoring/events/{event_id}/matching_signals" + .replaceAll("\\{" + "event_id" + "\\}", apiClient.escapeString(eventId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "track", track)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecretsRules", + "v2.SecurityMonitoringApi.getMatchingSignals", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -13695,32 +13771,76 @@ public CompletableFuture> getSecretsRulesWithHttpIn localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to getResourceEvaluationFilters. */ + public static class GetResourceEvaluationFiltersOptionalParameters { + private String cloudProvider; + private String accountId; + private Boolean skipCache; + + /** + * Set cloudProvider. + * + * @param cloudProvider Filter resource filters by cloud provider (e.g. aws, gcp, azure). + * (optional) + * @return GetResourceEvaluationFiltersOptionalParameters + */ + public GetResourceEvaluationFiltersOptionalParameters cloudProvider(String cloudProvider) { + this.cloudProvider = cloudProvider; + return this; + } + + /** + * Set accountId. + * + * @param accountId Filter resource filters by cloud provider account ID. This parameter is only + * valid when provider is specified. (optional) + * @return GetResourceEvaluationFiltersOptionalParameters + */ + public GetResourceEvaluationFiltersOptionalParameters accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Set skipCache. + * + * @param skipCache Skip cache for resource filters. (optional) + * @return GetResourceEvaluationFiltersOptionalParameters + */ + public GetResourceEvaluationFiltersOptionalParameters skipCache(Boolean skipCache) { + this.skipCache = skipCache; + return this; + } } /** - * Get a security filter. + * List resource filters. * - *

See {@link #getSecurityFilterWithHttpInfo}. + *

See {@link #getResourceEvaluationFiltersWithHttpInfo}. * - * @param securityFilterId The ID of the security filter. (required) - * @return SecurityFilterResponse + * @return GetResourceEvaluationFiltersResponse * @throws ApiException if fails to make API call */ - public SecurityFilterResponse getSecurityFilter(String securityFilterId) throws ApiException { - return getSecurityFilterWithHttpInfo(securityFilterId).getData(); + public GetResourceEvaluationFiltersResponse getResourceEvaluationFilters() throws ApiException { + return getResourceEvaluationFiltersWithHttpInfo( + new GetResourceEvaluationFiltersOptionalParameters()) + .getData(); } /** - * Get a security filter. + * List resource filters. * - *

See {@link #getSecurityFilterWithHttpInfoAsync}. + *

See {@link #getResourceEvaluationFiltersWithHttpInfoAsync}. * - * @param securityFilterId The ID of the security filter. (required) - * @return CompletableFuture<SecurityFilterResponse> + * @return CompletableFuture<GetResourceEvaluationFiltersResponse> */ - public CompletableFuture getSecurityFilterAsync(String securityFilterId) { - return getSecurityFilterWithHttpInfoAsync(securityFilterId) + public CompletableFuture + getResourceEvaluationFiltersAsync() { + return getResourceEvaluationFiltersWithHttpInfoAsync( + new GetResourceEvaluationFiltersOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -13728,48 +13848,73 @@ public CompletableFuture getSecurityFilterAsync(String s } /** - * Get the details of a specific security filter. + * List resource filters. * - *

See the security - * filter guide for more examples. + *

See {@link #getResourceEvaluationFiltersWithHttpInfo}. * - * @param securityFilterId The ID of the security filter. (required) - * @return ApiResponse<SecurityFilterResponse> + * @param parameters Optional parameters for the request. + * @return GetResourceEvaluationFiltersResponse + * @throws ApiException if fails to make API call + */ + public GetResourceEvaluationFiltersResponse getResourceEvaluationFilters( + GetResourceEvaluationFiltersOptionalParameters parameters) throws ApiException { + return getResourceEvaluationFiltersWithHttpInfo(parameters).getData(); + } + + /** + * List resource filters. + * + *

See {@link #getResourceEvaluationFiltersWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<GetResourceEvaluationFiltersResponse> + */ + public CompletableFuture getResourceEvaluationFiltersAsync( + GetResourceEvaluationFiltersOptionalParameters parameters) { + return getResourceEvaluationFiltersWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List resource filters. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<GetResourceEvaluationFiltersResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * + * * - * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getSecurityFilterWithHttpInfo(String securityFilterId) - throws ApiException { + public ApiResponse getResourceEvaluationFiltersWithHttpInfo( + GetResourceEvaluationFiltersOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; - - // verify the required parameter 'securityFilterId' is set - if (securityFilterId == null) { - throw new ApiException( - 400, "Missing the required parameter 'securityFilterId' when calling getSecurityFilter"); - } + String cloudProvider = parameters.cloudProvider; + String accountId = parameters.accountId; + Boolean skipCache = parameters.skipCache; // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" - .replaceAll( - "\\{" + "security_filter_id" + "\\}", - apiClient.escapeString(securityFilterId.toString())); + String localVarPath = "/api/v2/cloud_security_management/resource_filters"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "cloud_provider", cloudProvider)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "account_id", accountId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "skip_cache", skipCache)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFilter", + "v2.SecurityMonitoringApi.getResourceEvaluationFilters", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -13782,52 +13927,48 @@ public ApiResponse getSecurityFilterWithHttpInfo(String localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a security filter. + * List resource filters. * - *

See {@link #getSecurityFilterWithHttpInfo}. + *

See {@link #getResourceEvaluationFiltersWithHttpInfo}. * - * @param securityFilterId The ID of the security filter. (required) - * @return CompletableFuture<ApiResponse<SecurityFilterResponse>> + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<GetResourceEvaluationFiltersResponse>> */ - public CompletableFuture> getSecurityFilterWithHttpInfoAsync( - String securityFilterId) { + public CompletableFuture> + getResourceEvaluationFiltersWithHttpInfoAsync( + GetResourceEvaluationFiltersOptionalParameters parameters) { Object localVarPostBody = null; - - // verify the required parameter 'securityFilterId' is set - if (securityFilterId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'securityFilterId' when calling getSecurityFilter")); - return result; - } + String cloudProvider = parameters.cloudProvider; + String accountId = parameters.accountId; + Boolean skipCache = parameters.skipCache; // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" - .replaceAll( - "\\{" + "security_filter_id" + "\\}", - apiClient.escapeString(securityFilterId.toString())); + String localVarPath = "/api/v2/cloud_security_management/resource_filters"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "cloud_provider", cloudProvider)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "account_id", accountId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "skip_cache", skipCache)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFilter", + "v2.SecurityMonitoringApi.getResourceEvaluationFilters", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -13839,46 +13980,64 @@ public CompletableFuture> getSecurityFilterW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to getRuleVersionHistory. */ + public static class GetRuleVersionHistoryOptionalParameters { + private Long pageSize; + private Long pageNumber; + + /** + * Set pageSize. + * + * @param pageSize Number of items to return per page. The maximum allowed value is 100. + * (optional, default to 10) + * @return GetRuleVersionHistoryOptionalParameters + */ + public GetRuleVersionHistoryOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageNumber. + * + * @param pageNumber Specific page number to return. (optional, default to 0) + * @return GetRuleVersionHistoryOptionalParameters + */ + public GetRuleVersionHistoryOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; + return this; + } } /** - * Get a default inbox rule. + * Get a rule's version history. * - *

See {@link #getSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo}. + *

See {@link #getRuleVersionHistoryWithHttpInfo}. * - * @param ruleId The ID of the default inbox rule. Known default rule IDs include: - * identity_risk_default_rule, secret_default_rule, - * library_vulnerability_default_rule, attack_path_default_rule, - * host_and_container_vulnerability_default_rule, - * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule - * , and misconfiguration_default_rule. Datadog can add new default rules - * over time. (required) - * @return DefaultInboxRuleResponse + * @param ruleId The ID of the rule. (required) + * @return GetRuleVersionHistoryResponse * @throws ApiException if fails to make API call */ - public DefaultInboxRuleResponse getSecurityFindingsAutomationDefaultInboxRule(String ruleId) - throws ApiException { - return getSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo(ruleId).getData(); + public GetRuleVersionHistoryResponse getRuleVersionHistory(String ruleId) throws ApiException { + return getRuleVersionHistoryWithHttpInfo(ruleId, new GetRuleVersionHistoryOptionalParameters()) + .getData(); } /** - * Get a default inbox rule. + * Get a rule's version history. * - *

See {@link #getSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync}. + *

See {@link #getRuleVersionHistoryWithHttpInfoAsync}. * - * @param ruleId The ID of the default inbox rule. Known default rule IDs include: - * identity_risk_default_rule, secret_default_rule, - * library_vulnerability_default_rule, attack_path_default_rule, - * host_and_container_vulnerability_default_rule, - * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule - * , and misconfiguration_default_rule. Datadog can add new default rules - * over time. (required) - * @return CompletableFuture<DefaultInboxRuleResponse> + * @param ruleId The ID of the rule. (required) + * @return CompletableFuture<GetRuleVersionHistoryResponse> */ - public CompletableFuture - getSecurityFindingsAutomationDefaultInboxRuleAsync(String ruleId) { - return getSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync(ruleId) + public CompletableFuture getRuleVersionHistoryAsync( + String ruleId) { + return getRuleVersionHistoryWithHttpInfoAsync( + ruleId, new GetRuleVersionHistoryOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -13886,32 +14045,60 @@ public DefaultInboxRuleResponse getSecurityFindingsAutomationDefaultInboxRule(St } /** - * Get the details of a default inbox rule by ID. Datadog manages default inbox rules. Their name, - * rule, and action are read-only, and each organization can change only whether they are enabled. + * Get a rule's version history. * - * @param ruleId The ID of the default inbox rule. Known default rule IDs include: - * identity_risk_default_rule, secret_default_rule, - * library_vulnerability_default_rule, attack_path_default_rule, - * host_and_container_vulnerability_default_rule, - * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule - * , and misconfiguration_default_rule. Datadog can add new default rules - * over time. (required) - * @return ApiResponse<DefaultInboxRuleResponse> + *

See {@link #getRuleVersionHistoryWithHttpInfo}. + * + * @param ruleId The ID of the rule. (required) + * @param parameters Optional parameters for the request. + * @return GetRuleVersionHistoryResponse + * @throws ApiException if fails to make API call + */ + public GetRuleVersionHistoryResponse getRuleVersionHistory( + String ruleId, GetRuleVersionHistoryOptionalParameters parameters) throws ApiException { + return getRuleVersionHistoryWithHttpInfo(ruleId, parameters).getData(); + } + + /** + * Get a rule's version history. + * + *

See {@link #getRuleVersionHistoryWithHttpInfoAsync}. + * + * @param ruleId The ID of the rule. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<GetRuleVersionHistoryResponse> + */ + public CompletableFuture getRuleVersionHistoryAsync( + String ruleId, GetRuleVersionHistoryOptionalParameters parameters) { + return getRuleVersionHistoryWithHttpInfoAsync(ruleId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a rule's version history. + * + * @param ruleId The ID of the rule. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<GetRuleVersionHistoryResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * + * * * *
Response details
Status Code Description Response Headers
200 Successfully retrieved the default inbox rule -
403 Forbidden -
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - getSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo(String ruleId) throws ApiException { + public ApiResponse getRuleVersionHistoryWithHttpInfo( + String ruleId, GetRuleVersionHistoryOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "getSecurityFindingsAutomationDefaultInboxRule"; + String operationId = "getRuleVersionHistory"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -13922,22 +14109,26 @@ public DefaultInboxRuleResponse getSecurityFindingsAutomationDefaultInboxRule(St // verify the required parameter 'ruleId' is set if (ruleId == null) { throw new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling" - + " getSecurityFindingsAutomationDefaultInboxRule"); + 400, "Missing the required parameter 'ruleId' when calling getRuleVersionHistory"); } + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/default_inbox_rules/{rule_id}" + "/api/v2/security_monitoring/rules/{rule_id}/version_history" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFindingsAutomationDefaultInboxRule", + "v2.SecurityMonitoringApi.getRuleVersionHistory", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -13950,31 +14141,28 @@ public DefaultInboxRuleResponse getSecurityFindingsAutomationDefaultInboxRule(St localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a default inbox rule. + * Get a rule's version history. * - *

See {@link #getSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo}. + *

See {@link #getRuleVersionHistoryWithHttpInfo}. * - * @param ruleId The ID of the default inbox rule. Known default rule IDs include: - * identity_risk_default_rule, secret_default_rule, - * library_vulnerability_default_rule, attack_path_default_rule, - * host_and_container_vulnerability_default_rule, - * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule - * , and misconfiguration_default_rule. Datadog can add new default rules - * over time. (required) - * @return CompletableFuture<ApiResponse<DefaultInboxRuleResponse>> + * @param ruleId The ID of the rule. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<GetRuleVersionHistoryResponse>> */ - public CompletableFuture> - getSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync(String ruleId) { + public CompletableFuture> + getRuleVersionHistoryWithHttpInfoAsync( + String ruleId, GetRuleVersionHistoryOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "getSecurityFindingsAutomationDefaultInboxRule"; + String operationId = "getRuleVersionHistory"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -13983,34 +14171,40 @@ public DefaultInboxRuleResponse getSecurityFindingsAutomationDefaultInboxRule(St // verify the required parameter 'ruleId' is set if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling" - + " getSecurityFindingsAutomationDefaultInboxRule")); + 400, "Missing the required parameter 'ruleId' when calling getRuleVersionHistory")); return result; } + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/default_inbox_rules/{rule_id}" + "/api/v2/security_monitoring/rules/{rule_id}/version_history" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFindingsAutomationDefaultInboxRule", + "v2.SecurityMonitoringApi.getRuleVersionHistory", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -14022,34 +14216,65 @@ public DefaultInboxRuleResponse getSecurityFindingsAutomationDefaultInboxRule(St localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** - * Get a due date rule. - * - *

See {@link #getSecurityFindingsAutomationDueDateRuleWithHttpInfo}. - * - * @param ruleId The ID of the due date rule. (required) - * @return DueDateRuleResponse - * @throws ApiException if fails to make API call - */ - public DueDateRuleResponse getSecurityFindingsAutomationDueDateRule(UUID ruleId) - throws ApiException { - return getSecurityFindingsAutomationDueDateRuleWithHttpInfo(ruleId).getData(); - } + /** Manage optional parameters to getSBOM. */ + public static class GetSBOMOptionalParameters { + private String filterRepoDigest; + private SBOMFormat extFormat; - /** - * Get a due date rule. + /** + * Set filterRepoDigest. + * + * @param filterRepoDigest The container image repo_digest for the SBOM request. + * When the requested asset type is 'Image', this filter is mandatory. (optional) + * @return GetSBOMOptionalParameters + */ + public GetSBOMOptionalParameters filterRepoDigest(String filterRepoDigest) { + this.filterRepoDigest = filterRepoDigest; + return this; + } + + /** + * Set extFormat. + * + * @param extFormat The standard of the SBOM. (optional) + * @return GetSBOMOptionalParameters + */ + public GetSBOMOptionalParameters extFormat(SBOMFormat extFormat) { + this.extFormat = extFormat; + return this; + } + } + + /** + * Get SBOM. * - *

See {@link #getSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync}. + *

See {@link #getSBOMWithHttpInfo}. * - * @param ruleId The ID of the due date rule. (required) - * @return CompletableFuture<DueDateRuleResponse> + * @param assetType The type of the asset for the SBOM request. (required) + * @param filterAssetName The name of the asset for the SBOM request. (required) + * @return GetSBOMResponse + * @throws ApiException if fails to make API call */ - public CompletableFuture getSecurityFindingsAutomationDueDateRuleAsync( - UUID ruleId) { - return getSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync(ruleId) + public GetSBOMResponse getSBOM(AssetType assetType, String filterAssetName) throws ApiException { + return getSBOMWithHttpInfo(assetType, filterAssetName, new GetSBOMOptionalParameters()) + .getData(); + } + + /** + * Get SBOM. + * + *

See {@link #getSBOMWithHttpInfoAsync}. + * + * @param assetType The type of the asset for the SBOM request. (required) + * @param filterAssetName The name of the asset for the SBOM request. (required) + * @return CompletableFuture<GetSBOMResponse> + */ + public CompletableFuture getSBOMAsync( + AssetType assetType, String filterAssetName) { + return getSBOMWithHttpInfoAsync(assetType, filterAssetName, new GetSBOMOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -14057,51 +14282,97 @@ public CompletableFuture getSecurityFindingsAutomationDueDa } /** - * Get the details of a due date rule by ID. + * Get SBOM. * - * @param ruleId The ID of the due date rule. (required) - * @return ApiResponse<DueDateRuleResponse> + *

See {@link #getSBOMWithHttpInfo}. + * + * @param assetType The type of the asset for the SBOM request. (required) + * @param filterAssetName The name of the asset for the SBOM request. (required) + * @param parameters Optional parameters for the request. + * @return GetSBOMResponse + * @throws ApiException if fails to make API call + */ + public GetSBOMResponse getSBOM( + AssetType assetType, String filterAssetName, GetSBOMOptionalParameters parameters) + throws ApiException { + return getSBOMWithHttpInfo(assetType, filterAssetName, parameters).getData(); + } + + /** + * Get SBOM. + * + *

See {@link #getSBOMWithHttpInfoAsync}. + * + * @param assetType The type of the asset for the SBOM request. (required) + * @param filterAssetName The name of the asset for the SBOM request. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<GetSBOMResponse> + */ + public CompletableFuture getSBOMAsync( + AssetType assetType, String filterAssetName, GetSBOMOptionalParameters parameters) { + return getSBOMWithHttpInfoAsync(assetType, filterAssetName, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a single SBOM related to an asset by its type and name. + * + * @param assetType The type of the asset for the SBOM request. (required) + * @param filterAssetName The name of the asset for the SBOM request. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<GetSBOMResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * - * + * + * + * + * * *
Response details
Status Code Description Response Headers
200 Successfully retrieved the due date rule -
403 Forbidden -
404 Not Found -
200 OK -
400 Bad request: The server cannot process the request due to invalid syntax in the request. -
403 Forbidden: Access denied -
404 Not found: asset not found -
429 Too many requests -
*/ - public ApiResponse getSecurityFindingsAutomationDueDateRuleWithHttpInfo( - UUID ruleId) throws ApiException { - // Check if unstable operation is enabled - String operationId = "getSecurityFindingsAutomationDueDateRule"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse getSBOMWithHttpInfo( + AssetType assetType, String filterAssetName, GetSBOMOptionalParameters parameters) + throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'assetType' is set + if (assetType == null) { throw new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling" - + " getSecurityFindingsAutomationDueDateRule"); + 400, "Missing the required parameter 'assetType' when calling getSBOM"); + } + + // verify the required parameter 'filterAssetName' is set + if (filterAssetName == null) { + throw new ApiException( + 400, "Missing the required parameter 'filterAssetName' when calling getSBOM"); } + String filterRepoDigest = parameters.filterRepoDigest; + SBOMFormat extFormat = parameters.extFormat; // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/due_date_rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security/sboms/{asset_type}" + .replaceAll("\\{" + "asset_type" + "\\}", apiClient.escapeString(assetType.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset_name]", filterAssetName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[repo_digest]", filterRepoDigest)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ext:format", extFormat)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFindingsAutomationDueDateRule", + "v2.SecurityMonitoringApi.getSBOM", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -14114,61 +14385,68 @@ public ApiResponse getSecurityFindingsAutomationDueDateRule localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a due date rule. + * Get SBOM. * - *

See {@link #getSecurityFindingsAutomationDueDateRuleWithHttpInfo}. + *

See {@link #getSBOMWithHttpInfo}. * - * @param ruleId The ID of the due date rule. (required) - * @return CompletableFuture<ApiResponse<DueDateRuleResponse>> + * @param assetType The type of the asset for the SBOM request. (required) + * @param filterAssetName The name of the asset for the SBOM request. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<GetSBOMResponse>> */ - public CompletableFuture> - getSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync(UUID ruleId) { - // Check if unstable operation is enabled - String operationId = "getSecurityFindingsAutomationDueDateRule"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); + public CompletableFuture> getSBOMWithHttpInfoAsync( + AssetType assetType, String filterAssetName, GetSBOMOptionalParameters parameters) { + Object localVarPostBody = null; + + // verify the required parameter 'assetType' is set + if (assetType == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + new ApiException(400, "Missing the required parameter 'assetType' when calling getSBOM")); return result; } - Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'filterAssetName' is set + if (filterAssetName == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling" - + " getSecurityFindingsAutomationDueDateRule")); + 400, "Missing the required parameter 'filterAssetName' when calling getSBOM")); return result; } + String filterRepoDigest = parameters.filterRepoDigest; + SBOMFormat extFormat = parameters.extFormat; // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/due_date_rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security/sboms/{asset_type}" + .replaceAll("\\{" + "asset_type" + "\\}", apiClient.escapeString(assetType.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset_name]", filterAssetName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[repo_digest]", filterRepoDigest)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ext:format", extFormat)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFindingsAutomationDueDateRule", + "v2.SecurityMonitoringApi.getSBOM", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -14180,33 +14458,30 @@ public ApiResponse getSecurityFindingsAutomationDueDateRule localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get an inbox rule. + * Returns a list of Secrets rules. * - *

See {@link #getSecurityFindingsAutomationInboxRuleWithHttpInfo}. + *

See {@link #getSecretsRulesWithHttpInfo}. * - * @param ruleId The ID of the inbox rule. (required) - * @return InboxRuleResponse + * @return SecretRuleArray * @throws ApiException if fails to make API call */ - public InboxRuleResponse getSecurityFindingsAutomationInboxRule(UUID ruleId) throws ApiException { - return getSecurityFindingsAutomationInboxRuleWithHttpInfo(ruleId).getData(); + public SecretRuleArray getSecretsRules() throws ApiException { + return getSecretsRulesWithHttpInfo().getData(); } /** - * Get an inbox rule. + * Returns a list of Secrets rules. * - *

See {@link #getSecurityFindingsAutomationInboxRuleWithHttpInfoAsync}. + *

See {@link #getSecretsRulesWithHttpInfoAsync}. * - * @param ruleId The ID of the inbox rule. (required) - * @return CompletableFuture<InboxRuleResponse> + * @return CompletableFuture<SecretRuleArray> */ - public CompletableFuture getSecurityFindingsAutomationInboxRuleAsync( - UUID ruleId) { - return getSecurityFindingsAutomationInboxRuleWithHttpInfoAsync(ruleId) + public CompletableFuture getSecretsRulesAsync() { + return getSecretsRulesWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -14214,49 +14489,35 @@ public CompletableFuture getSecurityFindingsAutomationInboxRu } /** - * Get the details of an inbox rule by ID. + * Returns a list of Secrets rules with ID, Pattern, Description, Priority, and SDS ID. * - * @param ruleId The ID of the inbox rule. (required) - * @return ApiResponse<InboxRuleResponse> + * @return ApiResponse<SecretRuleArray> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * - * + * * *
Response details
Status Code Description Response Headers
200 Successfully retrieved the inbox rule -
403 Forbidden -
404 Not Found -
200 OK -
429 Too many requests -
*/ - public ApiResponse getSecurityFindingsAutomationInboxRuleWithHttpInfo( - UUID ruleId) throws ApiException { + public ApiResponse getSecretsRulesWithHttpInfo() throws ApiException { // Check if unstable operation is enabled - String operationId = "getSecurityFindingsAutomationInboxRule"; + String operationId = "getSecretsRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling" - + " getSecurityFindingsAutomationInboxRule"); - } // create path and map variables - String localVarPath = - "/api/v2/security/findings/automation/inbox_rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/static-analysis/secrets/rules"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFindingsAutomationInboxRule", + "v2.SecurityMonitoringApi.getSecretsRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -14271,45 +14532,30 @@ public ApiResponse getSecurityFindingsAutomationInboxRuleWith localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get an inbox rule. + * Returns a list of Secrets rules. * - *

See {@link #getSecurityFindingsAutomationInboxRuleWithHttpInfo}. + *

See {@link #getSecretsRulesWithHttpInfo}. * - * @param ruleId The ID of the inbox rule. (required) - * @return CompletableFuture<ApiResponse<InboxRuleResponse>> + * @return CompletableFuture<ApiResponse<SecretRuleArray>> */ - public CompletableFuture> - getSecurityFindingsAutomationInboxRuleWithHttpInfoAsync(UUID ruleId) { + public CompletableFuture> getSecretsRulesWithHttpInfoAsync() { // Check if unstable operation is enabled - String operationId = "getSecurityFindingsAutomationInboxRule"; + String operationId = "getSecretsRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling" - + " getSecurityFindingsAutomationInboxRule")); - return result; - } // create path and map variables - String localVarPath = - "/api/v2/security/findings/automation/inbox_rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/static-analysis/secrets/rules"; Map localVarHeaderParams = new HashMap(); @@ -14317,7 +14563,7 @@ public ApiResponse getSecurityFindingsAutomationInboxRuleWith try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFindingsAutomationInboxRule", + "v2.SecurityMonitoringApi.getSecretsRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -14325,7 +14571,7 @@ public ApiResponse getSecurityFindingsAutomationInboxRuleWith new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -14337,33 +14583,32 @@ public ApiResponse getSecurityFindingsAutomationInboxRuleWith localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a mute rule. + * Get a security filter. * - *

See {@link #getSecurityFindingsAutomationMuteRuleWithHttpInfo}. + *

See {@link #getSecurityFilterWithHttpInfo}. * - * @param ruleId The ID of the mute rule. (required) - * @return MuteRuleResponse + * @param securityFilterId The ID of the security filter. (required) + * @return SecurityFilterResponse * @throws ApiException if fails to make API call */ - public MuteRuleResponse getSecurityFindingsAutomationMuteRule(UUID ruleId) throws ApiException { - return getSecurityFindingsAutomationMuteRuleWithHttpInfo(ruleId).getData(); + public SecurityFilterResponse getSecurityFilter(String securityFilterId) throws ApiException { + return getSecurityFilterWithHttpInfo(securityFilterId).getData(); } /** - * Get a mute rule. + * Get a security filter. * - *

See {@link #getSecurityFindingsAutomationMuteRuleWithHttpInfoAsync}. + *

See {@link #getSecurityFilterWithHttpInfoAsync}. * - * @param ruleId The ID of the mute rule. (required) - * @return CompletableFuture<MuteRuleResponse> + * @param securityFilterId The ID of the security filter. (required) + * @return CompletableFuture<SecurityFilterResponse> */ - public CompletableFuture getSecurityFindingsAutomationMuteRuleAsync( - UUID ruleId) { - return getSecurityFindingsAutomationMuteRuleWithHttpInfoAsync(ruleId) + public CompletableFuture getSecurityFilterAsync(String securityFilterId) { + return getSecurityFilterWithHttpInfoAsync(securityFilterId) .thenApply( response -> { return response.getData(); @@ -14371,49 +14616,46 @@ public CompletableFuture getSecurityFindingsAutomationMuteRule } /** - * Get the details of a mute rule by ID. + * Get the details of a specific security filter. * - * @param ruleId The ID of the mute rule. (required) - * @return ApiResponse<MuteRuleResponse> + *

See the security + * filter guide for more examples. + * + * @param securityFilterId The ID of the security filter. (required) + * @return ApiResponse<SecurityFilterResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * * * *
Response details
Status Code Description Response Headers
200 Successfully retrieved the mute rule -
403 Forbidden -
200 OK -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getSecurityFindingsAutomationMuteRuleWithHttpInfo( - UUID ruleId) throws ApiException { - // Check if unstable operation is enabled - String operationId = "getSecurityFindingsAutomationMuteRule"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse getSecurityFilterWithHttpInfo(String securityFilterId) + throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'securityFilterId' is set + if (securityFilterId == null) { throw new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling" - + " getSecurityFindingsAutomationMuteRule"); + 400, "Missing the required parameter 'securityFilterId' when calling getSecurityFilter"); } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/mute_rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" + .replaceAll( + "\\{" + "security_filter_id" + "\\}", + apiClient.escapeString(securityFilterId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFindingsAutomationMuteRule", + "v2.SecurityMonitoringApi.getSecurityFilter", localVarPath, new ArrayList(), localVarHeaderParams, @@ -14428,45 +14670,36 @@ public ApiResponse getSecurityFindingsAutomationMuteRuleWithHt localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a mute rule. + * Get a security filter. * - *

See {@link #getSecurityFindingsAutomationMuteRuleWithHttpInfo}. + *

See {@link #getSecurityFilterWithHttpInfo}. * - * @param ruleId The ID of the mute rule. (required) - * @return CompletableFuture<ApiResponse<MuteRuleResponse>> + * @param securityFilterId The ID of the security filter. (required) + * @return CompletableFuture<ApiResponse<SecurityFilterResponse>> */ - public CompletableFuture> - getSecurityFindingsAutomationMuteRuleWithHttpInfoAsync(UUID ruleId) { - // Check if unstable operation is enabled - String operationId = "getSecurityFindingsAutomationMuteRule"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> getSecurityFilterWithHttpInfoAsync( + String securityFilterId) { Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'securityFilterId' is set + if (securityFilterId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'ruleId' when calling" - + " getSecurityFindingsAutomationMuteRule")); + "Missing the required parameter 'securityFilterId' when calling getSecurityFilter")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/mute_rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" + .replaceAll( + "\\{" + "security_filter_id" + "\\}", + apiClient.escapeString(securityFilterId.toString())); Map localVarHeaderParams = new HashMap(); @@ -14474,7 +14707,7 @@ public ApiResponse getSecurityFindingsAutomationMuteRuleWithHt try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFindingsAutomationMuteRule", + "v2.SecurityMonitoringApi.getSecurityFilter", localVarPath, new ArrayList(), localVarHeaderParams, @@ -14482,7 +14715,7 @@ public ApiResponse getSecurityFindingsAutomationMuteRuleWithHt new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -14494,34 +14727,46 @@ public ApiResponse getSecurityFindingsAutomationMuteRuleWithHt localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a severity modifier rule. + * Get a default inbox rule. * - *

See {@link #getSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo}. + *

See {@link #getSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo}. * - * @param ruleId The ID of the severity modifier rule. (required) - * @return SeverityModifierRuleResponse + * @param ruleId The ID of the default inbox rule. Known default rule IDs include: + * identity_risk_default_rule, secret_default_rule, + * library_vulnerability_default_rule, attack_path_default_rule, + * host_and_container_vulnerability_default_rule, + * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule + * , and misconfiguration_default_rule. Datadog can add new default rules + * over time. (required) + * @return DefaultInboxRuleResponse * @throws ApiException if fails to make API call */ - public SeverityModifierRuleResponse getSecurityFindingsAutomationSeverityModifierRule(UUID ruleId) + public DefaultInboxRuleResponse getSecurityFindingsAutomationDefaultInboxRule(String ruleId) throws ApiException { - return getSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo(ruleId).getData(); + return getSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo(ruleId).getData(); } /** - * Get a severity modifier rule. + * Get a default inbox rule. * - *

See {@link #getSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync}. + *

See {@link #getSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync}. * - * @param ruleId The ID of the severity modifier rule. (required) - * @return CompletableFuture<SeverityModifierRuleResponse> + * @param ruleId The ID of the default inbox rule. Known default rule IDs include: + * identity_risk_default_rule, secret_default_rule, + * library_vulnerability_default_rule, attack_path_default_rule, + * host_and_container_vulnerability_default_rule, + * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule + * , and misconfiguration_default_rule. Datadog can add new default rules + * over time. (required) + * @return CompletableFuture<DefaultInboxRuleResponse> */ - public CompletableFuture - getSecurityFindingsAutomationSeverityModifierRuleAsync(UUID ruleId) { - return getSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync(ruleId) + public CompletableFuture + getSecurityFindingsAutomationDefaultInboxRuleAsync(String ruleId) { + return getSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -14529,27 +14774,32 @@ public SeverityModifierRuleResponse getSecurityFindingsAutomationSeverityModifie } /** - * Get the details of a severity modifier rule by ID. + * Get the details of a default inbox rule by ID. Datadog manages default inbox rules. Their name, + * rule, and action are read-only, and each organization can change only whether they are enabled. * - * @param ruleId The ID of the severity modifier rule. (required) - * @return ApiResponse<SeverityModifierRuleResponse> + * @param ruleId The ID of the default inbox rule. Known default rule IDs include: + * identity_risk_default_rule, secret_default_rule, + * library_vulnerability_default_rule, attack_path_default_rule, + * host_and_container_vulnerability_default_rule, + * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule + * , and misconfiguration_default_rule. Datadog can add new default rules + * over time. (required) + * @return ApiResponse<DefaultInboxRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * - * * *
Response details
Status Code Description Response Headers
200 Successfully retrieved the severity modifier rule -
200 Successfully retrieved the default inbox rule -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
429 Too many requests -
*/ - public ApiResponse - getSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo(UUID ruleId) - throws ApiException { + public ApiResponse + getSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo(String ruleId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getSecurityFindingsAutomationSeverityModifierRule"; + String operationId = "getSecurityFindingsAutomationDefaultInboxRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -14562,18 +14812,18 @@ public SeverityModifierRuleResponse getSecurityFindingsAutomationSeverityModifie throw new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " getSecurityFindingsAutomationSeverityModifierRule"); + + " getSecurityFindingsAutomationDefaultInboxRule"); } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/severity_modifier_rules/{rule_id}" + "/api/v2/security/findings/automation/default_inbox_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFindingsAutomationSeverityModifierRule", + "v2.SecurityMonitoringApi.getSecurityFindingsAutomationDefaultInboxRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -14588,26 +14838,31 @@ public SeverityModifierRuleResponse getSecurityFindingsAutomationSeverityModifie localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a severity modifier rule. + * Get a default inbox rule. * - *

See {@link #getSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo}. + *

See {@link #getSecurityFindingsAutomationDefaultInboxRuleWithHttpInfo}. * - * @param ruleId The ID of the severity modifier rule. (required) - * @return CompletableFuture<ApiResponse<SeverityModifierRuleResponse>> + * @param ruleId The ID of the default inbox rule. Known default rule IDs include: + * identity_risk_default_rule, secret_default_rule, + * library_vulnerability_default_rule, attack_path_default_rule, + * host_and_container_vulnerability_default_rule, + * runtime_code_vulnerability_default_rule, iac_misconfiguration_default_rule + * , and misconfiguration_default_rule. Datadog can add new default rules + * over time. (required) + * @return CompletableFuture<ApiResponse<DefaultInboxRuleResponse>> */ - public CompletableFuture> - getSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync(UUID ruleId) { + public CompletableFuture> + getSecurityFindingsAutomationDefaultInboxRuleWithHttpInfoAsync(String ruleId) { // Check if unstable operation is enabled - String operationId = "getSecurityFindingsAutomationSeverityModifierRule"; + String operationId = "getSecurityFindingsAutomationDefaultInboxRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -14616,18 +14871,17 @@ public SeverityModifierRuleResponse getSecurityFindingsAutomationSeverityModifie // verify the required parameter 'ruleId' is set if (ruleId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " getSecurityFindingsAutomationSeverityModifierRule")); + + " getSecurityFindingsAutomationDefaultInboxRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/severity_modifier_rules/{rule_id}" + "/api/v2/security/findings/automation/default_inbox_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -14636,7 +14890,7 @@ public SeverityModifierRuleResponse getSecurityFindingsAutomationSeverityModifie try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFindingsAutomationSeverityModifierRule", + "v2.SecurityMonitoringApi.getSecurityFindingsAutomationDefaultInboxRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -14644,8 +14898,7 @@ public SeverityModifierRuleResponse getSecurityFindingsAutomationSeverityModifie new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -14657,34 +14910,34 @@ public SeverityModifierRuleResponse getSecurityFindingsAutomationSeverityModifie localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a ticket creation rule. + * Get a due date rule. * - *

See {@link #getSecurityFindingsAutomationTicketCreationRuleWithHttpInfo}. + *

See {@link #getSecurityFindingsAutomationDueDateRuleWithHttpInfo}. * - * @param ruleId The ID of the ticket creation rule. (required) - * @return TicketCreationRuleResponse + * @param ruleId The ID of the due date rule. (required) + * @return DueDateRuleResponse * @throws ApiException if fails to make API call */ - public TicketCreationRuleResponse getSecurityFindingsAutomationTicketCreationRule(UUID ruleId) + public DueDateRuleResponse getSecurityFindingsAutomationDueDateRule(UUID ruleId) throws ApiException { - return getSecurityFindingsAutomationTicketCreationRuleWithHttpInfo(ruleId).getData(); + return getSecurityFindingsAutomationDueDateRuleWithHttpInfo(ruleId).getData(); } /** - * Get a ticket creation rule. + * Get a due date rule. * - *

See {@link #getSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync}. + *

See {@link #getSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync}. * - * @param ruleId The ID of the ticket creation rule. (required) - * @return CompletableFuture<TicketCreationRuleResponse> + * @param ruleId The ID of the due date rule. (required) + * @return CompletableFuture<DueDateRuleResponse> */ - public CompletableFuture - getSecurityFindingsAutomationTicketCreationRuleAsync(UUID ruleId) { - return getSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync(ruleId) + public CompletableFuture getSecurityFindingsAutomationDueDateRuleAsync( + UUID ruleId) { + return getSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -14692,25 +14945,25 @@ public TicketCreationRuleResponse getSecurityFindingsAutomationTicketCreationRul } /** - * Get the details of a ticket creation rule by ID. + * Get the details of a due date rule by ID. * - * @param ruleId The ID of the ticket creation rule. (required) - * @return ApiResponse<TicketCreationRuleResponse> + * @param ruleId The ID of the due date rule. (required) + * @return ApiResponse<DueDateRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * *
Response details
Status Code Description Response Headers
200 Successfully retrieved the ticket creation rule -
200 Successfully retrieved the due date rule -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - getSecurityFindingsAutomationTicketCreationRuleWithHttpInfo(UUID ruleId) throws ApiException { + public ApiResponse getSecurityFindingsAutomationDueDateRuleWithHttpInfo( + UUID ruleId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getSecurityFindingsAutomationTicketCreationRule"; + String operationId = "getSecurityFindingsAutomationDueDateRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -14723,18 +14976,18 @@ public TicketCreationRuleResponse getSecurityFindingsAutomationTicketCreationRul throw new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " getSecurityFindingsAutomationTicketCreationRule"); + + " getSecurityFindingsAutomationDueDateRule"); } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/ticket_creation_rules/{rule_id}" + "/api/v2/security/findings/automation/due_date_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFindingsAutomationTicketCreationRule", + "v2.SecurityMonitoringApi.getSecurityFindingsAutomationDueDateRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -14749,25 +15002,25 @@ public TicketCreationRuleResponse getSecurityFindingsAutomationTicketCreationRul localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a ticket creation rule. + * Get a due date rule. * - *

See {@link #getSecurityFindingsAutomationTicketCreationRuleWithHttpInfo}. + *

See {@link #getSecurityFindingsAutomationDueDateRuleWithHttpInfo}. * - * @param ruleId The ID of the ticket creation rule. (required) - * @return CompletableFuture<ApiResponse<TicketCreationRuleResponse>> + * @param ruleId The ID of the due date rule. (required) + * @return CompletableFuture<ApiResponse<DueDateRuleResponse>> */ - public CompletableFuture> - getSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync(UUID ruleId) { + public CompletableFuture> + getSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync(UUID ruleId) { // Check if unstable operation is enabled - String operationId = "getSecurityFindingsAutomationTicketCreationRule"; + String operationId = "getSecurityFindingsAutomationDueDateRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -14776,17 +15029,17 @@ public TicketCreationRuleResponse getSecurityFindingsAutomationTicketCreationRul // verify the required parameter 'ruleId' is set if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " getSecurityFindingsAutomationTicketCreationRule")); + + " getSecurityFindingsAutomationDueDateRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/ticket_creation_rules/{rule_id}" + "/api/v2/security/findings/automation/due_date_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -14795,7 +15048,7 @@ public TicketCreationRuleResponse getSecurityFindingsAutomationTicketCreationRul try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityFindingsAutomationTicketCreationRule", + "v2.SecurityMonitoringApi.getSecurityFindingsAutomationDueDateRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -14803,7 +15056,7 @@ public TicketCreationRuleResponse getSecurityFindingsAutomationTicketCreationRul new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -14815,34 +15068,33 @@ public TicketCreationRuleResponse getSecurityFindingsAutomationTicketCreationRul localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a critical asset. + * Get an inbox rule. * - *

See {@link #getSecurityMonitoringCriticalAssetWithHttpInfo}. + *

See {@link #getSecurityFindingsAutomationInboxRuleWithHttpInfo}. * - * @param criticalAssetId The ID of the critical asset. (required) - * @return SecurityMonitoringCriticalAssetResponse + * @param ruleId The ID of the inbox rule. (required) + * @return InboxRuleResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringCriticalAssetResponse getSecurityMonitoringCriticalAsset( - String criticalAssetId) throws ApiException { - return getSecurityMonitoringCriticalAssetWithHttpInfo(criticalAssetId).getData(); + public InboxRuleResponse getSecurityFindingsAutomationInboxRule(UUID ruleId) throws ApiException { + return getSecurityFindingsAutomationInboxRuleWithHttpInfo(ruleId).getData(); } /** - * Get a critical asset. + * Get an inbox rule. * - *

See {@link #getSecurityMonitoringCriticalAssetWithHttpInfoAsync}. + *

See {@link #getSecurityFindingsAutomationInboxRuleWithHttpInfoAsync}. * - * @param criticalAssetId The ID of the critical asset. (required) - * @return CompletableFuture<SecurityMonitoringCriticalAssetResponse> + * @param ruleId The ID of the inbox rule. (required) + * @return CompletableFuture<InboxRuleResponse> */ - public CompletableFuture - getSecurityMonitoringCriticalAssetAsync(String criticalAssetId) { - return getSecurityMonitoringCriticalAssetWithHttpInfoAsync(criticalAssetId) + public CompletableFuture getSecurityFindingsAutomationInboxRuleAsync( + UUID ruleId) { + return getSecurityFindingsAutomationInboxRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -14850,44 +15102,49 @@ public SecurityMonitoringCriticalAssetResponse getSecurityMonitoringCriticalAsse } /** - * Get the details of a specific critical asset. + * Get the details of an inbox rule by ID. * - * @param criticalAssetId The ID of the critical asset. (required) - * @return ApiResponse<SecurityMonitoringCriticalAssetResponse> + * @param ruleId The ID of the inbox rule. (required) + * @return ApiResponse<InboxRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * * * *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
200 Successfully retrieved the inbox rule -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - getSecurityMonitoringCriticalAssetWithHttpInfo(String criticalAssetId) throws ApiException { + public ApiResponse getSecurityFindingsAutomationInboxRuleWithHttpInfo( + UUID ruleId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getSecurityFindingsAutomationInboxRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; - // verify the required parameter 'criticalAssetId' is set - if (criticalAssetId == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( 400, - "Missing the required parameter 'criticalAssetId' when calling" - + " getSecurityMonitoringCriticalAsset"); + "Missing the required parameter 'ruleId' when calling" + + " getSecurityFindingsAutomationInboxRule"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/critical_assets/{critical_asset_id}" - .replaceAll( - "\\{" + "critical_asset_id" + "\\}", - apiClient.escapeString(criticalAssetId.toString())); + "/api/v2/security/findings/automation/inbox_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringCriticalAsset", + "v2.SecurityMonitoringApi.getSecurityFindingsAutomationInboxRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -14902,38 +15159,45 @@ public SecurityMonitoringCriticalAssetResponse getSecurityMonitoringCriticalAsse localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a critical asset. + * Get an inbox rule. * - *

See {@link #getSecurityMonitoringCriticalAssetWithHttpInfo}. + *

See {@link #getSecurityFindingsAutomationInboxRuleWithHttpInfo}. * - * @param criticalAssetId The ID of the critical asset. (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringCriticalAssetResponse>> + * @param ruleId The ID of the inbox rule. (required) + * @return CompletableFuture<ApiResponse<InboxRuleResponse>> */ - public CompletableFuture> - getSecurityMonitoringCriticalAssetWithHttpInfoAsync(String criticalAssetId) { + public CompletableFuture> + getSecurityFindingsAutomationInboxRuleWithHttpInfoAsync(UUID ruleId) { + // Check if unstable operation is enabled + String operationId = "getSecurityFindingsAutomationInboxRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; - // verify the required parameter 'criticalAssetId' is set - if (criticalAssetId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'criticalAssetId' when calling" - + " getSecurityMonitoringCriticalAsset")); + "Missing the required parameter 'ruleId' when calling" + + " getSecurityFindingsAutomationInboxRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/critical_assets/{critical_asset_id}" - .replaceAll( - "\\{" + "critical_asset_id" + "\\}", - apiClient.escapeString(criticalAssetId.toString())); + "/api/v2/security/findings/automation/inbox_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -14941,7 +15205,7 @@ public SecurityMonitoringCriticalAssetResponse getSecurityMonitoringCriticalAsse try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringCriticalAsset", + "v2.SecurityMonitoringApi.getSecurityFindingsAutomationInboxRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -14949,8 +15213,7 @@ public SecurityMonitoringCriticalAssetResponse getSecurityMonitoringCriticalAsse new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -14962,34 +15225,33 @@ public SecurityMonitoringCriticalAssetResponse getSecurityMonitoringCriticalAsse localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a dataset. + * Get a mute rule. * - *

See {@link #getSecurityMonitoringDatasetWithHttpInfo}. + *

See {@link #getSecurityFindingsAutomationMuteRuleWithHttpInfo}. * - * @param datasetId The UUID of the dataset. (required) - * @return SecurityMonitoringDatasetResponse + * @param ruleId The ID of the mute rule. (required) + * @return MuteRuleResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringDatasetResponse getSecurityMonitoringDataset(String datasetId) - throws ApiException { - return getSecurityMonitoringDatasetWithHttpInfo(datasetId).getData(); + public MuteRuleResponse getSecurityFindingsAutomationMuteRule(UUID ruleId) throws ApiException { + return getSecurityFindingsAutomationMuteRuleWithHttpInfo(ruleId).getData(); } /** - * Get a dataset. + * Get a mute rule. * - *

See {@link #getSecurityMonitoringDatasetWithHttpInfoAsync}. + *

See {@link #getSecurityFindingsAutomationMuteRuleWithHttpInfoAsync}. * - * @param datasetId The UUID of the dataset. (required) - * @return CompletableFuture<SecurityMonitoringDatasetResponse> + * @param ruleId The ID of the mute rule. (required) + * @return CompletableFuture<MuteRuleResponse> */ - public CompletableFuture getSecurityMonitoringDatasetAsync( - String datasetId) { - return getSecurityMonitoringDatasetWithHttpInfoAsync(datasetId) + public CompletableFuture getSecurityFindingsAutomationMuteRuleAsync( + UUID ruleId) { + return getSecurityFindingsAutomationMuteRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -14997,26 +15259,25 @@ public CompletableFuture getSecurityMonitorin } /** - * Get the current version of a Cloud SIEM dataset by ID. + * Get the details of a mute rule by ID. * - * @param datasetId The UUID of the dataset. (required) - * @return ApiResponse<SecurityMonitoringDatasetResponse> + * @param ruleId The ID of the mute rule. (required) + * @return ApiResponse<MuteRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
200 Successfully retrieved the mute rule -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getSecurityMonitoringDatasetWithHttpInfo( - String datasetId) throws ApiException { + public ApiResponse getSecurityFindingsAutomationMuteRuleWithHttpInfo( + UUID ruleId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getSecurityMonitoringDataset"; + String operationId = "getSecurityFindingsAutomationMuteRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -15024,22 +15285,23 @@ public ApiResponse getSecurityMonitoringDatas } Object localVarPostBody = null; - // verify the required parameter 'datasetId' is set - if (datasetId == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( 400, - "Missing the required parameter 'datasetId' when calling getSecurityMonitoringDataset"); + "Missing the required parameter 'ruleId' when calling" + + " getSecurityFindingsAutomationMuteRule"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/datasets/{dataset_id}" - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/security/findings/automation/mute_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringDataset", + "v2.SecurityMonitoringApi.getSecurityFindingsAutomationMuteRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -15054,47 +15316,45 @@ public ApiResponse getSecurityMonitoringDatas localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a dataset. + * Get a mute rule. * - *

See {@link #getSecurityMonitoringDatasetWithHttpInfo}. + *

See {@link #getSecurityFindingsAutomationMuteRuleWithHttpInfo}. * - * @param datasetId The UUID of the dataset. (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringDatasetResponse>> + * @param ruleId The ID of the mute rule. (required) + * @return CompletableFuture<ApiResponse<MuteRuleResponse>> */ - public CompletableFuture> - getSecurityMonitoringDatasetWithHttpInfoAsync(String datasetId) { + public CompletableFuture> + getSecurityFindingsAutomationMuteRuleWithHttpInfoAsync(UUID ruleId) { // Check if unstable operation is enabled - String operationId = "getSecurityMonitoringDataset"; + String operationId = "getSecurityFindingsAutomationMuteRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'datasetId' is set - if (datasetId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'datasetId' when calling" - + " getSecurityMonitoringDataset")); + "Missing the required parameter 'ruleId' when calling" + + " getSecurityFindingsAutomationMuteRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/datasets/{dataset_id}" - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/security/findings/automation/mute_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -15102,7 +15362,7 @@ public ApiResponse getSecurityMonitoringDatas try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringDataset", + "v2.SecurityMonitoringApi.getSecurityFindingsAutomationMuteRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -15110,8 +15370,7 @@ public ApiResponse getSecurityMonitoringDatas new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -15123,36 +15382,34 @@ public ApiResponse getSecurityMonitoringDatas localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a dataset at a specific version. + * Get a severity modifier rule. * - *

See {@link #getSecurityMonitoringDatasetByVersionWithHttpInfo}. + *

See {@link #getSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo}. * - * @param datasetId The UUID of the dataset. (required) - * @param version The version number of the dataset to retrieve. (required) - * @return SecurityMonitoringDatasetResponse + * @param ruleId The ID of the severity modifier rule. (required) + * @return SeverityModifierRuleResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringDatasetResponse getSecurityMonitoringDatasetByVersion( - String datasetId, Long version) throws ApiException { - return getSecurityMonitoringDatasetByVersionWithHttpInfo(datasetId, version).getData(); + public SeverityModifierRuleResponse getSecurityFindingsAutomationSeverityModifierRule(UUID ruleId) + throws ApiException { + return getSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo(ruleId).getData(); } /** - * Get a dataset at a specific version. + * Get a severity modifier rule. * - *

See {@link #getSecurityMonitoringDatasetByVersionWithHttpInfoAsync}. + *

See {@link #getSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync}. * - * @param datasetId The UUID of the dataset. (required) - * @param version The version number of the dataset to retrieve. (required) - * @return CompletableFuture<SecurityMonitoringDatasetResponse> + * @param ruleId The ID of the severity modifier rule. (required) + * @return CompletableFuture<SeverityModifierRuleResponse> */ - public CompletableFuture - getSecurityMonitoringDatasetByVersionAsync(String datasetId, Long version) { - return getSecurityMonitoringDatasetByVersionWithHttpInfoAsync(datasetId, version) + public CompletableFuture + getSecurityFindingsAutomationSeverityModifierRuleAsync(UUID ruleId) { + return getSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -15160,28 +15417,27 @@ public SecurityMonitoringDatasetResponse getSecurityMonitoringDatasetByVersion( } /** - * Retrieve a specific historical version of a Cloud SIEM dataset. + * Get the details of a severity modifier rule by ID. * - * @param datasetId The UUID of the dataset. (required) - * @param version The version number of the dataset to retrieve. (required) - * @return ApiResponse<SecurityMonitoringDatasetResponse> + * @param ruleId The ID of the severity modifier rule. (required) + * @return ApiResponse<SeverityModifierRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * * * + * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
200 Successfully retrieved the severity modifier rule -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
429 Too many requests -
*/ - public ApiResponse - getSecurityMonitoringDatasetByVersionWithHttpInfo(String datasetId, Long version) + public ApiResponse + getSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo(UUID ruleId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getSecurityMonitoringDatasetByVersion"; + String operationId = "getSecurityFindingsAutomationSeverityModifierRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -15189,32 +15445,23 @@ public SecurityMonitoringDatasetResponse getSecurityMonitoringDatasetByVersion( } Object localVarPostBody = null; - // verify the required parameter 'datasetId' is set - if (datasetId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'datasetId' when calling" - + " getSecurityMonitoringDatasetByVersion"); - } - - // verify the required parameter 'version' is set - if (version == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( 400, - "Missing the required parameter 'version' when calling" - + " getSecurityMonitoringDatasetByVersion"); + "Missing the required parameter 'ruleId' when calling" + + " getSecurityFindingsAutomationSeverityModifierRule"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/datasets/{dataset_id}/version/{version}" - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())) - .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + "/api/v2/security/findings/automation/severity_modifier_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringDatasetByVersion", + "v2.SecurityMonitoringApi.getSecurityFindingsAutomationSeverityModifierRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -15229,26 +15476,25 @@ public SecurityMonitoringDatasetResponse getSecurityMonitoringDatasetByVersion( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a dataset at a specific version. + * Get a severity modifier rule. * - *

See {@link #getSecurityMonitoringDatasetByVersionWithHttpInfo}. + *

See {@link #getSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo}. * - * @param datasetId The UUID of the dataset. (required) - * @param version The version number of the dataset to retrieve. (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringDatasetResponse>> + * @param ruleId The ID of the severity modifier rule. (required) + * @return CompletableFuture<ApiResponse<SeverityModifierRuleResponse>> */ - public CompletableFuture> - getSecurityMonitoringDatasetByVersionWithHttpInfoAsync(String datasetId, Long version) { + public CompletableFuture> + getSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync(UUID ruleId) { // Check if unstable operation is enabled - String operationId = "getSecurityMonitoringDatasetByVersion"; + String operationId = "getSecurityFindingsAutomationSeverityModifierRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -15256,34 +15502,21 @@ public SecurityMonitoringDatasetResponse getSecurityMonitoringDatasetByVersion( } Object localVarPostBody = null; - // verify the required parameter 'datasetId' is set - if (datasetId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'datasetId' when calling" - + " getSecurityMonitoringDatasetByVersion")); - return result; - } - - // verify the required parameter 'version' is set - if (version == null) { - CompletableFuture> result = + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'version' when calling" - + " getSecurityMonitoringDatasetByVersion")); + "Missing the required parameter 'ruleId' when calling" + + " getSecurityFindingsAutomationSeverityModifierRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/datasets/{dataset_id}/version/{version}" - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())) - .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + "/api/v2/security/findings/automation/severity_modifier_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -15291,7 +15524,7 @@ public SecurityMonitoringDatasetResponse getSecurityMonitoringDatasetByVersion( try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringDatasetByVersion", + "v2.SecurityMonitoringApi.getSecurityFindingsAutomationSeverityModifierRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -15299,7 +15532,7 @@ public SecurityMonitoringDatasetResponse getSecurityMonitoringDatasetByVersion( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -15312,103 +15545,34 @@ public SecurityMonitoringDatasetResponse getSecurityMonitoringDatasetByVersion( localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to getSecurityMonitoringDatasetVersionHistory. */ - public static class GetSecurityMonitoringDatasetVersionHistoryOptionalParameters { - private Long pageSize; - private Long pageNumber; - - /** - * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 100. (optional, default - * to 10) - * @return GetSecurityMonitoringDatasetVersionHistoryOptionalParameters - */ - public GetSecurityMonitoringDatasetVersionHistoryOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Set pageNumber. - * - * @param pageNumber Specific page number to return. (optional, default to 0) - * @return GetSecurityMonitoringDatasetVersionHistoryOptionalParameters - */ - public GetSecurityMonitoringDatasetVersionHistoryOptionalParameters pageNumber( - Long pageNumber) { - this.pageNumber = pageNumber; - return this; - } - } - - /** - * Get the version history of a dataset. - * - *

See {@link #getSecurityMonitoringDatasetVersionHistoryWithHttpInfo}. - * - * @param datasetId The UUID of the dataset. (required) - * @return SecurityMonitoringDatasetVersionHistoryResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringDatasetVersionHistoryResponse getSecurityMonitoringDatasetVersionHistory( - String datasetId) throws ApiException { - return getSecurityMonitoringDatasetVersionHistoryWithHttpInfo( - datasetId, new GetSecurityMonitoringDatasetVersionHistoryOptionalParameters()) - .getData(); - } - - /** - * Get the version history of a dataset. - * - *

See {@link #getSecurityMonitoringDatasetVersionHistoryWithHttpInfoAsync}. - * - * @param datasetId The UUID of the dataset. (required) - * @return CompletableFuture<SecurityMonitoringDatasetVersionHistoryResponse> - */ - public CompletableFuture - getSecurityMonitoringDatasetVersionHistoryAsync(String datasetId) { - return getSecurityMonitoringDatasetVersionHistoryWithHttpInfoAsync( - datasetId, new GetSecurityMonitoringDatasetVersionHistoryOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * Get the version history of a dataset. + * Get a ticket creation rule. * - *

See {@link #getSecurityMonitoringDatasetVersionHistoryWithHttpInfo}. + *

See {@link #getSecurityFindingsAutomationTicketCreationRuleWithHttpInfo}. * - * @param datasetId The UUID of the dataset. (required) - * @param parameters Optional parameters for the request. - * @return SecurityMonitoringDatasetVersionHistoryResponse + * @param ruleId The ID of the ticket creation rule. (required) + * @return TicketCreationRuleResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringDatasetVersionHistoryResponse getSecurityMonitoringDatasetVersionHistory( - String datasetId, GetSecurityMonitoringDatasetVersionHistoryOptionalParameters parameters) + public TicketCreationRuleResponse getSecurityFindingsAutomationTicketCreationRule(UUID ruleId) throws ApiException { - return getSecurityMonitoringDatasetVersionHistoryWithHttpInfo(datasetId, parameters).getData(); + return getSecurityFindingsAutomationTicketCreationRuleWithHttpInfo(ruleId).getData(); } /** - * Get the version history of a dataset. + * Get a ticket creation rule. * - *

See {@link #getSecurityMonitoringDatasetVersionHistoryWithHttpInfoAsync}. + *

See {@link #getSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync}. * - * @param datasetId The UUID of the dataset. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SecurityMonitoringDatasetVersionHistoryResponse> + * @param ruleId The ID of the ticket creation rule. (required) + * @return CompletableFuture<TicketCreationRuleResponse> */ - public CompletableFuture - getSecurityMonitoringDatasetVersionHistoryAsync( - String datasetId, - GetSecurityMonitoringDatasetVersionHistoryOptionalParameters parameters) { - return getSecurityMonitoringDatasetVersionHistoryWithHttpInfoAsync(datasetId, parameters) + public CompletableFuture + getSecurityFindingsAutomationTicketCreationRuleAsync(UUID ruleId) { + return getSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -15416,30 +15580,25 @@ public SecurityMonitoringDatasetVersionHistoryResponse getSecurityMonitoringData } /** - * Retrieve the version history of a Cloud SIEM dataset, including the changes made at each - * version. + * Get the details of a ticket creation rule by ID. * - * @param datasetId The UUID of the dataset. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<SecurityMonitoringDatasetVersionHistoryResponse> + * @param ruleId The ID of the ticket creation rule. (required) + * @return ApiResponse<TicketCreationRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
200 Successfully retrieved the ticket creation rule -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - getSecurityMonitoringDatasetVersionHistoryWithHttpInfo( - String datasetId, GetSecurityMonitoringDatasetVersionHistoryOptionalParameters parameters) - throws ApiException { + public ApiResponse + getSecurityFindingsAutomationTicketCreationRuleWithHttpInfo(UUID ruleId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getSecurityMonitoringDatasetVersionHistory"; + String operationId = "getSecurityFindingsAutomationTicketCreationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -15447,31 +15606,25 @@ public SecurityMonitoringDatasetVersionHistoryResponse getSecurityMonitoringData } Object localVarPostBody = null; - // verify the required parameter 'datasetId' is set - if (datasetId == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( 400, - "Missing the required parameter 'datasetId' when calling" - + " getSecurityMonitoringDatasetVersionHistory"); + "Missing the required parameter 'ruleId' when calling" + + " getSecurityFindingsAutomationTicketCreationRule"); } - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/datasets/{dataset_id}/version_history" - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/security/findings/automation/ticket_creation_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringDatasetVersionHistory", + "v2.SecurityMonitoringApi.getSecurityFindingsAutomationTicketCreationRule", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -15484,74 +15637,61 @@ public SecurityMonitoringDatasetVersionHistoryResponse getSecurityMonitoringData localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get the version history of a dataset. + * Get a ticket creation rule. * - *

See {@link #getSecurityMonitoringDatasetVersionHistoryWithHttpInfo}. + *

See {@link #getSecurityFindingsAutomationTicketCreationRuleWithHttpInfo}. * - * @param datasetId The UUID of the dataset. (required) - * @param parameters Optional parameters for the request. - * @return - * CompletableFuture<ApiResponse<SecurityMonitoringDatasetVersionHistoryResponse>> + * @param ruleId The ID of the ticket creation rule. (required) + * @return CompletableFuture<ApiResponse<TicketCreationRuleResponse>> */ - public CompletableFuture> - getSecurityMonitoringDatasetVersionHistoryWithHttpInfoAsync( - String datasetId, - GetSecurityMonitoringDatasetVersionHistoryOptionalParameters parameters) { + public CompletableFuture> + getSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync(UUID ruleId) { // Check if unstable operation is enabled - String operationId = "getSecurityMonitoringDatasetVersionHistory"; + String operationId = "getSecurityFindingsAutomationTicketCreationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'datasetId' is set - if (datasetId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'datasetId' when calling" - + " getSecurityMonitoringDatasetVersionHistory")); + "Missing the required parameter 'ruleId' when calling" + + " getSecurityFindingsAutomationTicketCreationRule")); return result; } - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/datasets/{dataset_id}/version_history" - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/security/findings/automation/ticket_creation_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringDatasetVersionHistory", + "v2.SecurityMonitoringApi.getSecurityFindingsAutomationTicketCreationRule", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -15563,34 +15703,34 @@ public SecurityMonitoringDatasetVersionHistoryResponse getSecurityMonitoringData localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a hist signal's details. + * Get a critical asset. * - *

See {@link #getSecurityMonitoringHistsignalWithHttpInfo}. + *

See {@link #getSecurityMonitoringCriticalAssetWithHttpInfo}. * - * @param histsignalId The ID of the historical signal. (required) - * @return SecurityMonitoringSignalResponse + * @param criticalAssetId The ID of the critical asset. (required) + * @return SecurityMonitoringCriticalAssetResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringSignalResponse getSecurityMonitoringHistsignal(String histsignalId) - throws ApiException { - return getSecurityMonitoringHistsignalWithHttpInfo(histsignalId).getData(); + public SecurityMonitoringCriticalAssetResponse getSecurityMonitoringCriticalAsset( + String criticalAssetId) throws ApiException { + return getSecurityMonitoringCriticalAssetWithHttpInfo(criticalAssetId).getData(); } /** - * Get a hist signal's details. + * Get a critical asset. * - *

See {@link #getSecurityMonitoringHistsignalWithHttpInfoAsync}. + *

See {@link #getSecurityMonitoringCriticalAssetWithHttpInfoAsync}. * - * @param histsignalId The ID of the historical signal. (required) - * @return CompletableFuture<SecurityMonitoringSignalResponse> + * @param criticalAssetId The ID of the critical asset. (required) + * @return CompletableFuture<SecurityMonitoringCriticalAssetResponse> */ - public CompletableFuture getSecurityMonitoringHistsignalAsync( - String histsignalId) { - return getSecurityMonitoringHistsignalWithHttpInfoAsync(histsignalId) + public CompletableFuture + getSecurityMonitoringCriticalAssetAsync(String criticalAssetId) { + return getSecurityMonitoringCriticalAssetWithHttpInfoAsync(criticalAssetId) .thenApply( response -> { return response.getData(); @@ -15598,51 +15738,44 @@ public CompletableFuture getSecurityMonitoring } /** - * Get a hist signal's details. + * Get the details of a specific critical asset. * - * @param histsignalId The ID of the historical signal. (required) - * @return ApiResponse<SecurityMonitoringSignalResponse> + * @param criticalAssetId The ID of the critical asset. (required) + * @return ApiResponse<SecurityMonitoringCriticalAssetResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getSecurityMonitoringHistsignalWithHttpInfo( - String histsignalId) throws ApiException { - // Check if unstable operation is enabled - String operationId = "getSecurityMonitoringHistsignal"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse + getSecurityMonitoringCriticalAssetWithHttpInfo(String criticalAssetId) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'histsignalId' is set - if (histsignalId == null) { + // verify the required parameter 'criticalAssetId' is set + if (criticalAssetId == null) { throw new ApiException( 400, - "Missing the required parameter 'histsignalId' when calling" - + " getSecurityMonitoringHistsignal"); + "Missing the required parameter 'criticalAssetId' when calling" + + " getSecurityMonitoringCriticalAsset"); } // create path and map variables String localVarPath = - "/api/v2/siem-historical-detections/histsignals/{histsignal_id}" + "/api/v2/security_monitoring/configuration/critical_assets/{critical_asset_id}" .replaceAll( - "\\{" + "histsignal_id" + "\\}", apiClient.escapeString(histsignalId.toString())); + "\\{" + "critical_asset_id" + "\\}", + apiClient.escapeString(criticalAssetId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringHistsignal", + "v2.SecurityMonitoringApi.getSecurityMonitoringCriticalAsset", localVarPath, new ArrayList(), localVarHeaderParams, @@ -15657,48 +15790,38 @@ public ApiResponse getSecurityMonitoringHistsi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a hist signal's details. + * Get a critical asset. * - *

See {@link #getSecurityMonitoringHistsignalWithHttpInfo}. + *

See {@link #getSecurityMonitoringCriticalAssetWithHttpInfo}. * - * @param histsignalId The ID of the historical signal. (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalResponse>> + * @param criticalAssetId The ID of the critical asset. (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringCriticalAssetResponse>> */ - public CompletableFuture> - getSecurityMonitoringHistsignalWithHttpInfoAsync(String histsignalId) { - // Check if unstable operation is enabled - String operationId = "getSecurityMonitoringHistsignal"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> + getSecurityMonitoringCriticalAssetWithHttpInfoAsync(String criticalAssetId) { Object localVarPostBody = null; - // verify the required parameter 'histsignalId' is set - if (histsignalId == null) { - CompletableFuture> result = + // verify the required parameter 'criticalAssetId' is set + if (criticalAssetId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'histsignalId' when calling" - + " getSecurityMonitoringHistsignal")); + "Missing the required parameter 'criticalAssetId' when calling" + + " getSecurityMonitoringCriticalAsset")); return result; } // create path and map variables String localVarPath = - "/api/v2/siem-historical-detections/histsignals/{histsignal_id}" + "/api/v2/security_monitoring/configuration/critical_assets/{critical_asset_id}" .replaceAll( - "\\{" + "histsignal_id" + "\\}", apiClient.escapeString(histsignalId.toString())); + "\\{" + "critical_asset_id" + "\\}", + apiClient.escapeString(criticalAssetId.toString())); Map localVarHeaderParams = new HashMap(); @@ -15706,7 +15829,7 @@ public ApiResponse getSecurityMonitoringHistsi try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringHistsignal", + "v2.SecurityMonitoringApi.getSecurityMonitoringCriticalAsset", localVarPath, new ArrayList(), localVarHeaderParams, @@ -15714,7 +15837,7 @@ public ApiResponse getSecurityMonitoringHistsi new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -15727,166 +15850,45 @@ public ApiResponse getSecurityMonitoringHistsi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to getSecurityMonitoringHistsignalsByJobId. */ - public static class GetSecurityMonitoringHistsignalsByJobIdOptionalParameters { - private String filterQuery; - private OffsetDateTime filterFrom; - private OffsetDateTime filterTo; - private SecurityMonitoringSignalsSort sort; - private String pageCursor; - private Integer pageLimit; - - /** - * Set filterQuery. - * - * @param filterQuery The search query for security signals. (optional) - * @return GetSecurityMonitoringHistsignalsByJobIdOptionalParameters - */ - public GetSecurityMonitoringHistsignalsByJobIdOptionalParameters filterQuery( - String filterQuery) { - this.filterQuery = filterQuery; - return this; - } + /** + * Get a dataset. + * + *

See {@link #getSecurityMonitoringDatasetWithHttpInfo}. + * + * @param datasetId The UUID of the dataset. (required) + * @return SecurityMonitoringDatasetResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringDatasetResponse getSecurityMonitoringDataset(String datasetId) + throws ApiException { + return getSecurityMonitoringDatasetWithHttpInfo(datasetId).getData(); + } - /** - * Set filterFrom. - * - * @param filterFrom The minimum timestamp for requested security signals. (optional) - * @return GetSecurityMonitoringHistsignalsByJobIdOptionalParameters - */ - public GetSecurityMonitoringHistsignalsByJobIdOptionalParameters filterFrom( - OffsetDateTime filterFrom) { - this.filterFrom = filterFrom; - return this; - } - - /** - * Set filterTo. - * - * @param filterTo The maximum timestamp for requested security signals. (optional) - * @return GetSecurityMonitoringHistsignalsByJobIdOptionalParameters - */ - public GetSecurityMonitoringHistsignalsByJobIdOptionalParameters filterTo( - OffsetDateTime filterTo) { - this.filterTo = filterTo; - return this; - } - - /** - * Set sort. - * - * @param sort The order of the security signals in results. (optional) - * @return GetSecurityMonitoringHistsignalsByJobIdOptionalParameters - */ - public GetSecurityMonitoringHistsignalsByJobIdOptionalParameters sort( - SecurityMonitoringSignalsSort sort) { - this.sort = sort; - return this; - } - - /** - * Set pageCursor. - * - * @param pageCursor A list of results using the cursor provided in the previous query. - * (optional) - * @return GetSecurityMonitoringHistsignalsByJobIdOptionalParameters - */ - public GetSecurityMonitoringHistsignalsByJobIdOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; - return this; - } - - /** - * Set pageLimit. - * - * @param pageLimit The maximum number of security signals in the response. (optional, default - * to 10) - * @return GetSecurityMonitoringHistsignalsByJobIdOptionalParameters - */ - public GetSecurityMonitoringHistsignalsByJobIdOptionalParameters pageLimit(Integer pageLimit) { - this.pageLimit = pageLimit; - return this; - } - } - - /** - * Get a job's hist signals. - * - *

See {@link #getSecurityMonitoringHistsignalsByJobIdWithHttpInfo}. - * - * @param jobId The ID of the job. (required) - * @return SecurityMonitoringSignalsListResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringSignalsListResponse getSecurityMonitoringHistsignalsByJobId(String jobId) - throws ApiException { - return getSecurityMonitoringHistsignalsByJobIdWithHttpInfo( - jobId, new GetSecurityMonitoringHistsignalsByJobIdOptionalParameters()) - .getData(); - } - - /** - * Get a job's hist signals. - * - *

See {@link #getSecurityMonitoringHistsignalsByJobIdWithHttpInfoAsync}. - * - * @param jobId The ID of the job. (required) - * @return CompletableFuture<SecurityMonitoringSignalsListResponse> - */ - public CompletableFuture - getSecurityMonitoringHistsignalsByJobIdAsync(String jobId) { - return getSecurityMonitoringHistsignalsByJobIdWithHttpInfoAsync( - jobId, new GetSecurityMonitoringHistsignalsByJobIdOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get a job's hist signals. - * - *

See {@link #getSecurityMonitoringHistsignalsByJobIdWithHttpInfo}. - * - * @param jobId The ID of the job. (required) - * @param parameters Optional parameters for the request. - * @return SecurityMonitoringSignalsListResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringSignalsListResponse getSecurityMonitoringHistsignalsByJobId( - String jobId, GetSecurityMonitoringHistsignalsByJobIdOptionalParameters parameters) - throws ApiException { - return getSecurityMonitoringHistsignalsByJobIdWithHttpInfo(jobId, parameters).getData(); - } - - /** - * Get a job's hist signals. - * - *

See {@link #getSecurityMonitoringHistsignalsByJobIdWithHttpInfoAsync}. - * - * @param jobId The ID of the job. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SecurityMonitoringSignalsListResponse> - */ - public CompletableFuture - getSecurityMonitoringHistsignalsByJobIdAsync( - String jobId, GetSecurityMonitoringHistsignalsByJobIdOptionalParameters parameters) { - return getSecurityMonitoringHistsignalsByJobIdWithHttpInfoAsync(jobId, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } + /** + * Get a dataset. + * + *

See {@link #getSecurityMonitoringDatasetWithHttpInfoAsync}. + * + * @param datasetId The UUID of the dataset. (required) + * @return CompletableFuture<SecurityMonitoringDatasetResponse> + */ + public CompletableFuture getSecurityMonitoringDatasetAsync( + String datasetId) { + return getSecurityMonitoringDatasetWithHttpInfoAsync(datasetId) + .thenApply( + response -> { + return response.getData(); + }); + } /** - * Get a job's hist signals. + * Get the current version of a Cloud SIEM dataset by ID. * - * @param jobId The ID of the job. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<SecurityMonitoringSignalsListResponse> + * @param datasetId The UUID of the dataset. (required) + * @return ApiResponse<SecurityMonitoringDatasetResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -15894,17 +15896,15 @@ public SecurityMonitoringSignalsListResponse getSecurityMonitoringHistsignalsByJ * * * - * + * * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - getSecurityMonitoringHistsignalsByJobIdWithHttpInfo( - String jobId, GetSecurityMonitoringHistsignalsByJobIdOptionalParameters parameters) - throws ApiException { + public ApiResponse getSecurityMonitoringDatasetWithHttpInfo( + String datasetId) throws ApiException { // Check if unstable operation is enabled - String operationId = "getSecurityMonitoringHistsignalsByJobId"; + String operationId = "getSecurityMonitoringDataset"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -15912,39 +15912,24 @@ public SecurityMonitoringSignalsListResponse getSecurityMonitoringHistsignalsByJ } Object localVarPostBody = null; - // verify the required parameter 'jobId' is set - if (jobId == null) { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { throw new ApiException( 400, - "Missing the required parameter 'jobId' when calling" - + " getSecurityMonitoringHistsignalsByJobId"); + "Missing the required parameter 'datasetId' when calling getSecurityMonitoringDataset"); } - String filterQuery = parameters.filterQuery; - OffsetDateTime filterFrom = parameters.filterFrom; - OffsetDateTime filterTo = parameters.filterTo; - SecurityMonitoringSignalsSort sort = parameters.sort; - String pageCursor = parameters.pageCursor; - Integer pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/siem-historical-detections/jobs/{job_id}/histsignals" - .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); + "/api/v2/security_monitoring/datasets/{dataset_id}" + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringHistsignalsByJobId", + "v2.SecurityMonitoringApi.getSecurityMonitoringDataset", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -15957,27 +15942,25 @@ public SecurityMonitoringSignalsListResponse getSecurityMonitoringHistsignalsByJ localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a job's hist signals. + * Get a dataset. * - *

See {@link #getSecurityMonitoringHistsignalsByJobIdWithHttpInfo}. + *

See {@link #getSecurityMonitoringDatasetWithHttpInfo}. * - * @param jobId The ID of the job. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalsListResponse>> + * @param datasetId The UUID of the dataset. (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringDatasetResponse>> */ - public CompletableFuture> - getSecurityMonitoringHistsignalsByJobIdWithHttpInfoAsync( - String jobId, GetSecurityMonitoringHistsignalsByJobIdOptionalParameters parameters) { + public CompletableFuture> + getSecurityMonitoringDatasetWithHttpInfoAsync(String datasetId) { // Check if unstable operation is enabled - String operationId = "getSecurityMonitoringHistsignalsByJobId"; + String operationId = "getSecurityMonitoringDataset"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -15985,51 +15968,37 @@ public SecurityMonitoringSignalsListResponse getSecurityMonitoringHistsignalsByJ } Object localVarPostBody = null; - // verify the required parameter 'jobId' is set - if (jobId == null) { - CompletableFuture> result = + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'jobId' when calling" - + " getSecurityMonitoringHistsignalsByJobId")); + "Missing the required parameter 'datasetId' when calling" + + " getSecurityMonitoringDataset")); return result; } - String filterQuery = parameters.filterQuery; - OffsetDateTime filterFrom = parameters.filterFrom; - OffsetDateTime filterTo = parameters.filterTo; - SecurityMonitoringSignalsSort sort = parameters.sort; - String pageCursor = parameters.pageCursor; - Integer pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/siem-historical-detections/jobs/{job_id}/histsignals" - .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); + "/api/v2/security_monitoring/datasets/{dataset_id}" + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringHistsignalsByJobId", + "v2.SecurityMonitoringApi.getSecurityMonitoringDataset", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -16042,34 +16011,36 @@ public SecurityMonitoringSignalsListResponse getSecurityMonitoringHistsignalsByJ localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get an entity context sync configuration. + * Get a dataset at a specific version. * - *

See {@link #getSecurityMonitoringIntegrationConfigWithHttpInfo}. + *

See {@link #getSecurityMonitoringDatasetByVersionWithHttpInfo}. * - * @param integrationConfigId The ID of the entity context sync configuration. (required) - * @return SecurityMonitoringIntegrationConfigResponse + * @param datasetId The UUID of the dataset. (required) + * @param version The version number of the dataset to retrieve. (required) + * @return SecurityMonitoringDatasetResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringIntegrationConfigResponse getSecurityMonitoringIntegrationConfig( - String integrationConfigId) throws ApiException { - return getSecurityMonitoringIntegrationConfigWithHttpInfo(integrationConfigId).getData(); + public SecurityMonitoringDatasetResponse getSecurityMonitoringDatasetByVersion( + String datasetId, Long version) throws ApiException { + return getSecurityMonitoringDatasetByVersionWithHttpInfo(datasetId, version).getData(); } /** - * Get an entity context sync configuration. + * Get a dataset at a specific version. * - *

See {@link #getSecurityMonitoringIntegrationConfigWithHttpInfoAsync}. + *

See {@link #getSecurityMonitoringDatasetByVersionWithHttpInfoAsync}. * - * @param integrationConfigId The ID of the entity context sync configuration. (required) - * @return CompletableFuture<SecurityMonitoringIntegrationConfigResponse> + * @param datasetId The UUID of the dataset. (required) + * @param version The version number of the dataset to retrieve. (required) + * @return CompletableFuture<SecurityMonitoringDatasetResponse> */ - public CompletableFuture - getSecurityMonitoringIntegrationConfigAsync(String integrationConfigId) { - return getSecurityMonitoringIntegrationConfigWithHttpInfoAsync(integrationConfigId) + public CompletableFuture + getSecurityMonitoringDatasetByVersionAsync(String datasetId, Long version) { + return getSecurityMonitoringDatasetByVersionWithHttpInfoAsync(datasetId, version) .thenApply( response -> { return response.getData(); @@ -16077,26 +16048,28 @@ public SecurityMonitoringIntegrationConfigResponse getSecurityMonitoringIntegrat } /** - * Get the details of a specific entity context sync configuration. + * Retrieve a specific historical version of a Cloud SIEM dataset. * - * @param integrationConfigId The ID of the entity context sync configuration. (required) - * @return ApiResponse<SecurityMonitoringIntegrationConfigResponse> + * @param datasetId The UUID of the dataset. (required) + * @param version The version number of the dataset to retrieve. (required) + * @return ApiResponse<SecurityMonitoringDatasetResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * + * + * * * *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - getSecurityMonitoringIntegrationConfigWithHttpInfo(String integrationConfigId) + public ApiResponse + getSecurityMonitoringDatasetByVersionWithHttpInfo(String datasetId, Long version) throws ApiException { // Check if unstable operation is enabled - String operationId = "getSecurityMonitoringIntegrationConfig"; + String operationId = "getSecurityMonitoringDatasetByVersion"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -16104,25 +16077,32 @@ public SecurityMonitoringIntegrationConfigResponse getSecurityMonitoringIntegrat } Object localVarPostBody = null; - // verify the required parameter 'integrationConfigId' is set - if (integrationConfigId == null) { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { throw new ApiException( 400, - "Missing the required parameter 'integrationConfigId' when calling" - + " getSecurityMonitoringIntegrationConfig"); + "Missing the required parameter 'datasetId' when calling" + + " getSecurityMonitoringDatasetByVersion"); + } + + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException( + 400, + "Missing the required parameter 'version' when calling" + + " getSecurityMonitoringDatasetByVersion"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/integration_config/{integration_config_id}" - .replaceAll( - "\\{" + "integration_config_id" + "\\}", - apiClient.escapeString(integrationConfigId.toString())); + "/api/v2/security_monitoring/datasets/{dataset_id}/version/{version}" + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringIntegrationConfig", + "v2.SecurityMonitoringApi.getSecurityMonitoringDatasetByVersion", localVarPath, new ArrayList(), localVarHeaderParams, @@ -16137,25 +16117,26 @@ public SecurityMonitoringIntegrationConfigResponse getSecurityMonitoringIntegrat localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get an entity context sync configuration. + * Get a dataset at a specific version. * - *

See {@link #getSecurityMonitoringIntegrationConfigWithHttpInfo}. + *

See {@link #getSecurityMonitoringDatasetByVersionWithHttpInfo}. * - * @param integrationConfigId The ID of the entity context sync configuration. (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringIntegrationConfigResponse>> + * @param datasetId The UUID of the dataset. (required) + * @param version The version number of the dataset to retrieve. (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringDatasetResponse>> */ - public CompletableFuture> - getSecurityMonitoringIntegrationConfigWithHttpInfoAsync(String integrationConfigId) { + public CompletableFuture> + getSecurityMonitoringDatasetByVersionWithHttpInfoAsync(String datasetId, Long version) { // Check if unstable operation is enabled - String operationId = "getSecurityMonitoringIntegrationConfig"; + String operationId = "getSecurityMonitoringDatasetByVersion"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -16163,23 +16144,34 @@ public SecurityMonitoringIntegrationConfigResponse getSecurityMonitoringIntegrat } Object localVarPostBody = null; - // verify the required parameter 'integrationConfigId' is set - if (integrationConfigId == null) { - CompletableFuture> result = + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'integrationConfigId' when calling" - + " getSecurityMonitoringIntegrationConfig")); + "Missing the required parameter 'datasetId' when calling" + + " getSecurityMonitoringDatasetByVersion")); + return result; + } + + // verify the required parameter 'version' is set + if (version == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'version' when calling" + + " getSecurityMonitoringDatasetByVersion")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/integration_config/{integration_config_id}" - .replaceAll( - "\\{" + "integration_config_id" + "\\}", - apiClient.escapeString(integrationConfigId.toString())); + "/api/v2/security_monitoring/datasets/{dataset_id}/version/{version}" + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); Map localVarHeaderParams = new HashMap(); @@ -16187,7 +16179,7 @@ public SecurityMonitoringIntegrationConfigResponse getSecurityMonitoringIntegrat try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringIntegrationConfig", + "v2.SecurityMonitoringApi.getSecurityMonitoringDatasetByVersion", localVarPath, new ArrayList(), localVarHeaderParams, @@ -16195,7 +16187,7 @@ public SecurityMonitoringIntegrationConfigResponse getSecurityMonitoringIntegrat new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -16208,34 +16200,103 @@ public SecurityMonitoringIntegrationConfigResponse getSecurityMonitoringIntegrat localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to getSecurityMonitoringDatasetVersionHistory. */ + public static class GetSecurityMonitoringDatasetVersionHistoryOptionalParameters { + private Long pageSize; + private Long pageNumber; + + /** + * Set pageSize. + * + * @param pageSize Size for a given page. The maximum allowed value is 100. (optional, default + * to 10) + * @return GetSecurityMonitoringDatasetVersionHistoryOptionalParameters + */ + public GetSecurityMonitoringDatasetVersionHistoryOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageNumber. + * + * @param pageNumber Specific page number to return. (optional, default to 0) + * @return GetSecurityMonitoringDatasetVersionHistoryOptionalParameters + */ + public GetSecurityMonitoringDatasetVersionHistoryOptionalParameters pageNumber( + Long pageNumber) { + this.pageNumber = pageNumber; + return this; + } } /** - * Get a rule's details. + * Get the version history of a dataset. * - *

See {@link #getSecurityMonitoringRuleWithHttpInfo}. + *

See {@link #getSecurityMonitoringDatasetVersionHistoryWithHttpInfo}. * - * @param ruleId The ID of the rule. (required) - * @return SecurityMonitoringRuleResponse + * @param datasetId The UUID of the dataset. (required) + * @return SecurityMonitoringDatasetVersionHistoryResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringRuleResponse getSecurityMonitoringRule(String ruleId) + public SecurityMonitoringDatasetVersionHistoryResponse getSecurityMonitoringDatasetVersionHistory( + String datasetId) throws ApiException { + return getSecurityMonitoringDatasetVersionHistoryWithHttpInfo( + datasetId, new GetSecurityMonitoringDatasetVersionHistoryOptionalParameters()) + .getData(); + } + + /** + * Get the version history of a dataset. + * + *

See {@link #getSecurityMonitoringDatasetVersionHistoryWithHttpInfoAsync}. + * + * @param datasetId The UUID of the dataset. (required) + * @return CompletableFuture<SecurityMonitoringDatasetVersionHistoryResponse> + */ + public CompletableFuture + getSecurityMonitoringDatasetVersionHistoryAsync(String datasetId) { + return getSecurityMonitoringDatasetVersionHistoryWithHttpInfoAsync( + datasetId, new GetSecurityMonitoringDatasetVersionHistoryOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the version history of a dataset. + * + *

See {@link #getSecurityMonitoringDatasetVersionHistoryWithHttpInfo}. + * + * @param datasetId The UUID of the dataset. (required) + * @param parameters Optional parameters for the request. + * @return SecurityMonitoringDatasetVersionHistoryResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringDatasetVersionHistoryResponse getSecurityMonitoringDatasetVersionHistory( + String datasetId, GetSecurityMonitoringDatasetVersionHistoryOptionalParameters parameters) throws ApiException { - return getSecurityMonitoringRuleWithHttpInfo(ruleId).getData(); + return getSecurityMonitoringDatasetVersionHistoryWithHttpInfo(datasetId, parameters).getData(); } /** - * Get a rule's details. + * Get the version history of a dataset. * - *

See {@link #getSecurityMonitoringRuleWithHttpInfoAsync}. + *

See {@link #getSecurityMonitoringDatasetVersionHistoryWithHttpInfoAsync}. * - * @param ruleId The ID of the rule. (required) - * @return CompletableFuture<SecurityMonitoringRuleResponse> + * @param datasetId The UUID of the dataset. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SecurityMonitoringDatasetVersionHistoryResponse> */ - public CompletableFuture getSecurityMonitoringRuleAsync( - String ruleId) { - return getSecurityMonitoringRuleWithHttpInfoAsync(ruleId) + public CompletableFuture + getSecurityMonitoringDatasetVersionHistoryAsync( + String datasetId, + GetSecurityMonitoringDatasetVersionHistoryOptionalParameters parameters) { + return getSecurityMonitoringDatasetVersionHistoryWithHttpInfoAsync(datasetId, parameters) .thenApply( response -> { return response.getData(); @@ -16243,41 +16304,62 @@ public CompletableFuture getSecurityMonitoringRu } /** - * Get a rule's details. + * Retrieve the version history of a Cloud SIEM dataset, including the changes made at each + * version. * - * @param ruleId The ID of the rule. (required) - * @return ApiResponse<SecurityMonitoringRuleResponse> + * @param datasetId The UUID of the dataset. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<SecurityMonitoringDatasetVersionHistoryResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * + * + * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getSecurityMonitoringRuleWithHttpInfo( - String ruleId) throws ApiException { + public ApiResponse + getSecurityMonitoringDatasetVersionHistoryWithHttpInfo( + String datasetId, GetSecurityMonitoringDatasetVersionHistoryOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getSecurityMonitoringDatasetVersionHistory"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { throw new ApiException( - 400, "Missing the required parameter 'ruleId' when calling getSecurityMonitoringRule"); + 400, + "Missing the required parameter 'datasetId' when calling" + + " getSecurityMonitoringDatasetVersionHistory"); } + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/datasets/{dataset_id}/version_history" + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringRule", + "v2.SecurityMonitoringApi.getSecurityMonitoringDatasetVersionHistory", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -16290,51 +16372,73 @@ public ApiResponse getSecurityMonitoringRuleWith localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a rule's details. + * Get the version history of a dataset. * - *

See {@link #getSecurityMonitoringRuleWithHttpInfo}. + *

See {@link #getSecurityMonitoringDatasetVersionHistoryWithHttpInfo}. * - * @param ruleId The ID of the rule. (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleResponse>> + * @param datasetId The UUID of the dataset. (required) + * @param parameters Optional parameters for the request. + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringDatasetVersionHistoryResponse>> */ - public CompletableFuture> - getSecurityMonitoringRuleWithHttpInfoAsync(String ruleId) { - Object localVarPostBody = null; - - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = + public CompletableFuture> + getSecurityMonitoringDatasetVersionHistoryWithHttpInfoAsync( + String datasetId, + GetSecurityMonitoringDatasetVersionHistoryOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getSecurityMonitoringDatasetVersionHistory"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling getSecurityMonitoringRule")); + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'datasetId' when calling" + + " getSecurityMonitoringDatasetVersionHistory")); return result; } + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/datasets/{dataset_id}/version_history" + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringRule", + "v2.SecurityMonitoringApi.getSecurityMonitoringDatasetVersionHistory", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -16347,34 +16451,34 @@ public ApiResponse getSecurityMonitoringRuleWith localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a signal's details. + * Get a hist signal's details. * - *

See {@link #getSecurityMonitoringSignalWithHttpInfo}. + *

See {@link #getSecurityMonitoringHistsignalWithHttpInfo}. * - * @param signalId The ID of the signal. (required) + * @param histsignalId The ID of the historical signal. (required) * @return SecurityMonitoringSignalResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringSignalResponse getSecurityMonitoringSignal(String signalId) + public SecurityMonitoringSignalResponse getSecurityMonitoringHistsignal(String histsignalId) throws ApiException { - return getSecurityMonitoringSignalWithHttpInfo(signalId).getData(); + return getSecurityMonitoringHistsignalWithHttpInfo(histsignalId).getData(); } /** - * Get a signal's details. + * Get a hist signal's details. * - *

See {@link #getSecurityMonitoringSignalWithHttpInfoAsync}. + *

See {@link #getSecurityMonitoringHistsignalWithHttpInfoAsync}. * - * @param signalId The ID of the signal. (required) + * @param histsignalId The ID of the historical signal. (required) * @return CompletableFuture<SecurityMonitoringSignalResponse> */ - public CompletableFuture getSecurityMonitoringSignalAsync( - String signalId) { - return getSecurityMonitoringSignalWithHttpInfoAsync(signalId) + public CompletableFuture getSecurityMonitoringHistsignalAsync( + String histsignalId) { + return getSecurityMonitoringHistsignalWithHttpInfoAsync(histsignalId) .thenApply( response -> { return response.getData(); @@ -16382,9 +16486,9 @@ public CompletableFuture getSecurityMonitoring } /** - * Get a signal's details. + * Get a hist signal's details. * - * @param signalId The ID of the signal. (required) + * @param histsignalId The ID of the historical signal. (required) * @return ApiResponse<SecurityMonitoringSignalResponse> * @throws ApiException if fails to make API call * @http.response.details @@ -16392,31 +16496,41 @@ public CompletableFuture getSecurityMonitoring * Response details * Status Code Description Response Headers * 200 OK - + * 400 Bad Request - * 403 Not Authorized - * 404 Not Found - * 429 Too many requests - * */ - public ApiResponse getSecurityMonitoringSignalWithHttpInfo( - String signalId) throws ApiException { + public ApiResponse getSecurityMonitoringHistsignalWithHttpInfo( + String histsignalId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getSecurityMonitoringHistsignal"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; - // verify the required parameter 'signalId' is set - if (signalId == null) { + // verify the required parameter 'histsignalId' is set + if (histsignalId == null) { throw new ApiException( 400, - "Missing the required parameter 'signalId' when calling getSecurityMonitoringSignal"); + "Missing the required parameter 'histsignalId' when calling" + + " getSecurityMonitoringHistsignal"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + "/api/v2/siem-historical-detections/histsignals/{histsignal_id}" + .replaceAll( + "\\{" + "histsignal_id" + "\\}", apiClient.escapeString(histsignalId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringSignal", + "v2.SecurityMonitoringApi.getSecurityMonitoringHistsignal", localVarPath, new ArrayList(), localVarHeaderParams, @@ -16435,32 +16549,44 @@ public ApiResponse getSecurityMonitoringSignal } /** - * Get a signal's details. + * Get a hist signal's details. * - *

See {@link #getSecurityMonitoringSignalWithHttpInfo}. + *

See {@link #getSecurityMonitoringHistsignalWithHttpInfo}. * - * @param signalId The ID of the signal. (required) + * @param histsignalId The ID of the historical signal. (required) * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalResponse>> */ public CompletableFuture> - getSecurityMonitoringSignalWithHttpInfoAsync(String signalId) { + getSecurityMonitoringHistsignalWithHttpInfoAsync(String histsignalId) { + // Check if unstable operation is enabled + String operationId = "getSecurityMonitoringHistsignal"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; - // verify the required parameter 'signalId' is set - if (signalId == null) { + // verify the required parameter 'histsignalId' is set + if (histsignalId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'signalId' when calling" - + " getSecurityMonitoringSignal")); + "Missing the required parameter 'histsignalId' when calling" + + " getSecurityMonitoringHistsignal")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + "/api/v2/siem-historical-detections/histsignals/{histsignal_id}" + .replaceAll( + "\\{" + "histsignal_id" + "\\}", apiClient.escapeString(histsignalId.toString())); Map localVarHeaderParams = new HashMap(); @@ -16468,7 +16594,7 @@ public ApiResponse getSecurityMonitoringSignal try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringSignal", + "v2.SecurityMonitoringApi.getSecurityMonitoringHistsignal", localVarPath, new ArrayList(), localVarHeaderParams, @@ -16492,31 +16618,116 @@ public ApiResponse getSecurityMonitoringSignal new GenericType() {}); } + /** Manage optional parameters to getSecurityMonitoringHistsignalsByJobId. */ + public static class GetSecurityMonitoringHistsignalsByJobIdOptionalParameters { + private String filterQuery; + private OffsetDateTime filterFrom; + private OffsetDateTime filterTo; + private SecurityMonitoringSignalsSort sort; + private String pageCursor; + private Integer pageLimit; + + /** + * Set filterQuery. + * + * @param filterQuery The search query for security signals. (optional) + * @return GetSecurityMonitoringHistsignalsByJobIdOptionalParameters + */ + public GetSecurityMonitoringHistsignalsByJobIdOptionalParameters filterQuery( + String filterQuery) { + this.filterQuery = filterQuery; + return this; + } + + /** + * Set filterFrom. + * + * @param filterFrom The minimum timestamp for requested security signals. (optional) + * @return GetSecurityMonitoringHistsignalsByJobIdOptionalParameters + */ + public GetSecurityMonitoringHistsignalsByJobIdOptionalParameters filterFrom( + OffsetDateTime filterFrom) { + this.filterFrom = filterFrom; + return this; + } + + /** + * Set filterTo. + * + * @param filterTo The maximum timestamp for requested security signals. (optional) + * @return GetSecurityMonitoringHistsignalsByJobIdOptionalParameters + */ + public GetSecurityMonitoringHistsignalsByJobIdOptionalParameters filterTo( + OffsetDateTime filterTo) { + this.filterTo = filterTo; + return this; + } + + /** + * Set sort. + * + * @param sort The order of the security signals in results. (optional) + * @return GetSecurityMonitoringHistsignalsByJobIdOptionalParameters + */ + public GetSecurityMonitoringHistsignalsByJobIdOptionalParameters sort( + SecurityMonitoringSignalsSort sort) { + this.sort = sort; + return this; + } + + /** + * Set pageCursor. + * + * @param pageCursor A list of results using the cursor provided in the previous query. + * (optional) + * @return GetSecurityMonitoringHistsignalsByJobIdOptionalParameters + */ + public GetSecurityMonitoringHistsignalsByJobIdOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } + + /** + * Set pageLimit. + * + * @param pageLimit The maximum number of security signals in the response. (optional, default + * to 10) + * @return GetSecurityMonitoringHistsignalsByJobIdOptionalParameters + */ + public GetSecurityMonitoringHistsignalsByJobIdOptionalParameters pageLimit(Integer pageLimit) { + this.pageLimit = pageLimit; + return this; + } + } + /** - * Get a suppression rule. + * Get a job's hist signals. * - *

See {@link #getSecurityMonitoringSuppressionWithHttpInfo}. + *

See {@link #getSecurityMonitoringHistsignalsByJobIdWithHttpInfo}. * - * @param suppressionId The ID of the suppression rule (required) - * @return SecurityMonitoringSuppressionResponse + * @param jobId The ID of the job. (required) + * @return SecurityMonitoringSignalsListResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringSuppressionResponse getSecurityMonitoringSuppression( - String suppressionId) throws ApiException { - return getSecurityMonitoringSuppressionWithHttpInfo(suppressionId).getData(); + public SecurityMonitoringSignalsListResponse getSecurityMonitoringHistsignalsByJobId(String jobId) + throws ApiException { + return getSecurityMonitoringHistsignalsByJobIdWithHttpInfo( + jobId, new GetSecurityMonitoringHistsignalsByJobIdOptionalParameters()) + .getData(); } /** - * Get a suppression rule. + * Get a job's hist signals. * - *

See {@link #getSecurityMonitoringSuppressionWithHttpInfoAsync}. + *

See {@link #getSecurityMonitoringHistsignalsByJobIdWithHttpInfoAsync}. * - * @param suppressionId The ID of the suppression rule (required) - * @return CompletableFuture<SecurityMonitoringSuppressionResponse> + * @param jobId The ID of the job. (required) + * @return CompletableFuture<SecurityMonitoringSignalsListResponse> */ - public CompletableFuture - getSecurityMonitoringSuppressionAsync(String suppressionId) { - return getSecurityMonitoringSuppressionWithHttpInfoAsync(suppressionId) + public CompletableFuture + getSecurityMonitoringHistsignalsByJobIdAsync(String jobId) { + return getSecurityMonitoringHistsignalsByJobIdWithHttpInfoAsync( + jobId, new GetSecurityMonitoringHistsignalsByJobIdOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -16524,45 +16735,104 @@ public SecurityMonitoringSuppressionResponse getSecurityMonitoringSuppression( } /** - * Get the details of a specific suppression rule. + * Get a job's hist signals. * - * @param suppressionId The ID of the suppression rule (required) - * @return ApiResponse<SecurityMonitoringSuppressionResponse> + *

See {@link #getSecurityMonitoringHistsignalsByJobIdWithHttpInfo}. + * + * @param jobId The ID of the job. (required) + * @param parameters Optional parameters for the request. + * @return SecurityMonitoringSignalsListResponse * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - getSecurityMonitoringSuppressionWithHttpInfo(String suppressionId) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'suppressionId' is set - if (suppressionId == null) { + public SecurityMonitoringSignalsListResponse getSecurityMonitoringHistsignalsByJobId( + String jobId, GetSecurityMonitoringHistsignalsByJobIdOptionalParameters parameters) + throws ApiException { + return getSecurityMonitoringHistsignalsByJobIdWithHttpInfo(jobId, parameters).getData(); + } + + /** + * Get a job's hist signals. + * + *

See {@link #getSecurityMonitoringHistsignalsByJobIdWithHttpInfoAsync}. + * + * @param jobId The ID of the job. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + */ + public CompletableFuture + getSecurityMonitoringHistsignalsByJobIdAsync( + String jobId, GetSecurityMonitoringHistsignalsByJobIdOptionalParameters parameters) { + return getSecurityMonitoringHistsignalsByJobIdWithHttpInfoAsync(jobId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a job's hist signals. + * + * @param jobId The ID of the job. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<SecurityMonitoringSignalsListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + getSecurityMonitoringHistsignalsByJobIdWithHttpInfo( + String jobId, GetSecurityMonitoringHistsignalsByJobIdOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getSecurityMonitoringHistsignalsByJobId"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'jobId' is set + if (jobId == null) { throw new ApiException( 400, - "Missing the required parameter 'suppressionId' when calling" - + " getSecurityMonitoringSuppression"); + "Missing the required parameter 'jobId' when calling" + + " getSecurityMonitoringHistsignalsByJobId"); } + String filterQuery = parameters.filterQuery; + OffsetDateTime filterFrom = parameters.filterFrom; + OffsetDateTime filterTo = parameters.filterTo; + SecurityMonitoringSignalsSort sort = parameters.sort; + String pageCursor = parameters.pageCursor; + Integer pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/suppressions/{suppression_id}" - .replaceAll( - "\\{" + "suppression_id" + "\\}", apiClient.escapeString(suppressionId.toString())); + "/api/v2/siem-historical-detections/jobs/{job_id}/histsignals" + .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringSuppression", + "v2.SecurityMonitoringApi.getSecurityMonitoringHistsignalsByJobId", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -16575,53 +16845,79 @@ public SecurityMonitoringSuppressionResponse getSecurityMonitoringSuppression( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a suppression rule. + * Get a job's hist signals. * - *

See {@link #getSecurityMonitoringSuppressionWithHttpInfo}. + *

See {@link #getSecurityMonitoringHistsignalsByJobIdWithHttpInfo}. * - * @param suppressionId The ID of the suppression rule (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringSuppressionResponse>> + * @param jobId The ID of the job. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalsListResponse>> */ - public CompletableFuture> - getSecurityMonitoringSuppressionWithHttpInfoAsync(String suppressionId) { + public CompletableFuture> + getSecurityMonitoringHistsignalsByJobIdWithHttpInfoAsync( + String jobId, GetSecurityMonitoringHistsignalsByJobIdOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getSecurityMonitoringHistsignalsByJobId"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; - // verify the required parameter 'suppressionId' is set - if (suppressionId == null) { - CompletableFuture> result = + // verify the required parameter 'jobId' is set + if (jobId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'suppressionId' when calling" - + " getSecurityMonitoringSuppression")); + "Missing the required parameter 'jobId' when calling" + + " getSecurityMonitoringHistsignalsByJobId")); return result; } + String filterQuery = parameters.filterQuery; + OffsetDateTime filterFrom = parameters.filterFrom; + OffsetDateTime filterTo = parameters.filterTo; + SecurityMonitoringSignalsSort sort = parameters.sort; + String pageCursor = parameters.pageCursor; + Integer pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/suppressions/{suppression_id}" - .replaceAll( - "\\{" + "suppression_id" + "\\}", apiClient.escapeString(suppressionId.toString())); + "/api/v2/siem-historical-detections/jobs/{job_id}/histsignals" + .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSecurityMonitoringSuppression", + "v2.SecurityMonitoringApi.getSecurityMonitoringHistsignalsByJobId", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -16634,82 +16930,34 @@ public SecurityMonitoringSuppressionResponse getSecurityMonitoringSuppression( localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to getSignalEntities. */ - public static class GetSignalEntitiesOptionalParameters { - private Integer limit; - - /** - * Set limit. - * - * @param limit The maximum number of entities to return. (optional, default to 10) - * @return GetSignalEntitiesOptionalParameters - */ - public GetSignalEntitiesOptionalParameters limit(Integer limit) { - this.limit = limit; - return this; - } - } - - /** - * Get entities related to a signal. - * - *

See {@link #getSignalEntitiesWithHttpInfo}. - * - * @param signalId The ID of the signal. (required) - * @return SignalEntitiesResponse - * @throws ApiException if fails to make API call - */ - public SignalEntitiesResponse getSignalEntities(String signalId) throws ApiException { - return getSignalEntitiesWithHttpInfo(signalId, new GetSignalEntitiesOptionalParameters()) - .getData(); - } - - /** - * Get entities related to a signal. - * - *

See {@link #getSignalEntitiesWithHttpInfoAsync}. - * - * @param signalId The ID of the signal. (required) - * @return CompletableFuture<SignalEntitiesResponse> - */ - public CompletableFuture getSignalEntitiesAsync(String signalId) { - return getSignalEntitiesWithHttpInfoAsync(signalId, new GetSignalEntitiesOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * Get entities related to a signal. + * Get an entity context sync configuration. * - *

See {@link #getSignalEntitiesWithHttpInfo}. + *

See {@link #getSecurityMonitoringIntegrationConfigWithHttpInfo}. * - * @param signalId The ID of the signal. (required) - * @param parameters Optional parameters for the request. - * @return SignalEntitiesResponse + * @param integrationConfigId The ID of the entity context sync configuration. (required) + * @return SecurityMonitoringIntegrationConfigResponse * @throws ApiException if fails to make API call */ - public SignalEntitiesResponse getSignalEntities( - String signalId, GetSignalEntitiesOptionalParameters parameters) throws ApiException { - return getSignalEntitiesWithHttpInfo(signalId, parameters).getData(); + public SecurityMonitoringIntegrationConfigResponse getSecurityMonitoringIntegrationConfig( + String integrationConfigId) throws ApiException { + return getSecurityMonitoringIntegrationConfigWithHttpInfo(integrationConfigId).getData(); } /** - * Get entities related to a signal. + * Get an entity context sync configuration. * - *

See {@link #getSignalEntitiesWithHttpInfoAsync}. + *

See {@link #getSecurityMonitoringIntegrationConfigWithHttpInfoAsync}. * - * @param signalId The ID of the signal. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SignalEntitiesResponse> + * @param integrationConfigId The ID of the entity context sync configuration. (required) + * @return CompletableFuture<SecurityMonitoringIntegrationConfigResponse> */ - public CompletableFuture getSignalEntitiesAsync( - String signalId, GetSignalEntitiesOptionalParameters parameters) { - return getSignalEntitiesWithHttpInfoAsync(signalId, parameters) + public CompletableFuture + getSecurityMonitoringIntegrationConfigAsync(String integrationConfigId) { + return getSecurityMonitoringIntegrationConfigWithHttpInfoAsync(integrationConfigId) .thenApply( response -> { return response.getData(); @@ -16717,27 +16965,26 @@ public CompletableFuture getSignalEntitiesAsync( } /** - * Get the list of entities related to a security signal, captured at the signal's timestamp. + * Get the details of a specific entity context sync configuration. * - * @param signalId The ID of the signal. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<SignalEntitiesResponse> + * @param integrationConfigId The ID of the entity context sync configuration. (required) + * @return ApiResponse<SecurityMonitoringIntegrationConfigResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getSignalEntitiesWithHttpInfo( - String signalId, GetSignalEntitiesOptionalParameters parameters) throws ApiException { + public ApiResponse + getSecurityMonitoringIntegrationConfigWithHttpInfo(String integrationConfigId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "getSignalEntities"; + String operationId = "getSecurityMonitoringIntegrationConfig"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -16745,27 +16992,27 @@ public ApiResponse getSignalEntitiesWithHttpInfo( } Object localVarPostBody = null; - // verify the required parameter 'signalId' is set - if (signalId == null) { + // verify the required parameter 'integrationConfigId' is set + if (integrationConfigId == null) { throw new ApiException( - 400, "Missing the required parameter 'signalId' when calling getSignalEntities"); + 400, + "Missing the required parameter 'integrationConfigId' when calling" + + " getSecurityMonitoringIntegrationConfig"); } - Integer limit = parameters.limit; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/entities" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + "/api/v2/security_monitoring/configuration/integration_config/{integration_config_id}" + .replaceAll( + "\\{" + "integration_config_id" + "\\}", + apiClient.escapeString(integrationConfigId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSignalEntities", + "v2.SecurityMonitoringApi.getSecurityMonitoringIntegrationConfig", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -16778,64 +17025,66 @@ public ApiResponse getSignalEntitiesWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get entities related to a signal. + * Get an entity context sync configuration. * - *

See {@link #getSignalEntitiesWithHttpInfo}. + *

See {@link #getSecurityMonitoringIntegrationConfigWithHttpInfo}. * - * @param signalId The ID of the signal. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<SignalEntitiesResponse>> + * @param integrationConfigId The ID of the entity context sync configuration. (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringIntegrationConfigResponse>> */ - public CompletableFuture> getSignalEntitiesWithHttpInfoAsync( - String signalId, GetSignalEntitiesOptionalParameters parameters) { + public CompletableFuture> + getSecurityMonitoringIntegrationConfigWithHttpInfoAsync(String integrationConfigId) { // Check if unstable operation is enabled - String operationId = "getSignalEntities"; + String operationId = "getSecurityMonitoringIntegrationConfig"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'signalId' is set - if (signalId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'integrationConfigId' is set + if (integrationConfigId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'signalId' when calling getSignalEntities")); + 400, + "Missing the required parameter 'integrationConfigId' when calling" + + " getSecurityMonitoringIntegrationConfig")); return result; } - Integer limit = parameters.limit; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/entities" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + "/api/v2/security_monitoring/configuration/integration_config/{integration_config_id}" + .replaceAll( + "\\{" + "integration_config_id" + "\\}", + apiClient.escapeString(integrationConfigId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSignalEntities", + "v2.SecurityMonitoringApi.getSecurityMonitoringIntegrationConfig", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -16847,32 +17096,34 @@ public CompletableFuture> getSignalEntitiesW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get details of a signal-based notification rule. + * Get a rule's details. * - *

See {@link #getSignalNotificationRuleWithHttpInfo}. + *

See {@link #getSecurityMonitoringRuleWithHttpInfo}. * - * @param id ID of the notification rule. (required) - * @return NotificationRuleResponse + * @param ruleId The ID of the rule. (required) + * @return SecurityMonitoringRuleResponse * @throws ApiException if fails to make API call */ - public NotificationRuleResponse getSignalNotificationRule(String id) throws ApiException { - return getSignalNotificationRuleWithHttpInfo(id).getData(); + public SecurityMonitoringRuleResponse getSecurityMonitoringRule(String ruleId) + throws ApiException { + return getSecurityMonitoringRuleWithHttpInfo(ruleId).getData(); } /** - * Get details of a signal-based notification rule. + * Get a rule's details. * - *

See {@link #getSignalNotificationRuleWithHttpInfoAsync}. + *

See {@link #getSecurityMonitoringRuleWithHttpInfoAsync}. * - * @param id ID of the notification rule. (required) - * @return CompletableFuture<NotificationRuleResponse> + * @param ruleId The ID of the rule. (required) + * @return CompletableFuture<SecurityMonitoringRuleResponse> */ - public CompletableFuture getSignalNotificationRuleAsync(String id) { - return getSignalNotificationRuleWithHttpInfoAsync(id) + public CompletableFuture getSecurityMonitoringRuleAsync( + String ruleId) { + return getSecurityMonitoringRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -16880,41 +17131,39 @@ public CompletableFuture getSignalNotificationRuleAsyn } /** - * Get the details of a notification rule for security signals. + * Get a rule's details. * - * @param id ID of the notification rule. (required) - * @return ApiResponse<NotificationRuleResponse> + * @param ruleId The ID of the rule. (required) + * @return ApiResponse<SecurityMonitoringRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * - * + * * * *
Response details
Status Code Description Response Headers
200 Notification rule details. -
400 Bad Request -
403 Forbidden -
200 OK -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getSignalNotificationRuleWithHttpInfo(String id) - throws ApiException { + public ApiResponse getSecurityMonitoringRuleWithHttpInfo( + String ruleId) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'id' is set - if (id == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( - 400, "Missing the required parameter 'id' when calling getSignalNotificationRule"); + 400, "Missing the required parameter 'ruleId' when calling getSecurityMonitoringRule"); } // create path and map variables String localVarPath = - "/api/v2/security/signals/notification_rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/security_monitoring/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSignalNotificationRule", + "v2.SecurityMonitoringApi.getSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -16929,33 +17178,35 @@ public ApiResponse getSignalNotificationRuleWithHttpIn localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get details of a signal-based notification rule. + * Get a rule's details. * - *

See {@link #getSignalNotificationRuleWithHttpInfo}. + *

See {@link #getSecurityMonitoringRuleWithHttpInfo}. * - * @param id ID of the notification rule. (required) - * @return CompletableFuture<ApiResponse<NotificationRuleResponse>> + * @param ruleId The ID of the rule. (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleResponse>> */ - public CompletableFuture> - getSignalNotificationRuleWithHttpInfoAsync(String id) { + public CompletableFuture> + getSecurityMonitoringRuleWithHttpInfoAsync(String ruleId) { Object localVarPostBody = null; - // verify the required parameter 'id' is set - if (id == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'id' when calling getSignalNotificationRule")); + 400, + "Missing the required parameter 'ruleId' when calling getSecurityMonitoringRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/signals/notification_rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/security_monitoring/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -16963,7 +17214,7 @@ public ApiResponse getSignalNotificationRuleWithHttpIn try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSignalNotificationRule", + "v2.SecurityMonitoringApi.getSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -16971,7 +17222,8 @@ public ApiResponse getSignalNotificationRuleWithHttpIn new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -16983,30 +17235,34 @@ public ApiResponse getSignalNotificationRuleWithHttpIn localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get the list of signal-based notification rules. + * Get a signal's details. * - *

See {@link #getSignalNotificationRulesWithHttpInfo}. + *

See {@link #getSecurityMonitoringSignalWithHttpInfo}. * - * @return NotificationRulesListResponse + * @param signalId The ID of the signal. (required) + * @return SecurityMonitoringSignalResponse * @throws ApiException if fails to make API call */ - public NotificationRulesListResponse getSignalNotificationRules() throws ApiException { - return getSignalNotificationRulesWithHttpInfo().getData(); + public SecurityMonitoringSignalResponse getSecurityMonitoringSignal(String signalId) + throws ApiException { + return getSecurityMonitoringSignalWithHttpInfo(signalId).getData(); } /** - * Get the list of signal-based notification rules. + * Get a signal's details. * - *

See {@link #getSignalNotificationRulesWithHttpInfoAsync}. + *

See {@link #getSecurityMonitoringSignalWithHttpInfoAsync}. * - * @return CompletableFuture<NotificationRulesListResponse> + * @param signalId The ID of the signal. (required) + * @return CompletableFuture<SecurityMonitoringSignalResponse> */ - public CompletableFuture getSignalNotificationRulesAsync() { - return getSignalNotificationRulesWithHttpInfoAsync() + public CompletableFuture getSecurityMonitoringSignalAsync( + String signalId) { + return getSecurityMonitoringSignalWithHttpInfoAsync(signalId) .thenApply( response -> { return response.getData(); @@ -17014,30 +17270,41 @@ public CompletableFuture getSignalNotificationRul } /** - * Returns the list of notification rules for security signals. + * Get a signal's details. * - * @return ApiResponse<NotificationRulesListResponse> + * @param signalId The ID of the signal. (required) + * @return ApiResponse<SecurityMonitoringSignalResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * + * * *
Response details
Status Code Description Response Headers
200 The list of notification rules. -
403 Forbidden -
200 OK -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getSignalNotificationRulesWithHttpInfo() - throws ApiException { + public ApiResponse getSecurityMonitoringSignalWithHttpInfo( + String signalId) throws ApiException { Object localVarPostBody = null; + + // verify the required parameter 'signalId' is set + if (signalId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'signalId' when calling getSecurityMonitoringSignal"); + } // create path and map variables - String localVarPath = "/api/v2/security/signals/notification_rules"; + String localVarPath = + "/api/v2/security_monitoring/signals/{signal_id}" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSignalNotificationRules", + "v2.SecurityMonitoringApi.getSecurityMonitoringSignal", localVarPath, new ArrayList(), localVarHeaderParams, @@ -17052,21 +17319,36 @@ public ApiResponse getSignalNotificationRulesWith localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get the list of signal-based notification rules. + * Get a signal's details. * - *

See {@link #getSignalNotificationRulesWithHttpInfo}. + *

See {@link #getSecurityMonitoringSignalWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<NotificationRulesListResponse>> + * @param signalId The ID of the signal. (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalResponse>> */ - public CompletableFuture> - getSignalNotificationRulesWithHttpInfoAsync() { + public CompletableFuture> + getSecurityMonitoringSignalWithHttpInfoAsync(String signalId) { Object localVarPostBody = null; + + // verify the required parameter 'signalId' is set + if (signalId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'signalId' when calling" + + " getSecurityMonitoringSignal")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/security/signals/notification_rules"; + String localVarPath = + "/api/v2/security_monitoring/signals/{signal_id}" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); Map localVarHeaderParams = new HashMap(); @@ -17074,7 +17356,7 @@ public ApiResponse getSignalNotificationRulesWith try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSignalNotificationRules", + "v2.SecurityMonitoringApi.getSecurityMonitoringSignal", localVarPath, new ArrayList(), localVarHeaderParams, @@ -17082,7 +17364,7 @@ public ApiResponse getSignalNotificationRulesWith new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -17095,128 +17377,34 @@ public ApiResponse getSignalNotificationRulesWith localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to getSingleEntityContext. */ - public static class GetSingleEntityContextOptionalParameters { - private EntityContextEntityType entityType; - private String from; - private String to; - private String asOf; - - /** - * Set entityType. - * - * @param entityType The type of entity to retrieve. Only siem_entity_identity is - * currently supported. Defaults to siem_entity_identity. (optional, default to - * "siem_entity_identity") - * @return GetSingleEntityContextOptionalParameters - */ - public GetSingleEntityContextOptionalParameters entityType(EntityContextEntityType entityType) { - this.entityType = entityType; - return this; - } - - /** - * Set from. - * - * @param from The start of the time range to query, as an RFC3339 timestamp or a relative time - * (for example, now-7d). Defaults to now-7d. Ignored when - * as_of is set. (optional, default to "now-7d") - * @return GetSingleEntityContextOptionalParameters - */ - public GetSingleEntityContextOptionalParameters from(String from) { - this.from = from; - return this; - } - - /** - * Set to. - * - * @param to The end of the time range to query, as an RFC3339 timestamp or a relative time (for - * example, now). Defaults to now. Ignored when as_of - * is set. (optional, default to "now") - * @return GetSingleEntityContextOptionalParameters - */ - public GetSingleEntityContextOptionalParameters to(String to) { - this.to = to; - return this; - } - - /** - * Set asOf. - * - * @param asOf A point in time at which to query the entity revisions, as an RFC3339 timestamp, - * a Unix timestamp (in seconds), or a relative time (for example, now-1d). - * When set, from and to are ignored. Cannot be combined with - * custom from / to values. (optional) - * @return GetSingleEntityContextOptionalParameters - */ - public GetSingleEntityContextOptionalParameters asOf(String asOf) { - this.asOf = asOf; - return this; - } - } - - /** - * Get a single entity context. - * - *

See {@link #getSingleEntityContextWithHttpInfo}. - * - * @param id The unique identifier of the entity to retrieve. (required) - * @return SingleEntityContextResponse - * @throws ApiException if fails to make API call - */ - public SingleEntityContextResponse getSingleEntityContext(String id) throws ApiException { - return getSingleEntityContextWithHttpInfo(id, new GetSingleEntityContextOptionalParameters()) - .getData(); - } - - /** - * Get a single entity context. - * - *

See {@link #getSingleEntityContextWithHttpInfoAsync}. - * - * @param id The unique identifier of the entity to retrieve. (required) - * @return CompletableFuture<SingleEntityContextResponse> - */ - public CompletableFuture getSingleEntityContextAsync(String id) { - return getSingleEntityContextWithHttpInfoAsync( - id, new GetSingleEntityContextOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get a single entity context. - * - *

See {@link #getSingleEntityContextWithHttpInfo}. - * - * @param id The unique identifier of the entity to retrieve. (required) - * @param parameters Optional parameters for the request. - * @return SingleEntityContextResponse - * @throws ApiException if fails to make API call - */ - public SingleEntityContextResponse getSingleEntityContext( - String id, GetSingleEntityContextOptionalParameters parameters) throws ApiException { - return getSingleEntityContextWithHttpInfo(id, parameters).getData(); - } + /** + * Get a suppression rule. + * + *

See {@link #getSecurityMonitoringSuppressionWithHttpInfo}. + * + * @param suppressionId The ID of the suppression rule (required) + * @return SecurityMonitoringSuppressionResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSuppressionResponse getSecurityMonitoringSuppression( + String suppressionId) throws ApiException { + return getSecurityMonitoringSuppressionWithHttpInfo(suppressionId).getData(); + } /** - * Get a single entity context. + * Get a suppression rule. * - *

See {@link #getSingleEntityContextWithHttpInfoAsync}. + *

See {@link #getSecurityMonitoringSuppressionWithHttpInfoAsync}. * - * @param id The unique identifier of the entity to retrieve. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SingleEntityContextResponse> + * @param suppressionId The ID of the suppression rule (required) + * @return CompletableFuture<SecurityMonitoringSuppressionResponse> */ - public CompletableFuture getSingleEntityContextAsync( - String id, GetSingleEntityContextOptionalParameters parameters) { - return getSingleEntityContextWithHttpInfoAsync(id, parameters) + public CompletableFuture + getSecurityMonitoringSuppressionAsync(String suppressionId) { + return getSecurityMonitoringSuppressionWithHttpInfoAsync(suppressionId) .thenApply( response -> { return response.getData(); @@ -17224,64 +17412,45 @@ public CompletableFuture getSingleEntityContextAsyn } /** - * Get a single entity from the Cloud SIEM entity context store by its identifier, returning the - * historical revisions of the entity in the requested time range. The endpoint can either return - * revisions across an interval (from / to) or the snapshot of the - * entity at a single point in time (as_of); the two modes are mutually exclusive. + * Get the details of a specific suppression rule. * - * @param id The unique identifier of the entity to retrieve. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<SingleEntityContextResponse> + * @param suppressionId The ID of the suppression rule (required) + * @return ApiResponse<SecurityMonitoringSuppressionResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getSingleEntityContextWithHttpInfo( - String id, GetSingleEntityContextOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "getSingleEntityContext"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse + getSecurityMonitoringSuppressionWithHttpInfo(String suppressionId) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'id' is set - if (id == null) { + // verify the required parameter 'suppressionId' is set + if (suppressionId == null) { throw new ApiException( - 400, "Missing the required parameter 'id' when calling getSingleEntityContext"); + 400, + "Missing the required parameter 'suppressionId' when calling" + + " getSecurityMonitoringSuppression"); } - EntityContextEntityType entityType = parameters.entityType; - String from = parameters.from; - String to = parameters.to; - String asOf = parameters.asOf; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/entity_context/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/security_monitoring/configuration/suppressions/{suppression_id}" + .replaceAll( + "\\{" + "suppression_id" + "\\}", apiClient.escapeString(suppressionId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "as_of", asOf)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSingleEntityContext", + "v2.SecurityMonitoringApi.getSecurityMonitoringSuppression", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -17294,73 +17463,53 @@ public ApiResponse getSingleEntityContextWithHttpIn localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a single entity context. + * Get a suppression rule. * - *

See {@link #getSingleEntityContextWithHttpInfo}. + *

See {@link #getSecurityMonitoringSuppressionWithHttpInfo}. * - * @param id The unique identifier of the entity to retrieve. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<SingleEntityContextResponse>> + * @param suppressionId The ID of the suppression rule (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringSuppressionResponse>> */ - public CompletableFuture> - getSingleEntityContextWithHttpInfoAsync( - String id, GetSingleEntityContextOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "getSingleEntityContext"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> + getSecurityMonitoringSuppressionWithHttpInfoAsync(String suppressionId) { Object localVarPostBody = null; - // verify the required parameter 'id' is set - if (id == null) { - CompletableFuture> result = + // verify the required parameter 'suppressionId' is set + if (suppressionId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'id' when calling getSingleEntityContext")); + 400, + "Missing the required parameter 'suppressionId' when calling" + + " getSecurityMonitoringSuppression")); return result; } - EntityContextEntityType entityType = parameters.entityType; - String from = parameters.from; - String to = parameters.to; - String asOf = parameters.asOf; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/entity_context/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/security_monitoring/configuration/suppressions/{suppression_id}" + .replaceAll( + "\\{" + "suppression_id" + "\\}", apiClient.escapeString(suppressionId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "as_of", asOf)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSingleEntityContext", + "v2.SecurityMonitoringApi.getSecurityMonitoringSuppression", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -17373,34 +17522,49 @@ public ApiResponse getSingleEntityContextWithHttpIn localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to getSignalEntities. */ + public static class GetSignalEntitiesOptionalParameters { + private Integer limit; + + /** + * Set limit. + * + * @param limit The maximum number of entities to return. (optional, default to 10) + * @return GetSignalEntitiesOptionalParameters + */ + public GetSignalEntitiesOptionalParameters limit(Integer limit) { + this.limit = limit; + return this; + } } /** - * Get default rulesets for a language. + * Get entities related to a signal. * - *

See {@link #getStaticAnalysisDefaultRulesetsWithHttpInfo}. + *

See {@link #getSignalEntitiesWithHttpInfo}. * - * @param language The programming language for which to retrieve the default rulesets. (required) - * @return DefaultRulesetsPerLanguageResponse + * @param signalId The ID of the signal. (required) + * @return SignalEntitiesResponse * @throws ApiException if fails to make API call */ - public DefaultRulesetsPerLanguageResponse getStaticAnalysisDefaultRulesets(String language) - throws ApiException { - return getStaticAnalysisDefaultRulesetsWithHttpInfo(language).getData(); + public SignalEntitiesResponse getSignalEntities(String signalId) throws ApiException { + return getSignalEntitiesWithHttpInfo(signalId, new GetSignalEntitiesOptionalParameters()) + .getData(); } /** - * Get default rulesets for a language. + * Get entities related to a signal. * - *

See {@link #getStaticAnalysisDefaultRulesetsWithHttpInfoAsync}. + *

See {@link #getSignalEntitiesWithHttpInfoAsync}. * - * @param language The programming language for which to retrieve the default rulesets. (required) - * @return CompletableFuture<DefaultRulesetsPerLanguageResponse> + * @param signalId The ID of the signal. (required) + * @return CompletableFuture<SignalEntitiesResponse> */ - public CompletableFuture - getStaticAnalysisDefaultRulesetsAsync(String language) { - return getStaticAnalysisDefaultRulesetsWithHttpInfoAsync(language) + public CompletableFuture getSignalEntitiesAsync(String signalId) { + return getSignalEntitiesWithHttpInfoAsync(signalId, new GetSignalEntitiesOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -17408,10 +17572,44 @@ public DefaultRulesetsPerLanguageResponse getStaticAnalysisDefaultRulesets(Strin } /** - * Get the default SAST ruleset names for a given programming language. + * Get entities related to a signal. * - * @param language The programming language for which to retrieve the default rulesets. (required) - * @return ApiResponse<DefaultRulesetsPerLanguageResponse> + *

See {@link #getSignalEntitiesWithHttpInfo}. + * + * @param signalId The ID of the signal. (required) + * @param parameters Optional parameters for the request. + * @return SignalEntitiesResponse + * @throws ApiException if fails to make API call + */ + public SignalEntitiesResponse getSignalEntities( + String signalId, GetSignalEntitiesOptionalParameters parameters) throws ApiException { + return getSignalEntitiesWithHttpInfo(signalId, parameters).getData(); + } + + /** + * Get entities related to a signal. + * + *

See {@link #getSignalEntitiesWithHttpInfoAsync}. + * + * @param signalId The ID of the signal. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SignalEntitiesResponse> + */ + public CompletableFuture getSignalEntitiesAsync( + String signalId, GetSignalEntitiesOptionalParameters parameters) { + return getSignalEntitiesWithHttpInfoAsync(signalId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the list of entities related to a security signal, captured at the signal's timestamp. + * + * @param signalId The ID of the signal. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<SignalEntitiesResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -17419,13 +17617,15 @@ public DefaultRulesetsPerLanguageResponse getStaticAnalysisDefaultRulesets(Strin * * * + * + * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - getStaticAnalysisDefaultRulesetsWithHttpInfo(String language) throws ApiException { + public ApiResponse getSignalEntitiesWithHttpInfo( + String signalId, GetSignalEntitiesOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "getStaticAnalysisDefaultRulesets"; + String operationId = "getSignalEntities"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -17433,25 +17633,27 @@ public DefaultRulesetsPerLanguageResponse getStaticAnalysisDefaultRulesets(Strin } Object localVarPostBody = null; - // verify the required parameter 'language' is set - if (language == null) { + // verify the required parameter 'signalId' is set + if (signalId == null) { throw new ApiException( - 400, - "Missing the required parameter 'language' when calling" - + " getStaticAnalysisDefaultRulesets"); + 400, "Missing the required parameter 'signalId' when calling getSignalEntities"); } + Integer limit = parameters.limit; // create path and map variables String localVarPath = - "/api/v2/static-analysis/default-rulesets/{language}" - .replaceAll("\\{" + "language" + "\\}", apiClient.escapeString(language.toString())); + "/api/v2/security_monitoring/signals/{signal_id}/entities" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getStaticAnalysisDefaultRulesets", + "v2.SecurityMonitoringApi.getSignalEntities", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -17464,64 +17666,64 @@ public DefaultRulesetsPerLanguageResponse getStaticAnalysisDefaultRulesets(Strin localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get default rulesets for a language. + * Get entities related to a signal. * - *

See {@link #getStaticAnalysisDefaultRulesetsWithHttpInfo}. + *

See {@link #getSignalEntitiesWithHttpInfo}. * - * @param language The programming language for which to retrieve the default rulesets. (required) - * @return CompletableFuture<ApiResponse<DefaultRulesetsPerLanguageResponse>> + * @param signalId The ID of the signal. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SignalEntitiesResponse>> */ - public CompletableFuture> - getStaticAnalysisDefaultRulesetsWithHttpInfoAsync(String language) { + public CompletableFuture> getSignalEntitiesWithHttpInfoAsync( + String signalId, GetSignalEntitiesOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "getStaticAnalysisDefaultRulesets"; + String operationId = "getSignalEntities"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'language' is set - if (language == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'signalId' is set + if (signalId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'language' when calling" - + " getStaticAnalysisDefaultRulesets")); + 400, "Missing the required parameter 'signalId' when calling getSignalEntities")); return result; } + Integer limit = parameters.limit; // create path and map variables String localVarPath = - "/api/v2/static-analysis/default-rulesets/{language}" - .replaceAll("\\{" + "language" + "\\}", apiClient.escapeString(language.toString())); + "/api/v2/security_monitoring/signals/{signal_id}/entities" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getStaticAnalysisDefaultRulesets", + "v2.SecurityMonitoringApi.getSignalEntities", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -17533,34 +17735,32 @@ public DefaultRulesetsPerLanguageResponse getStaticAnalysisDefaultRulesets(Strin localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get node types for a language. + * Get details of a signal-based notification rule. * - *

See {@link #getStaticAnalysisNodeTypesWithHttpInfo}. + *

See {@link #getSignalNotificationRuleWithHttpInfo}. * - * @param language The programming language for which to retrieve node type definitions. - * (required) - * @return NodeTypesResponse + * @param id ID of the notification rule. (required) + * @return NotificationRuleResponse * @throws ApiException if fails to make API call */ - public NodeTypesResponse getStaticAnalysisNodeTypes(String language) throws ApiException { - return getStaticAnalysisNodeTypesWithHttpInfo(language).getData(); + public NotificationRuleResponse getSignalNotificationRule(String id) throws ApiException { + return getSignalNotificationRuleWithHttpInfo(id).getData(); } /** - * Get node types for a language. + * Get details of a signal-based notification rule. * - *

See {@link #getStaticAnalysisNodeTypesWithHttpInfoAsync}. + *

See {@link #getSignalNotificationRuleWithHttpInfoAsync}. * - * @param language The programming language for which to retrieve node type definitions. - * (required) - * @return CompletableFuture<NodeTypesResponse> + * @param id ID of the notification rule. (required) + * @return CompletableFuture<NotificationRuleResponse> */ - public CompletableFuture getStaticAnalysisNodeTypesAsync(String language) { - return getStaticAnalysisNodeTypesWithHttpInfoAsync(language) + public CompletableFuture getSignalNotificationRuleAsync(String id) { + return getSignalNotificationRuleWithHttpInfoAsync(id) .thenApply( response -> { return response.getData(); @@ -17568,48 +17768,41 @@ public CompletableFuture getStaticAnalysisNodeTypesAsync(Stri } /** - * Retrieve tree-sitter node type definitions for a given programming language. + * Get the details of a notification rule for security signals. * - * @param language The programming language for which to retrieve node type definitions. - * (required) - * @return ApiResponse<NodeTypesResponse> + * @param id ID of the notification rule. (required) + * @return ApiResponse<NotificationRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
200 Notification rule details. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getStaticAnalysisNodeTypesWithHttpInfo(String language) + public ApiResponse getSignalNotificationRuleWithHttpInfo(String id) throws ApiException { - // Check if unstable operation is enabled - String operationId = "getStaticAnalysisNodeTypes"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } Object localVarPostBody = null; - // verify the required parameter 'language' is set - if (language == null) { + // verify the required parameter 'id' is set + if (id == null) { throw new ApiException( - 400, "Missing the required parameter 'language' when calling getStaticAnalysisNodeTypes"); + 400, "Missing the required parameter 'id' when calling getSignalNotificationRule"); } // create path and map variables String localVarPath = - "/api/v2/static-analysis/static-analysis-server/node-types/{language}" - .replaceAll("\\{" + "language" + "\\}", apiClient.escapeString(language.toString())); + "/api/v2/security/signals/notification_rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getStaticAnalysisNodeTypes", + "v2.SecurityMonitoringApi.getSignalNotificationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -17624,45 +17817,33 @@ public ApiResponse getStaticAnalysisNodeTypesWithHttpInfo(Str localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get node types for a language. + * Get details of a signal-based notification rule. * - *

See {@link #getStaticAnalysisNodeTypesWithHttpInfo}. + *

See {@link #getSignalNotificationRuleWithHttpInfo}. * - * @param language The programming language for which to retrieve node type definitions. - * (required) - * @return CompletableFuture<ApiResponse<NodeTypesResponse>> + * @param id ID of the notification rule. (required) + * @return CompletableFuture<ApiResponse<NotificationRuleResponse>> */ - public CompletableFuture> - getStaticAnalysisNodeTypesWithHttpInfoAsync(String language) { - // Check if unstable operation is enabled - String operationId = "getStaticAnalysisNodeTypes"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> + getSignalNotificationRuleWithHttpInfoAsync(String id) { Object localVarPostBody = null; - // verify the required parameter 'language' is set - if (language == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'language' when calling getStaticAnalysisNodeTypes")); + 400, "Missing the required parameter 'id' when calling getSignalNotificationRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/static-analysis/static-analysis-server/node-types/{language}" - .replaceAll("\\{" + "language" + "\\}", apiClient.escapeString(language.toString())); + "/api/v2/security/signals/notification_rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); Map localVarHeaderParams = new HashMap(); @@ -17670,7 +17851,7 @@ public ApiResponse getStaticAnalysisNodeTypesWithHttpInfo(Str try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getStaticAnalysisNodeTypes", + "v2.SecurityMonitoringApi.getSignalNotificationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -17678,7 +17859,7 @@ public ApiResponse getStaticAnalysisNodeTypesWithHttpInfo(Str new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -17690,100 +17871,30 @@ public ApiResponse getStaticAnalysisNodeTypesWithHttpInfo(Str localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to getStaticAnalysisRuleset. */ - public static class GetStaticAnalysisRulesetOptionalParameters { - private Boolean includeTests; - private Boolean includeTestingRules; - - /** - * Set includeTests. - * - * @param includeTests When true, test cases for each rule are included in the response. - * (optional) - * @return GetStaticAnalysisRulesetOptionalParameters - */ - public GetStaticAnalysisRulesetOptionalParameters includeTests(Boolean includeTests) { - this.includeTests = includeTests; - return this; - } - - /** - * Set includeTestingRules. - * - * @param includeTestingRules When true, rules that are in testing mode are included in the - * response. (optional) - * @return GetStaticAnalysisRulesetOptionalParameters - */ - public GetStaticAnalysisRulesetOptionalParameters includeTestingRules( - Boolean includeTestingRules) { - this.includeTestingRules = includeTestingRules; - return this; - } + new GenericType() {}); } /** - * Get a SAST ruleset. + * Get the list of signal-based notification rules. * - *

See {@link #getStaticAnalysisRulesetWithHttpInfo}. - * - * @param rulesetName The name of the ruleset to retrieve. (required) - * @return SastRulesetResponse - * @throws ApiException if fails to make API call - */ - public SastRulesetResponse getStaticAnalysisRuleset(String rulesetName) throws ApiException { - return getStaticAnalysisRulesetWithHttpInfo( - rulesetName, new GetStaticAnalysisRulesetOptionalParameters()) - .getData(); - } - - /** - * Get a SAST ruleset. - * - *

See {@link #getStaticAnalysisRulesetWithHttpInfoAsync}. - * - * @param rulesetName The name of the ruleset to retrieve. (required) - * @return CompletableFuture<SastRulesetResponse> - */ - public CompletableFuture getStaticAnalysisRulesetAsync(String rulesetName) { - return getStaticAnalysisRulesetWithHttpInfoAsync( - rulesetName, new GetStaticAnalysisRulesetOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get a SAST ruleset. - * - *

See {@link #getStaticAnalysisRulesetWithHttpInfo}. + *

See {@link #getSignalNotificationRulesWithHttpInfo}. * - * @param rulesetName The name of the ruleset to retrieve. (required) - * @param parameters Optional parameters for the request. - * @return SastRulesetResponse + * @return NotificationRulesListResponse * @throws ApiException if fails to make API call */ - public SastRulesetResponse getStaticAnalysisRuleset( - String rulesetName, GetStaticAnalysisRulesetOptionalParameters parameters) - throws ApiException { - return getStaticAnalysisRulesetWithHttpInfo(rulesetName, parameters).getData(); + public NotificationRulesListResponse getSignalNotificationRules() throws ApiException { + return getSignalNotificationRulesWithHttpInfo().getData(); } /** - * Get a SAST ruleset. + * Get the list of signal-based notification rules. * - *

See {@link #getStaticAnalysisRulesetWithHttpInfoAsync}. + *

See {@link #getSignalNotificationRulesWithHttpInfoAsync}. * - * @param rulesetName The name of the ruleset to retrieve. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SastRulesetResponse> + * @return CompletableFuture<NotificationRulesListResponse> */ - public CompletableFuture getStaticAnalysisRulesetAsync( - String rulesetName, GetStaticAnalysisRulesetOptionalParameters parameters) { - return getStaticAnalysisRulesetWithHttpInfoAsync(rulesetName, parameters) + public CompletableFuture getSignalNotificationRulesAsync() { + return getSignalNotificationRulesWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -17791,60 +17902,32 @@ public CompletableFuture getStaticAnalysisRulesetAsync( } /** - * Get a SAST ruleset by name, including all its rules. + * Returns the list of notification rules for security signals. * - * @param rulesetName The name of the ruleset to retrieve. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<SastRulesetResponse> + * @return ApiResponse<NotificationRulesListResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * - * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
200 The list of notification rules. -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse getStaticAnalysisRulesetWithHttpInfo( - String rulesetName, GetStaticAnalysisRulesetOptionalParameters parameters) + public ApiResponse getSignalNotificationRulesWithHttpInfo() throws ApiException { - // Check if unstable operation is enabled - String operationId = "getStaticAnalysisRuleset"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } Object localVarPostBody = null; - - // verify the required parameter 'rulesetName' is set - if (rulesetName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'rulesetName' when calling getStaticAnalysisRuleset"); - } - Boolean includeTests = parameters.includeTests; - Boolean includeTestingRules = parameters.includeTestingRules; // create path and map variables - String localVarPath = - "/api/v2/static-analysis/rulesets/{ruleset_name}" - .replaceAll( - "\\{" + "ruleset_name" + "\\}", apiClient.escapeString(rulesetName.toString())); + String localVarPath = "/api/v2/security/signals/notification_rules"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_tests", includeTests)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_testing_rules", includeTestingRules)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getStaticAnalysisRuleset", + "v2.SecurityMonitoringApi.getSignalNotificationRules", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -17857,71 +17940,38 @@ public ApiResponse getStaticAnalysisRulesetWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a SAST ruleset. + * Get the list of signal-based notification rules. * - *

See {@link #getStaticAnalysisRulesetWithHttpInfo}. + *

See {@link #getSignalNotificationRulesWithHttpInfo}. * - * @param rulesetName The name of the ruleset to retrieve. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<SastRulesetResponse>> + * @return CompletableFuture<ApiResponse<NotificationRulesListResponse>> */ - public CompletableFuture> - getStaticAnalysisRulesetWithHttpInfoAsync( - String rulesetName, GetStaticAnalysisRulesetOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "getStaticAnalysisRuleset"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> + getSignalNotificationRulesWithHttpInfoAsync() { Object localVarPostBody = null; - - // verify the required parameter 'rulesetName' is set - if (rulesetName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'rulesetName' when calling" - + " getStaticAnalysisRuleset")); - return result; - } - Boolean includeTests = parameters.includeTests; - Boolean includeTestingRules = parameters.includeTestingRules; // create path and map variables - String localVarPath = - "/api/v2/static-analysis/rulesets/{ruleset_name}" - .replaceAll( - "\\{" + "ruleset_name" + "\\}", apiClient.escapeString(rulesetName.toString())); + String localVarPath = "/api/v2/security/signals/notification_rules"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_tests", includeTests)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_testing_rules", includeTestingRules)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getStaticAnalysisRuleset", + "v2.SecurityMonitoringApi.getSignalNotificationRules", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -17933,32 +17983,95 @@ public ApiResponse getStaticAnalysisRulesetWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to getSingleEntityContext. */ + public static class GetSingleEntityContextOptionalParameters { + private EntityContextEntityType entityType; + private String from; + private String to; + private String asOf; + + /** + * Set entityType. + * + * @param entityType The type of entity to retrieve. Only siem_entity_identity is + * currently supported. Defaults to siem_entity_identity. (optional, default to + * "siem_entity_identity") + * @return GetSingleEntityContextOptionalParameters + */ + public GetSingleEntityContextOptionalParameters entityType(EntityContextEntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Set from. + * + * @param from The start of the time range to query, as an RFC3339 timestamp or a relative time + * (for example, now-7d). Defaults to now-7d. Ignored when + * as_of is set. (optional, default to "now-7d") + * @return GetSingleEntityContextOptionalParameters + */ + public GetSingleEntityContextOptionalParameters from(String from) { + this.from = from; + return this; + } + + /** + * Set to. + * + * @param to The end of the time range to query, as an RFC3339 timestamp or a relative time (for + * example, now). Defaults to now. Ignored when as_of + * is set. (optional, default to "now") + * @return GetSingleEntityContextOptionalParameters + */ + public GetSingleEntityContextOptionalParameters to(String to) { + this.to = to; + return this; + } + + /** + * Set asOf. + * + * @param asOf A point in time at which to query the entity revisions, as an RFC3339 timestamp, + * a Unix timestamp (in seconds), or a relative time (for example, now-1d). + * When set, from and to are ignored. Cannot be combined with + * custom from / to values. (optional) + * @return GetSingleEntityContextOptionalParameters + */ + public GetSingleEntityContextOptionalParameters asOf(String asOf) { + this.asOf = asOf; + return this; + } } /** - * Get tree-sitter WASM file. + * Get a single entity context. * - *

See {@link #getStaticAnalysisTreeSitterWasmWithHttpInfo}. + *

See {@link #getSingleEntityContextWithHttpInfo}. * - * @param file The name of the WASM file to download. (required) - * @return File + * @param id The unique identifier of the entity to retrieve. (required) + * @return SingleEntityContextResponse * @throws ApiException if fails to make API call */ - public File getStaticAnalysisTreeSitterWasm(String file) throws ApiException { - return getStaticAnalysisTreeSitterWasmWithHttpInfo(file).getData(); + public SingleEntityContextResponse getSingleEntityContext(String id) throws ApiException { + return getSingleEntityContextWithHttpInfo(id, new GetSingleEntityContextOptionalParameters()) + .getData(); } /** - * Get tree-sitter WASM file. + * Get a single entity context. * - *

See {@link #getStaticAnalysisTreeSitterWasmWithHttpInfoAsync}. + *

See {@link #getSingleEntityContextWithHttpInfoAsync}. * - * @param file The name of the WASM file to download. (required) - * @return CompletableFuture<File> + * @param id The unique identifier of the entity to retrieve. (required) + * @return CompletableFuture<SingleEntityContextResponse> */ - public CompletableFuture getStaticAnalysisTreeSitterWasmAsync(String file) { - return getStaticAnalysisTreeSitterWasmWithHttpInfoAsync(file) + public CompletableFuture getSingleEntityContextAsync(String id) { + return getSingleEntityContextWithHttpInfoAsync( + id, new GetSingleEntityContextOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -17966,25 +18079,63 @@ public CompletableFuture getStaticAnalysisTreeSitterWasmAsync(String file) } /** - * Download the WebAssembly binary for a tree-sitter grammar by file name. + * Get a single entity context. * - * @param file The name of the WASM file to download. (required) - * @return ApiResponse<File> + *

See {@link #getSingleEntityContextWithHttpInfo}. + * + * @param id The unique identifier of the entity to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return SingleEntityContextResponse * @throws ApiException if fails to make API call - * @http.response.details - * - * + */ + public SingleEntityContextResponse getSingleEntityContext( + String id, GetSingleEntityContextOptionalParameters parameters) throws ApiException { + return getSingleEntityContextWithHttpInfo(id, parameters).getData(); + } + + /** + * Get a single entity context. + * + *

See {@link #getSingleEntityContextWithHttpInfoAsync}. + * + * @param id The unique identifier of the entity to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SingleEntityContextResponse> + */ + public CompletableFuture getSingleEntityContextAsync( + String id, GetSingleEntityContextOptionalParameters parameters) { + return getSingleEntityContextWithHttpInfoAsync(id, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a single entity from the Cloud SIEM entity context store by its identifier, returning the + * historical revisions of the entity in the requested time range. The endpoint can either return + * revisions across an interval (from / to) or the snapshot of the + * entity at a single point in time (as_of); the two modes are mutually exclusive. + * + * @param id The unique identifier of the entity to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<SingleEntityContextResponse> + * @throws ApiException if fails to make API call + * @http.response.details + *

Response details
+ * * - * + * * - * + * + * * *
Response details
Status Code Description Response Headers
200 BLOB with the content of the WASM file -
200 OK -
400 Bad Request -
401 Unauthorized -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getStaticAnalysisTreeSitterWasmWithHttpInfo(String file) - throws ApiException { + public ApiResponse getSingleEntityContextWithHttpInfo( + String id, GetSingleEntityContextOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "getStaticAnalysisTreeSitterWasm"; + String operationId = "getSingleEntityContext"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -17992,27 +18143,36 @@ public ApiResponse getStaticAnalysisTreeSitterWasmWithHttpInfo(String file } Object localVarPostBody = null; - // verify the required parameter 'file' is set - if (file == null) { + // verify the required parameter 'id' is set + if (id == null) { throw new ApiException( - 400, - "Missing the required parameter 'file' when calling getStaticAnalysisTreeSitterWasm"); + 400, "Missing the required parameter 'id' when calling getSingleEntityContext"); } + EntityContextEntityType entityType = parameters.entityType; + String from = parameters.from; + String to = parameters.to; + String asOf = parameters.asOf; // create path and map variables String localVarPath = - "/api/v2/static-analysis/static-analysis-server/tree-sitter-wasm/{file}" - .replaceAll("\\{" + "file" + "\\}", apiClient.escapeString(file.toString())); + "/api/v2/security_monitoring/entity_context/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "as_of", asOf)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getStaticAnalysisTreeSitterWasm", + "v2.SecurityMonitoringApi.getSingleEntityContext", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), - new String[] {"application/octet-stream", "application/json"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( "GET", @@ -18022,61 +18182,74 @@ public ApiResponse getStaticAnalysisTreeSitterWasmWithHttpInfo(String file localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get tree-sitter WASM file. + * Get a single entity context. * - *

See {@link #getStaticAnalysisTreeSitterWasmWithHttpInfo}. + *

See {@link #getSingleEntityContextWithHttpInfo}. * - * @param file The name of the WASM file to download. (required) - * @return CompletableFuture<ApiResponse<File>> + * @param id The unique identifier of the entity to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SingleEntityContextResponse>> */ - public CompletableFuture> getStaticAnalysisTreeSitterWasmWithHttpInfoAsync( - String file) { + public CompletableFuture> + getSingleEntityContextWithHttpInfoAsync( + String id, GetSingleEntityContextOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "getStaticAnalysisTreeSitterWasm"; + String operationId = "getSingleEntityContext"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'file' is set - if (file == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'file' when calling" - + " getStaticAnalysisTreeSitterWasm")); + 400, "Missing the required parameter 'id' when calling getSingleEntityContext")); return result; } + EntityContextEntityType entityType = parameters.entityType; + String from = parameters.from; + String to = parameters.to; + String asOf = parameters.asOf; // create path and map variables String localVarPath = - "/api/v2/static-analysis/static-analysis-server/tree-sitter-wasm/{file}" - .replaceAll("\\{" + "file" + "\\}", apiClient.escapeString(file.toString())); + "/api/v2/security_monitoring/entity_context/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "as_of", asOf)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getStaticAnalysisTreeSitterWasm", + "v2.SecurityMonitoringApi.getSingleEntityContext", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), - new String[] {"application/octet-stream", "application/json"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -18088,34 +18261,34 @@ public CompletableFuture> getStaticAnalysisTreeSitterWasmWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get suggested actions for a signal. + * Get default rulesets for a language. * - *

See {@link #getSuggestedActionsMatchingSignalWithHttpInfo}. + *

See {@link #getStaticAnalysisDefaultRulesetsWithHttpInfo}. * - * @param signalId The ID of the signal. (required) - * @return SecurityMonitoringSignalSuggestedActionsResponse + * @param language The programming language for which to retrieve the default rulesets. (required) + * @return DefaultRulesetsPerLanguageResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringSignalSuggestedActionsResponse getSuggestedActionsMatchingSignal( - String signalId) throws ApiException { - return getSuggestedActionsMatchingSignalWithHttpInfo(signalId).getData(); + public DefaultRulesetsPerLanguageResponse getStaticAnalysisDefaultRulesets(String language) + throws ApiException { + return getStaticAnalysisDefaultRulesetsWithHttpInfo(language).getData(); } /** - * Get suggested actions for a signal. + * Get default rulesets for a language. * - *

See {@link #getSuggestedActionsMatchingSignalWithHttpInfoAsync}. + *

See {@link #getStaticAnalysisDefaultRulesetsWithHttpInfoAsync}. * - * @param signalId The ID of the signal. (required) - * @return CompletableFuture<SecurityMonitoringSignalSuggestedActionsResponse> + * @param language The programming language for which to retrieve the default rulesets. (required) + * @return CompletableFuture<DefaultRulesetsPerLanguageResponse> */ - public CompletableFuture - getSuggestedActionsMatchingSignalAsync(String signalId) { - return getSuggestedActionsMatchingSignalWithHttpInfoAsync(signalId) + public CompletableFuture + getStaticAnalysisDefaultRulesetsAsync(String language) { + return getStaticAnalysisDefaultRulesetsWithHttpInfoAsync(language) .thenApply( response -> { return response.getData(); @@ -18123,42 +18296,48 @@ public SecurityMonitoringSignalSuggestedActionsResponse getSuggestedActionsMatch } /** - * Get the list of suggested actions for a given security signal. + * Get the default SAST ruleset names for a given programming language. * - * @param signalId The ID of the signal. (required) - * @return ApiResponse<SecurityMonitoringSignalSuggestedActionsResponse> + * @param language The programming language for which to retrieve the default rulesets. (required) + * @return ApiResponse<DefaultRulesetsPerLanguageResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * - * + * * *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
404 Not Found -
400 Bad Request -
429 Too many requests -
*/ - public ApiResponse - getSuggestedActionsMatchingSignalWithHttpInfo(String signalId) throws ApiException { + public ApiResponse + getStaticAnalysisDefaultRulesetsWithHttpInfo(String language) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getStaticAnalysisDefaultRulesets"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; - // verify the required parameter 'signalId' is set - if (signalId == null) { + // verify the required parameter 'language' is set + if (language == null) { throw new ApiException( 400, - "Missing the required parameter 'signalId' when calling" - + " getSuggestedActionsMatchingSignal"); + "Missing the required parameter 'language' when calling" + + " getStaticAnalysisDefaultRulesets"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/suggested_actions" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + "/api/v2/static-analysis/default-rulesets/{language}" + .replaceAll("\\{" + "language" + "\\}", apiClient.escapeString(language.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSuggestedActionsMatchingSignal", + "v2.SecurityMonitoringApi.getStaticAnalysisDefaultRulesets", localVarPath, new ArrayList(), localVarHeaderParams, @@ -18173,37 +18352,47 @@ public SecurityMonitoringSignalSuggestedActionsResponse getSuggestedActionsMatch localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get suggested actions for a signal. + * Get default rulesets for a language. * - *

See {@link #getSuggestedActionsMatchingSignalWithHttpInfo}. + *

See {@link #getStaticAnalysisDefaultRulesetsWithHttpInfo}. * - * @param signalId The ID of the signal. (required) - * @return - * CompletableFuture<ApiResponse<SecurityMonitoringSignalSuggestedActionsResponse>> + * @param language The programming language for which to retrieve the default rulesets. (required) + * @return CompletableFuture<ApiResponse<DefaultRulesetsPerLanguageResponse>> */ - public CompletableFuture> - getSuggestedActionsMatchingSignalWithHttpInfoAsync(String signalId) { + public CompletableFuture> + getStaticAnalysisDefaultRulesetsWithHttpInfoAsync(String language) { + // Check if unstable operation is enabled + String operationId = "getStaticAnalysisDefaultRulesets"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; - // verify the required parameter 'signalId' is set - if (signalId == null) { - CompletableFuture> result = + // verify the required parameter 'language' is set + if (language == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'signalId' when calling" - + " getSuggestedActionsMatchingSignal")); + "Missing the required parameter 'language' when calling" + + " getStaticAnalysisDefaultRulesets")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/signals/{signal_id}/suggested_actions" - .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); + "/api/v2/static-analysis/default-rulesets/{language}" + .replaceAll("\\{" + "language" + "\\}", apiClient.escapeString(language.toString())); Map localVarHeaderParams = new HashMap(); @@ -18211,7 +18400,7 @@ public SecurityMonitoringSignalSuggestedActionsResponse getSuggestedActionsMatch try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSuggestedActionsMatchingSignal", + "v2.SecurityMonitoringApi.getStaticAnalysisDefaultRulesets", localVarPath, new ArrayList(), localVarHeaderParams, @@ -18219,7 +18408,7 @@ public SecurityMonitoringSignalSuggestedActionsResponse getSuggestedActionsMatch new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -18232,34 +18421,34 @@ public SecurityMonitoringSignalSuggestedActionsResponse getSuggestedActionsMatch localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get suppressions affecting future rule. + * Get node types for a language. * - *

See {@link #getSuppressionsAffectingFutureRuleWithHttpInfo}. + *

See {@link #getStaticAnalysisNodeTypesWithHttpInfo}. * - * @param body (required) - * @return SecurityMonitoringSuppressionsResponse + * @param language The programming language for which to retrieve node type definitions. + * (required) + * @return NodeTypesResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingFutureRule( - SecurityMonitoringRuleCreatePayload body) throws ApiException { - return getSuppressionsAffectingFutureRuleWithHttpInfo(body).getData(); + public NodeTypesResponse getStaticAnalysisNodeTypes(String language) throws ApiException { + return getStaticAnalysisNodeTypesWithHttpInfo(language).getData(); } /** - * Get suppressions affecting future rule. + * Get node types for a language. * - *

See {@link #getSuppressionsAffectingFutureRuleWithHttpInfoAsync}. + *

See {@link #getStaticAnalysisNodeTypesWithHttpInfoAsync}. * - * @param body (required) - * @return CompletableFuture<SecurityMonitoringSuppressionsResponse> + * @param language The programming language for which to retrieve node type definitions. + * (required) + * @return CompletableFuture<NodeTypesResponse> */ - public CompletableFuture - getSuppressionsAffectingFutureRuleAsync(SecurityMonitoringRuleCreatePayload body) { - return getSuppressionsAffectingFutureRuleWithHttpInfoAsync(body) + public CompletableFuture getStaticAnalysisNodeTypesAsync(String language) { + return getStaticAnalysisNodeTypesWithHttpInfoAsync(language) .thenApply( response -> { return response.getData(); @@ -18267,10 +18456,11 @@ public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingFutureRule } /** - * Get the list of suppressions that would affect a rule. + * Retrieve tree-sitter node type definitions for a given programming language. * - * @param body (required) - * @return ApiResponse<SecurityMonitoringSuppressionsResponse> + * @param language The programming language for which to retrieve node type definitions. + * (required) + * @return ApiResponse<NodeTypesResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -18278,29 +18468,36 @@ public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingFutureRule * * * - * + * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
401 Unauthorized -
429 Too many requests -
*/ - public ApiResponse - getSuppressionsAffectingFutureRuleWithHttpInfo(SecurityMonitoringRuleCreatePayload body) - throws ApiException { - Object localVarPostBody = body; + public ApiResponse getStaticAnalysisNodeTypesWithHttpInfo(String language) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getStaticAnalysisNodeTypes"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { + // verify the required parameter 'language' is set + if (language == null) { throw new ApiException( - 400, - "Missing the required parameter 'body' when calling getSuppressionsAffectingFutureRule"); + 400, "Missing the required parameter 'language' when calling getStaticAnalysisNodeTypes"); } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/suppressions/rules"; + String localVarPath = + "/api/v2/static-analysis/static-analysis-server/node-types/{language}" + .replaceAll("\\{" + "language" + "\\}", apiClient.escapeString(language.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSuppressionsAffectingFutureRule", + "v2.SecurityMonitoringApi.getStaticAnalysisNodeTypes", localVarPath, new ArrayList(), localVarHeaderParams, @@ -18308,42 +18505,52 @@ public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingFutureRule new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "POST", + "GET", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get suppressions affecting future rule. + * Get node types for a language. * - *

See {@link #getSuppressionsAffectingFutureRuleWithHttpInfo}. + *

See {@link #getStaticAnalysisNodeTypesWithHttpInfo}. * - * @param body (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringSuppressionsResponse>> + * @param language The programming language for which to retrieve node type definitions. + * (required) + * @return CompletableFuture<ApiResponse<NodeTypesResponse>> */ - public CompletableFuture> - getSuppressionsAffectingFutureRuleWithHttpInfoAsync( - SecurityMonitoringRuleCreatePayload body) { - Object localVarPostBody = body; + public CompletableFuture> + getStaticAnalysisNodeTypesWithHttpInfoAsync(String language) { + // Check if unstable operation is enabled + String operationId = "getStaticAnalysisNodeTypes"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'language' is set + if (language == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling" - + " getSuppressionsAffectingFutureRule")); + "Missing the required parameter 'language' when calling getStaticAnalysisNodeTypes")); return result; } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/suppressions/rules"; + String localVarPath = + "/api/v2/static-analysis/static-analysis-server/node-types/{language}" + .replaceAll("\\{" + "language" + "\\}", apiClient.escapeString(language.toString())); Map localVarHeaderParams = new HashMap(); @@ -18351,7 +18558,7 @@ public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingFutureRule try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSuppressionsAffectingFutureRule", + "v2.SecurityMonitoringApi.getStaticAnalysisNodeTypes", localVarPath, new ArrayList(), localVarHeaderParams, @@ -18359,47 +18566,112 @@ public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingFutureRule new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "POST", + "GET", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to getStaticAnalysisRuleset. */ + public static class GetStaticAnalysisRulesetOptionalParameters { + private Boolean includeTests; + private Boolean includeTestingRules; + + /** + * Set includeTests. + * + * @param includeTests When true, test cases for each rule are included in the response. + * (optional) + * @return GetStaticAnalysisRulesetOptionalParameters + */ + public GetStaticAnalysisRulesetOptionalParameters includeTests(Boolean includeTests) { + this.includeTests = includeTests; + return this; + } + + /** + * Set includeTestingRules. + * + * @param includeTestingRules When true, rules that are in testing mode are included in the + * response. (optional) + * @return GetStaticAnalysisRulesetOptionalParameters + */ + public GetStaticAnalysisRulesetOptionalParameters includeTestingRules( + Boolean includeTestingRules) { + this.includeTestingRules = includeTestingRules; + return this; + } } /** - * Get suppressions affecting a specific rule. + * Get a SAST ruleset. * - *

See {@link #getSuppressionsAffectingRuleWithHttpInfo}. + *

See {@link #getStaticAnalysisRulesetWithHttpInfo}. * - * @param ruleId The ID of the rule. (required) - * @return SecurityMonitoringSuppressionsResponse + * @param rulesetName The name of the ruleset to retrieve. (required) + * @return SastRulesetResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingRule(String ruleId) + public SastRulesetResponse getStaticAnalysisRuleset(String rulesetName) throws ApiException { + return getStaticAnalysisRulesetWithHttpInfo( + rulesetName, new GetStaticAnalysisRulesetOptionalParameters()) + .getData(); + } + + /** + * Get a SAST ruleset. + * + *

See {@link #getStaticAnalysisRulesetWithHttpInfoAsync}. + * + * @param rulesetName The name of the ruleset to retrieve. (required) + * @return CompletableFuture<SastRulesetResponse> + */ + public CompletableFuture getStaticAnalysisRulesetAsync(String rulesetName) { + return getStaticAnalysisRulesetWithHttpInfoAsync( + rulesetName, new GetStaticAnalysisRulesetOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a SAST ruleset. + * + *

See {@link #getStaticAnalysisRulesetWithHttpInfo}. + * + * @param rulesetName The name of the ruleset to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return SastRulesetResponse + * @throws ApiException if fails to make API call + */ + public SastRulesetResponse getStaticAnalysisRuleset( + String rulesetName, GetStaticAnalysisRulesetOptionalParameters parameters) throws ApiException { - return getSuppressionsAffectingRuleWithHttpInfo(ruleId).getData(); + return getStaticAnalysisRulesetWithHttpInfo(rulesetName, parameters).getData(); } /** - * Get suppressions affecting a specific rule. + * Get a SAST ruleset. * - *

See {@link #getSuppressionsAffectingRuleWithHttpInfoAsync}. + *

See {@link #getStaticAnalysisRulesetWithHttpInfoAsync}. * - * @param ruleId The ID of the rule. (required) - * @return CompletableFuture<SecurityMonitoringSuppressionsResponse> + * @param rulesetName The name of the ruleset to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SastRulesetResponse> */ - public CompletableFuture - getSuppressionsAffectingRuleAsync(String ruleId) { - return getSuppressionsAffectingRuleWithHttpInfoAsync(ruleId) + public CompletableFuture getStaticAnalysisRulesetAsync( + String rulesetName, GetStaticAnalysisRulesetOptionalParameters parameters) { + return getStaticAnalysisRulesetWithHttpInfoAsync(rulesetName, parameters) .thenApply( response -> { return response.getData(); @@ -18407,42 +18679,60 @@ public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingRule(Strin } /** - * Get the list of suppressions that affect a specific existing rule by its ID. + * Get a SAST ruleset by name, including all its rules. * - * @param ruleId The ID of the rule. (required) - * @return ApiResponse<SecurityMonitoringSuppressionsResponse> + * @param rulesetName The name of the ruleset to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<SastRulesetResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * + * * * *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
400 Bad Request -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - getSuppressionsAffectingRuleWithHttpInfo(String ruleId) throws ApiException { + public ApiResponse getStaticAnalysisRulesetWithHttpInfo( + String rulesetName, GetStaticAnalysisRulesetOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getStaticAnalysisRuleset"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'rulesetName' is set + if (rulesetName == null) { throw new ApiException( - 400, "Missing the required parameter 'ruleId' when calling getSuppressionsAffectingRule"); + 400, + "Missing the required parameter 'rulesetName' when calling getStaticAnalysisRuleset"); } + Boolean includeTests = parameters.includeTests; + Boolean includeTestingRules = parameters.includeTestingRules; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/suppressions/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/static-analysis/rulesets/{ruleset_name}" + .replaceAll( + "\\{" + "ruleset_name" + "\\}", apiClient.escapeString(rulesetName.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_tests", includeTests)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include_testing_rules", includeTestingRules)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSuppressionsAffectingRule", + "v2.SecurityMonitoringApi.getStaticAnalysisRuleset", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -18455,52 +18745,71 @@ public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingRule(Strin localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get suppressions affecting a specific rule. + * Get a SAST ruleset. * - *

See {@link #getSuppressionsAffectingRuleWithHttpInfo}. + *

See {@link #getStaticAnalysisRulesetWithHttpInfo}. * - * @param ruleId The ID of the rule. (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringSuppressionsResponse>> + * @param rulesetName The name of the ruleset to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SastRulesetResponse>> */ - public CompletableFuture> - getSuppressionsAffectingRuleWithHttpInfoAsync(String ruleId) { - Object localVarPostBody = null; - - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + public CompletableFuture> + getStaticAnalysisRulesetWithHttpInfoAsync( + String rulesetName, GetStaticAnalysisRulesetOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getStaticAnalysisRuleset"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'rulesetName' is set + if (rulesetName == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'ruleId' when calling getSuppressionsAffectingRule")); + "Missing the required parameter 'rulesetName' when calling" + + " getStaticAnalysisRuleset")); return result; } + Boolean includeTests = parameters.includeTests; + Boolean includeTestingRules = parameters.includeTestingRules; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/suppressions/rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/static-analysis/rulesets/{ruleset_name}" + .replaceAll( + "\\{" + "ruleset_name" + "\\}", apiClient.escapeString(rulesetName.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_tests", includeTests)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include_testing_rules", includeTestingRules)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSuppressionsAffectingRule", + "v2.SecurityMonitoringApi.getStaticAnalysisRuleset", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -18512,100 +18821,32 @@ public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingRule(Strin localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to getSuppressionVersionHistory. */ - public static class GetSuppressionVersionHistoryOptionalParameters { - private Long pageSize; - private Long pageNumber; - - /** - * Set pageSize. - * - * @param pageSize Number of items to return per page. The maximum allowed value is 100. - * (optional, default to 10) - * @return GetSuppressionVersionHistoryOptionalParameters - */ - public GetSuppressionVersionHistoryOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Set pageNumber. - * - * @param pageNumber Specific page number to return. (optional, default to 0) - * @return GetSuppressionVersionHistoryOptionalParameters - */ - public GetSuppressionVersionHistoryOptionalParameters pageNumber(Long pageNumber) { - this.pageNumber = pageNumber; - return this; - } - } - - /** - * Get a suppression's version history. - * - *

See {@link #getSuppressionVersionHistoryWithHttpInfo}. - * - * @param suppressionId The ID of the suppression rule (required) - * @return GetSuppressionVersionHistoryResponse - * @throws ApiException if fails to make API call - */ - public GetSuppressionVersionHistoryResponse getSuppressionVersionHistory(String suppressionId) - throws ApiException { - return getSuppressionVersionHistoryWithHttpInfo( - suppressionId, new GetSuppressionVersionHistoryOptionalParameters()) - .getData(); - } - - /** - * Get a suppression's version history. - * - *

See {@link #getSuppressionVersionHistoryWithHttpInfoAsync}. - * - * @param suppressionId The ID of the suppression rule (required) - * @return CompletableFuture<GetSuppressionVersionHistoryResponse> - */ - public CompletableFuture getSuppressionVersionHistoryAsync( - String suppressionId) { - return getSuppressionVersionHistoryWithHttpInfoAsync( - suppressionId, new GetSuppressionVersionHistoryOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * Get a suppression's version history. + * Get tree-sitter WASM file. * - *

See {@link #getSuppressionVersionHistoryWithHttpInfo}. + *

See {@link #getStaticAnalysisTreeSitterWasmWithHttpInfo}. * - * @param suppressionId The ID of the suppression rule (required) - * @param parameters Optional parameters for the request. - * @return GetSuppressionVersionHistoryResponse + * @param file The name of the WASM file to download. (required) + * @return File * @throws ApiException if fails to make API call */ - public GetSuppressionVersionHistoryResponse getSuppressionVersionHistory( - String suppressionId, GetSuppressionVersionHistoryOptionalParameters parameters) - throws ApiException { - return getSuppressionVersionHistoryWithHttpInfo(suppressionId, parameters).getData(); + public File getStaticAnalysisTreeSitterWasm(String file) throws ApiException { + return getStaticAnalysisTreeSitterWasmWithHttpInfo(file).getData(); } /** - * Get a suppression's version history. + * Get tree-sitter WASM file. * - *

See {@link #getSuppressionVersionHistoryWithHttpInfoAsync}. + *

See {@link #getStaticAnalysisTreeSitterWasmWithHttpInfoAsync}. * - * @param suppressionId The ID of the suppression rule (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<GetSuppressionVersionHistoryResponse> + * @param file The name of the WASM file to download. (required) + * @return CompletableFuture<File> */ - public CompletableFuture getSuppressionVersionHistoryAsync( - String suppressionId, GetSuppressionVersionHistoryOptionalParameters parameters) { - return getSuppressionVersionHistoryWithHttpInfoAsync(suppressionId, parameters) + public CompletableFuture getStaticAnalysisTreeSitterWasmAsync(String file) { + return getStaticAnalysisTreeSitterWasmWithHttpInfoAsync(file) .thenApply( response -> { return response.getData(); @@ -18613,56 +18854,53 @@ public CompletableFuture getSuppressionVer } /** - * Get a suppression's version history. + * Download the WebAssembly binary for a tree-sitter grammar by file name. * - * @param suppressionId The ID of the suppression rule (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<GetSuppressionVersionHistoryResponse> + * @param file The name of the WASM file to download. (required) + * @return ApiResponse<File> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * - * + * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
404 Not Found -
200 BLOB with the content of the WASM file -
400 Bad Request -
401 Unauthorized -
429 Too many requests -
*/ - public ApiResponse getSuppressionVersionHistoryWithHttpInfo( - String suppressionId, GetSuppressionVersionHistoryOptionalParameters parameters) + public ApiResponse getStaticAnalysisTreeSitterWasmWithHttpInfo(String file) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getStaticAnalysisTreeSitterWasm"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; - // verify the required parameter 'suppressionId' is set - if (suppressionId == null) { + // verify the required parameter 'file' is set + if (file == null) { throw new ApiException( 400, - "Missing the required parameter 'suppressionId' when calling" - + " getSuppressionVersionHistory"); + "Missing the required parameter 'file' when calling getStaticAnalysisTreeSitterWasm"); } - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/suppressions/{suppression_id}/version_history" - .replaceAll( - "\\{" + "suppression_id" + "\\}", apiClient.escapeString(suppressionId.toString())); + "/api/v2/static-analysis/static-analysis-server/tree-sitter-wasm/{file}" + .replaceAll("\\{" + "file" + "\\}", apiClient.escapeString(file.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSuppressionVersionHistory", + "v2.SecurityMonitoringApi.getStaticAnalysisTreeSitterWasm", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"application/octet-stream", "application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( "GET", @@ -18672,62 +18910,61 @@ public ApiResponse getSuppressionVersionHi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a suppression's version history. + * Get tree-sitter WASM file. * - *

See {@link #getSuppressionVersionHistoryWithHttpInfo}. + *

See {@link #getStaticAnalysisTreeSitterWasmWithHttpInfo}. * - * @param suppressionId The ID of the suppression rule (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<GetSuppressionVersionHistoryResponse>> + * @param file The name of the WASM file to download. (required) + * @return CompletableFuture<ApiResponse<File>> */ - public CompletableFuture> - getSuppressionVersionHistoryWithHttpInfoAsync( - String suppressionId, GetSuppressionVersionHistoryOptionalParameters parameters) { + public CompletableFuture> getStaticAnalysisTreeSitterWasmWithHttpInfoAsync( + String file) { + // Check if unstable operation is enabled + String operationId = "getStaticAnalysisTreeSitterWasm"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; - // verify the required parameter 'suppressionId' is set - if (suppressionId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'file' is set + if (file == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'suppressionId' when calling" - + " getSuppressionVersionHistory")); + "Missing the required parameter 'file' when calling" + + " getStaticAnalysisTreeSitterWasm")); return result; } - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/suppressions/{suppression_id}/version_history" - .replaceAll( - "\\{" + "suppression_id" + "\\}", apiClient.escapeString(suppressionId.toString())); + "/api/v2/static-analysis/static-analysis-server/tree-sitter-wasm/{file}" + .replaceAll("\\{" + "file" + "\\}", apiClient.escapeString(file.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getSuppressionVersionHistory", + "v2.SecurityMonitoringApi.getStaticAnalysisTreeSitterWasm", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"application/octet-stream", "application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -18739,33 +18976,34 @@ public ApiResponse getSuppressionVersionHi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get details of a vulnerability notification rule. + * Get suggested actions for a signal. * - *

See {@link #getVulnerabilityNotificationRuleWithHttpInfo}. + *

See {@link #getSuggestedActionsMatchingSignalWithHttpInfo}. * - * @param id ID of the notification rule. (required) - * @return NotificationRuleResponse + * @param signalId The ID of the signal. (required) + * @return SecurityMonitoringSignalSuggestedActionsResponse * @throws ApiException if fails to make API call */ - public NotificationRuleResponse getVulnerabilityNotificationRule(String id) throws ApiException { - return getVulnerabilityNotificationRuleWithHttpInfo(id).getData(); - } - + public SecurityMonitoringSignalSuggestedActionsResponse getSuggestedActionsMatchingSignal( + String signalId) throws ApiException { + return getSuggestedActionsMatchingSignalWithHttpInfo(signalId).getData(); + } + /** - * Get details of a vulnerability notification rule. + * Get suggested actions for a signal. * - *

See {@link #getVulnerabilityNotificationRuleWithHttpInfoAsync}. + *

See {@link #getSuggestedActionsMatchingSignalWithHttpInfoAsync}. * - * @param id ID of the notification rule. (required) - * @return CompletableFuture<NotificationRuleResponse> + * @param signalId The ID of the signal. (required) + * @return CompletableFuture<SecurityMonitoringSignalSuggestedActionsResponse> */ - public CompletableFuture getVulnerabilityNotificationRuleAsync( - String id) { - return getVulnerabilityNotificationRuleWithHttpInfoAsync(id) + public CompletableFuture + getSuggestedActionsMatchingSignalAsync(String signalId) { + return getSuggestedActionsMatchingSignalWithHttpInfoAsync(signalId) .thenApply( response -> { return response.getData(); @@ -18773,41 +19011,42 @@ public CompletableFuture getVulnerabilityNotificationR } /** - * Get the details of a notification rule for security vulnerabilities. + * Get the list of suggested actions for a given security signal. * - * @param id ID of the notification rule. (required) - * @return ApiResponse<NotificationRuleResponse> + * @param signalId The ID of the signal. (required) + * @return ApiResponse<SecurityMonitoringSignalSuggestedActionsResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * - * + * + * * * *
Response details
Status Code Description Response Headers
200 Notification rule details. -
400 Bad Request -
403 Forbidden -
200 OK -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getVulnerabilityNotificationRuleWithHttpInfo( - String id) throws ApiException { + public ApiResponse + getSuggestedActionsMatchingSignalWithHttpInfo(String signalId) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'id' is set - if (id == null) { + // verify the required parameter 'signalId' is set + if (signalId == null) { throw new ApiException( - 400, "Missing the required parameter 'id' when calling getVulnerabilityNotificationRule"); + 400, + "Missing the required parameter 'signalId' when calling" + + " getSuggestedActionsMatchingSignal"); } // create path and map variables String localVarPath = - "/api/v2/security/vulnerabilities/notification_rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/security_monitoring/signals/{signal_id}/suggested_actions" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getVulnerabilityNotificationRule", + "v2.SecurityMonitoringApi.getSuggestedActionsMatchingSignal", localVarPath, new ArrayList(), localVarHeaderParams, @@ -18822,34 +19061,37 @@ public ApiResponse getVulnerabilityNotificationRuleWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get details of a vulnerability notification rule. + * Get suggested actions for a signal. * - *

See {@link #getVulnerabilityNotificationRuleWithHttpInfo}. + *

See {@link #getSuggestedActionsMatchingSignalWithHttpInfo}. * - * @param id ID of the notification rule. (required) - * @return CompletableFuture<ApiResponse<NotificationRuleResponse>> + * @param signalId The ID of the signal. (required) + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringSignalSuggestedActionsResponse>> */ - public CompletableFuture> - getVulnerabilityNotificationRuleWithHttpInfoAsync(String id) { + public CompletableFuture> + getSuggestedActionsMatchingSignalWithHttpInfoAsync(String signalId) { Object localVarPostBody = null; - // verify the required parameter 'id' is set - if (id == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'signalId' is set + if (signalId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'id' when calling getVulnerabilityNotificationRule")); + "Missing the required parameter 'signalId' when calling" + + " getSuggestedActionsMatchingSignal")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/vulnerabilities/notification_rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + "/api/v2/security_monitoring/signals/{signal_id}/suggested_actions" + .replaceAll("\\{" + "signal_id" + "\\}", apiClient.escapeString(signalId.toString())); Map localVarHeaderParams = new HashMap(); @@ -18857,7 +19099,7 @@ public ApiResponse getVulnerabilityNotificationRuleWit try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getVulnerabilityNotificationRule", + "v2.SecurityMonitoringApi.getSuggestedActionsMatchingSignal", localVarPath, new ArrayList(), localVarHeaderParams, @@ -18865,7 +19107,8 @@ public ApiResponse getVulnerabilityNotificationRuleWit new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -18877,30 +19120,34 @@ public ApiResponse getVulnerabilityNotificationRuleWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get the list of vulnerability notification rules. + * Get suppressions affecting future rule. * - *

See {@link #getVulnerabilityNotificationRulesWithHttpInfo}. + *

See {@link #getSuppressionsAffectingFutureRuleWithHttpInfo}. * - * @return NotificationRulesListResponse + * @param body (required) + * @return SecurityMonitoringSuppressionsResponse * @throws ApiException if fails to make API call */ - public NotificationRulesListResponse getVulnerabilityNotificationRules() throws ApiException { - return getVulnerabilityNotificationRulesWithHttpInfo().getData(); + public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingFutureRule( + SecurityMonitoringRuleCreatePayload body) throws ApiException { + return getSuppressionsAffectingFutureRuleWithHttpInfo(body).getData(); } /** - * Get the list of vulnerability notification rules. + * Get suppressions affecting future rule. * - *

See {@link #getVulnerabilityNotificationRulesWithHttpInfoAsync}. + *

See {@link #getSuppressionsAffectingFutureRuleWithHttpInfoAsync}. * - * @return CompletableFuture<NotificationRulesListResponse> + * @param body (required) + * @return CompletableFuture<SecurityMonitoringSuppressionsResponse> */ - public CompletableFuture getVulnerabilityNotificationRulesAsync() { - return getVulnerabilityNotificationRulesWithHttpInfoAsync() + public CompletableFuture + getSuppressionsAffectingFutureRuleAsync(SecurityMonitoringRuleCreatePayload body) { + return getSuppressionsAffectingFutureRuleWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -18908,30 +19155,40 @@ public CompletableFuture getVulnerabilityNotifica } /** - * Returns the list of notification rules for security vulnerabilities. + * Get the list of suppressions that would affect a rule. * - * @return ApiResponse<NotificationRulesListResponse> + * @param body (required) + * @return ApiResponse<SecurityMonitoringSuppressionsResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * + * * *
Response details
Status Code Description Response Headers
200 The list of notification rules. -
403 Forbidden -
200 OK -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
*/ - public ApiResponse getVulnerabilityNotificationRulesWithHttpInfo() - throws ApiException { - Object localVarPostBody = null; + public ApiResponse + getSuppressionsAffectingFutureRuleWithHttpInfo(SecurityMonitoringRuleCreatePayload body) + throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling getSuppressionsAffectingFutureRule"); + } // create path and map variables - String localVarPath = "/api/v2/security/vulnerabilities/notification_rules"; + String localVarPath = "/api/v2/security_monitoring/configuration/suppressions/rules"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getVulnerabilityNotificationRules", + "v2.SecurityMonitoringApi.getSuppressionsAffectingFutureRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -18939,28 +19196,42 @@ public ApiResponse getVulnerabilityNotificationRu new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get the list of vulnerability notification rules. + * Get suppressions affecting future rule. * - *

See {@link #getVulnerabilityNotificationRulesWithHttpInfo}. + *

See {@link #getSuppressionsAffectingFutureRuleWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<NotificationRulesListResponse>> + * @param body (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringSuppressionsResponse>> */ - public CompletableFuture> - getVulnerabilityNotificationRulesWithHttpInfoAsync() { - Object localVarPostBody = null; + public CompletableFuture> + getSuppressionsAffectingFutureRuleWithHttpInfoAsync( + SecurityMonitoringRuleCreatePayload body) { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " getSuppressionsAffectingFutureRule")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/security/vulnerabilities/notification_rules"; + String localVarPath = "/api/v2/security_monitoring/configuration/suppressions/rules"; Map localVarHeaderParams = new HashMap(); @@ -18968,7 +19239,7 @@ public ApiResponse getVulnerabilityNotificationRu try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.getVulnerabilityNotificationRules", + "v2.SecurityMonitoringApi.getSuppressionsAffectingFutureRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -18976,44 +19247,47 @@ public ApiResponse getVulnerabilityNotificationRu new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Import security vulnerabilities. + * Get suppressions affecting a specific rule. * - *

See {@link #importSecurityVulnerabilitiesWithHttpInfo}. + *

See {@link #getSuppressionsAffectingRuleWithHttpInfo}. * - * @param body (required) + * @param ruleId The ID of the rule. (required) + * @return SecurityMonitoringSuppressionsResponse * @throws ApiException if fails to make API call */ - public void importSecurityVulnerabilities(CycloneDXBom body) throws ApiException { - importSecurityVulnerabilitiesWithHttpInfo(body); + public SecurityMonitoringSuppressionsResponse getSuppressionsAffectingRule(String ruleId) + throws ApiException { + return getSuppressionsAffectingRuleWithHttpInfo(ruleId).getData(); } /** - * Import security vulnerabilities. + * Get suppressions affecting a specific rule. * - *

See {@link #importSecurityVulnerabilitiesWithHttpInfoAsync}. + *

See {@link #getSuppressionsAffectingRuleWithHttpInfoAsync}. * - * @param body (required) - * @return CompletableFuture + * @param ruleId The ID of the rule. (required) + * @return CompletableFuture<SecurityMonitoringSuppressionsResponse> */ - public CompletableFuture importSecurityVulnerabilitiesAsync(CycloneDXBom body) { - return importSecurityVulnerabilitiesWithHttpInfoAsync(body) + public CompletableFuture + getSuppressionsAffectingRuleAsync(String ruleId) { + return getSuppressionsAffectingRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -19021,122 +19295,83 @@ public CompletableFuture importSecurityVulnerabilitiesAsync(CycloneDXBom b } /** - * Import security vulnerabilities from an external scanner in CycloneDX 1.5 format. - * - *

The payload is validated against the CycloneDX 1.5 JSON schema and the following additional - * constraints: - * - *

    - *
  • metadata, metadata.component, and metadata.component.name - * are required. - *
  • metadata.tools.components must contain exactly one element with a name - * field. - *
  • components cannot be empty. Each component requires bom-ref, - * type, name, and version. - *
  • When type is library, purl is required and must be - * a valid PURL. - *
  • When type is operating-system, name must be one of - * the supported OS values: alma, alpine, amazon, - * azurelinux, bottlerocket, cbl-mariner, - * chainguard, centos, debian, fedora, - * opensuse, opensuse-leap, opensuse-tumbleweed, - * oracle, photon, redhat, rocky, slem - * , sles, ubuntu, wolfi, windows - * , macos. - *
  • vulnerabilities cannot be empty. Each vulnerability requires id - * , exactly one ratings entry, and at least one affects entry. - *
  • Each affects[].ref must match a bom-ref value in - * components. - *
+ * Get the list of suppressions that affect a specific existing rule by its ID. * - * @param body (required) - * @return ApiResponse<Void> + * @param ruleId The ID of the rule. (required) + * @return ApiResponse<SecurityMonitoringSuppressionsResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * - * + * + * + * * - * *
Response details
Status Code Description Response Headers
200 Vulnerabilities accepted successfully. -
400 Bad Request -
403 Forbidden -
200 OK -
403 Not Authorized -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse importSecurityVulnerabilitiesWithHttpInfo(CycloneDXBom body) - throws ApiException { - // Check if unstable operation is enabled - String operationId = "importSecurityVulnerabilities"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { + public ApiResponse + getSuppressionsAffectingRuleWithHttpInfo(String ruleId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling importSecurityVulnerabilities"); + 400, "Missing the required parameter 'ruleId' when calling getSuppressionsAffectingRule"); } // create path and map variables - String localVarPath = "/api/v2/security/vulnerabilities"; + String localVarPath = + "/api/v2/security_monitoring/configuration/suppressions/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.importSecurityVulnerabilities", + "v2.SecurityMonitoringApi.getSuppressionsAffectingRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "POST", + "GET", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Import security vulnerabilities. + * Get suppressions affecting a specific rule. * - *

See {@link #importSecurityVulnerabilitiesWithHttpInfo}. + *

See {@link #getSuppressionsAffectingRuleWithHttpInfo}. * - * @param body (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param ruleId The ID of the rule. (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringSuppressionsResponse>> */ - public CompletableFuture> importSecurityVulnerabilitiesWithHttpInfoAsync( - CycloneDXBom body) { - // Check if unstable operation is enabled - String operationId = "importSecurityVulnerabilities"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = body; + public CompletableFuture> + getSuppressionsAffectingRuleWithHttpInfoAsync(String ruleId) { + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling importSecurityVulnerabilities")); + "Missing the required parameter 'ruleId' when calling getSuppressionsAffectingRule")); return result; } // create path and map variables - String localVarPath = "/api/v2/security/vulnerabilities"; + String localVarPath = + "/api/v2/security_monitoring/configuration/suppressions/rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -19144,161 +19379,87 @@ public CompletableFuture> importSecurityVulnerabilitiesWithHtt try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.importSecurityVulnerabilities", + "v2.SecurityMonitoringApi.getSuppressionsAffectingRule", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "POST", + "GET", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } - /** Manage optional parameters to listAssetsSBOMs. */ - public static class ListAssetsSBOMsOptionalParameters { - private String pageToken; + /** Manage optional parameters to getSuppressionVersionHistory. */ + public static class GetSuppressionVersionHistoryOptionalParameters { + private Long pageSize; private Long pageNumber; - private AssetType filterAssetType; - private String filterAssetName; - private String filterPackageName; - private String filterPackageVersion; - private String filterLicenseName; - private SBOMComponentLicenseType filterLicenseType; /** - * Set pageToken. + * Set pageSize. * - * @param pageToken Its value must come from the links section of the response of - * the first request. Do not manually edit it. (optional) - * @return ListAssetsSBOMsOptionalParameters + * @param pageSize Number of items to return per page. The maximum allowed value is 100. + * (optional, default to 10) + * @return GetSuppressionVersionHistoryOptionalParameters */ - public ListAssetsSBOMsOptionalParameters pageToken(String pageToken) { - this.pageToken = pageToken; + public GetSuppressionVersionHistoryOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; return this; } /** * Set pageNumber. * - * @param pageNumber The page number to be retrieved. It should be equal to or greater than 1. - * (optional) - * @return ListAssetsSBOMsOptionalParameters + * @param pageNumber Specific page number to return. (optional, default to 0) + * @return GetSuppressionVersionHistoryOptionalParameters */ - public ListAssetsSBOMsOptionalParameters pageNumber(Long pageNumber) { + public GetSuppressionVersionHistoryOptionalParameters pageNumber(Long pageNumber) { this.pageNumber = pageNumber; return this; } - - /** - * Set filterAssetType. - * - * @param filterAssetType The type of the assets for the SBOM request. Required for initial - * requests (when no page[token] is provided). Infrastructure types (Host - * , HostImage, Image, ServerlessFunction) and - * code types (Repository, Service) cannot be mixed in the same - * request. (optional) - * @return ListAssetsSBOMsOptionalParameters - */ - public ListAssetsSBOMsOptionalParameters filterAssetType(AssetType filterAssetType) { - this.filterAssetType = filterAssetType; - return this; - } - - /** - * Set filterAssetName. - * - * @param filterAssetName The name of the asset for the SBOM request. (optional) - * @return ListAssetsSBOMsOptionalParameters - */ - public ListAssetsSBOMsOptionalParameters filterAssetName(String filterAssetName) { - this.filterAssetName = filterAssetName; - return this; - } - - /** - * Set filterPackageName. - * - * @param filterPackageName The name of the component that is a dependency of an asset. - * (optional) - * @return ListAssetsSBOMsOptionalParameters - */ - public ListAssetsSBOMsOptionalParameters filterPackageName(String filterPackageName) { - this.filterPackageName = filterPackageName; - return this; - } - - /** - * Set filterPackageVersion. - * - * @param filterPackageVersion The version of the component that is a dependency of an asset. - * (optional) - * @return ListAssetsSBOMsOptionalParameters - */ - public ListAssetsSBOMsOptionalParameters filterPackageVersion(String filterPackageVersion) { - this.filterPackageVersion = filterPackageVersion; - return this; - } - - /** - * Set filterLicenseName. - * - * @param filterLicenseName The software license name of the component that is a dependency of - * an asset. (optional) - * @return ListAssetsSBOMsOptionalParameters - */ - public ListAssetsSBOMsOptionalParameters filterLicenseName(String filterLicenseName) { - this.filterLicenseName = filterLicenseName; - return this; - } - - /** - * Set filterLicenseType. - * - * @param filterLicenseType The software license type of the component that is a dependency of - * an asset. (optional) - * @return ListAssetsSBOMsOptionalParameters - */ - public ListAssetsSBOMsOptionalParameters filterLicenseType( - SBOMComponentLicenseType filterLicenseType) { - this.filterLicenseType = filterLicenseType; - return this; - } } /** - * List assets SBOMs. + * Get a suppression's version history. * - *

See {@link #listAssetsSBOMsWithHttpInfo}. + *

See {@link #getSuppressionVersionHistoryWithHttpInfo}. * - * @return ListAssetsSBOMsResponse + * @param suppressionId The ID of the suppression rule (required) + * @return GetSuppressionVersionHistoryResponse * @throws ApiException if fails to make API call */ - public ListAssetsSBOMsResponse listAssetsSBOMs() throws ApiException { - return listAssetsSBOMsWithHttpInfo(new ListAssetsSBOMsOptionalParameters()).getData(); + public GetSuppressionVersionHistoryResponse getSuppressionVersionHistory(String suppressionId) + throws ApiException { + return getSuppressionVersionHistoryWithHttpInfo( + suppressionId, new GetSuppressionVersionHistoryOptionalParameters()) + .getData(); } /** - * List assets SBOMs. + * Get a suppression's version history. * - *

See {@link #listAssetsSBOMsWithHttpInfoAsync}. + *

See {@link #getSuppressionVersionHistoryWithHttpInfoAsync}. * - * @return CompletableFuture<ListAssetsSBOMsResponse> + * @param suppressionId The ID of the suppression rule (required) + * @return CompletableFuture<GetSuppressionVersionHistoryResponse> */ - public CompletableFuture listAssetsSBOMsAsync() { - return listAssetsSBOMsWithHttpInfoAsync(new ListAssetsSBOMsOptionalParameters()) + public CompletableFuture getSuppressionVersionHistoryAsync( + String suppressionId) { + return getSuppressionVersionHistoryWithHttpInfoAsync( + suppressionId, new GetSuppressionVersionHistoryOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -19306,30 +19467,33 @@ public CompletableFuture listAssetsSBOMsAsync() { } /** - * List assets SBOMs. + * Get a suppression's version history. * - *

See {@link #listAssetsSBOMsWithHttpInfo}. + *

See {@link #getSuppressionVersionHistoryWithHttpInfo}. * + * @param suppressionId The ID of the suppression rule (required) * @param parameters Optional parameters for the request. - * @return ListAssetsSBOMsResponse + * @return GetSuppressionVersionHistoryResponse * @throws ApiException if fails to make API call */ - public ListAssetsSBOMsResponse listAssetsSBOMs(ListAssetsSBOMsOptionalParameters parameters) + public GetSuppressionVersionHistoryResponse getSuppressionVersionHistory( + String suppressionId, GetSuppressionVersionHistoryOptionalParameters parameters) throws ApiException { - return listAssetsSBOMsWithHttpInfo(parameters).getData(); + return getSuppressionVersionHistoryWithHttpInfo(suppressionId, parameters).getData(); } /** - * List assets SBOMs. + * Get a suppression's version history. * - *

See {@link #listAssetsSBOMsWithHttpInfoAsync}. + *

See {@link #getSuppressionVersionHistoryWithHttpInfoAsync}. * + * @param suppressionId The ID of the suppression rule (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ListAssetsSBOMsResponse> + * @return CompletableFuture<GetSuppressionVersionHistoryResponse> */ - public CompletableFuture listAssetsSBOMsAsync( - ListAssetsSBOMsOptionalParameters parameters) { - return listAssetsSBOMsWithHttpInfoAsync(parameters) + public CompletableFuture getSuppressionVersionHistoryAsync( + String suppressionId, GetSuppressionVersionHistoryOptionalParameters parameters) { + return getSuppressionVersionHistoryWithHttpInfoAsync(suppressionId, parameters) .thenApply( response -> { return response.getData(); @@ -19337,79 +19501,51 @@ public CompletableFuture listAssetsSBOMsAsync( } /** - * Get a list of assets SBOMs for an organization. - * - *

The filter[asset_type] parameter is required for initial requests (when no - * page[token] is provided). Subsequent pages encode the asset type in the pagination - * token, so filter[asset_type] is not required for paginated requests. Mixing - * infrastructure asset types (Host, HostImage, Image, - * ServerlessFunction) with code asset types (Repository, Service - * ) in the same request is not supported and returns a 400 error. - * - *

Pagination

- * - *

Please review the Pagination section for the "List - * Vulnerabilities" endpoint. - * - *

Filtering

- * - *

Please review the Filtering section for the "List Vulnerabilities" - * endpoint. - * - *

Metadata

- * - *

Please review the Metadata section for the "List Vulnerabilities" - * endpoint. + * Get a suppression's version history. * + * @param suppressionId The ID of the suppression rule (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<ListAssetsSBOMsResponse> + * @return ApiResponse<GetSuppressionVersionHistoryResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * - * - * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad request: The server cannot process the request due to invalid syntax in the request. -
403 Forbidden: Access denied -
404 Not found: asset not found -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse listAssetsSBOMsWithHttpInfo( - ListAssetsSBOMsOptionalParameters parameters) throws ApiException { + public ApiResponse getSuppressionVersionHistoryWithHttpInfo( + String suppressionId, GetSuppressionVersionHistoryOptionalParameters parameters) + throws ApiException { Object localVarPostBody = null; - String pageToken = parameters.pageToken; + + // verify the required parameter 'suppressionId' is set + if (suppressionId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'suppressionId' when calling" + + " getSuppressionVersionHistory"); + } + Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; - AssetType filterAssetType = parameters.filterAssetType; - String filterAssetName = parameters.filterAssetName; - String filterPackageName = parameters.filterPackageName; - String filterPackageVersion = parameters.filterPackageVersion; - String filterLicenseName = parameters.filterLicenseName; - SBOMComponentLicenseType filterLicenseType = parameters.filterLicenseType; // create path and map variables - String localVarPath = "/api/v2/security/sboms"; + String localVarPath = + "/api/v2/security_monitoring/configuration/suppressions/{suppression_id}/version_history" + .replaceAll( + "\\{" + "suppression_id" + "\\}", apiClient.escapeString(suppressionId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset_type]", filterAssetType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset_name]", filterAssetName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[package_name]", filterPackageName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[package_version]", filterPackageVersion)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[license_name]", filterLicenseName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[license_type]", filterLicenseType)); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listAssetsSBOMs", + "v2.SecurityMonitoringApi.getSuppressionVersionHistory", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -19424,54 +19560,53 @@ public ApiResponse listAssetsSBOMsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List assets SBOMs. + * Get a suppression's version history. * - *

See {@link #listAssetsSBOMsWithHttpInfo}. + *

See {@link #getSuppressionVersionHistoryWithHttpInfo}. * + * @param suppressionId The ID of the suppression rule (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<ListAssetsSBOMsResponse>> + * @return CompletableFuture<ApiResponse<GetSuppressionVersionHistoryResponse>> */ - public CompletableFuture> listAssetsSBOMsWithHttpInfoAsync( - ListAssetsSBOMsOptionalParameters parameters) { + public CompletableFuture> + getSuppressionVersionHistoryWithHttpInfoAsync( + String suppressionId, GetSuppressionVersionHistoryOptionalParameters parameters) { Object localVarPostBody = null; - String pageToken = parameters.pageToken; + + // verify the required parameter 'suppressionId' is set + if (suppressionId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'suppressionId' when calling" + + " getSuppressionVersionHistory")); + return result; + } + Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; - AssetType filterAssetType = parameters.filterAssetType; - String filterAssetName = parameters.filterAssetName; - String filterPackageName = parameters.filterPackageName; - String filterPackageVersion = parameters.filterPackageVersion; - String filterLicenseName = parameters.filterLicenseName; - SBOMComponentLicenseType filterLicenseType = parameters.filterLicenseType; // create path and map variables - String localVarPath = "/api/v2/security/sboms"; + String localVarPath = + "/api/v2/security_monitoring/configuration/suppressions/{suppression_id}/version_history" + .replaceAll( + "\\{" + "suppression_id" + "\\}", apiClient.escapeString(suppressionId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset_type]", filterAssetType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset_name]", filterAssetName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[package_name]", filterPackageName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[package_version]", filterPackageVersion)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[license_name]", filterLicenseName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[license_type]", filterLicenseType)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listAssetsSBOMs", + "v2.SecurityMonitoringApi.getSuppressionVersionHistory", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -19479,7 +19614,8 @@ public CompletableFuture> listAssetsSBOMsWi new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -19491,224 +19627,168 @@ public CompletableFuture> listAssetsSBOMsWi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listFindings. */ - public static class ListFindingsOptionalParameters { - private Long pageLimit; - private Long snapshotTimestamp; - private String pageCursor; - private String filterTags; - private String filterEvaluationChangedAt; - private Boolean filterMuted; - private String filterRuleId; - private String filterRuleName; - private String filterResourceType; - private String filterResourceId; - private String filterDiscoveryTimestamp; - private FindingEvaluation filterEvaluation; - private FindingStatus filterStatus; - private List filterVulnerabilityType; - private Boolean detailedFindings; + /** + * Get details of a vulnerability notification rule. + * + *

See {@link #getVulnerabilityNotificationRuleWithHttpInfo}. + * + * @param id ID of the notification rule. (required) + * @return NotificationRuleResponse + * @throws ApiException if fails to make API call + */ + public NotificationRuleResponse getVulnerabilityNotificationRule(String id) throws ApiException { + return getVulnerabilityNotificationRuleWithHttpInfo(id).getData(); + } - /** - * Set pageLimit. - * - * @param pageLimit Limit the number of findings returned. Must be <= 1000. (optional, - * default to 100) - * @return ListFindingsOptionalParameters - */ - public ListFindingsOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; - return this; - } + /** + * Get details of a vulnerability notification rule. + * + *

See {@link #getVulnerabilityNotificationRuleWithHttpInfoAsync}. + * + * @param id ID of the notification rule. (required) + * @return CompletableFuture<NotificationRuleResponse> + */ + public CompletableFuture getVulnerabilityNotificationRuleAsync( + String id) { + return getVulnerabilityNotificationRuleWithHttpInfoAsync(id) + .thenApply( + response -> { + return response.getData(); + }); + } - /** - * Set snapshotTimestamp. - * - * @param snapshotTimestamp Return findings for a given snapshot of time (Unix ms). (optional) - * @return ListFindingsOptionalParameters - */ - public ListFindingsOptionalParameters snapshotTimestamp(Long snapshotTimestamp) { - this.snapshotTimestamp = snapshotTimestamp; - return this; - } + /** + * Get the details of a notification rule for security vulnerabilities. + * + * @param id ID of the notification rule. (required) + * @return ApiResponse<NotificationRuleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 Notification rule details. -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getVulnerabilityNotificationRuleWithHttpInfo( + String id) throws ApiException { + Object localVarPostBody = null; - /** - * Set pageCursor. - * - * @param pageCursor Return the next page of findings pointed to by the cursor. (optional) - * @return ListFindingsOptionalParameters - */ - public ListFindingsOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; - return this; + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling getVulnerabilityNotificationRule"); } + // create path and map variables + String localVarPath = + "/api/v2/security/vulnerabilities/notification_rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); - /** - * Set filterTags. - * - * @param filterTags Return findings that have these associated tags (repeatable). (optional) - * @return ListFindingsOptionalParameters - */ - public ListFindingsOptionalParameters filterTags(String filterTags) { - this.filterTags = filterTags; - return this; - } + Map localVarHeaderParams = new HashMap(); - /** - * Set filterEvaluationChangedAt. - * - * @param filterEvaluationChangedAt Return findings that have changed from pass to fail or vice - * versa on a specified date (Unix ms) or date range (using comparison operators). - * (optional) - * @return ListFindingsOptionalParameters - */ - public ListFindingsOptionalParameters filterEvaluationChangedAt( - String filterEvaluationChangedAt) { - this.filterEvaluationChangedAt = filterEvaluationChangedAt; - return this; - } + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getVulnerabilityNotificationRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } - /** - * Set filterMuted. - * - * @param filterMuted Set to true to return findings that are muted. Set to - * false to return unmuted findings. (optional) - * @return ListFindingsOptionalParameters - */ - public ListFindingsOptionalParameters filterMuted(Boolean filterMuted) { - this.filterMuted = filterMuted; - return this; - } - - /** - * Set filterRuleId. - * - * @param filterRuleId Return findings for the specified rule ID. (optional) - * @return ListFindingsOptionalParameters - */ - public ListFindingsOptionalParameters filterRuleId(String filterRuleId) { - this.filterRuleId = filterRuleId; - return this; - } - - /** - * Set filterRuleName. - * - * @param filterRuleName Return findings for the specified rule. (optional) - * @return ListFindingsOptionalParameters - */ - public ListFindingsOptionalParameters filterRuleName(String filterRuleName) { - this.filterRuleName = filterRuleName; - return this; - } - - /** - * Set filterResourceType. - * - * @param filterResourceType Return only findings for the specified resource type. (optional) - * @return ListFindingsOptionalParameters - */ - public ListFindingsOptionalParameters filterResourceType(String filterResourceType) { - this.filterResourceType = filterResourceType; - return this; - } - - /** - * Set filterResourceId. - * - * @param filterResourceId Return only findings for the specified resource id. (optional) - * @return ListFindingsOptionalParameters - */ - public ListFindingsOptionalParameters filterResourceId(String filterResourceId) { - this.filterResourceId = filterResourceId; - return this; - } - - /** - * Set filterDiscoveryTimestamp. - * - * @param filterDiscoveryTimestamp Return findings that were found on a specified date (Unix ms) - * or date range (using comparison operators). (optional) - * @return ListFindingsOptionalParameters - */ - public ListFindingsOptionalParameters filterDiscoveryTimestamp( - String filterDiscoveryTimestamp) { - this.filterDiscoveryTimestamp = filterDiscoveryTimestamp; - return this; - } - - /** - * Set filterEvaluation. - * - * @param filterEvaluation Return only pass or fail findings. - * (optional) - * @return ListFindingsOptionalParameters - */ - public ListFindingsOptionalParameters filterEvaluation(FindingEvaluation filterEvaluation) { - this.filterEvaluation = filterEvaluation; - return this; - } + /** + * Get details of a vulnerability notification rule. + * + *

See {@link #getVulnerabilityNotificationRuleWithHttpInfo}. + * + * @param id ID of the notification rule. (required) + * @return CompletableFuture<ApiResponse<NotificationRuleResponse>> + */ + public CompletableFuture> + getVulnerabilityNotificationRuleWithHttpInfoAsync(String id) { + Object localVarPostBody = null; - /** - * Set filterStatus. - * - * @param filterStatus Return only findings with the specified status. (optional) - * @return ListFindingsOptionalParameters - */ - public ListFindingsOptionalParameters filterStatus(FindingStatus filterStatus) { - this.filterStatus = filterStatus; - return this; + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'id' when calling getVulnerabilityNotificationRule")); + return result; } + // create path and map variables + String localVarPath = + "/api/v2/security/vulnerabilities/notification_rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); - /** - * Set filterVulnerabilityType. - * - * @param filterVulnerabilityType Return findings that match the selected vulnerability types - * (repeatable). (optional) - * @return ListFindingsOptionalParameters - */ - public ListFindingsOptionalParameters filterVulnerabilityType( - List filterVulnerabilityType) { - this.filterVulnerabilityType = filterVulnerabilityType; - return this; - } + Map localVarHeaderParams = new HashMap(); - /** - * Set detailedFindings. - * - * @param detailedFindings Return additional fields for some findings. (optional) - * @return ListFindingsOptionalParameters - */ - public ListFindingsOptionalParameters detailedFindings(Boolean detailedFindings) { - this.detailedFindings = detailedFindings; - return this; + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getVulnerabilityNotificationRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); } /** - * List findings. + * Get the list of vulnerability notification rules. * - *

See {@link #listFindingsWithHttpInfo}. + *

See {@link #getVulnerabilityNotificationRulesWithHttpInfo}. * - * @return ListFindingsResponse + * @return NotificationRulesListResponse * @throws ApiException if fails to make API call */ - public ListFindingsResponse listFindings() throws ApiException { - return listFindingsWithHttpInfo(new ListFindingsOptionalParameters()).getData(); + public NotificationRulesListResponse getVulnerabilityNotificationRules() throws ApiException { + return getVulnerabilityNotificationRulesWithHttpInfo().getData(); } /** - * List findings. + * Get the list of vulnerability notification rules. * - *

See {@link #listFindingsWithHttpInfoAsync}. + *

See {@link #getVulnerabilityNotificationRulesWithHttpInfoAsync}. * - * @return CompletableFuture<ListFindingsResponse> + * @return CompletableFuture<NotificationRulesListResponse> */ - public CompletableFuture listFindingsAsync() { - return listFindingsWithHttpInfoAsync(new ListFindingsOptionalParameters()) + public CompletableFuture getVulnerabilityNotificationRulesAsync() { + return getVulnerabilityNotificationRulesWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -19716,413 +19796,397 @@ public CompletableFuture listFindingsAsync() { } /** - * List findings. - * - *

See {@link #listFindingsWithHttpInfo}. + * Returns the list of notification rules for security vulnerabilities. * - * @param parameters Optional parameters for the request. - * @return ListFindingsResponse + * @return ApiResponse<NotificationRulesListResponse> * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 The list of notification rules. -
403 Forbidden -
429 Too many requests -
*/ - public ListFindingsResponse listFindings(ListFindingsOptionalParameters parameters) + public ApiResponse getVulnerabilityNotificationRulesWithHttpInfo() throws ApiException { - return listFindingsWithHttpInfo(parameters).getData(); - } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/security/vulnerabilities/notification_rules"; - /** - * List findings. - * - *

See {@link #listFindingsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ListFindingsResponse> - */ - public CompletableFuture listFindingsAsync( - ListFindingsOptionalParameters parameters) { - return listFindingsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); - } + Map localVarHeaderParams = new HashMap(); - /** - * List findings. - * - *

See {@link #listFindingsWithHttpInfo}. - * - * @return PaginationIterable<Finding> - */ - public PaginationIterable listFindingsWithPagination() { - ListFindingsOptionalParameters parameters = new ListFindingsOptionalParameters(); - return listFindingsWithPagination(parameters); + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getVulnerabilityNotificationRules", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); } /** - * List findings. + * Get the list of vulnerability notification rules. * - *

See {@link #listFindingsWithHttpInfo}. + *

See {@link #getVulnerabilityNotificationRulesWithHttpInfo}. * - * @return ListFindingsResponse + * @return CompletableFuture<ApiResponse<NotificationRulesListResponse>> */ - public PaginationIterable listFindingsWithPagination( - ListFindingsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getCursor"; - String valueSetterPath = "pageCursor"; - Boolean valueSetterParamOptional = true; - Long limit; - - if (parameters.pageLimit == null) { - limit = 100l; - parameters.pageLimit(limit); - } else { - limit = parameters.pageLimit; - } - - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); + public CompletableFuture> + getVulnerabilityNotificationRulesWithHttpInfoAsync() { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/security/vulnerabilities/notification_rules"; - PaginationIterable iterator = - new PaginationIterable( - this, - "listFindings", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - true, - true, - limit, - args, - 0); + Map localVarHeaderParams = new HashMap(); - return iterator; + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getVulnerabilityNotificationRules", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); } /** - * Get a list of findings. These include both misconfigurations and identity risks. - * - *

Note: To filter and return only identity risks, add the following query - * parameter: ?filter[tags]=dd_rule_type:ciem - * - *

Filtering

- * - *

Filters can be applied by appending query parameters to the URL. - * - *

    - *
  • Using a single filter: ?filter[attribute_key]=attribute_value - *
  • Chaining filters: - * ?filter[attribute_key]=attribute_value&filter[attribute_key]=attribute_value... - * - *
  • Filtering on tags: - * ?filter[tags]=tag_key:tag_value&filter[tags]=tag_key_2:tag_value_2 - *
- * - *

Here, attribute_key can be any of the filter keys described further below. - * - *

Query parameters of type integer support comparison operators (> - * , >=, <, <=). This is particularly - * useful when filtering by evaluation_changed_at or - * resource_discovery_timestamp. For example: - * ?filter[evaluation_changed_at]=>20123123121. - * - *

You can also use the negation operator on strings. For example, use - * filter[resource_type]=-aws* to filter for any non-AWS resources. - * - *

The operator must come after the equal sign. For example, to filter with the >= - * operator, add the operator after the equal sign: - * filter[evaluation_changed_at]=>=1678809373257. - * - *

Query parameters must be only among the documented ones and with values of correct types. - * Duplicated query parameters (e.g. filter[status]=low&filter[status]=info) are - * not allowed. - * - *

Additional extension fields

- * - *

Additional extension fields are available for some findings. + * Import security vulnerabilities. * - *

The data is available when you include the query parameter ?detailed_findings=true - * in the request. + *

See {@link #importSecurityVulnerabilitiesWithHttpInfo}. * - *

The following fields are available for findings: - external_id: The resource - * external ID related to the finding. - description: The description and remediation - * steps for the finding. - datadog_link: The Datadog relative link for the finding. - * - ip_addresses: The list of private IP addresses for the resource related to the - * finding. + * @param body (required) + * @throws ApiException if fails to make API call + */ + public void importSecurityVulnerabilities(CycloneDXBom body) throws ApiException { + importSecurityVulnerabilitiesWithHttpInfo(body); + } + + /** + * Import security vulnerabilities. * - *

Response

+ *

See {@link #importSecurityVulnerabilitiesWithHttpInfoAsync}. * - *

The response includes an array of finding objects, pagination metadata, and a count of items - * that match the query. + * @param body (required) + * @return CompletableFuture + */ + public CompletableFuture importSecurityVulnerabilitiesAsync(CycloneDXBom body) { + return importSecurityVulnerabilitiesWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Import security vulnerabilities from an external scanner in CycloneDX 1.5 format. * - *

Each finding object contains the following: + *

The payload is validated against the CycloneDX 1.5 JSON schema and the following additional + * constraints: * *

    - *
  • The finding ID that can be used in a GetFinding request to retrieve the full - * finding details. - *
  • Core attributes, including status, evaluation, high-level resource details, muted state, - * and rule details. - *
  • evaluation_changed_at and resource_discovery_date time stamps. - *
  • An array of associated tags. + *
  • metadata, metadata.component, and metadata.component.name + * are required. + *
  • metadata.tools.components must contain exactly one element with a name + * field. + *
  • components cannot be empty. Each component requires bom-ref, + * type, name, and version. + *
  • When type is library, purl is required and must be + * a valid PURL. + *
  • When type is operating-system, name must be one of + * the supported OS values: alma, alpine, amazon, + * azurelinux, bottlerocket, cbl-mariner, + * chainguard, centos, debian, fedora, + * opensuse, opensuse-leap, opensuse-tumbleweed, + * oracle, photon, redhat, rocky, slem + * , sles, ubuntu, wolfi, windows + * , macos. + *
  • vulnerabilities cannot be empty. Each vulnerability requires id + * , exactly one ratings entry, and at least one affects entry. + *
  • Each affects[].ref must match a bom-ref value in + * components. *
* - * @param parameters Optional parameters for the request. - * @return ApiResponse<ListFindingsResponse> + * @param body (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * - * - * - * + * + * + * + * + * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request: The server cannot process the request due to invalid syntax in the request. -
403 Forbidden: Access denied -
404 Not Found: The requested finding cannot be found. -
429 Too many requests: The rate limit set by the API has been exceeded. -
200 Vulnerabilities accepted successfully. -
400 Bad Request -
403 Forbidden -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listFindingsWithHttpInfo( - ListFindingsOptionalParameters parameters) throws ApiException { + public ApiResponse importSecurityVulnerabilitiesWithHttpInfo(CycloneDXBom body) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listFindings"; + String operationId = "importSecurityVulnerabilities"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; - Long pageLimit = parameters.pageLimit; - Long snapshotTimestamp = parameters.snapshotTimestamp; - String pageCursor = parameters.pageCursor; - String filterTags = parameters.filterTags; - String filterEvaluationChangedAt = parameters.filterEvaluationChangedAt; - Boolean filterMuted = parameters.filterMuted; - String filterRuleId = parameters.filterRuleId; - String filterRuleName = parameters.filterRuleName; - String filterResourceType = parameters.filterResourceType; - String filterResourceId = parameters.filterResourceId; - String filterDiscoveryTimestamp = parameters.filterDiscoveryTimestamp; - FindingEvaluation filterEvaluation = parameters.filterEvaluation; - FindingStatus filterStatus = parameters.filterStatus; - List filterVulnerabilityType = parameters.filterVulnerabilityType; - Boolean detailedFindings = parameters.detailedFindings; + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling importSecurityVulnerabilities"); + } // create path and map variables - String localVarPath = "/api/v2/posture_management/findings"; + String localVarPath = "/api/v2/security/vulnerabilities"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[evaluation_changed_at]", filterEvaluationChangedAt)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[muted]", filterMuted)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_id]", filterRuleId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_name]", filterRuleName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[resource_type]", filterResourceType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[@resource_id]", filterResourceId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[discovery_timestamp]", filterDiscoveryTimestamp)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[evaluation]", filterEvaluation)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("multi", "filter[vulnerability_type]", filterVulnerabilityType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "detailed_findings", detailedFindings)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listFindings", + "v2.SecurityMonitoringApi.importSecurityVulnerabilities", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * List findings. + * Import security vulnerabilities. * - *

See {@link #listFindingsWithHttpInfo}. + *

See {@link #importSecurityVulnerabilitiesWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<ListFindingsResponse>> + * @param body (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> listFindingsWithHttpInfoAsync( - ListFindingsOptionalParameters parameters) { + public CompletableFuture> importSecurityVulnerabilitiesWithHttpInfoAsync( + CycloneDXBom body) { // Check if unstable operation is enabled - String operationId = "listFindings"; + String operationId = "importSecurityVulnerabilities"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; - Long pageLimit = parameters.pageLimit; - Long snapshotTimestamp = parameters.snapshotTimestamp; - String pageCursor = parameters.pageCursor; - String filterTags = parameters.filterTags; - String filterEvaluationChangedAt = parameters.filterEvaluationChangedAt; - Boolean filterMuted = parameters.filterMuted; - String filterRuleId = parameters.filterRuleId; - String filterRuleName = parameters.filterRuleName; - String filterResourceType = parameters.filterResourceType; - String filterResourceId = parameters.filterResourceId; - String filterDiscoveryTimestamp = parameters.filterDiscoveryTimestamp; - FindingEvaluation filterEvaluation = parameters.filterEvaluation; - FindingStatus filterStatus = parameters.filterStatus; - List filterVulnerabilityType = parameters.filterVulnerabilityType; - Boolean detailedFindings = parameters.detailedFindings; + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling importSecurityVulnerabilities")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/posture_management/findings"; + String localVarPath = "/api/v2/security/vulnerabilities"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[evaluation_changed_at]", filterEvaluationChangedAt)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[muted]", filterMuted)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_id]", filterRuleId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_name]", filterRuleName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[resource_type]", filterResourceType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[@resource_id]", filterResourceId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[discovery_timestamp]", filterDiscoveryTimestamp)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[evaluation]", filterEvaluation)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("multi", "filter[vulnerability_type]", filterVulnerabilityType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "detailed_findings", detailedFindings)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listFindings", + "v2.SecurityMonitoringApi.importSecurityVulnerabilities", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } - /** Manage optional parameters to listHistoricalJobs. */ - public static class ListHistoricalJobsOptionalParameters { - private Long pageSize; + /** Manage optional parameters to listAssetsSBOMs. */ + public static class ListAssetsSBOMsOptionalParameters { + private String pageToken; private Long pageNumber; - private String sort; - private String filterQuery; + private AssetType filterAssetType; + private String filterAssetName; + private String filterPackageName; + private String filterPackageVersion; + private String filterLicenseName; + private SBOMComponentLicenseType filterLicenseType; /** - * Set pageSize. + * Set pageToken. * - * @param pageSize Number of items to return per page. The maximum allowed value is 100. - * (optional, default to 10) - * @return ListHistoricalJobsOptionalParameters + * @param pageToken Its value must come from the links section of the response of + * the first request. Do not manually edit it. (optional) + * @return ListAssetsSBOMsOptionalParameters */ - public ListHistoricalJobsOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; + public ListAssetsSBOMsOptionalParameters pageToken(String pageToken) { + this.pageToken = pageToken; return this; } /** * Set pageNumber. * - * @param pageNumber Specific page number to return. (optional, default to 0) - * @return ListHistoricalJobsOptionalParameters + * @param pageNumber The page number to be retrieved. It should be equal to or greater than 1. + * (optional) + * @return ListAssetsSBOMsOptionalParameters */ - public ListHistoricalJobsOptionalParameters pageNumber(Long pageNumber) { + public ListAssetsSBOMsOptionalParameters pageNumber(Long pageNumber) { this.pageNumber = pageNumber; return this; } /** - * Set sort. + * Set filterAssetType. * - * @param sort The order of the jobs in results. (optional) - * @return ListHistoricalJobsOptionalParameters + * @param filterAssetType The type of the assets for the SBOM request. Required for initial + * requests (when no page[token] is provided). Infrastructure types (Host + * , HostImage, Image, ServerlessFunction) and + * code types (Repository, Service) cannot be mixed in the same + * request. (optional) + * @return ListAssetsSBOMsOptionalParameters */ - public ListHistoricalJobsOptionalParameters sort(String sort) { - this.sort = sort; + public ListAssetsSBOMsOptionalParameters filterAssetType(AssetType filterAssetType) { + this.filterAssetType = filterAssetType; return this; } /** - * Set filterQuery. + * Set filterAssetName. * - * @param filterQuery Query used to filter items from the fetched list. (optional) - * @return ListHistoricalJobsOptionalParameters + * @param filterAssetName The name of the asset for the SBOM request. (optional) + * @return ListAssetsSBOMsOptionalParameters */ - public ListHistoricalJobsOptionalParameters filterQuery(String filterQuery) { - this.filterQuery = filterQuery; + public ListAssetsSBOMsOptionalParameters filterAssetName(String filterAssetName) { + this.filterAssetName = filterAssetName; + return this; + } + + /** + * Set filterPackageName. + * + * @param filterPackageName The name of the component that is a dependency of an asset. + * (optional) + * @return ListAssetsSBOMsOptionalParameters + */ + public ListAssetsSBOMsOptionalParameters filterPackageName(String filterPackageName) { + this.filterPackageName = filterPackageName; + return this; + } + + /** + * Set filterPackageVersion. + * + * @param filterPackageVersion The version of the component that is a dependency of an asset. + * (optional) + * @return ListAssetsSBOMsOptionalParameters + */ + public ListAssetsSBOMsOptionalParameters filterPackageVersion(String filterPackageVersion) { + this.filterPackageVersion = filterPackageVersion; + return this; + } + + /** + * Set filterLicenseName. + * + * @param filterLicenseName The software license name of the component that is a dependency of + * an asset. (optional) + * @return ListAssetsSBOMsOptionalParameters + */ + public ListAssetsSBOMsOptionalParameters filterLicenseName(String filterLicenseName) { + this.filterLicenseName = filterLicenseName; + return this; + } + + /** + * Set filterLicenseType. + * + * @param filterLicenseType The software license type of the component that is a dependency of + * an asset. (optional) + * @return ListAssetsSBOMsOptionalParameters + */ + public ListAssetsSBOMsOptionalParameters filterLicenseType( + SBOMComponentLicenseType filterLicenseType) { + this.filterLicenseType = filterLicenseType; return this; } } /** - * List historical jobs. + * List assets SBOMs. * - *

See {@link #listHistoricalJobsWithHttpInfo}. + *

See {@link #listAssetsSBOMsWithHttpInfo}. * - * @return ListHistoricalJobsResponse + * @return ListAssetsSBOMsResponse * @throws ApiException if fails to make API call */ - public ListHistoricalJobsResponse listHistoricalJobs() throws ApiException { - return listHistoricalJobsWithHttpInfo(new ListHistoricalJobsOptionalParameters()).getData(); + public ListAssetsSBOMsResponse listAssetsSBOMs() throws ApiException { + return listAssetsSBOMsWithHttpInfo(new ListAssetsSBOMsOptionalParameters()).getData(); } /** - * List historical jobs. + * List assets SBOMs. * - *

See {@link #listHistoricalJobsWithHttpInfoAsync}. + *

See {@link #listAssetsSBOMsWithHttpInfoAsync}. * - * @return CompletableFuture<ListHistoricalJobsResponse> + * @return CompletableFuture<ListAssetsSBOMsResponse> */ - public CompletableFuture listHistoricalJobsAsync() { - return listHistoricalJobsWithHttpInfoAsync(new ListHistoricalJobsOptionalParameters()) + public CompletableFuture listAssetsSBOMsAsync() { + return listAssetsSBOMsWithHttpInfoAsync(new ListAssetsSBOMsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -20130,30 +20194,30 @@ public CompletableFuture listHistoricalJobsAsync() { } /** - * List historical jobs. + * List assets SBOMs. * - *

See {@link #listHistoricalJobsWithHttpInfo}. + *

See {@link #listAssetsSBOMsWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return ListHistoricalJobsResponse + * @return ListAssetsSBOMsResponse * @throws ApiException if fails to make API call */ - public ListHistoricalJobsResponse listHistoricalJobs( - ListHistoricalJobsOptionalParameters parameters) throws ApiException { - return listHistoricalJobsWithHttpInfo(parameters).getData(); + public ListAssetsSBOMsResponse listAssetsSBOMs(ListAssetsSBOMsOptionalParameters parameters) + throws ApiException { + return listAssetsSBOMsWithHttpInfo(parameters).getData(); } /** - * List historical jobs. + * List assets SBOMs. * - *

See {@link #listHistoricalJobsWithHttpInfoAsync}. + *

See {@link #listAssetsSBOMsWithHttpInfoAsync}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ListHistoricalJobsResponse> + * @return CompletableFuture<ListAssetsSBOMsResponse> */ - public CompletableFuture listHistoricalJobsAsync( - ListHistoricalJobsOptionalParameters parameters) { - return listHistoricalJobsWithHttpInfoAsync(parameters) + public CompletableFuture listAssetsSBOMsAsync( + ListAssetsSBOMsOptionalParameters parameters) { + return listAssetsSBOMsWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -20161,49 +20225,79 @@ public CompletableFuture listHistoricalJobsAsync( } /** - * List historical jobs. + * Get a list of assets SBOMs for an organization. + * + *

The filter[asset_type] parameter is required for initial requests (when no + * page[token] is provided). Subsequent pages encode the asset type in the pagination + * token, so filter[asset_type] is not required for paginated requests. Mixing + * infrastructure asset types (Host, HostImage, Image, + * ServerlessFunction) with code asset types (Repository, Service + * ) in the same request is not supported and returns a 400 error. + * + *

Pagination

+ * + *

Please review the Pagination section for the "List + * Vulnerabilities" endpoint. + * + *

Filtering

+ * + *

Please review the Filtering section for the "List Vulnerabilities" + * endpoint. + * + *

Metadata

+ * + *

Please review the Metadata section for the "List Vulnerabilities" + * endpoint. * * @param parameters Optional parameters for the request. - * @return ApiResponse<ListHistoricalJobsResponse> + * @return ApiResponse<ListAssetsSBOMsResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * - * + * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
400 Bad request: The server cannot process the request due to invalid syntax in the request. -
403 Forbidden: Access denied -
404 Not found: asset not found -
429 Too many requests -
*/ - public ApiResponse listHistoricalJobsWithHttpInfo( - ListHistoricalJobsOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "listHistoricalJobs"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse listAssetsSBOMsWithHttpInfo( + ListAssetsSBOMsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; - Long pageSize = parameters.pageSize; + String pageToken = parameters.pageToken; Long pageNumber = parameters.pageNumber; - String sort = parameters.sort; - String filterQuery = parameters.filterQuery; + AssetType filterAssetType = parameters.filterAssetType; + String filterAssetName = parameters.filterAssetName; + String filterPackageName = parameters.filterPackageName; + String filterPackageVersion = parameters.filterPackageVersion; + String filterLicenseName = parameters.filterLicenseName; + SBOMComponentLicenseType filterLicenseType = parameters.filterLicenseType; // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/jobs"; + String localVarPath = "/api/v2/security/sboms"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset_type]", filterAssetType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset_name]", filterAssetName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[package_name]", filterPackageName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[package_version]", filterPackageVersion)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[license_name]", filterLicenseName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[license_type]", filterLicenseType)); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listHistoricalJobs", + "v2.SecurityMonitoringApi.listAssetsSBOMs", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -20218,50 +20312,54 @@ public ApiResponse listHistoricalJobsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List historical jobs. + * List assets SBOMs. * - *

See {@link #listHistoricalJobsWithHttpInfo}. + *

See {@link #listAssetsSBOMsWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<ListHistoricalJobsResponse>> + * @return CompletableFuture<ApiResponse<ListAssetsSBOMsResponse>> */ - public CompletableFuture> - listHistoricalJobsWithHttpInfoAsync(ListHistoricalJobsOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "listHistoricalJobs"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> listAssetsSBOMsWithHttpInfoAsync( + ListAssetsSBOMsOptionalParameters parameters) { Object localVarPostBody = null; - Long pageSize = parameters.pageSize; + String pageToken = parameters.pageToken; Long pageNumber = parameters.pageNumber; - String sort = parameters.sort; - String filterQuery = parameters.filterQuery; + AssetType filterAssetType = parameters.filterAssetType; + String filterAssetName = parameters.filterAssetName; + String filterPackageName = parameters.filterPackageName; + String filterPackageVersion = parameters.filterPackageVersion; + String filterLicenseName = parameters.filterLicenseName; + SBOMComponentLicenseType filterLicenseType = parameters.filterLicenseType; // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/jobs"; + String localVarPath = "/api/v2/security/sboms"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset_type]", filterAssetType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset_name]", filterAssetName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[package_name]", filterPackageName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[package_version]", filterPackageVersion)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[license_name]", filterLicenseName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[license_type]", filterLicenseType)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listHistoricalJobs", + "v2.SecurityMonitoringApi.listAssetsSBOMs", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -20269,7 +20367,7 @@ public ApiResponse listHistoricalJobsWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -20281,168 +20379,224 @@ public ApiResponse listHistoricalJobsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listIndicatorsOfCompromise. */ - public static class ListIndicatorsOfCompromiseOptionalParameters { - private Integer limit; - private Integer offset; - private String query; - private String sortColumn; - private String sortOrder; - private Boolean ocsf; - private String workedBy; - private IoCTriageState triageState; + /** Manage optional parameters to listFindings. */ + public static class ListFindingsOptionalParameters { + private Long pageLimit; + private Long snapshotTimestamp; + private String pageCursor; + private String filterTags; + private String filterEvaluationChangedAt; + private Boolean filterMuted; + private String filterRuleId; + private String filterRuleName; + private String filterResourceType; + private String filterResourceId; + private String filterDiscoveryTimestamp; + private FindingEvaluation filterEvaluation; + private FindingStatus filterStatus; + private List filterVulnerabilityType; + private Boolean detailedFindings; /** - * Set limit. + * Set pageLimit. * - * @param limit Number of results per page. (optional, default to 50) - * @return ListIndicatorsOfCompromiseOptionalParameters + * @param pageLimit Limit the number of findings returned. Must be <= 1000. (optional, + * default to 100) + * @return ListFindingsOptionalParameters */ - public ListIndicatorsOfCompromiseOptionalParameters limit(Integer limit) { - this.limit = limit; + public ListFindingsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; return this; } /** - * Set offset. + * Set snapshotTimestamp. * - * @param offset Pagination offset. (optional, default to 0) - * @return ListIndicatorsOfCompromiseOptionalParameters + * @param snapshotTimestamp Return findings for a given snapshot of time (Unix ms). (optional) + * @return ListFindingsOptionalParameters */ - public ListIndicatorsOfCompromiseOptionalParameters offset(Integer offset) { - this.offset = offset; + public ListFindingsOptionalParameters snapshotTimestamp(Long snapshotTimestamp) { + this.snapshotTimestamp = snapshotTimestamp; return this; } /** - * Set query. + * Set pageCursor. * - * @param query Search/filter query (supports field:value syntax). (optional) - * @return ListIndicatorsOfCompromiseOptionalParameters + * @param pageCursor Return the next page of findings pointed to by the cursor. (optional) + * @return ListFindingsOptionalParameters */ - public ListIndicatorsOfCompromiseOptionalParameters query(String query) { - this.query = query; + public ListFindingsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; return this; } /** - * Set sortColumn. + * Set filterTags. * - * @param sortColumn Sort column: score, first_seen_ts_epoch, last_seen_ts_epoch, indicator, - * indicator_type, signal_count, log_count, category, as_type. (optional, default to - * "score") - * @return ListIndicatorsOfCompromiseOptionalParameters + * @param filterTags Return findings that have these associated tags (repeatable). (optional) + * @return ListFindingsOptionalParameters */ - public ListIndicatorsOfCompromiseOptionalParameters sortColumn(String sortColumn) { - this.sortColumn = sortColumn; + public ListFindingsOptionalParameters filterTags(String filterTags) { + this.filterTags = filterTags; return this; } /** - * Set sortOrder. + * Set filterEvaluationChangedAt. * - * @param sortOrder Sort order: asc or desc. (optional, default to "desc") - * @return ListIndicatorsOfCompromiseOptionalParameters + * @param filterEvaluationChangedAt Return findings that have changed from pass to fail or vice + * versa on a specified date (Unix ms) or date range (using comparison operators). + * (optional) + * @return ListFindingsOptionalParameters */ - public ListIndicatorsOfCompromiseOptionalParameters sortOrder(String sortOrder) { - this.sortOrder = sortOrder; + public ListFindingsOptionalParameters filterEvaluationChangedAt( + String filterEvaluationChangedAt) { + this.filterEvaluationChangedAt = filterEvaluationChangedAt; return this; } /** - * Set ocsf. + * Set filterMuted. * - * @param ocsf When true, return only OCSF field-based matches. When false, return - * regex/message-based matches. (optional, default to true) - * @return ListIndicatorsOfCompromiseOptionalParameters + * @param filterMuted Set to true to return findings that are muted. Set to + * false to return unmuted findings. (optional) + * @return ListFindingsOptionalParameters */ - public ListIndicatorsOfCompromiseOptionalParameters ocsf(Boolean ocsf) { - this.ocsf = ocsf; + public ListFindingsOptionalParameters filterMuted(Boolean filterMuted) { + this.filterMuted = filterMuted; return this; } /** - * Set workedBy. + * Set filterRuleId. * - * @param workedBy Filter indicators whose triage state was updated by a specific user - * identified by their handle. (optional) - * @return ListIndicatorsOfCompromiseOptionalParameters + * @param filterRuleId Return findings for the specified rule ID. (optional) + * @return ListFindingsOptionalParameters */ - public ListIndicatorsOfCompromiseOptionalParameters workedBy(String workedBy) { - this.workedBy = workedBy; + public ListFindingsOptionalParameters filterRuleId(String filterRuleId) { + this.filterRuleId = filterRuleId; return this; } /** - * Set triageState. + * Set filterRuleName. * - * @param triageState Filter by triage state. (optional) - * @return ListIndicatorsOfCompromiseOptionalParameters + * @param filterRuleName Return findings for the specified rule. (optional) + * @return ListFindingsOptionalParameters */ - public ListIndicatorsOfCompromiseOptionalParameters triageState(IoCTriageState triageState) { - this.triageState = triageState; + public ListFindingsOptionalParameters filterRuleName(String filterRuleName) { + this.filterRuleName = filterRuleName; return this; } - } - - /** - * List indicators of compromise. - * - *

See {@link #listIndicatorsOfCompromiseWithHttpInfo}. - * - * @return IoCExplorerListResponse - * @throws ApiException if fails to make API call - */ - public IoCExplorerListResponse listIndicatorsOfCompromise() throws ApiException { - return listIndicatorsOfCompromiseWithHttpInfo( - new ListIndicatorsOfCompromiseOptionalParameters()) - .getData(); - } - /** - * List indicators of compromise. - * - *

See {@link #listIndicatorsOfCompromiseWithHttpInfoAsync}. - * - * @return CompletableFuture<IoCExplorerListResponse> - */ - public CompletableFuture listIndicatorsOfCompromiseAsync() { - return listIndicatorsOfCompromiseWithHttpInfoAsync( - new ListIndicatorsOfCompromiseOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } + /** + * Set filterResourceType. + * + * @param filterResourceType Return only findings for the specified resource type. (optional) + * @return ListFindingsOptionalParameters + */ + public ListFindingsOptionalParameters filterResourceType(String filterResourceType) { + this.filterResourceType = filterResourceType; + return this; + } - /** - * List indicators of compromise. - * - *

See {@link #listIndicatorsOfCompromiseWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return IoCExplorerListResponse + /** + * Set filterResourceId. + * + * @param filterResourceId Return only findings for the specified resource id. (optional) + * @return ListFindingsOptionalParameters + */ + public ListFindingsOptionalParameters filterResourceId(String filterResourceId) { + this.filterResourceId = filterResourceId; + return this; + } + + /** + * Set filterDiscoveryTimestamp. + * + * @param filterDiscoveryTimestamp Return findings that were found on a specified date (Unix ms) + * or date range (using comparison operators). (optional) + * @return ListFindingsOptionalParameters + */ + public ListFindingsOptionalParameters filterDiscoveryTimestamp( + String filterDiscoveryTimestamp) { + this.filterDiscoveryTimestamp = filterDiscoveryTimestamp; + return this; + } + + /** + * Set filterEvaluation. + * + * @param filterEvaluation Return only pass or fail findings. + * (optional) + * @return ListFindingsOptionalParameters + */ + public ListFindingsOptionalParameters filterEvaluation(FindingEvaluation filterEvaluation) { + this.filterEvaluation = filterEvaluation; + return this; + } + + /** + * Set filterStatus. + * + * @param filterStatus Return only findings with the specified status. (optional) + * @return ListFindingsOptionalParameters + */ + public ListFindingsOptionalParameters filterStatus(FindingStatus filterStatus) { + this.filterStatus = filterStatus; + return this; + } + + /** + * Set filterVulnerabilityType. + * + * @param filterVulnerabilityType Return findings that match the selected vulnerability types + * (repeatable). (optional) + * @return ListFindingsOptionalParameters + */ + public ListFindingsOptionalParameters filterVulnerabilityType( + List filterVulnerabilityType) { + this.filterVulnerabilityType = filterVulnerabilityType; + return this; + } + + /** + * Set detailedFindings. + * + * @param detailedFindings Return additional fields for some findings. (optional) + * @return ListFindingsOptionalParameters + */ + public ListFindingsOptionalParameters detailedFindings(Boolean detailedFindings) { + this.detailedFindings = detailedFindings; + return this; + } + } + + /** + * List findings. + * + *

See {@link #listFindingsWithHttpInfo}. + * + * @return ListFindingsResponse * @throws ApiException if fails to make API call */ - public IoCExplorerListResponse listIndicatorsOfCompromise( - ListIndicatorsOfCompromiseOptionalParameters parameters) throws ApiException { - return listIndicatorsOfCompromiseWithHttpInfo(parameters).getData(); + public ListFindingsResponse listFindings() throws ApiException { + return listFindingsWithHttpInfo(new ListFindingsOptionalParameters()).getData(); } /** - * List indicators of compromise. + * List findings. * - *

See {@link #listIndicatorsOfCompromiseWithHttpInfoAsync}. + *

See {@link #listFindingsWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IoCExplorerListResponse> + * @return CompletableFuture<ListFindingsResponse> */ - public CompletableFuture listIndicatorsOfCompromiseAsync( - ListIndicatorsOfCompromiseOptionalParameters parameters) { - return listIndicatorsOfCompromiseWithHttpInfoAsync(parameters) + public CompletableFuture listFindingsAsync() { + return listFindingsWithHttpInfoAsync(new ListFindingsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -20450,374 +20604,413 @@ public CompletableFuture listIndicatorsOfCompromiseAsyn } /** - * Get a list of indicators of compromise (IoCs) matching the specified filters. + * List findings. + * + *

See {@link #listFindingsWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return ApiResponse<IoCExplorerListResponse> + * @return ListFindingsResponse * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
*/ - public ApiResponse listIndicatorsOfCompromiseWithHttpInfo( - ListIndicatorsOfCompromiseOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "listIndicatorsOfCompromise"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = null; - Integer limit = parameters.limit; - Integer offset = parameters.offset; - String query = parameters.query; - String sortColumn = parameters.sortColumn; - String sortOrder = parameters.sortOrder; - Boolean ocsf = parameters.ocsf; - String workedBy = parameters.workedBy; - IoCTriageState triageState = parameters.triageState; - // create path and map variables - String localVarPath = "/api/v2/security/siem/ioc-explorer"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort[column]", sortColumn)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort[order]", sortOrder)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "ocsf", ocsf)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "worked_by", workedBy)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "triage_state", triageState)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.listIndicatorsOfCompromise", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + public ListFindingsResponse listFindings(ListFindingsOptionalParameters parameters) + throws ApiException { + return listFindingsWithHttpInfo(parameters).getData(); } /** - * List indicators of compromise. + * List findings. * - *

See {@link #listIndicatorsOfCompromiseWithHttpInfo}. + *

See {@link #listFindingsWithHttpInfoAsync}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IoCExplorerListResponse>> + * @return CompletableFuture<ListFindingsResponse> */ - public CompletableFuture> - listIndicatorsOfCompromiseWithHttpInfoAsync( - ListIndicatorsOfCompromiseOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "listIndicatorsOfCompromise"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = null; - Integer limit = parameters.limit; - Integer offset = parameters.offset; - String query = parameters.query; - String sortColumn = parameters.sortColumn; - String sortOrder = parameters.sortOrder; - Boolean ocsf = parameters.ocsf; - String workedBy = parameters.workedBy; - IoCTriageState triageState = parameters.triageState; - // create path and map variables - String localVarPath = "/api/v2/security/siem/ioc-explorer"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort[column]", sortColumn)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort[order]", sortOrder)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "ocsf", ocsf)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "worked_by", workedBy)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "triage_state", triageState)); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.listIndicatorsOfCompromise", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); + public CompletableFuture listFindingsAsync( + ListFindingsOptionalParameters parameters) { + return listFindingsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); } /** - * Ruleset get multiple. + * List findings. * - *

See {@link #listMultipleRulesetsWithHttpInfo}. + *

See {@link #listFindingsWithHttpInfo}. * - * @param body (required) - * @return GetMultipleRulesetsResponse - * @throws ApiException if fails to make API call + * @return PaginationIterable<Finding> */ - public GetMultipleRulesetsResponse listMultipleRulesets(GetMultipleRulesetsRequest body) - throws ApiException { - return listMultipleRulesetsWithHttpInfo(body).getData(); + public PaginationIterable listFindingsWithPagination() { + ListFindingsOptionalParameters parameters = new ListFindingsOptionalParameters(); + return listFindingsWithPagination(parameters); } /** - * Ruleset get multiple. + * List findings. * - *

See {@link #listMultipleRulesetsWithHttpInfoAsync}. + *

See {@link #listFindingsWithHttpInfo}. * - * @param body (required) - * @return CompletableFuture<GetMultipleRulesetsResponse> + * @return ListFindingsResponse */ - public CompletableFuture listMultipleRulesetsAsync( - GetMultipleRulesetsRequest body) { - return listMultipleRulesetsWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + public PaginationIterable listFindingsWithPagination( + ListFindingsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getCursor"; + String valueSetterPath = "pageCursor"; + Boolean valueSetterParamOptional = true; + Long limit; + + if (parameters.pageLimit == null) { + limit = 100l; + parameters.pageLimit(limit); + } else { + limit = parameters.pageLimit; + } + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); + + PaginationIterable iterator = + new PaginationIterable( + this, + "listFindings", + resultsPath, + valueGetterPath, + valueSetterPath, + valueSetterParamOptional, + true, + true, + limit, + args, + 0); + + return iterator; } /** - * Get rules for multiple rulesets in batch. + * Get a list of findings. These include both misconfigurations and identity risks. * - * @param body (required) - * @return ApiResponse<GetMultipleRulesetsResponse> + *

Note: To filter and return only identity risks, add the following query + * parameter: ?filter[tags]=dd_rule_type:ciem + * + *

Filtering

+ * + *

Filters can be applied by appending query parameters to the URL. + * + *

    + *
  • Using a single filter: ?filter[attribute_key]=attribute_value + *
  • Chaining filters: + * ?filter[attribute_key]=attribute_value&filter[attribute_key]=attribute_value... + * + *
  • Filtering on tags: + * ?filter[tags]=tag_key:tag_value&filter[tags]=tag_key_2:tag_value_2 + *
+ * + *

Here, attribute_key can be any of the filter keys described further below. + * + *

Query parameters of type integer support comparison operators (> + * , >=, <, <=). This is particularly + * useful when filtering by evaluation_changed_at or + * resource_discovery_timestamp. For example: + * ?filter[evaluation_changed_at]=>20123123121. + * + *

You can also use the negation operator on strings. For example, use + * filter[resource_type]=-aws* to filter for any non-AWS resources. + * + *

The operator must come after the equal sign. For example, to filter with the >= + * operator, add the operator after the equal sign: + * filter[evaluation_changed_at]=>=1678809373257. + * + *

Query parameters must be only among the documented ones and with values of correct types. + * Duplicated query parameters (e.g. filter[status]=low&filter[status]=info) are + * not allowed. + * + *

Additional extension fields

+ * + *

Additional extension fields are available for some findings. + * + *

The data is available when you include the query parameter ?detailed_findings=true + * in the request. + * + *

The following fields are available for findings: - external_id: The resource + * external ID related to the finding. - description: The description and remediation + * steps for the finding. - datadog_link: The Datadog relative link for the finding. + * - ip_addresses: The list of private IP addresses for the resource related to the + * finding. + * + *

Response

+ * + *

The response includes an array of finding objects, pagination metadata, and a count of items + * that match the query. + * + *

Each finding object contains the following: + * + *

    + *
  • The finding ID that can be used in a GetFinding request to retrieve the full + * finding details. + *
  • Core attributes, including status, evaluation, high-level resource details, muted state, + * and rule details. + *
  • evaluation_changed_at and resource_discovery_date time stamps. + *
  • An array of associated tags. + *
+ * + * @param parameters Optional parameters for the request. + * @return ApiResponse<ListFindingsResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * + * + * + * + * *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
400 Bad Request: The server cannot process the request due to invalid syntax in the request. -
403 Forbidden: Access denied -
404 Not Found: The requested finding cannot be found. -
429 Too many requests: The rate limit set by the API has been exceeded. -
*/ - public ApiResponse listMultipleRulesetsWithHttpInfo( - GetMultipleRulesetsRequest body) throws ApiException { + public ApiResponse listFindingsWithHttpInfo( + ListFindingsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listMultipleRulesets"; + String operationId = "listFindings"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling listMultipleRulesets"); - } + Object localVarPostBody = null; + Long pageLimit = parameters.pageLimit; + Long snapshotTimestamp = parameters.snapshotTimestamp; + String pageCursor = parameters.pageCursor; + String filterTags = parameters.filterTags; + String filterEvaluationChangedAt = parameters.filterEvaluationChangedAt; + Boolean filterMuted = parameters.filterMuted; + String filterRuleId = parameters.filterRuleId; + String filterRuleName = parameters.filterRuleName; + String filterResourceType = parameters.filterResourceType; + String filterResourceId = parameters.filterResourceId; + String filterDiscoveryTimestamp = parameters.filterDiscoveryTimestamp; + FindingEvaluation filterEvaluation = parameters.filterEvaluation; + FindingStatus filterStatus = parameters.filterStatus; + List filterVulnerabilityType = parameters.filterVulnerabilityType; + Boolean detailedFindings = parameters.detailedFindings; // create path and map variables - String localVarPath = "/api/v2/static-analysis/rulesets"; + String localVarPath = "/api/v2/posture_management/findings"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[evaluation_changed_at]", filterEvaluationChangedAt)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[muted]", filterMuted)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_id]", filterRuleId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_name]", filterRuleName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[resource_type]", filterResourceType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[@resource_id]", filterResourceId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[discovery_timestamp]", filterDiscoveryTimestamp)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[evaluation]", filterEvaluation)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[vulnerability_type]", filterVulnerabilityType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "detailed_findings", detailedFindings)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listMultipleRulesets", + "v2.SecurityMonitoringApi.listFindings", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "POST", + "GET", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Ruleset get multiple. + * List findings. * - *

See {@link #listMultipleRulesetsWithHttpInfo}. + *

See {@link #listFindingsWithHttpInfo}. * - * @param body (required) - * @return CompletableFuture<ApiResponse<GetMultipleRulesetsResponse>> + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<ListFindingsResponse>> */ - public CompletableFuture> - listMultipleRulesetsWithHttpInfoAsync(GetMultipleRulesetsRequest body) { + public CompletableFuture> listFindingsWithHttpInfoAsync( + ListFindingsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listMultipleRulesets"; + String operationId = "listFindings"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling listMultipleRulesets")); - return result; - } + Object localVarPostBody = null; + Long pageLimit = parameters.pageLimit; + Long snapshotTimestamp = parameters.snapshotTimestamp; + String pageCursor = parameters.pageCursor; + String filterTags = parameters.filterTags; + String filterEvaluationChangedAt = parameters.filterEvaluationChangedAt; + Boolean filterMuted = parameters.filterMuted; + String filterRuleId = parameters.filterRuleId; + String filterRuleName = parameters.filterRuleName; + String filterResourceType = parameters.filterResourceType; + String filterResourceId = parameters.filterResourceId; + String filterDiscoveryTimestamp = parameters.filterDiscoveryTimestamp; + FindingEvaluation filterEvaluation = parameters.filterEvaluation; + FindingStatus filterStatus = parameters.filterStatus; + List filterVulnerabilityType = parameters.filterVulnerabilityType; + Boolean detailedFindings = parameters.detailedFindings; // create path and map variables - String localVarPath = "/api/v2/static-analysis/rulesets"; + String localVarPath = "/api/v2/posture_management/findings"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "snapshot_timestamp", snapshotTimestamp)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[evaluation_changed_at]", filterEvaluationChangedAt)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[muted]", filterMuted)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_id]", filterRuleId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[rule_name]", filterRuleName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[resource_type]", filterResourceType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[@resource_id]", filterResourceId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[discovery_timestamp]", filterDiscoveryTimestamp)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[evaluation]", filterEvaluation)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[vulnerability_type]", filterVulnerabilityType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "detailed_findings", detailedFindings)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listMultipleRulesets", + "v2.SecurityMonitoringApi.listFindings", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "POST", + "GET", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listSampleLogGenerationSubscriptions. */ - public static class ListSampleLogGenerationSubscriptionsOptionalParameters { - private SampleLogGenerationSubscriptionsStatusFilter status; - private OffsetDateTime startTimestamp; - private OffsetDateTime endTimestamp; + /** Manage optional parameters to listHistoricalJobs. */ + public static class ListHistoricalJobsOptionalParameters { + private Long pageSize; + private Long pageNumber; + private String sort; + private String filterQuery; /** - * Set status. + * Set pageSize. * - * @param status Filter the subscriptions by status. Use active to return only - * currently active subscriptions, or all to return every subscription - * including expired ones. Ignored when start_timestamp is provided. Defaults - * to active. (optional, default to "active") - * @return ListSampleLogGenerationSubscriptionsOptionalParameters + * @param pageSize Number of items to return per page. The maximum allowed value is 100. + * (optional, default to 10) + * @return ListHistoricalJobsOptionalParameters */ - public ListSampleLogGenerationSubscriptionsOptionalParameters status( - SampleLogGenerationSubscriptionsStatusFilter status) { - this.status = status; + public ListHistoricalJobsOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; return this; } /** - * Set startTimestamp. + * Set pageNumber. * - * @param startTimestamp The start of the time range, as an RFC3339 timestamp. When provided, - * the response includes every subscription that was active at any point in - * [start_timestamp, end_timestamp], and the status filter is ignored. - * (optional) - * @return ListSampleLogGenerationSubscriptionsOptionalParameters + * @param pageNumber Specific page number to return. (optional, default to 0) + * @return ListHistoricalJobsOptionalParameters */ - public ListSampleLogGenerationSubscriptionsOptionalParameters startTimestamp( - OffsetDateTime startTimestamp) { - this.startTimestamp = startTimestamp; + public ListHistoricalJobsOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; return this; } /** - * Set endTimestamp. + * Set sort. * - * @param endTimestamp The end of the time range, as an RFC3339 timestamp. Ignored unless - * start_timestamp is set. Defaults to the current time when start_timestamp - * is provided. (optional) - * @return ListSampleLogGenerationSubscriptionsOptionalParameters + * @param sort The order of the jobs in results. (optional) + * @return ListHistoricalJobsOptionalParameters */ - public ListSampleLogGenerationSubscriptionsOptionalParameters endTimestamp( - OffsetDateTime endTimestamp) { - this.endTimestamp = endTimestamp; + public ListHistoricalJobsOptionalParameters sort(String sort) { + this.sort = sort; + return this; + } + + /** + * Set filterQuery. + * + * @param filterQuery Query used to filter items from the fetched list. (optional) + * @return ListHistoricalJobsOptionalParameters + */ + public ListHistoricalJobsOptionalParameters filterQuery(String filterQuery) { + this.filterQuery = filterQuery; return this; } } /** - * Get sample log generation subscriptions. + * List historical jobs. * - *

See {@link #listSampleLogGenerationSubscriptionsWithHttpInfo}. + *

See {@link #listHistoricalJobsWithHttpInfo}. * - * @return SampleLogGenerationSubscriptionsResponse + * @return ListHistoricalJobsResponse * @throws ApiException if fails to make API call */ - public SampleLogGenerationSubscriptionsResponse listSampleLogGenerationSubscriptions() - throws ApiException { - return listSampleLogGenerationSubscriptionsWithHttpInfo( - new ListSampleLogGenerationSubscriptionsOptionalParameters()) - .getData(); + public ListHistoricalJobsResponse listHistoricalJobs() throws ApiException { + return listHistoricalJobsWithHttpInfo(new ListHistoricalJobsOptionalParameters()).getData(); } /** - * Get sample log generation subscriptions. + * List historical jobs. * - *

See {@link #listSampleLogGenerationSubscriptionsWithHttpInfoAsync}. + *

See {@link #listHistoricalJobsWithHttpInfoAsync}. * - * @return CompletableFuture<SampleLogGenerationSubscriptionsResponse> + * @return CompletableFuture<ListHistoricalJobsResponse> */ - public CompletableFuture - listSampleLogGenerationSubscriptionsAsync() { - return listSampleLogGenerationSubscriptionsWithHttpInfoAsync( - new ListSampleLogGenerationSubscriptionsOptionalParameters()) + public CompletableFuture listHistoricalJobsAsync() { + return listHistoricalJobsWithHttpInfoAsync(new ListHistoricalJobsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -20825,31 +21018,30 @@ public SampleLogGenerationSubscriptionsResponse listSampleLogGenerationSubscript } /** - * Get sample log generation subscriptions. + * List historical jobs. * - *

See {@link #listSampleLogGenerationSubscriptionsWithHttpInfo}. + *

See {@link #listHistoricalJobsWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return SampleLogGenerationSubscriptionsResponse + * @return ListHistoricalJobsResponse * @throws ApiException if fails to make API call */ - public SampleLogGenerationSubscriptionsResponse listSampleLogGenerationSubscriptions( - ListSampleLogGenerationSubscriptionsOptionalParameters parameters) throws ApiException { - return listSampleLogGenerationSubscriptionsWithHttpInfo(parameters).getData(); + public ListHistoricalJobsResponse listHistoricalJobs( + ListHistoricalJobsOptionalParameters parameters) throws ApiException { + return listHistoricalJobsWithHttpInfo(parameters).getData(); } /** - * Get sample log generation subscriptions. + * List historical jobs. * - *

See {@link #listSampleLogGenerationSubscriptionsWithHttpInfoAsync}. + *

See {@link #listHistoricalJobsWithHttpInfoAsync}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<SampleLogGenerationSubscriptionsResponse> + * @return CompletableFuture<ListHistoricalJobsResponse> */ - public CompletableFuture - listSampleLogGenerationSubscriptionsAsync( - ListSampleLogGenerationSubscriptionsOptionalParameters parameters) { - return listSampleLogGenerationSubscriptionsWithHttpInfoAsync(parameters) + public CompletableFuture listHistoricalJobsAsync( + ListHistoricalJobsOptionalParameters parameters) { + return listHistoricalJobsWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -20857,17 +21049,10 @@ public SampleLogGenerationSubscriptionsResponse listSampleLogGenerationSubscript } /** - * Get the sample log generation subscriptions for the organization. Sample log generation injects - * representative example logs for a given Cloud SIEM content pack into the Logs platform, which - * can be used to test detection rules without onboarding the underlying integration first. - * - *

Availability: this endpoint is restricted to Cloud SIEM trial organizations - * on an eligible pricing model. Other organizations receive a 403 Forbidden - * (non-trial orgs) or a 400 Bad Request (feature disabled), and legacy pricing tiers - * receive a response with status: not_available. + * List historical jobs. * * @param parameters Optional parameters for the request. - * @return ApiResponse<SampleLogGenerationSubscriptionsResponse> + * @return ApiResponse<ListHistoricalJobsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -20879,33 +21064,34 @@ public SampleLogGenerationSubscriptionsResponse listSampleLogGenerationSubscript * *
429 Too many requests -
*/ - public ApiResponse - listSampleLogGenerationSubscriptionsWithHttpInfo( - ListSampleLogGenerationSubscriptionsOptionalParameters parameters) throws ApiException { + public ApiResponse listHistoricalJobsWithHttpInfo( + ListHistoricalJobsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listSampleLogGenerationSubscriptions"; + String operationId = "listHistoricalJobs"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - SampleLogGenerationSubscriptionsStatusFilter status = parameters.status; - OffsetDateTime startTimestamp = parameters.startTimestamp; - OffsetDateTime endTimestamp = parameters.endTimestamp; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + String sort = parameters.sort; + String filterQuery = parameters.filterQuery; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/sample_log_generation/subscriptions"; + String localVarPath = "/api/v2/siem-historical-detections/jobs"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_timestamp", startTimestamp)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_timestamp", endTimestamp)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSampleLogGenerationSubscriptions", + "v2.SecurityMonitoringApi.listHistoricalJobs", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -20920,50 +21106,50 @@ public SampleLogGenerationSubscriptionsResponse listSampleLogGenerationSubscript localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get sample log generation subscriptions. + * List historical jobs. * - *

See {@link #listSampleLogGenerationSubscriptionsWithHttpInfo}. + *

See {@link #listHistoricalJobsWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<SampleLogGenerationSubscriptionsResponse>> + * @return CompletableFuture<ApiResponse<ListHistoricalJobsResponse>> */ - public CompletableFuture> - listSampleLogGenerationSubscriptionsWithHttpInfoAsync( - ListSampleLogGenerationSubscriptionsOptionalParameters parameters) { + public CompletableFuture> + listHistoricalJobsWithHttpInfoAsync(ListHistoricalJobsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listSampleLogGenerationSubscriptions"; + String operationId = "listHistoricalJobs"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - SampleLogGenerationSubscriptionsStatusFilter status = parameters.status; - OffsetDateTime startTimestamp = parameters.startTimestamp; - OffsetDateTime endTimestamp = parameters.endTimestamp; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + String sort = parameters.sort; + String filterQuery = parameters.filterQuery; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/sample_log_generation/subscriptions"; + String localVarPath = "/api/v2/siem-historical-detections/jobs"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_timestamp", startTimestamp)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_timestamp", endTimestamp)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSampleLogGenerationSubscriptions", + "v2.SecurityMonitoringApi.listHistoricalJobs", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -20971,8 +21157,7 @@ public SampleLogGenerationSubscriptionsResponse listSampleLogGenerationSubscript new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -20984,113 +21169,137 @@ public SampleLogGenerationSubscriptionsResponse listSampleLogGenerationSubscript localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listScannedAssetsMetadata. */ - public static class ListScannedAssetsMetadataOptionalParameters { - private String pageToken; - private Long pageNumber; - private CloudAssetType filterAssetType; - private String filterAssetName; - private String filterLastSuccessOrigin; - private String filterLastSuccessEnv; + /** Manage optional parameters to listIndicatorsOfCompromise. */ + public static class ListIndicatorsOfCompromiseOptionalParameters { + private Integer limit; + private Integer offset; + private String query; + private String sortColumn; + private String sortOrder; + private Boolean ocsf; + private String workedBy; + private IoCTriageState triageState; /** - * Set pageToken. + * Set limit. * - * @param pageToken Its value must come from the links section of the response of - * the first request. Do not manually edit it. (optional) - * @return ListScannedAssetsMetadataOptionalParameters + * @param limit Number of results per page. (optional, default to 50) + * @return ListIndicatorsOfCompromiseOptionalParameters */ - public ListScannedAssetsMetadataOptionalParameters pageToken(String pageToken) { - this.pageToken = pageToken; + public ListIndicatorsOfCompromiseOptionalParameters limit(Integer limit) { + this.limit = limit; return this; } /** - * Set pageNumber. + * Set offset. * - * @param pageNumber The page number to be retrieved. It should be equal to or greater than 1. - * (optional) - * @return ListScannedAssetsMetadataOptionalParameters + * @param offset Pagination offset. (optional, default to 0) + * @return ListIndicatorsOfCompromiseOptionalParameters */ - public ListScannedAssetsMetadataOptionalParameters pageNumber(Long pageNumber) { - this.pageNumber = pageNumber; + public ListIndicatorsOfCompromiseOptionalParameters offset(Integer offset) { + this.offset = offset; return this; } /** - * Set filterAssetType. + * Set query. * - * @param filterAssetType The type of the scanned asset. (optional) - * @return ListScannedAssetsMetadataOptionalParameters + * @param query Search/filter query (supports field:value syntax). (optional) + * @return ListIndicatorsOfCompromiseOptionalParameters */ - public ListScannedAssetsMetadataOptionalParameters filterAssetType( - CloudAssetType filterAssetType) { - this.filterAssetType = filterAssetType; + public ListIndicatorsOfCompromiseOptionalParameters query(String query) { + this.query = query; return this; } /** - * Set filterAssetName. + * Set sortColumn. * - * @param filterAssetName The name of the scanned asset. (optional) - * @return ListScannedAssetsMetadataOptionalParameters + * @param sortColumn Sort column: score, first_seen_ts_epoch, last_seen_ts_epoch, indicator, + * indicator_type, signal_count, log_count, category, as_type. (optional, default to + * "score") + * @return ListIndicatorsOfCompromiseOptionalParameters */ - public ListScannedAssetsMetadataOptionalParameters filterAssetName(String filterAssetName) { - this.filterAssetName = filterAssetName; + public ListIndicatorsOfCompromiseOptionalParameters sortColumn(String sortColumn) { + this.sortColumn = sortColumn; return this; } /** - * Set filterLastSuccessOrigin. + * Set sortOrder. * - * @param filterLastSuccessOrigin The origin of last success scan. (optional) - * @return ListScannedAssetsMetadataOptionalParameters + * @param sortOrder Sort order: asc or desc. (optional, default to "desc") + * @return ListIndicatorsOfCompromiseOptionalParameters */ - public ListScannedAssetsMetadataOptionalParameters filterLastSuccessOrigin( - String filterLastSuccessOrigin) { - this.filterLastSuccessOrigin = filterLastSuccessOrigin; + public ListIndicatorsOfCompromiseOptionalParameters sortOrder(String sortOrder) { + this.sortOrder = sortOrder; return this; } /** - * Set filterLastSuccessEnv. + * Set ocsf. * - * @param filterLastSuccessEnv The environment of last success scan. (optional) - * @return ListScannedAssetsMetadataOptionalParameters + * @param ocsf When true, return only OCSF field-based matches. When false, return + * regex/message-based matches. (optional, default to true) + * @return ListIndicatorsOfCompromiseOptionalParameters */ - public ListScannedAssetsMetadataOptionalParameters filterLastSuccessEnv( - String filterLastSuccessEnv) { - this.filterLastSuccessEnv = filterLastSuccessEnv; + public ListIndicatorsOfCompromiseOptionalParameters ocsf(Boolean ocsf) { + this.ocsf = ocsf; + return this; + } + + /** + * Set workedBy. + * + * @param workedBy Filter indicators whose triage state was updated by a specific user + * identified by their handle. (optional) + * @return ListIndicatorsOfCompromiseOptionalParameters + */ + public ListIndicatorsOfCompromiseOptionalParameters workedBy(String workedBy) { + this.workedBy = workedBy; + return this; + } + + /** + * Set triageState. + * + * @param triageState Filter by triage state. (optional) + * @return ListIndicatorsOfCompromiseOptionalParameters + */ + public ListIndicatorsOfCompromiseOptionalParameters triageState(IoCTriageState triageState) { + this.triageState = triageState; return this; } } /** - * List scanned assets metadata. + * List indicators of compromise. * - *

See {@link #listScannedAssetsMetadataWithHttpInfo}. + *

See {@link #listIndicatorsOfCompromiseWithHttpInfo}. * - * @return ScannedAssetsMetadata + * @return IoCExplorerListResponse * @throws ApiException if fails to make API call */ - public ScannedAssetsMetadata listScannedAssetsMetadata() throws ApiException { - return listScannedAssetsMetadataWithHttpInfo(new ListScannedAssetsMetadataOptionalParameters()) + public IoCExplorerListResponse listIndicatorsOfCompromise() throws ApiException { + return listIndicatorsOfCompromiseWithHttpInfo( + new ListIndicatorsOfCompromiseOptionalParameters()) .getData(); } /** - * List scanned assets metadata. + * List indicators of compromise. * - *

See {@link #listScannedAssetsMetadataWithHttpInfoAsync}. + *

See {@link #listIndicatorsOfCompromiseWithHttpInfoAsync}. * - * @return CompletableFuture<ScannedAssetsMetadata> + * @return CompletableFuture<IoCExplorerListResponse> */ - public CompletableFuture listScannedAssetsMetadataAsync() { - return listScannedAssetsMetadataWithHttpInfoAsync( - new ListScannedAssetsMetadataOptionalParameters()) + public CompletableFuture listIndicatorsOfCompromiseAsync() { + return listIndicatorsOfCompromiseWithHttpInfoAsync( + new ListIndicatorsOfCompromiseOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -21098,30 +21307,30 @@ public CompletableFuture listScannedAssetsMetadataAsync() } /** - * List scanned assets metadata. + * List indicators of compromise. * - *

See {@link #listScannedAssetsMetadataWithHttpInfo}. + *

See {@link #listIndicatorsOfCompromiseWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return ScannedAssetsMetadata + * @return IoCExplorerListResponse * @throws ApiException if fails to make API call */ - public ScannedAssetsMetadata listScannedAssetsMetadata( - ListScannedAssetsMetadataOptionalParameters parameters) throws ApiException { - return listScannedAssetsMetadataWithHttpInfo(parameters).getData(); + public IoCExplorerListResponse listIndicatorsOfCompromise( + ListIndicatorsOfCompromiseOptionalParameters parameters) throws ApiException { + return listIndicatorsOfCompromiseWithHttpInfo(parameters).getData(); } /** - * List scanned assets metadata. + * List indicators of compromise. * - *

See {@link #listScannedAssetsMetadataWithHttpInfoAsync}. + *

See {@link #listIndicatorsOfCompromiseWithHttpInfoAsync}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ScannedAssetsMetadata> + * @return CompletableFuture<IoCExplorerListResponse> */ - public CompletableFuture listScannedAssetsMetadataAsync( - ListScannedAssetsMetadataOptionalParameters parameters) { - return listScannedAssetsMetadataWithHttpInfoAsync(parameters) + public CompletableFuture listIndicatorsOfCompromiseAsync( + ListIndicatorsOfCompromiseOptionalParameters parameters) { + return listIndicatorsOfCompromiseWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -21129,109 +21338,57 @@ public CompletableFuture listScannedAssetsMetadataAsync( } /** - * Get a list of security scanned assets metadata for an organization. - * - *

Pagination

- * - *

For the "List Vulnerabilities" endpoint, see the Pagination - * section. - * - *

Filtering

- * - *

For the "List Vulnerabilities" endpoint, see the Filtering section. - * - *

Metadata

- * - *

For the "List Vulnerabilities" endpoint, see the Metadata section. - * - *

Related endpoints

- * - *

This endpoint returns additional metadata for cloud resources that is not available from the - * standard resource endpoints. To access a richer dataset, call this endpoint together with the - * relevant resource endpoint(s) and merge (join) their results using the resource identifier. - * - *

Hosts - * - *

To enrich host data, join the response from the Hosts endpoint with the response from - * the scanned-assets-metadata endpoint on the following key fields: - * - *

| ENDPOINT | JOIN KEY | TYPE | | --- | --- | --- | | /api/v1/hosts | host_list.host_name | - * string | | /api/v2/security/scanned-assets-metadata | data.attributes.asset.name | string | - * - *

Host Images - * - *

To enrich host image data, join the response from the Hosts endpoint with the response from - * the scanned-assets-metadata endpoint on the following key fields: - * - *

| ENDPOINT | JOIN KEY | TYPE | | --- | --- | --- | | /api/v1/hosts | - * host_list.tags_by_source["Amazon Web Services"]["image"] | string | | - * /api/v2/security/scanned-assets-metadata | data.attributes.asset.name | string | - * - *

Container Images - * - *

To enrich container image data, join the response from the Container Images endpoint - * with the response from the scanned-assets-metadata endpoint on the following key fields: - * - *

| ENDPOINT | JOIN KEY | TYPE | | --- | --- | --- | | /api/v2/container_images | - * data.attributes.name@data.attributes.repo_digest | string | | - * /api/v2/security/scanned-assets-metadata | data.attributes.asset.name | string | + * Get a list of indicators of compromise (IoCs) matching the specified filters. * * @param parameters Optional parameters for the request. - * @return ApiResponse<ScannedAssetsMetadata> + * @return ApiResponse<IoCExplorerListResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * - * - * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad request: The server cannot process the request due to invalid syntax in the request. -
403 Forbidden: Access denied -
404 Not found: asset not found -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
*/ - public ApiResponse listScannedAssetsMetadataWithHttpInfo( - ListScannedAssetsMetadataOptionalParameters parameters) throws ApiException { + public ApiResponse listIndicatorsOfCompromiseWithHttpInfo( + ListIndicatorsOfCompromiseOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listScannedAssetsMetadata"; + String operationId = "listIndicatorsOfCompromise"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - String pageToken = parameters.pageToken; - Long pageNumber = parameters.pageNumber; - CloudAssetType filterAssetType = parameters.filterAssetType; - String filterAssetName = parameters.filterAssetName; - String filterLastSuccessOrigin = parameters.filterLastSuccessOrigin; - String filterLastSuccessEnv = parameters.filterLastSuccessEnv; + Integer limit = parameters.limit; + Integer offset = parameters.offset; + String query = parameters.query; + String sortColumn = parameters.sortColumn; + String sortOrder = parameters.sortOrder; + Boolean ocsf = parameters.ocsf; + String workedBy = parameters.workedBy; + IoCTriageState triageState = parameters.triageState; // create path and map variables - String localVarPath = "/api/v2/security/scanned-assets-metadata"; + String localVarPath = "/api/v2/security/siem/ioc-explorer"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.type]", filterAssetType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.name]", filterAssetName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[last_success.origin]", filterLastSuccessOrigin)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[last_success.env]", filterLastSuccessEnv)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort[column]", sortColumn)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort[order]", sortOrder)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ocsf", ocsf)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "worked_by", workedBy)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "triage_state", triageState)); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listScannedAssetsMetadata", + "v2.SecurityMonitoringApi.listIndicatorsOfCompromise", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -21246,59 +21403,59 @@ public ApiResponse listScannedAssetsMetadataWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List scanned assets metadata. + * List indicators of compromise. * - *

See {@link #listScannedAssetsMetadataWithHttpInfo}. + *

See {@link #listIndicatorsOfCompromiseWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<ScannedAssetsMetadata>> + * @return CompletableFuture<ApiResponse<IoCExplorerListResponse>> */ - public CompletableFuture> - listScannedAssetsMetadataWithHttpInfoAsync( - ListScannedAssetsMetadataOptionalParameters parameters) { + public CompletableFuture> + listIndicatorsOfCompromiseWithHttpInfoAsync( + ListIndicatorsOfCompromiseOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listScannedAssetsMetadata"; + String operationId = "listIndicatorsOfCompromise"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - String pageToken = parameters.pageToken; - Long pageNumber = parameters.pageNumber; - CloudAssetType filterAssetType = parameters.filterAssetType; - String filterAssetName = parameters.filterAssetName; - String filterLastSuccessOrigin = parameters.filterLastSuccessOrigin; - String filterLastSuccessEnv = parameters.filterLastSuccessEnv; + Integer limit = parameters.limit; + Integer offset = parameters.offset; + String query = parameters.query; + String sortColumn = parameters.sortColumn; + String sortOrder = parameters.sortOrder; + Boolean ocsf = parameters.ocsf; + String workedBy = parameters.workedBy; + IoCTriageState triageState = parameters.triageState; // create path and map variables - String localVarPath = "/api/v2/security/scanned-assets-metadata"; + String localVarPath = "/api/v2/security/siem/ioc-explorer"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.type]", filterAssetType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.name]", filterAssetName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[last_success.origin]", filterLastSuccessOrigin)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[last_success.env]", filterLastSuccessEnv)); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.listScannedAssetsMetadata", + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort[column]", sortColumn)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort[order]", sortOrder)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ocsf", ocsf)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "worked_by", workedBy)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "triage_state", triageState)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listIndicatorsOfCompromise", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -21306,7 +21463,7 @@ public ApiResponse listScannedAssetsMetadataWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -21318,30 +21475,34 @@ public ApiResponse listScannedAssetsMetadataWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get all security filters. + * Ruleset get multiple. * - *

See {@link #listSecurityFiltersWithHttpInfo}. + *

See {@link #listMultipleRulesetsWithHttpInfo}. * - * @return SecurityFiltersResponse + * @param body (required) + * @return GetMultipleRulesetsResponse * @throws ApiException if fails to make API call */ - public SecurityFiltersResponse listSecurityFilters() throws ApiException { - return listSecurityFiltersWithHttpInfo().getData(); + public GetMultipleRulesetsResponse listMultipleRulesets(GetMultipleRulesetsRequest body) + throws ApiException { + return listMultipleRulesetsWithHttpInfo(body).getData(); } /** - * Get all security filters. + * Ruleset get multiple. * - *

See {@link #listSecurityFiltersWithHttpInfoAsync}. + *

See {@link #listMultipleRulesetsWithHttpInfoAsync}. * - * @return CompletableFuture<SecurityFiltersResponse> + * @param body (required) + * @return CompletableFuture<GetMultipleRulesetsResponse> */ - public CompletableFuture listSecurityFiltersAsync() { - return listSecurityFiltersWithHttpInfoAsync() + public CompletableFuture listMultipleRulesetsAsync( + GetMultipleRulesetsRequest body) { + return listMultipleRulesetsWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -21349,30 +21510,43 @@ public CompletableFuture listSecurityFiltersAsync() { } /** - * Get the list of configured security filters with their definitions. + * Get rules for multiple rulesets in batch. * - * @return ApiResponse<SecurityFiltersResponse> + * @param body (required) + * @return ApiResponse<GetMultipleRulesetsResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * * *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
429 Too many requests -
*/ - public ApiResponse listSecurityFiltersWithHttpInfo() - throws ApiException { - Object localVarPostBody = null; + public ApiResponse listMultipleRulesetsWithHttpInfo( + GetMultipleRulesetsRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listMultipleRulesets"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling listMultipleRulesets"); + } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/security_filters"; + String localVarPath = "/api/v2/static-analysis/rulesets"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFilters", + "v2.SecurityMonitoringApi.listMultipleRulesets", localVarPath, new ArrayList(), localVarHeaderParams, @@ -21380,28 +21554,50 @@ public ApiResponse listSecurityFiltersWithHttpInfo() new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get all security filters. + * Ruleset get multiple. * - *

See {@link #listSecurityFiltersWithHttpInfo}. + *

See {@link #listMultipleRulesetsWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<SecurityFiltersResponse>> + * @param body (required) + * @return CompletableFuture<ApiResponse<GetMultipleRulesetsResponse>> */ - public CompletableFuture> - listSecurityFiltersWithHttpInfoAsync() { - Object localVarPostBody = null; + public CompletableFuture> + listMultipleRulesetsWithHttpInfoAsync(GetMultipleRulesetsRequest body) { + // Check if unstable operation is enabled + String operationId = "listMultipleRulesets"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling listMultipleRulesets")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/security_filters"; + String localVarPath = "/api/v2/static-analysis/rulesets"; Map localVarHeaderParams = new HashMap(); @@ -21409,7 +21605,7 @@ public ApiResponse listSecurityFiltersWithHttpInfo() try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFilters", + "v2.SecurityMonitoringApi.listMultipleRulesets", localVarPath, new ArrayList(), localVarHeaderParams, @@ -21417,42 +21613,99 @@ public ApiResponse listSecurityFiltersWithHttpInfo() new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to listSampleLogGenerationSubscriptions. */ + public static class ListSampleLogGenerationSubscriptionsOptionalParameters { + private SampleLogGenerationSubscriptionsStatusFilter status; + private OffsetDateTime startTimestamp; + private OffsetDateTime endTimestamp; + + /** + * Set status. + * + * @param status Filter the subscriptions by status. Use active to return only + * currently active subscriptions, or all to return every subscription + * including expired ones. Ignored when start_timestamp is provided. Defaults + * to active. (optional, default to "active") + * @return ListSampleLogGenerationSubscriptionsOptionalParameters + */ + public ListSampleLogGenerationSubscriptionsOptionalParameters status( + SampleLogGenerationSubscriptionsStatusFilter status) { + this.status = status; + return this; + } + + /** + * Set startTimestamp. + * + * @param startTimestamp The start of the time range, as an RFC3339 timestamp. When provided, + * the response includes every subscription that was active at any point in + * [start_timestamp, end_timestamp], and the status filter is ignored. + * (optional) + * @return ListSampleLogGenerationSubscriptionsOptionalParameters + */ + public ListSampleLogGenerationSubscriptionsOptionalParameters startTimestamp( + OffsetDateTime startTimestamp) { + this.startTimestamp = startTimestamp; + return this; + } + + /** + * Set endTimestamp. + * + * @param endTimestamp The end of the time range, as an RFC3339 timestamp. Ignored unless + * start_timestamp is set. Defaults to the current time when start_timestamp + * is provided. (optional) + * @return ListSampleLogGenerationSubscriptionsOptionalParameters + */ + public ListSampleLogGenerationSubscriptionsOptionalParameters endTimestamp( + OffsetDateTime endTimestamp) { + this.endTimestamp = endTimestamp; + return this; + } } /** - * Get the version history of security filters. + * Get sample log generation subscriptions. * - *

See {@link #listSecurityFilterVersionsWithHttpInfo}. + *

See {@link #listSampleLogGenerationSubscriptionsWithHttpInfo}. * - * @return SecurityFilterVersionsResponse + * @return SampleLogGenerationSubscriptionsResponse * @throws ApiException if fails to make API call */ - public SecurityFilterVersionsResponse listSecurityFilterVersions() throws ApiException { - return listSecurityFilterVersionsWithHttpInfo().getData(); + public SampleLogGenerationSubscriptionsResponse listSampleLogGenerationSubscriptions() + throws ApiException { + return listSampleLogGenerationSubscriptionsWithHttpInfo( + new ListSampleLogGenerationSubscriptionsOptionalParameters()) + .getData(); } /** - * Get the version history of security filters. + * Get sample log generation subscriptions. * - *

See {@link #listSecurityFilterVersionsWithHttpInfoAsync}. + *

See {@link #listSampleLogGenerationSubscriptionsWithHttpInfoAsync}. * - * @return CompletableFuture<SecurityFilterVersionsResponse> + * @return CompletableFuture<SampleLogGenerationSubscriptionsResponse> */ - public CompletableFuture listSecurityFilterVersionsAsync() { - return listSecurityFilterVersionsWithHttpInfoAsync() + public CompletableFuture + listSampleLogGenerationSubscriptionsAsync() { + return listSampleLogGenerationSubscriptionsWithHttpInfoAsync( + new ListSampleLogGenerationSubscriptionsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -21460,34 +21713,89 @@ public CompletableFuture listSecurityFilterVersi } /** - * Get the configured security filters at each historical version of the configuration. Each entry - * in the response represents the set of all security filters at a given version, ordered from the - * most recent version to the oldest. + * Get sample log generation subscriptions. * - * @return ApiResponse<SecurityFilterVersionsResponse> + *

See {@link #listSampleLogGenerationSubscriptionsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SampleLogGenerationSubscriptionsResponse + * @throws ApiException if fails to make API call + */ + public SampleLogGenerationSubscriptionsResponse listSampleLogGenerationSubscriptions( + ListSampleLogGenerationSubscriptionsOptionalParameters parameters) throws ApiException { + return listSampleLogGenerationSubscriptionsWithHttpInfo(parameters).getData(); + } + + /** + * Get sample log generation subscriptions. + * + *

See {@link #listSampleLogGenerationSubscriptionsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SampleLogGenerationSubscriptionsResponse> + */ + public CompletableFuture + listSampleLogGenerationSubscriptionsAsync( + ListSampleLogGenerationSubscriptionsOptionalParameters parameters) { + return listSampleLogGenerationSubscriptionsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the sample log generation subscriptions for the organization. Sample log generation injects + * representative example logs for a given Cloud SIEM content pack into the Logs platform, which + * can be used to test detection rules without onboarding the underlying integration first. + * + *

Availability: this endpoint is restricted to Cloud SIEM trial organizations + * on an eligible pricing model. Other organizations receive a 403 Forbidden + * (non-trial orgs) or a 400 Bad Request (feature disabled), and legacy pricing tiers + * receive a response with status: not_available. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<SampleLogGenerationSubscriptionsResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * + * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
*/ - public ApiResponse listSecurityFilterVersionsWithHttpInfo() - throws ApiException { - Object localVarPostBody = null; - // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/security_filters/versions"; - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = + public ApiResponse + listSampleLogGenerationSubscriptionsWithHttpInfo( + ListSampleLogGenerationSubscriptionsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listSampleLogGenerationSubscriptions"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + SampleLogGenerationSubscriptionsStatusFilter status = parameters.status; + OffsetDateTime startTimestamp = parameters.startTimestamp; + OffsetDateTime endTimestamp = parameters.endTimestamp; + // create path and map variables + String localVarPath = "/api/v2/security_monitoring/sample_log_generation/subscriptions"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_timestamp", startTimestamp)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_timestamp", endTimestamp)); + + Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFilterVersions", + "v2.SecurityMonitoringApi.listSampleLogGenerationSubscriptions", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -21500,37 +21808,58 @@ public ApiResponse listSecurityFilterVersionsWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get the version history of security filters. + * Get sample log generation subscriptions. * - *

See {@link #listSecurityFilterVersionsWithHttpInfo}. + *

See {@link #listSampleLogGenerationSubscriptionsWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<SecurityFilterVersionsResponse>> + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SampleLogGenerationSubscriptionsResponse>> */ - public CompletableFuture> - listSecurityFilterVersionsWithHttpInfoAsync() { + public CompletableFuture> + listSampleLogGenerationSubscriptionsWithHttpInfoAsync( + ListSampleLogGenerationSubscriptionsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listSampleLogGenerationSubscriptions"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; + SampleLogGenerationSubscriptionsStatusFilter status = parameters.status; + OffsetDateTime startTimestamp = parameters.startTimestamp; + OffsetDateTime endTimestamp = parameters.endTimestamp; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/security_filters/versions"; + String localVarPath = "/api/v2/security_monitoring/sample_log_generation/subscriptions"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_timestamp", startTimestamp)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_timestamp", endTimestamp)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFilterVersions", + "v2.SecurityMonitoringApi.listSampleLogGenerationSubscriptions", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -21543,83 +21872,113 @@ public ApiResponse listSecurityFilterVersionsWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listSecurityFindings. */ - public static class ListSecurityFindingsOptionalParameters { - private String filterQuery; - private String pageCursor; - private Long pageLimit; - private SecurityFindingsSort sort; + /** Manage optional parameters to listScannedAssetsMetadata. */ + public static class ListScannedAssetsMetadataOptionalParameters { + private String pageToken; + private Long pageNumber; + private CloudAssetType filterAssetType; + private String filterAssetName; + private String filterLastSuccessOrigin; + private String filterLastSuccessEnv; /** - * Set filterQuery. + * Set pageToken. * - * @param filterQuery The search query following log search syntax. (optional, default to "*") - * @return ListSecurityFindingsOptionalParameters + * @param pageToken Its value must come from the links section of the response of + * the first request. Do not manually edit it. (optional) + * @return ListScannedAssetsMetadataOptionalParameters */ - public ListSecurityFindingsOptionalParameters filterQuery(String filterQuery) { - this.filterQuery = filterQuery; + public ListScannedAssetsMetadataOptionalParameters pageToken(String pageToken) { + this.pageToken = pageToken; return this; } /** - * Set pageCursor. + * Set pageNumber. * - * @param pageCursor Get the next page of results with a cursor provided in the previous query. + * @param pageNumber The page number to be retrieved. It should be equal to or greater than 1. * (optional) - * @return ListSecurityFindingsOptionalParameters + * @return ListScannedAssetsMetadataOptionalParameters */ - public ListSecurityFindingsOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; + public ListScannedAssetsMetadataOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; return this; } /** - * Set pageLimit. + * Set filterAssetType. * - * @param pageLimit The maximum number of findings in the response. (optional, default to 10) - * @return ListSecurityFindingsOptionalParameters + * @param filterAssetType The type of the scanned asset. (optional) + * @return ListScannedAssetsMetadataOptionalParameters */ - public ListSecurityFindingsOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; + public ListScannedAssetsMetadataOptionalParameters filterAssetType( + CloudAssetType filterAssetType) { + this.filterAssetType = filterAssetType; return this; } /** - * Set sort. + * Set filterAssetName. * - * @param sort Sorts by @detection_changed_at. (optional, default to "-@detection_changed_at") - * @return ListSecurityFindingsOptionalParameters + * @param filterAssetName The name of the scanned asset. (optional) + * @return ListScannedAssetsMetadataOptionalParameters */ - public ListSecurityFindingsOptionalParameters sort(SecurityFindingsSort sort) { - this.sort = sort; + public ListScannedAssetsMetadataOptionalParameters filterAssetName(String filterAssetName) { + this.filterAssetName = filterAssetName; + return this; + } + + /** + * Set filterLastSuccessOrigin. + * + * @param filterLastSuccessOrigin The origin of last success scan. (optional) + * @return ListScannedAssetsMetadataOptionalParameters + */ + public ListScannedAssetsMetadataOptionalParameters filterLastSuccessOrigin( + String filterLastSuccessOrigin) { + this.filterLastSuccessOrigin = filterLastSuccessOrigin; + return this; + } + + /** + * Set filterLastSuccessEnv. + * + * @param filterLastSuccessEnv The environment of last success scan. (optional) + * @return ListScannedAssetsMetadataOptionalParameters + */ + public ListScannedAssetsMetadataOptionalParameters filterLastSuccessEnv( + String filterLastSuccessEnv) { + this.filterLastSuccessEnv = filterLastSuccessEnv; return this; } } /** - * List security findings. + * List scanned assets metadata. * - *

See {@link #listSecurityFindingsWithHttpInfo}. + *

See {@link #listScannedAssetsMetadataWithHttpInfo}. * - * @return ListSecurityFindingsResponse + * @return ScannedAssetsMetadata * @throws ApiException if fails to make API call */ - public ListSecurityFindingsResponse listSecurityFindings() throws ApiException { - return listSecurityFindingsWithHttpInfo(new ListSecurityFindingsOptionalParameters()).getData(); + public ScannedAssetsMetadata listScannedAssetsMetadata() throws ApiException { + return listScannedAssetsMetadataWithHttpInfo(new ListScannedAssetsMetadataOptionalParameters()) + .getData(); } /** - * List security findings. + * List scanned assets metadata. * - *

See {@link #listSecurityFindingsWithHttpInfoAsync}. + *

See {@link #listScannedAssetsMetadataWithHttpInfoAsync}. * - * @return CompletableFuture<ListSecurityFindingsResponse> + * @return CompletableFuture<ScannedAssetsMetadata> */ - public CompletableFuture listSecurityFindingsAsync() { - return listSecurityFindingsWithHttpInfoAsync(new ListSecurityFindingsOptionalParameters()) + public CompletableFuture listScannedAssetsMetadataAsync() { + return listScannedAssetsMetadataWithHttpInfoAsync( + new ListScannedAssetsMetadataOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -21627,30 +21986,30 @@ public CompletableFuture listSecurityFindingsAsync } /** - * List security findings. + * List scanned assets metadata. * - *

See {@link #listSecurityFindingsWithHttpInfo}. + *

See {@link #listScannedAssetsMetadataWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return ListSecurityFindingsResponse + * @return ScannedAssetsMetadata * @throws ApiException if fails to make API call */ - public ListSecurityFindingsResponse listSecurityFindings( - ListSecurityFindingsOptionalParameters parameters) throws ApiException { - return listSecurityFindingsWithHttpInfo(parameters).getData(); + public ScannedAssetsMetadata listScannedAssetsMetadata( + ListScannedAssetsMetadataOptionalParameters parameters) throws ApiException { + return listScannedAssetsMetadataWithHttpInfo(parameters).getData(); } /** - * List security findings. + * List scanned assets metadata. * - *

See {@link #listSecurityFindingsWithHttpInfoAsync}. + *

See {@link #listScannedAssetsMetadataWithHttpInfoAsync}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ListSecurityFindingsResponse> + * @return CompletableFuture<ScannedAssetsMetadata> */ - public CompletableFuture listSecurityFindingsAsync( - ListSecurityFindingsOptionalParameters parameters) { - return listSecurityFindingsWithHttpInfoAsync(parameters) + public CompletableFuture listScannedAssetsMetadataAsync( + ListScannedAssetsMetadataOptionalParameters parameters) { + return listScannedAssetsMetadataWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -21658,107 +22017,109 @@ public CompletableFuture listSecurityFindingsAsync } /** - * List security findings. + * Get a list of security scanned assets metadata for an organization. * - *

See {@link #listSecurityFindingsWithHttpInfo}. + *

Pagination

* - * @return PaginationIterable<SecurityFindingsData> - */ - public PaginationIterable listSecurityFindingsWithPagination() { - ListSecurityFindingsOptionalParameters parameters = - new ListSecurityFindingsOptionalParameters(); - return listSecurityFindingsWithPagination(parameters); - } - - /** - * List security findings. + *

For the "List Vulnerabilities" endpoint, see the Pagination + * section. * - *

See {@link #listSecurityFindingsWithHttpInfo}. + *

Filtering

* - * @return ListSecurityFindingsResponse - */ - public PaginationIterable listSecurityFindingsWithPagination( - ListSecurityFindingsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "pageCursor"; - Boolean valueSetterParamOptional = true; - Long limit; - - if (parameters.pageLimit == null) { - limit = 10l; - parameters.pageLimit(limit); - } else { - limit = parameters.pageLimit; - } - - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); - - PaginationIterable iterator = - new PaginationIterable( - this, - "listSecurityFindings", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - true, - true, - limit, - args, - 0); - - return iterator; - } - - /** - * Get a list of security findings that match a search query. See the schema for security - * findings. + *

For the "List Vulnerabilities" endpoint, see the Filtering section. * - *

Query Syntax

+ *

Metadata

* - *

This endpoint uses the logs query syntax. Findings attributes (living in the - * attributes.attributes. namespace) are prefixed by @ when queried. Tags are queried without a - * prefix. + *

For the "List Vulnerabilities" endpoint, see the Metadata section. * - *

Example: @severity:(critical OR high) @status:open team:platform + *

Related endpoints

+ * + *

This endpoint returns additional metadata for cloud resources that is not available from the + * standard resource endpoints. To access a richer dataset, call this endpoint together with the + * relevant resource endpoint(s) and merge (join) their results using the resource identifier. + * + *

Hosts + * + *

To enrich host data, join the response from the Hosts endpoint with the response from + * the scanned-assets-metadata endpoint on the following key fields: + * + *

| ENDPOINT | JOIN KEY | TYPE | | --- | --- | --- | | /api/v1/hosts | host_list.host_name | + * string | | /api/v2/security/scanned-assets-metadata | data.attributes.asset.name | string | + * + *

Host Images + * + *

To enrich host image data, join the response from the Hosts endpoint with the response from + * the scanned-assets-metadata endpoint on the following key fields: + * + *

| ENDPOINT | JOIN KEY | TYPE | | --- | --- | --- | | /api/v1/hosts | + * host_list.tags_by_source["Amazon Web Services"]["image"] | string | | + * /api/v2/security/scanned-assets-metadata | data.attributes.asset.name | string | + * + *

Container Images + * + *

To enrich container image data, join the response from the Container Images endpoint + * with the response from the scanned-assets-metadata endpoint on the following key fields: + * + *

| ENDPOINT | JOIN KEY | TYPE | | --- | --- | --- | | /api/v2/container_images | + * data.attributes.name@data.attributes.repo_digest | string | | + * /api/v2/security/scanned-assets-metadata | data.attributes.asset.name | string | * * @param parameters Optional parameters for the request. - * @return ApiResponse<ListSecurityFindingsResponse> + * @return ApiResponse<ScannedAssetsMetadata> * @throws ApiException if fails to make API call * @http.response.details * * * * - * - * + * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
400 Bad request: The server cannot process the request due to invalid syntax in the request. -
403 Forbidden: Access denied -
404 Not found: asset not found -
429 Too many requests -
*/ - public ApiResponse listSecurityFindingsWithHttpInfo( - ListSecurityFindingsOptionalParameters parameters) throws ApiException { + public ApiResponse listScannedAssetsMetadataWithHttpInfo( + ListScannedAssetsMetadataOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listScannedAssetsMetadata"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; - String filterQuery = parameters.filterQuery; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; - SecurityFindingsSort sort = parameters.sort; + String pageToken = parameters.pageToken; + Long pageNumber = parameters.pageNumber; + CloudAssetType filterAssetType = parameters.filterAssetType; + String filterAssetName = parameters.filterAssetName; + String filterLastSuccessOrigin = parameters.filterLastSuccessOrigin; + String filterLastSuccessEnv = parameters.filterLastSuccessEnv; // create path and map variables - String localVarPath = "/api/v2/security/findings"; + String localVarPath = "/api/v2/security/scanned-assets-metadata"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.type]", filterAssetType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.name]", filterAssetName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[last_success.origin]", filterLastSuccessOrigin)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[last_success.env]", filterLastSuccessEnv)); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFindings", + "v2.SecurityMonitoringApi.listScannedAssetsMetadata", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -21773,40 +22134,59 @@ public ApiResponse listSecurityFindingsWithHttpInf localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List security findings. + * List scanned assets metadata. * - *

See {@link #listSecurityFindingsWithHttpInfo}. + *

See {@link #listScannedAssetsMetadataWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<ListSecurityFindingsResponse>> + * @return CompletableFuture<ApiResponse<ScannedAssetsMetadata>> */ - public CompletableFuture> - listSecurityFindingsWithHttpInfoAsync(ListSecurityFindingsOptionalParameters parameters) { + public CompletableFuture> + listScannedAssetsMetadataWithHttpInfoAsync( + ListScannedAssetsMetadataOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listScannedAssetsMetadata"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; - String filterQuery = parameters.filterQuery; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; - SecurityFindingsSort sort = parameters.sort; + String pageToken = parameters.pageToken; + Long pageNumber = parameters.pageNumber; + CloudAssetType filterAssetType = parameters.filterAssetType; + String filterAssetName = parameters.filterAssetName; + String filterLastSuccessOrigin = parameters.filterLastSuccessOrigin; + String filterLastSuccessEnv = parameters.filterLastSuccessEnv; // create path and map variables - String localVarPath = "/api/v2/security/findings"; + String localVarPath = "/api/v2/security/scanned-assets-metadata"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.type]", filterAssetType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.name]", filterAssetName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[last_success.origin]", filterLastSuccessOrigin)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[last_success.env]", filterLastSuccessEnv)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFindings", + "v2.SecurityMonitoringApi.listScannedAssetsMetadata", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -21814,8 +22194,7 @@ public ApiResponse listSecurityFindingsWithHttpInf new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -21827,32 +22206,30 @@ public ApiResponse listSecurityFindingsWithHttpInf localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get all default inbox rules. + * Get all security filters. * - *

See {@link #listSecurityFindingsAutomationDefaultInboxRulesWithHttpInfo}. + *

See {@link #listSecurityFiltersWithHttpInfo}. * - * @return DefaultInboxRulesResponse + * @return SecurityFiltersResponse * @throws ApiException if fails to make API call */ - public DefaultInboxRulesResponse listSecurityFindingsAutomationDefaultInboxRules() - throws ApiException { - return listSecurityFindingsAutomationDefaultInboxRulesWithHttpInfo().getData(); + public SecurityFiltersResponse listSecurityFilters() throws ApiException { + return listSecurityFiltersWithHttpInfo().getData(); } /** - * Get all default inbox rules. + * Get all security filters. * - *

See {@link #listSecurityFindingsAutomationDefaultInboxRulesWithHttpInfoAsync}. + *

See {@link #listSecurityFiltersWithHttpInfoAsync}. * - * @return CompletableFuture<DefaultInboxRulesResponse> + * @return CompletableFuture<SecurityFiltersResponse> */ - public CompletableFuture - listSecurityFindingsAutomationDefaultInboxRulesAsync() { - return listSecurityFindingsAutomationDefaultInboxRulesWithHttpInfoAsync() + public CompletableFuture listSecurityFiltersAsync() { + return listSecurityFiltersWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -21860,39 +22237,30 @@ public DefaultInboxRulesResponse listSecurityFindingsAutomationDefaultInboxRules } /** - * Get all default inbox rules for the current organization. Datadog manages default inbox rules. - * Their name, rule, and action are read-only, and each organization can change only whether they - * are enabled. + * Get the list of configured security filters with their definitions. * - * @return ApiResponse<DefaultInboxRulesResponse> + * @return ApiResponse<SecurityFiltersResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * * *
Response details
Status Code Description Response Headers
200 Successfully retrieved the list of default inbox rules -
403 Forbidden -
200 OK -
403 Not Authorized -
429 Too many requests -
*/ - public ApiResponse - listSecurityFindingsAutomationDefaultInboxRulesWithHttpInfo() throws ApiException { - // Check if unstable operation is enabled - String operationId = "listSecurityFindingsAutomationDefaultInboxRules"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse listSecurityFiltersWithHttpInfo() + throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/default_inbox_rules"; + String localVarPath = "/api/v2/security_monitoring/configuration/security_filters"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFindingsAutomationDefaultInboxRules", + "v2.SecurityMonitoringApi.listSecurityFilters", localVarPath, new ArrayList(), localVarHeaderParams, @@ -21907,31 +22275,21 @@ public DefaultInboxRulesResponse listSecurityFindingsAutomationDefaultInboxRules localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get all default inbox rules. + * Get all security filters. * - *

See {@link #listSecurityFindingsAutomationDefaultInboxRulesWithHttpInfo}. + *

See {@link #listSecurityFiltersWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<DefaultInboxRulesResponse>> + * @return CompletableFuture<ApiResponse<SecurityFiltersResponse>> */ - public CompletableFuture> - listSecurityFindingsAutomationDefaultInboxRulesWithHttpInfoAsync() { - // Check if unstable operation is enabled - String operationId = "listSecurityFindingsAutomationDefaultInboxRules"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> + listSecurityFiltersWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/default_inbox_rules"; + String localVarPath = "/api/v2/security_monitoring/configuration/security_filters"; Map localVarHeaderParams = new HashMap(); @@ -21939,7 +22297,7 @@ public DefaultInboxRulesResponse listSecurityFindingsAutomationDefaultInboxRules try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFindingsAutomationDefaultInboxRules", + "v2.SecurityMonitoringApi.listSecurityFilters", localVarPath, new ArrayList(), localVarHeaderParams, @@ -21947,7 +22305,7 @@ public DefaultInboxRulesResponse listSecurityFindingsAutomationDefaultInboxRules new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -21959,93 +22317,30 @@ public DefaultInboxRulesResponse listSecurityFindingsAutomationDefaultInboxRules localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to listSecurityFindingsAutomationDueDateRules. */ - public static class ListSecurityFindingsAutomationDueDateRulesOptionalParameters { - private Long pageSize; - private Long pageNumber; - - /** - * Set pageSize. - * - * @param pageSize The number of rules per page. Maximum is 1000. (optional, default to 1000) - * @return ListSecurityFindingsAutomationDueDateRulesOptionalParameters - */ - public ListSecurityFindingsAutomationDueDateRulesOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Set pageNumber. - * - * @param pageNumber The page number to return. (optional, default to 0) - * @return ListSecurityFindingsAutomationDueDateRulesOptionalParameters - */ - public ListSecurityFindingsAutomationDueDateRulesOptionalParameters pageNumber( - Long pageNumber) { - this.pageNumber = pageNumber; - return this; - } + new GenericType() {}); } /** - * Get all due date rules. + * Get the version history of security filters. * - *

See {@link #listSecurityFindingsAutomationDueDateRulesWithHttpInfo}. - * - * @return DueDateRulesResponse - * @throws ApiException if fails to make API call - */ - public DueDateRulesResponse listSecurityFindingsAutomationDueDateRules() throws ApiException { - return listSecurityFindingsAutomationDueDateRulesWithHttpInfo( - new ListSecurityFindingsAutomationDueDateRulesOptionalParameters()) - .getData(); - } - - /** - * Get all due date rules. - * - *

See {@link #listSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync}. - * - * @return CompletableFuture<DueDateRulesResponse> - */ - public CompletableFuture listSecurityFindingsAutomationDueDateRulesAsync() { - return listSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync( - new ListSecurityFindingsAutomationDueDateRulesOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get all due date rules. - * - *

See {@link #listSecurityFindingsAutomationDueDateRulesWithHttpInfo}. + *

See {@link #listSecurityFilterVersionsWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return DueDateRulesResponse + * @return SecurityFilterVersionsResponse * @throws ApiException if fails to make API call */ - public DueDateRulesResponse listSecurityFindingsAutomationDueDateRules( - ListSecurityFindingsAutomationDueDateRulesOptionalParameters parameters) throws ApiException { - return listSecurityFindingsAutomationDueDateRulesWithHttpInfo(parameters).getData(); + public SecurityFilterVersionsResponse listSecurityFilterVersions() throws ApiException { + return listSecurityFilterVersionsWithHttpInfo().getData(); } /** - * Get all due date rules. + * Get the version history of security filters. * - *

See {@link #listSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync}. + *

See {@link #listSecurityFilterVersionsWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<DueDateRulesResponse> + * @return CompletableFuture<SecurityFilterVersionsResponse> */ - public CompletableFuture listSecurityFindingsAutomationDueDateRulesAsync( - ListSecurityFindingsAutomationDueDateRulesOptionalParameters parameters) { - return listSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync(parameters) + public CompletableFuture listSecurityFilterVersionsAsync() { + return listSecurityFilterVersionsWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -22053,46 +22348,34 @@ public CompletableFuture listSecurityFindingsAutomationDue } /** - * Get all due date rules for the current organization. + * Get the configured security filters at each historical version of the configuration. Each entry + * in the response represents the set of all security filters at a given version, ordered from the + * most recent version to the oldest. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<DueDateRulesResponse> + * @return ApiResponse<SecurityFilterVersionsResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * * *
Response details
Status Code Description Response Headers
200 Successfully retrieved the list of due date rules -
403 Forbidden -
200 OK -
403 Not Authorized -
429 Too many requests -
*/ - public ApiResponse listSecurityFindingsAutomationDueDateRulesWithHttpInfo( - ListSecurityFindingsAutomationDueDateRulesOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "listSecurityFindingsAutomationDueDateRules"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse listSecurityFilterVersionsWithHttpInfo() + throws ApiException { Object localVarPostBody = null; - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/due_date_rules"; + String localVarPath = "/api/v2/security_monitoring/configuration/security_filters/versions"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFindingsAutomationDueDateRules", + "v2.SecurityMonitoringApi.listSecurityFilterVersions", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -22105,55 +22388,38 @@ public ApiResponse listSecurityFindingsAutomationDueDateRu localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get all due date rules. + * Get the version history of security filters. * - *

See {@link #listSecurityFindingsAutomationDueDateRulesWithHttpInfo}. + *

See {@link #listSecurityFilterVersionsWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<DueDateRulesResponse>> + * @return CompletableFuture<ApiResponse<SecurityFilterVersionsResponse>> */ - public CompletableFuture> - listSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync( - ListSecurityFindingsAutomationDueDateRulesOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "listSecurityFindingsAutomationDueDateRules"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> + listSecurityFilterVersionsWithHttpInfoAsync() { Object localVarPostBody = null; - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/due_date_rules"; + String localVarPath = "/api/v2/security_monitoring/configuration/security_filters/versions"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFindingsAutomationDueDateRules", + "v2.SecurityMonitoringApi.listSecurityFilterVersions", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -22165,61 +22431,83 @@ public ApiResponse listSecurityFindingsAutomationDueDateRu localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listSecurityFindingsAutomationInboxRules. */ - public static class ListSecurityFindingsAutomationInboxRulesOptionalParameters { - private Long pageSize; - private Long pageNumber; + /** Manage optional parameters to listSecurityFindings. */ + public static class ListSecurityFindingsOptionalParameters { + private String filterQuery; + private String pageCursor; + private Long pageLimit; + private SecurityFindingsSort sort; /** - * Set pageSize. + * Set filterQuery. * - * @param pageSize The number of rules per page. Maximum is 1000. (optional, default to 1000) - * @return ListSecurityFindingsAutomationInboxRulesOptionalParameters + * @param filterQuery The search query following log search syntax. (optional, default to "*") + * @return ListSecurityFindingsOptionalParameters */ - public ListSecurityFindingsAutomationInboxRulesOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; + public ListSecurityFindingsOptionalParameters filterQuery(String filterQuery) { + this.filterQuery = filterQuery; return this; } /** - * Set pageNumber. + * Set pageCursor. * - * @param pageNumber The page number to return. (optional, default to 0) - * @return ListSecurityFindingsAutomationInboxRulesOptionalParameters + * @param pageCursor Get the next page of results with a cursor provided in the previous query. + * (optional) + * @return ListSecurityFindingsOptionalParameters */ - public ListSecurityFindingsAutomationInboxRulesOptionalParameters pageNumber(Long pageNumber) { - this.pageNumber = pageNumber; + public ListSecurityFindingsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } + + /** + * Set pageLimit. + * + * @param pageLimit The maximum number of findings in the response. (optional, default to 10) + * @return ListSecurityFindingsOptionalParameters + */ + public ListSecurityFindingsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } + + /** + * Set sort. + * + * @param sort Sorts by @detection_changed_at. (optional, default to "-@detection_changed_at") + * @return ListSecurityFindingsOptionalParameters + */ + public ListSecurityFindingsOptionalParameters sort(SecurityFindingsSort sort) { + this.sort = sort; return this; } } /** - * Get all inbox rules. + * List security findings. * - *

See {@link #listSecurityFindingsAutomationInboxRulesWithHttpInfo}. + *

See {@link #listSecurityFindingsWithHttpInfo}. * - * @return InboxRulesResponse + * @return ListSecurityFindingsResponse * @throws ApiException if fails to make API call */ - public InboxRulesResponse listSecurityFindingsAutomationInboxRules() throws ApiException { - return listSecurityFindingsAutomationInboxRulesWithHttpInfo( - new ListSecurityFindingsAutomationInboxRulesOptionalParameters()) - .getData(); + public ListSecurityFindingsResponse listSecurityFindings() throws ApiException { + return listSecurityFindingsWithHttpInfo(new ListSecurityFindingsOptionalParameters()).getData(); } /** - * Get all inbox rules. + * List security findings. * - *

See {@link #listSecurityFindingsAutomationInboxRulesWithHttpInfoAsync}. + *

See {@link #listSecurityFindingsWithHttpInfoAsync}. * - * @return CompletableFuture<InboxRulesResponse> + * @return CompletableFuture<ListSecurityFindingsResponse> */ - public CompletableFuture listSecurityFindingsAutomationInboxRulesAsync() { - return listSecurityFindingsAutomationInboxRulesWithHttpInfoAsync( - new ListSecurityFindingsAutomationInboxRulesOptionalParameters()) + public CompletableFuture listSecurityFindingsAsync() { + return listSecurityFindingsWithHttpInfoAsync(new ListSecurityFindingsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -22227,30 +22515,30 @@ public CompletableFuture listSecurityFindingsAutomationInbox } /** - * Get all inbox rules. + * List security findings. * - *

See {@link #listSecurityFindingsAutomationInboxRulesWithHttpInfo}. + *

See {@link #listSecurityFindingsWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return InboxRulesResponse + * @return ListSecurityFindingsResponse * @throws ApiException if fails to make API call */ - public InboxRulesResponse listSecurityFindingsAutomationInboxRules( - ListSecurityFindingsAutomationInboxRulesOptionalParameters parameters) throws ApiException { - return listSecurityFindingsAutomationInboxRulesWithHttpInfo(parameters).getData(); + public ListSecurityFindingsResponse listSecurityFindings( + ListSecurityFindingsOptionalParameters parameters) throws ApiException { + return listSecurityFindingsWithHttpInfo(parameters).getData(); } /** - * Get all inbox rules. + * List security findings. * - *

See {@link #listSecurityFindingsAutomationInboxRulesWithHttpInfoAsync}. + *

See {@link #listSecurityFindingsWithHttpInfoAsync}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<InboxRulesResponse> + * @return CompletableFuture<ListSecurityFindingsResponse> */ - public CompletableFuture listSecurityFindingsAutomationInboxRulesAsync( - ListSecurityFindingsAutomationInboxRulesOptionalParameters parameters) { - return listSecurityFindingsAutomationInboxRulesWithHttpInfoAsync(parameters) + public CompletableFuture listSecurityFindingsAsync( + ListSecurityFindingsOptionalParameters parameters) { + return listSecurityFindingsWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -22258,44 +22546,107 @@ public CompletableFuture listSecurityFindingsAutomationInbox } /** - * Get all inbox rules for the current organization. + * List security findings. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<InboxRulesResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 Successfully retrieved the list of inbox rules -
403 Forbidden -
429 Too many requests -
+ *

See {@link #listSecurityFindingsWithHttpInfo}. + * + * @return PaginationIterable<SecurityFindingsData> */ - public ApiResponse listSecurityFindingsAutomationInboxRulesWithHttpInfo( - ListSecurityFindingsAutomationInboxRulesOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "listSecurityFindingsAutomationInboxRules"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = null; - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; - // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/inbox_rules"; + public PaginationIterable listSecurityFindingsWithPagination() { + ListSecurityFindingsOptionalParameters parameters = + new ListSecurityFindingsOptionalParameters(); + return listSecurityFindingsWithPagination(parameters); + } + + /** + * List security findings. + * + *

See {@link #listSecurityFindingsWithHttpInfo}. + * + * @return ListSecurityFindingsResponse + */ + public PaginationIterable listSecurityFindingsWithPagination( + ListSecurityFindingsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "pageCursor"; + Boolean valueSetterParamOptional = true; + Long limit; + + if (parameters.pageLimit == null) { + limit = 10l; + parameters.pageLimit(limit); + } else { + limit = parameters.pageLimit; + } + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); + + PaginationIterable iterator = + new PaginationIterable( + this, + "listSecurityFindings", + resultsPath, + valueGetterPath, + valueSetterPath, + valueSetterParamOptional, + true, + true, + limit, + args, + 0); + + return iterator; + } + + /** + * Get a list of security findings that match a search query. See the schema for security + * findings. + * + *

Query Syntax

+ * + *

This endpoint uses the logs query syntax. Findings attributes (living in the + * attributes.attributes. namespace) are prefixed by @ when queried. Tags are queried without a + * prefix. + * + *

Example: @severity:(critical OR high) @status:open team:platform + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<ListSecurityFindingsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listSecurityFindingsWithHttpInfo( + ListSecurityFindingsOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + String filterQuery = parameters.filterQuery; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; + SecurityFindingsSort sort = parameters.sort; + // create path and map variables + String localVarPath = "/api/v2/security/findings"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFindingsAutomationInboxRules", + "v2.SecurityMonitoringApi.listSecurityFindings", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -22310,47 +22661,40 @@ public ApiResponse listSecurityFindingsAutomationInboxRulesW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get all inbox rules. + * List security findings. * - *

See {@link #listSecurityFindingsAutomationInboxRulesWithHttpInfo}. + *

See {@link #listSecurityFindingsWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<InboxRulesResponse>> + * @return CompletableFuture<ApiResponse<ListSecurityFindingsResponse>> */ - public CompletableFuture> - listSecurityFindingsAutomationInboxRulesWithHttpInfoAsync( - ListSecurityFindingsAutomationInboxRulesOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "listSecurityFindingsAutomationInboxRules"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> + listSecurityFindingsWithHttpInfoAsync(ListSecurityFindingsOptionalParameters parameters) { Object localVarPostBody = null; - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; + String filterQuery = parameters.filterQuery; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; + SecurityFindingsSort sort = parameters.sort; // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/inbox_rules"; + String localVarPath = "/api/v2/security/findings"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFindingsAutomationInboxRules", + "v2.SecurityMonitoringApi.listSecurityFindings", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -22358,7 +22702,8 @@ public ApiResponse listSecurityFindingsAutomationInboxRulesW new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -22370,92 +22715,32 @@ public ApiResponse listSecurityFindingsAutomationInboxRulesW localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to listSecurityFindingsAutomationMuteRules. */ - public static class ListSecurityFindingsAutomationMuteRulesOptionalParameters { - private Long pageSize; - private Long pageNumber; - - /** - * Set pageSize. - * - * @param pageSize The number of rules per page. Maximum is 1000. (optional, default to 1000) - * @return ListSecurityFindingsAutomationMuteRulesOptionalParameters - */ - public ListSecurityFindingsAutomationMuteRulesOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Set pageNumber. - * - * @param pageNumber The page number to return. (optional, default to 0) - * @return ListSecurityFindingsAutomationMuteRulesOptionalParameters - */ - public ListSecurityFindingsAutomationMuteRulesOptionalParameters pageNumber(Long pageNumber) { - this.pageNumber = pageNumber; - return this; - } - } - - /** - * Get all mute rules. - * - *

See {@link #listSecurityFindingsAutomationMuteRulesWithHttpInfo}. - * - * @return MuteRulesResponse - * @throws ApiException if fails to make API call - */ - public MuteRulesResponse listSecurityFindingsAutomationMuteRules() throws ApiException { - return listSecurityFindingsAutomationMuteRulesWithHttpInfo( - new ListSecurityFindingsAutomationMuteRulesOptionalParameters()) - .getData(); - } - - /** - * Get all mute rules. - * - *

See {@link #listSecurityFindingsAutomationMuteRulesWithHttpInfoAsync}. - * - * @return CompletableFuture<MuteRulesResponse> - */ - public CompletableFuture listSecurityFindingsAutomationMuteRulesAsync() { - return listSecurityFindingsAutomationMuteRulesWithHttpInfoAsync( - new ListSecurityFindingsAutomationMuteRulesOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * Get all mute rules. + * Get all default inbox rules. * - *

See {@link #listSecurityFindingsAutomationMuteRulesWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationDefaultInboxRulesWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return MuteRulesResponse + * @return DefaultInboxRulesResponse * @throws ApiException if fails to make API call */ - public MuteRulesResponse listSecurityFindingsAutomationMuteRules( - ListSecurityFindingsAutomationMuteRulesOptionalParameters parameters) throws ApiException { - return listSecurityFindingsAutomationMuteRulesWithHttpInfo(parameters).getData(); + public DefaultInboxRulesResponse listSecurityFindingsAutomationDefaultInboxRules() + throws ApiException { + return listSecurityFindingsAutomationDefaultInboxRulesWithHttpInfo().getData(); } /** - * Get all mute rules. + * Get all default inbox rules. * - *

See {@link #listSecurityFindingsAutomationMuteRulesWithHttpInfoAsync}. + *

See {@link #listSecurityFindingsAutomationDefaultInboxRulesWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<MuteRulesResponse> + * @return CompletableFuture<DefaultInboxRulesResponse> */ - public CompletableFuture listSecurityFindingsAutomationMuteRulesAsync( - ListSecurityFindingsAutomationMuteRulesOptionalParameters parameters) { - return listSecurityFindingsAutomationMuteRulesWithHttpInfoAsync(parameters) + public CompletableFuture + listSecurityFindingsAutomationDefaultInboxRulesAsync() { + return listSecurityFindingsAutomationDefaultInboxRulesWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -22463,46 +22748,41 @@ public CompletableFuture listSecurityFindingsAutomationMuteRu } /** - * Get all mute rules for the current organization. + * Get all default inbox rules for the current organization. Datadog manages default inbox rules. + * Their name, rule, and action are read-only, and each organization can change only whether they + * are enabled. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<MuteRulesResponse> + * @return ApiResponse<DefaultInboxRulesResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * *
Response details
Status Code Description Response Headers
200 Successfully retrieved the list of mute rules -
200 Successfully retrieved the list of default inbox rules -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse listSecurityFindingsAutomationMuteRulesWithHttpInfo( - ListSecurityFindingsAutomationMuteRulesOptionalParameters parameters) throws ApiException { + public ApiResponse + listSecurityFindingsAutomationDefaultInboxRulesWithHttpInfo() throws ApiException { // Check if unstable operation is enabled - String operationId = "listSecurityFindingsAutomationMuteRules"; + String operationId = "listSecurityFindingsAutomationDefaultInboxRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/mute_rules"; + String localVarPath = "/api/v2/security/findings/automation/default_inbox_rules"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFindingsAutomationMuteRules", + "v2.SecurityMonitoringApi.listSecurityFindingsAutomationDefaultInboxRules", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -22515,55 +22795,47 @@ public ApiResponse listSecurityFindingsAutomationMuteRulesWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get all mute rules. + * Get all default inbox rules. * - *

See {@link #listSecurityFindingsAutomationMuteRulesWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationDefaultInboxRulesWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<MuteRulesResponse>> + * @return CompletableFuture<ApiResponse<DefaultInboxRulesResponse>> */ - public CompletableFuture> - listSecurityFindingsAutomationMuteRulesWithHttpInfoAsync( - ListSecurityFindingsAutomationMuteRulesOptionalParameters parameters) { + public CompletableFuture> + listSecurityFindingsAutomationDefaultInboxRulesWithHttpInfoAsync() { // Check if unstable operation is enabled - String operationId = "listSecurityFindingsAutomationMuteRules"; + String operationId = "listSecurityFindingsAutomationDefaultInboxRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/mute_rules"; + String localVarPath = "/api/v2/security/findings/automation/default_inbox_rules"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFindingsAutomationMuteRules", + "v2.SecurityMonitoringApi.listSecurityFindingsAutomationDefaultInboxRules", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -22575,11 +22847,11 @@ public ApiResponse listSecurityFindingsAutomationMuteRulesWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listSecurityFindingsAutomationSeverityModifierRules. */ - public static class ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters { + /** Manage optional parameters to listSecurityFindingsAutomationDueDateRules. */ + public static class ListSecurityFindingsAutomationDueDateRulesOptionalParameters { private Long pageSize; private Long pageNumber; @@ -22587,10 +22859,9 @@ public static class ListSecurityFindingsAutomationSeverityModifierRulesOptionalP * Set pageSize. * * @param pageSize The number of rules per page. Maximum is 1000. (optional, default to 1000) - * @return ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters + * @return ListSecurityFindingsAutomationDueDateRulesOptionalParameters */ - public ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters pageSize( - Long pageSize) { + public ListSecurityFindingsAutomationDueDateRulesOptionalParameters pageSize(Long pageSize) { this.pageSize = pageSize; return this; } @@ -22599,9 +22870,9 @@ public ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters pag * Set pageNumber. * * @param pageNumber The page number to return. (optional, default to 0) - * @return ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters + * @return ListSecurityFindingsAutomationDueDateRulesOptionalParameters */ - public ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters pageNumber( + public ListSecurityFindingsAutomationDueDateRulesOptionalParameters pageNumber( Long pageNumber) { this.pageNumber = pageNumber; return this; @@ -22609,31 +22880,29 @@ public ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters pag } /** - * Get all severity modifier rules. + * Get all due date rules. * - *

See {@link #listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationDueDateRulesWithHttpInfo}. * - * @return SeverityModifierRulesResponse + * @return DueDateRulesResponse * @throws ApiException if fails to make API call */ - public SeverityModifierRulesResponse listSecurityFindingsAutomationSeverityModifierRules() - throws ApiException { - return listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo( - new ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters()) + public DueDateRulesResponse listSecurityFindingsAutomationDueDateRules() throws ApiException { + return listSecurityFindingsAutomationDueDateRulesWithHttpInfo( + new ListSecurityFindingsAutomationDueDateRulesOptionalParameters()) .getData(); } /** - * Get all severity modifier rules. + * Get all due date rules. * - *

See {@link #listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync}. + *

See {@link #listSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync}. * - * @return CompletableFuture<SeverityModifierRulesResponse> + * @return CompletableFuture<DueDateRulesResponse> */ - public CompletableFuture - listSecurityFindingsAutomationSeverityModifierRulesAsync() { - return listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync( - new ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters()) + public CompletableFuture listSecurityFindingsAutomationDueDateRulesAsync() { + return listSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync( + new ListSecurityFindingsAutomationDueDateRulesOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -22641,32 +22910,30 @@ public SeverityModifierRulesResponse listSecurityFindingsAutomationSeverityModif } /** - * Get all severity modifier rules. + * Get all due date rules. * - *

See {@link #listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationDueDateRulesWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return SeverityModifierRulesResponse + * @return DueDateRulesResponse * @throws ApiException if fails to make API call */ - public SeverityModifierRulesResponse listSecurityFindingsAutomationSeverityModifierRules( - ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters parameters) - throws ApiException { - return listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo(parameters).getData(); + public DueDateRulesResponse listSecurityFindingsAutomationDueDateRules( + ListSecurityFindingsAutomationDueDateRulesOptionalParameters parameters) throws ApiException { + return listSecurityFindingsAutomationDueDateRulesWithHttpInfo(parameters).getData(); } /** - * Get all severity modifier rules. + * Get all due date rules. * - *

See {@link #listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync}. + *

See {@link #listSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<SeverityModifierRulesResponse> + * @return CompletableFuture<DueDateRulesResponse> */ - public CompletableFuture - listSecurityFindingsAutomationSeverityModifierRulesAsync( - ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters parameters) { - return listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync(parameters) + public CompletableFuture listSecurityFindingsAutomationDueDateRulesAsync( + ListSecurityFindingsAutomationDueDateRulesOptionalParameters parameters) { + return listSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -22674,27 +22941,24 @@ public SeverityModifierRulesResponse listSecurityFindingsAutomationSeverityModif } /** - * Get all severity modifier rules for the current organization. + * Get all due date rules for the current organization. * * @param parameters Optional parameters for the request. - * @return ApiResponse<SeverityModifierRulesResponse> + * @return ApiResponse<DueDateRulesResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * * *
Response details
Status Code Description Response Headers
200 Successfully retrieved the list of severity modifier rules -
200 Successfully retrieved the list of due date rules -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo( - ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters parameters) - throws ApiException { + public ApiResponse listSecurityFindingsAutomationDueDateRulesWithHttpInfo( + ListSecurityFindingsAutomationDueDateRulesOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listSecurityFindingsAutomationSeverityModifierRules"; + String operationId = "listSecurityFindingsAutomationDueDateRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -22704,7 +22968,7 @@ public SeverityModifierRulesResponse listSecurityFindingsAutomationSeverityModif Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/severity_modifier_rules"; + String localVarPath = "/api/v2/security/findings/automation/due_date_rules"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -22714,7 +22978,7 @@ public SeverityModifierRulesResponse listSecurityFindingsAutomationSeverityModif Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFindingsAutomationSeverityModifierRules", + "v2.SecurityMonitoringApi.listSecurityFindingsAutomationDueDateRules", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -22729,27 +22993,26 @@ public SeverityModifierRulesResponse listSecurityFindingsAutomationSeverityModif localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get all severity modifier rules. + * Get all due date rules. * - *

See {@link #listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationDueDateRulesWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<SeverityModifierRulesResponse>> + * @return CompletableFuture<ApiResponse<DueDateRulesResponse>> */ - public CompletableFuture> - listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync( - ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters parameters) { + public CompletableFuture> + listSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync( + ListSecurityFindingsAutomationDueDateRulesOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listSecurityFindingsAutomationSeverityModifierRules"; + String operationId = "listSecurityFindingsAutomationDueDateRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -22758,7 +23021,7 @@ public SeverityModifierRulesResponse listSecurityFindingsAutomationSeverityModif Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/severity_modifier_rules"; + String localVarPath = "/api/v2/security/findings/automation/due_date_rules"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -22770,7 +23033,7 @@ public SeverityModifierRulesResponse listSecurityFindingsAutomationSeverityModif try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFindingsAutomationSeverityModifierRules", + "v2.SecurityMonitoringApi.listSecurityFindingsAutomationDueDateRules", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -22778,8 +23041,7 @@ public SeverityModifierRulesResponse listSecurityFindingsAutomationSeverityModif new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -22791,11 +23053,11 @@ public SeverityModifierRulesResponse listSecurityFindingsAutomationSeverityModif localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listSecurityFindingsAutomationTicketCreationRules. */ - public static class ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters { + /** Manage optional parameters to listSecurityFindingsAutomationInboxRules. */ + public static class ListSecurityFindingsAutomationInboxRulesOptionalParameters { private Long pageSize; private Long pageNumber; @@ -22803,10 +23065,9 @@ public static class ListSecurityFindingsAutomationTicketCreationRulesOptionalPar * Set pageSize. * * @param pageSize The number of rules per page. Maximum is 1000. (optional, default to 1000) - * @return ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters + * @return ListSecurityFindingsAutomationInboxRulesOptionalParameters */ - public ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters pageSize( - Long pageSize) { + public ListSecurityFindingsAutomationInboxRulesOptionalParameters pageSize(Long pageSize) { this.pageSize = pageSize; return this; } @@ -22815,41 +23076,38 @@ public ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters pageS * Set pageNumber. * * @param pageNumber The page number to return. (optional, default to 0) - * @return ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters + * @return ListSecurityFindingsAutomationInboxRulesOptionalParameters */ - public ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters pageNumber( - Long pageNumber) { + public ListSecurityFindingsAutomationInboxRulesOptionalParameters pageNumber(Long pageNumber) { this.pageNumber = pageNumber; return this; } } /** - * Get all ticket creation rules. + * Get all inbox rules. * - *

See {@link #listSecurityFindingsAutomationTicketCreationRulesWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationInboxRulesWithHttpInfo}. * - * @return TicketCreationRulesResponse + * @return InboxRulesResponse * @throws ApiException if fails to make API call */ - public TicketCreationRulesResponse listSecurityFindingsAutomationTicketCreationRules() - throws ApiException { - return listSecurityFindingsAutomationTicketCreationRulesWithHttpInfo( - new ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters()) + public InboxRulesResponse listSecurityFindingsAutomationInboxRules() throws ApiException { + return listSecurityFindingsAutomationInboxRulesWithHttpInfo( + new ListSecurityFindingsAutomationInboxRulesOptionalParameters()) .getData(); } /** - * Get all ticket creation rules. + * Get all inbox rules. * - *

See {@link #listSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync}. + *

See {@link #listSecurityFindingsAutomationInboxRulesWithHttpInfoAsync}. * - * @return CompletableFuture<TicketCreationRulesResponse> + * @return CompletableFuture<InboxRulesResponse> */ - public CompletableFuture - listSecurityFindingsAutomationTicketCreationRulesAsync() { - return listSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync( - new ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters()) + public CompletableFuture listSecurityFindingsAutomationInboxRulesAsync() { + return listSecurityFindingsAutomationInboxRulesWithHttpInfoAsync( + new ListSecurityFindingsAutomationInboxRulesOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -22857,32 +23115,30 @@ public TicketCreationRulesResponse listSecurityFindingsAutomationTicketCreationR } /** - * Get all ticket creation rules. + * Get all inbox rules. * - *

See {@link #listSecurityFindingsAutomationTicketCreationRulesWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationInboxRulesWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return TicketCreationRulesResponse + * @return InboxRulesResponse * @throws ApiException if fails to make API call */ - public TicketCreationRulesResponse listSecurityFindingsAutomationTicketCreationRules( - ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters parameters) - throws ApiException { - return listSecurityFindingsAutomationTicketCreationRulesWithHttpInfo(parameters).getData(); + public InboxRulesResponse listSecurityFindingsAutomationInboxRules( + ListSecurityFindingsAutomationInboxRulesOptionalParameters parameters) throws ApiException { + return listSecurityFindingsAutomationInboxRulesWithHttpInfo(parameters).getData(); } /** - * Get all ticket creation rules. + * Get all inbox rules. * - *

See {@link #listSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync}. + *

See {@link #listSecurityFindingsAutomationInboxRulesWithHttpInfoAsync}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<TicketCreationRulesResponse> + * @return CompletableFuture<InboxRulesResponse> */ - public CompletableFuture - listSecurityFindingsAutomationTicketCreationRulesAsync( - ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters parameters) { - return listSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync(parameters) + public CompletableFuture listSecurityFindingsAutomationInboxRulesAsync( + ListSecurityFindingsAutomationInboxRulesOptionalParameters parameters) { + return listSecurityFindingsAutomationInboxRulesWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -22890,26 +23146,24 @@ public TicketCreationRulesResponse listSecurityFindingsAutomationTicketCreationR } /** - * Get all ticket creation rules for the current organization. + * Get all inbox rules for the current organization. * * @param parameters Optional parameters for the request. - * @return ApiResponse<TicketCreationRulesResponse> + * @return ApiResponse<InboxRulesResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * *
Response details
Status Code Description Response Headers
200 Successfully retrieved the list of ticket creation rules -
200 Successfully retrieved the list of inbox rules -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse - listSecurityFindingsAutomationTicketCreationRulesWithHttpInfo( - ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters parameters) - throws ApiException { + public ApiResponse listSecurityFindingsAutomationInboxRulesWithHttpInfo( + ListSecurityFindingsAutomationInboxRulesOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listSecurityFindingsAutomationTicketCreationRules"; + String operationId = "listSecurityFindingsAutomationInboxRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -22919,7 +23173,7 @@ public TicketCreationRulesResponse listSecurityFindingsAutomationTicketCreationR Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/ticket_creation_rules"; + String localVarPath = "/api/v2/security/findings/automation/inbox_rules"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -22929,7 +23183,7 @@ public TicketCreationRulesResponse listSecurityFindingsAutomationTicketCreationR Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFindingsAutomationTicketCreationRules", + "v2.SecurityMonitoringApi.listSecurityFindingsAutomationInboxRules", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -22944,27 +23198,26 @@ public TicketCreationRulesResponse listSecurityFindingsAutomationTicketCreationR localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get all ticket creation rules. + * Get all inbox rules. * - *

See {@link #listSecurityFindingsAutomationTicketCreationRulesWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationInboxRulesWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<TicketCreationRulesResponse>> + * @return CompletableFuture<ApiResponse<InboxRulesResponse>> */ - public CompletableFuture> - listSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync( - ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters parameters) { + public CompletableFuture> + listSecurityFindingsAutomationInboxRulesWithHttpInfoAsync( + ListSecurityFindingsAutomationInboxRulesOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listSecurityFindingsAutomationTicketCreationRules"; + String operationId = "listSecurityFindingsAutomationInboxRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -22973,7 +23226,7 @@ public TicketCreationRulesResponse listSecurityFindingsAutomationTicketCreationR Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/ticket_creation_rules"; + String localVarPath = "/api/v2/security/findings/automation/inbox_rules"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); @@ -22985,7 +23238,7 @@ public TicketCreationRulesResponse listSecurityFindingsAutomationTicketCreationR try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityFindingsAutomationTicketCreationRules", + "v2.SecurityMonitoringApi.listSecurityFindingsAutomationInboxRules", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -22993,8 +23246,7 @@ public TicketCreationRulesResponse listSecurityFindingsAutomationTicketCreationR new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -23006,138 +23258,21 @@ public TicketCreationRulesResponse listSecurityFindingsAutomationTicketCreationR localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** - * Get all critical assets. - * - *

See {@link #listSecurityMonitoringCriticalAssetsWithHttpInfo}. - * - * @return SecurityMonitoringCriticalAssetsResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringCriticalAssetsResponse listSecurityMonitoringCriticalAssets() - throws ApiException { - return listSecurityMonitoringCriticalAssetsWithHttpInfo().getData(); - } - - /** - * Get all critical assets. - * - *

See {@link #listSecurityMonitoringCriticalAssetsWithHttpInfoAsync}. - * - * @return CompletableFuture<SecurityMonitoringCriticalAssetsResponse> - */ - public CompletableFuture - listSecurityMonitoringCriticalAssetsAsync() { - return listSecurityMonitoringCriticalAssetsWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get the list of all critical assets. - * - * @return ApiResponse<SecurityMonitoringCriticalAssetsResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
429 Too many requests -
- */ - public ApiResponse - listSecurityMonitoringCriticalAssetsWithHttpInfo() throws ApiException { - Object localVarPostBody = null; - // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/critical_assets"; - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringCriticalAssets", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Get all critical assets. - * - *

See {@link #listSecurityMonitoringCriticalAssetsWithHttpInfo}. - * - * @return CompletableFuture<ApiResponse<SecurityMonitoringCriticalAssetsResponse>> - */ - public CompletableFuture> - listSecurityMonitoringCriticalAssetsWithHttpInfoAsync() { - Object localVarPostBody = null; - // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/critical_assets"; - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringCriticalAssets", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** Manage optional parameters to listSecurityMonitoringDatasets. */ - public static class ListSecurityMonitoringDatasetsOptionalParameters { + /** Manage optional parameters to listSecurityFindingsAutomationMuteRules. */ + public static class ListSecurityFindingsAutomationMuteRulesOptionalParameters { private Long pageSize; private Long pageNumber; - private String sort; - private String filterQuery; /** * Set pageSize. * - * @param pageSize Size for a given page. The maximum allowed value is 100. (optional, default - * to 50) - * @return ListSecurityMonitoringDatasetsOptionalParameters + * @param pageSize The number of rules per page. Maximum is 1000. (optional, default to 1000) + * @return ListSecurityFindingsAutomationMuteRulesOptionalParameters */ - public ListSecurityMonitoringDatasetsOptionalParameters pageSize(Long pageSize) { + public ListSecurityFindingsAutomationMuteRulesOptionalParameters pageSize(Long pageSize) { this.pageSize = pageSize; return this; } @@ -23145,64 +23280,39 @@ public ListSecurityMonitoringDatasetsOptionalParameters pageSize(Long pageSize) /** * Set pageNumber. * - * @param pageNumber Specific page number to return. (optional, default to 1) - * @return ListSecurityMonitoringDatasetsOptionalParameters + * @param pageNumber The page number to return. (optional, default to 0) + * @return ListSecurityFindingsAutomationMuteRulesOptionalParameters */ - public ListSecurityMonitoringDatasetsOptionalParameters pageNumber(Long pageNumber) { + public ListSecurityFindingsAutomationMuteRulesOptionalParameters pageNumber(Long pageNumber) { this.pageNumber = pageNumber; return this; } - - /** - * Set sort. - * - * @param sort Attribute used to sort datasets. Prefix with - to sort in descending - * order. (optional) - * @return ListSecurityMonitoringDatasetsOptionalParameters - */ - public ListSecurityMonitoringDatasetsOptionalParameters sort(String sort) { - this.sort = sort; - return this; - } - - /** - * Set filterQuery. - * - * @param filterQuery A search query to filter datasets by name or description. (optional) - * @return ListSecurityMonitoringDatasetsOptionalParameters - */ - public ListSecurityMonitoringDatasetsOptionalParameters filterQuery(String filterQuery) { - this.filterQuery = filterQuery; - return this; - } } /** - * List datasets. + * Get all mute rules. * - *

See {@link #listSecurityMonitoringDatasetsWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationMuteRulesWithHttpInfo}. * - * @return SecurityMonitoringDatasetsListResponse + * @return MuteRulesResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringDatasetsListResponse listSecurityMonitoringDatasets() - throws ApiException { - return listSecurityMonitoringDatasetsWithHttpInfo( - new ListSecurityMonitoringDatasetsOptionalParameters()) + public MuteRulesResponse listSecurityFindingsAutomationMuteRules() throws ApiException { + return listSecurityFindingsAutomationMuteRulesWithHttpInfo( + new ListSecurityFindingsAutomationMuteRulesOptionalParameters()) .getData(); } /** - * List datasets. + * Get all mute rules. * - *

See {@link #listSecurityMonitoringDatasetsWithHttpInfoAsync}. + *

See {@link #listSecurityFindingsAutomationMuteRulesWithHttpInfoAsync}. * - * @return CompletableFuture<SecurityMonitoringDatasetsListResponse> + * @return CompletableFuture<MuteRulesResponse> */ - public CompletableFuture - listSecurityMonitoringDatasetsAsync() { - return listSecurityMonitoringDatasetsWithHttpInfoAsync( - new ListSecurityMonitoringDatasetsOptionalParameters()) + public CompletableFuture listSecurityFindingsAutomationMuteRulesAsync() { + return listSecurityFindingsAutomationMuteRulesWithHttpInfoAsync( + new ListSecurityFindingsAutomationMuteRulesOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -23210,31 +23320,30 @@ public SecurityMonitoringDatasetsListResponse listSecurityMonitoringDatasets() } /** - * List datasets. + * Get all mute rules. * - *

See {@link #listSecurityMonitoringDatasetsWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationMuteRulesWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return SecurityMonitoringDatasetsListResponse + * @return MuteRulesResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringDatasetsListResponse listSecurityMonitoringDatasets( - ListSecurityMonitoringDatasetsOptionalParameters parameters) throws ApiException { - return listSecurityMonitoringDatasetsWithHttpInfo(parameters).getData(); + public MuteRulesResponse listSecurityFindingsAutomationMuteRules( + ListSecurityFindingsAutomationMuteRulesOptionalParameters parameters) throws ApiException { + return listSecurityFindingsAutomationMuteRulesWithHttpInfo(parameters).getData(); } /** - * List datasets. + * Get all mute rules. * - *

See {@link #listSecurityMonitoringDatasetsWithHttpInfoAsync}. + *

See {@link #listSecurityFindingsAutomationMuteRulesWithHttpInfoAsync}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<SecurityMonitoringDatasetsListResponse> + * @return CompletableFuture<MuteRulesResponse> */ - public CompletableFuture - listSecurityMonitoringDatasetsAsync( - ListSecurityMonitoringDatasetsOptionalParameters parameters) { - return listSecurityMonitoringDatasetsWithHttpInfoAsync(parameters) + public CompletableFuture listSecurityFindingsAutomationMuteRulesAsync( + ListSecurityFindingsAutomationMuteRulesOptionalParameters parameters) { + return listSecurityFindingsAutomationMuteRulesWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -23242,27 +23351,24 @@ public SecurityMonitoringDatasetsListResponse listSecurityMonitoringDatasets( } /** - * List all Cloud SIEM datasets available to the organization, including both customer-defined - * datasets and Datadog out-of-the-box datasets. + * Get all mute rules for the current organization. * * @param parameters Optional parameters for the request. - * @return ApiResponse<SecurityMonitoringDatasetsListResponse> + * @return ApiResponse<MuteRulesResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
200 Successfully retrieved the list of mute rules -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse - listSecurityMonitoringDatasetsWithHttpInfo( - ListSecurityMonitoringDatasetsOptionalParameters parameters) throws ApiException { + public ApiResponse listSecurityFindingsAutomationMuteRulesWithHttpInfo( + ListSecurityFindingsAutomationMuteRulesOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listSecurityMonitoringDatasets"; + String operationId = "listSecurityFindingsAutomationMuteRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -23271,22 +23377,18 @@ public SecurityMonitoringDatasetsListResponse listSecurityMonitoringDatasets( Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; - String sort = parameters.sort; - String filterQuery = parameters.filterQuery; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/datasets"; + String localVarPath = "/api/v2/security/findings/automation/mute_rules"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringDatasets", + "v2.SecurityMonitoringApi.listSecurityFindingsAutomationMuteRules", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -23301,27 +23403,26 @@ public SecurityMonitoringDatasetsListResponse listSecurityMonitoringDatasets( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List datasets. + * Get all mute rules. * - *

See {@link #listSecurityMonitoringDatasetsWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationMuteRulesWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<SecurityMonitoringDatasetsListResponse>> + * @return CompletableFuture<ApiResponse<MuteRulesResponse>> */ - public CompletableFuture> - listSecurityMonitoringDatasetsWithHttpInfoAsync( - ListSecurityMonitoringDatasetsOptionalParameters parameters) { + public CompletableFuture> + listSecurityFindingsAutomationMuteRulesWithHttpInfoAsync( + ListSecurityFindingsAutomationMuteRulesOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listSecurityMonitoringDatasets"; + String operationId = "listSecurityFindingsAutomationMuteRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -23329,24 +23430,20 @@ public SecurityMonitoringDatasetsListResponse listSecurityMonitoringDatasets( Object localVarPostBody = null; Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; - String sort = parameters.sort; - String filterQuery = parameters.filterQuery; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/datasets"; + String localVarPath = "/api/v2/security/findings/automation/mute_rules"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringDatasets", + "v2.SecurityMonitoringApi.listSecurityFindingsAutomationMuteRules", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -23354,8 +23451,7 @@ public SecurityMonitoringDatasetsListResponse listSecurityMonitoringDatasets( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -23367,115 +23463,65 @@ public SecurityMonitoringDatasetsListResponse listSecurityMonitoringDatasets( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listSecurityMonitoringHistsignals. */ - public static class ListSecurityMonitoringHistsignalsOptionalParameters { - private String filterQuery; - private OffsetDateTime filterFrom; - private OffsetDateTime filterTo; - private SecurityMonitoringSignalsSort sort; - private String pageCursor; - private Integer pageLimit; - - /** - * Set filterQuery. - * - * @param filterQuery The search query for security signals. (optional) - * @return ListSecurityMonitoringHistsignalsOptionalParameters - */ - public ListSecurityMonitoringHistsignalsOptionalParameters filterQuery(String filterQuery) { - this.filterQuery = filterQuery; - return this; - } - - /** - * Set filterFrom. - * - * @param filterFrom The minimum timestamp for requested security signals. (optional) - * @return ListSecurityMonitoringHistsignalsOptionalParameters - */ - public ListSecurityMonitoringHistsignalsOptionalParameters filterFrom( - OffsetDateTime filterFrom) { - this.filterFrom = filterFrom; - return this; - } - - /** - * Set filterTo. - * - * @param filterTo The maximum timestamp for requested security signals. (optional) - * @return ListSecurityMonitoringHistsignalsOptionalParameters - */ - public ListSecurityMonitoringHistsignalsOptionalParameters filterTo(OffsetDateTime filterTo) { - this.filterTo = filterTo; - return this; - } - - /** - * Set sort. - * - * @param sort The order of the security signals in results. (optional) - * @return ListSecurityMonitoringHistsignalsOptionalParameters - */ - public ListSecurityMonitoringHistsignalsOptionalParameters sort( - SecurityMonitoringSignalsSort sort) { - this.sort = sort; - return this; - } + /** Manage optional parameters to listSecurityFindingsAutomationSeverityModifierRules. */ + public static class ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters { + private Long pageSize; + private Long pageNumber; /** - * Set pageCursor. + * Set pageSize. * - * @param pageCursor A list of results using the cursor provided in the previous query. - * (optional) - * @return ListSecurityMonitoringHistsignalsOptionalParameters + * @param pageSize The number of rules per page. Maximum is 1000. (optional, default to 1000) + * @return ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters */ - public ListSecurityMonitoringHistsignalsOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; + public ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters pageSize( + Long pageSize) { + this.pageSize = pageSize; return this; } /** - * Set pageLimit. + * Set pageNumber. * - * @param pageLimit The maximum number of security signals in the response. (optional, default - * to 10) - * @return ListSecurityMonitoringHistsignalsOptionalParameters + * @param pageNumber The page number to return. (optional, default to 0) + * @return ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters */ - public ListSecurityMonitoringHistsignalsOptionalParameters pageLimit(Integer pageLimit) { - this.pageLimit = pageLimit; + public ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters pageNumber( + Long pageNumber) { + this.pageNumber = pageNumber; return this; } } /** - * List hist signals. + * Get all severity modifier rules. * - *

See {@link #listSecurityMonitoringHistsignalsWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo}. * - * @return SecurityMonitoringSignalsListResponse + * @return SeverityModifierRulesResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringSignalsListResponse listSecurityMonitoringHistsignals() + public SeverityModifierRulesResponse listSecurityFindingsAutomationSeverityModifierRules() throws ApiException { - return listSecurityMonitoringHistsignalsWithHttpInfo( - new ListSecurityMonitoringHistsignalsOptionalParameters()) + return listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo( + new ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters()) .getData(); } /** - * List hist signals. + * Get all severity modifier rules. * - *

See {@link #listSecurityMonitoringHistsignalsWithHttpInfoAsync}. + *

See {@link #listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync}. * - * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + * @return CompletableFuture<SeverityModifierRulesResponse> */ - public CompletableFuture - listSecurityMonitoringHistsignalsAsync() { - return listSecurityMonitoringHistsignalsWithHttpInfoAsync( - new ListSecurityMonitoringHistsignalsOptionalParameters()) + public CompletableFuture + listSecurityFindingsAutomationSeverityModifierRulesAsync() { + return listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync( + new ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -23483,31 +23529,32 @@ public SecurityMonitoringSignalsListResponse listSecurityMonitoringHistsignals() } /** - * List hist signals. + * Get all severity modifier rules. * - *

See {@link #listSecurityMonitoringHistsignalsWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return SecurityMonitoringSignalsListResponse + * @return SeverityModifierRulesResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringSignalsListResponse listSecurityMonitoringHistsignals( - ListSecurityMonitoringHistsignalsOptionalParameters parameters) throws ApiException { - return listSecurityMonitoringHistsignalsWithHttpInfo(parameters).getData(); + public SeverityModifierRulesResponse listSecurityFindingsAutomationSeverityModifierRules( + ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters parameters) + throws ApiException { + return listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo(parameters).getData(); } /** - * List hist signals. + * Get all severity modifier rules. * - *

See {@link #listSecurityMonitoringHistsignalsWithHttpInfoAsync}. + *

See {@link #listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + * @return CompletableFuture<SeverityModifierRulesResponse> */ - public CompletableFuture - listSecurityMonitoringHistsignalsAsync( - ListSecurityMonitoringHistsignalsOptionalParameters parameters) { - return listSecurityMonitoringHistsignalsWithHttpInfoAsync(parameters) + public CompletableFuture + listSecurityFindingsAutomationSeverityModifierRulesAsync( + ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters parameters) { + return listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -23515,55 +23562,47 @@ public SecurityMonitoringSignalsListResponse listSecurityMonitoringHistsignals( } /** - * List hist signals. + * Get all severity modifier rules for the current organization. * * @param parameters Optional parameters for the request. - * @return ApiResponse<SecurityMonitoringSignalsListResponse> + * @return ApiResponse<SeverityModifierRulesResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * - * + * + * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
200 Successfully retrieved the list of severity modifier rules -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - listSecurityMonitoringHistsignalsWithHttpInfo( - ListSecurityMonitoringHistsignalsOptionalParameters parameters) throws ApiException { + public ApiResponse + listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo( + ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listSecurityMonitoringHistsignals"; + String operationId = "listSecurityFindingsAutomationSeverityModifierRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - String filterQuery = parameters.filterQuery; - OffsetDateTime filterFrom = parameters.filterFrom; - OffsetDateTime filterTo = parameters.filterTo; - SecurityMonitoringSignalsSort sort = parameters.sort; - String pageCursor = parameters.pageCursor; - Integer pageLimit = parameters.pageLimit; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/histsignals"; + String localVarPath = "/api/v2/security/findings/automation/severity_modifier_rules"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringHistsignals", + "v2.SecurityMonitoringApi.listSecurityFindingsAutomationSeverityModifierRules", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -23578,56 +23617,48 @@ public SecurityMonitoringSignalsListResponse listSecurityMonitoringHistsignals( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List hist signals. + * Get all severity modifier rules. * - *

See {@link #listSecurityMonitoringHistsignalsWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalsListResponse>> + * @return CompletableFuture<ApiResponse<SeverityModifierRulesResponse>> */ - public CompletableFuture> - listSecurityMonitoringHistsignalsWithHttpInfoAsync( - ListSecurityMonitoringHistsignalsOptionalParameters parameters) { + public CompletableFuture> + listSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync( + ListSecurityFindingsAutomationSeverityModifierRulesOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listSecurityMonitoringHistsignals"; + String operationId = "listSecurityFindingsAutomationSeverityModifierRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - String filterQuery = parameters.filterQuery; - OffsetDateTime filterFrom = parameters.filterFrom; - OffsetDateTime filterTo = parameters.filterTo; - SecurityMonitoringSignalsSort sort = parameters.sort; - String pageCursor = parameters.pageCursor; - Integer pageLimit = parameters.pageLimit; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/histsignals"; + String localVarPath = "/api/v2/security/findings/automation/severity_modifier_rules"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringHistsignals", + "v2.SecurityMonitoringApi.listSecurityFindingsAutomationSeverityModifierRules", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -23635,7 +23666,7 @@ public SecurityMonitoringSignalsListResponse listSecurityMonitoringHistsignals( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -23648,53 +23679,65 @@ public SecurityMonitoringSignalsListResponse listSecurityMonitoringHistsignals( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listSecurityMonitoringIntegrationConfigs. */ - public static class ListSecurityMonitoringIntegrationConfigsOptionalParameters { - private SecurityMonitoringIntegrationType filterIntegrationType; + /** Manage optional parameters to listSecurityFindingsAutomationTicketCreationRules. */ + public static class ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters { + private Long pageSize; + private Long pageNumber; /** - * Set filterIntegrationType. + * Set pageSize. * - * @param filterIntegrationType Filter the entity context sync configurations by source type. - * (optional) - * @return ListSecurityMonitoringIntegrationConfigsOptionalParameters + * @param pageSize The number of rules per page. Maximum is 1000. (optional, default to 1000) + * @return ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters */ - public ListSecurityMonitoringIntegrationConfigsOptionalParameters filterIntegrationType( - SecurityMonitoringIntegrationType filterIntegrationType) { - this.filterIntegrationType = filterIntegrationType; + public ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters pageSize( + Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageNumber. + * + * @param pageNumber The page number to return. (optional, default to 0) + * @return ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters + */ + public ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters pageNumber( + Long pageNumber) { + this.pageNumber = pageNumber; return this; } } /** - * List entity context sync configurations. + * Get all ticket creation rules. * - *

See {@link #listSecurityMonitoringIntegrationConfigsWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationTicketCreationRulesWithHttpInfo}. * - * @return SecurityMonitoringIntegrationConfigsResponse + * @return TicketCreationRulesResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringIntegrationConfigsResponse listSecurityMonitoringIntegrationConfigs() + public TicketCreationRulesResponse listSecurityFindingsAutomationTicketCreationRules() throws ApiException { - return listSecurityMonitoringIntegrationConfigsWithHttpInfo( - new ListSecurityMonitoringIntegrationConfigsOptionalParameters()) + return listSecurityFindingsAutomationTicketCreationRulesWithHttpInfo( + new ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters()) .getData(); } /** - * List entity context sync configurations. + * Get all ticket creation rules. * - *

See {@link #listSecurityMonitoringIntegrationConfigsWithHttpInfoAsync}. + *

See {@link #listSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync}. * - * @return CompletableFuture<SecurityMonitoringIntegrationConfigsResponse> + * @return CompletableFuture<TicketCreationRulesResponse> */ - public CompletableFuture - listSecurityMonitoringIntegrationConfigsAsync() { - return listSecurityMonitoringIntegrationConfigsWithHttpInfoAsync( - new ListSecurityMonitoringIntegrationConfigsOptionalParameters()) + public CompletableFuture + listSecurityFindingsAutomationTicketCreationRulesAsync() { + return listSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync( + new ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -23702,31 +23745,32 @@ public SecurityMonitoringIntegrationConfigsResponse listSecurityMonitoringIntegr } /** - * List entity context sync configurations. + * Get all ticket creation rules. * - *

See {@link #listSecurityMonitoringIntegrationConfigsWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationTicketCreationRulesWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return SecurityMonitoringIntegrationConfigsResponse + * @return TicketCreationRulesResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringIntegrationConfigsResponse listSecurityMonitoringIntegrationConfigs( - ListSecurityMonitoringIntegrationConfigsOptionalParameters parameters) throws ApiException { - return listSecurityMonitoringIntegrationConfigsWithHttpInfo(parameters).getData(); + public TicketCreationRulesResponse listSecurityFindingsAutomationTicketCreationRules( + ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters parameters) + throws ApiException { + return listSecurityFindingsAutomationTicketCreationRulesWithHttpInfo(parameters).getData(); } /** - * List entity context sync configurations. + * Get all ticket creation rules. * - *

See {@link #listSecurityMonitoringIntegrationConfigsWithHttpInfoAsync}. + *

See {@link #listSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<SecurityMonitoringIntegrationConfigsResponse> + * @return CompletableFuture<TicketCreationRulesResponse> */ - public CompletableFuture - listSecurityMonitoringIntegrationConfigsAsync( - ListSecurityMonitoringIntegrationConfigsOptionalParameters parameters) { - return listSecurityMonitoringIntegrationConfigsWithHttpInfoAsync(parameters) + public CompletableFuture + listSecurityFindingsAutomationTicketCreationRulesAsync( + ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters parameters) { + return listSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -23734,47 +23778,46 @@ public SecurityMonitoringIntegrationConfigsResponse listSecurityMonitoringIntegr } /** - * List the entity context sync configurations for Cloud SIEM. Each configuration connects Cloud - * SIEM to an external source that provides entities (for example, users from an identity - * provider) for use in signals and the entity explorer. + * Get all ticket creation rules for the current organization. * * @param parameters Optional parameters for the request. - * @return ApiResponse<SecurityMonitoringIntegrationConfigsResponse> + * @return ApiResponse<TicketCreationRulesResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
200 Successfully retrieved the list of ticket creation rules -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse - listSecurityMonitoringIntegrationConfigsWithHttpInfo( - ListSecurityMonitoringIntegrationConfigsOptionalParameters parameters) + public ApiResponse + listSecurityFindingsAutomationTicketCreationRulesWithHttpInfo( + ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listSecurityMonitoringIntegrationConfigs"; + String operationId = "listSecurityFindingsAutomationTicketCreationRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - SecurityMonitoringIntegrationType filterIntegrationType = parameters.filterIntegrationType; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/integration_config"; + String localVarPath = "/api/v2/security/findings/automation/ticket_creation_rules"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[integration_type]", filterIntegrationType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringIntegrationConfigs", + "v2.SecurityMonitoringApi.listSecurityFindingsAutomationTicketCreationRules", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -23789,48 +23832,48 @@ public SecurityMonitoringIntegrationConfigsResponse listSecurityMonitoringIntegr localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List entity context sync configurations. + * Get all ticket creation rules. * - *

See {@link #listSecurityMonitoringIntegrationConfigsWithHttpInfo}. + *

See {@link #listSecurityFindingsAutomationTicketCreationRulesWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return - * CompletableFuture<ApiResponse<SecurityMonitoringIntegrationConfigsResponse>> + * @return CompletableFuture<ApiResponse<TicketCreationRulesResponse>> */ - public CompletableFuture> - listSecurityMonitoringIntegrationConfigsWithHttpInfoAsync( - ListSecurityMonitoringIntegrationConfigsOptionalParameters parameters) { + public CompletableFuture> + listSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync( + ListSecurityFindingsAutomationTicketCreationRulesOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listSecurityMonitoringIntegrationConfigs"; + String operationId = "listSecurityFindingsAutomationTicketCreationRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - SecurityMonitoringIntegrationType filterIntegrationType = parameters.filterIntegrationType; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/integration_config"; + String localVarPath = "/api/v2/security/findings/automation/ticket_creation_rules"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[integration_type]", filterIntegrationType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringIntegrationConfigs", + "v2.SecurityMonitoringApi.listSecurityFindingsAutomationTicketCreationRules", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -23838,7 +23881,7 @@ public SecurityMonitoringIntegrationConfigsResponse listSecurityMonitoringIntegr new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -23851,24 +23894,23 @@ public SecurityMonitoringIntegrationConfigsResponse listSecurityMonitoringIntegr localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listSecurityMonitoringRules. */ - public static class ListSecurityMonitoringRulesOptionalParameters { + /** Manage optional parameters to listSecurityMonitoringBatchMigrationResources. */ + public static class ListSecurityMonitoringBatchMigrationResourcesOptionalParameters { private Long pageSize; private Long pageNumber; - private String query; - private SecurityMonitoringRuleSort sort; + private String filterQuery; /** * Set pageSize. * - * @param pageSize Number of items to return per page. The maximum allowed value is 100. - * (optional, default to 10) - * @return ListSecurityMonitoringRulesOptionalParameters + * @param pageSize Size for a given page. The maximum allowed value is 500. (optional, default + * to 50) + * @return ListSecurityMonitoringBatchMigrationResourcesOptionalParameters */ - public ListSecurityMonitoringRulesOptionalParameters pageSize(Long pageSize) { + public ListSecurityMonitoringBatchMigrationResourcesOptionalParameters pageSize(Long pageSize) { this.pageSize = pageSize; return this; } @@ -23876,63 +23918,60 @@ public ListSecurityMonitoringRulesOptionalParameters pageSize(Long pageSize) { /** * Set pageNumber. * - * @param pageNumber Specific page number to return. (optional, default to 0) - * @return ListSecurityMonitoringRulesOptionalParameters + * @param pageNumber Specific page number to return, starting at 1. (optional, default to 1) + * @return ListSecurityMonitoringBatchMigrationResourcesOptionalParameters */ - public ListSecurityMonitoringRulesOptionalParameters pageNumber(Long pageNumber) { + public ListSecurityMonitoringBatchMigrationResourcesOptionalParameters pageNumber( + Long pageNumber) { this.pageNumber = pageNumber; return this; } /** - * Set query. - * - * @param query A search query to filter security rules. You can filter by attributes such as - * type, source, tags. (optional) - * @return ListSecurityMonitoringRulesOptionalParameters - */ - public ListSecurityMonitoringRulesOptionalParameters query(String query) { - this.query = query; - return this; - } - - /** - * Set sort. + * Set filterQuery. * - * @param sort Attribute used to sort rules. Prefix with - to sort in descending - * order. (optional) - * @return ListSecurityMonitoringRulesOptionalParameters + * @param filterQuery A search query in Datadog search syntax to filter resources, such as + * status:completed. Filterable attributes are id, name + * , description, inputType, status, + * input, createdBy, and lastUpdatedBy. Free text matches + * the resource name. (optional) + * @return ListSecurityMonitoringBatchMigrationResourcesOptionalParameters */ - public ListSecurityMonitoringRulesOptionalParameters sort(SecurityMonitoringRuleSort sort) { - this.sort = sort; + public ListSecurityMonitoringBatchMigrationResourcesOptionalParameters filterQuery( + String filterQuery) { + this.filterQuery = filterQuery; return this; } } /** - * List rules. + * List batch migration resources. * - *

See {@link #listSecurityMonitoringRulesWithHttpInfo}. + *

See {@link #listSecurityMonitoringBatchMigrationResourcesWithHttpInfo}. * - * @return SecurityMonitoringListRulesResponse + * @param batchId The UUID of the batch migration. (required) + * @return SecurityMonitoringBatchMigrationResourcesListResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringListRulesResponse listSecurityMonitoringRules() throws ApiException { - return listSecurityMonitoringRulesWithHttpInfo( - new ListSecurityMonitoringRulesOptionalParameters()) + public SecurityMonitoringBatchMigrationResourcesListResponse + listSecurityMonitoringBatchMigrationResources(UUID batchId) throws ApiException { + return listSecurityMonitoringBatchMigrationResourcesWithHttpInfo( + batchId, new ListSecurityMonitoringBatchMigrationResourcesOptionalParameters()) .getData(); } /** - * List rules. + * List batch migration resources. * - *

See {@link #listSecurityMonitoringRulesWithHttpInfoAsync}. + *

See {@link #listSecurityMonitoringBatchMigrationResourcesWithHttpInfoAsync}. * - * @return CompletableFuture<SecurityMonitoringListRulesResponse> + * @param batchId The UUID of the batch migration. (required) + * @return CompletableFuture<SecurityMonitoringBatchMigrationResourcesListResponse> */ - public CompletableFuture listSecurityMonitoringRulesAsync() { - return listSecurityMonitoringRulesWithHttpInfoAsync( - new ListSecurityMonitoringRulesOptionalParameters()) + public CompletableFuture + listSecurityMonitoringBatchMigrationResourcesAsync(UUID batchId) { + return listSecurityMonitoringBatchMigrationResourcesWithHttpInfoAsync( + batchId, new ListSecurityMonitoringBatchMigrationResourcesOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -23940,30 +23979,36 @@ public CompletableFuture listSecurityMonito } /** - * List rules. + * List batch migration resources. * - *

See {@link #listSecurityMonitoringRulesWithHttpInfo}. + *

See {@link #listSecurityMonitoringBatchMigrationResourcesWithHttpInfo}. * + * @param batchId The UUID of the batch migration. (required) * @param parameters Optional parameters for the request. - * @return SecurityMonitoringListRulesResponse + * @return SecurityMonitoringBatchMigrationResourcesListResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringListRulesResponse listSecurityMonitoringRules( - ListSecurityMonitoringRulesOptionalParameters parameters) throws ApiException { - return listSecurityMonitoringRulesWithHttpInfo(parameters).getData(); + public SecurityMonitoringBatchMigrationResourcesListResponse + listSecurityMonitoringBatchMigrationResources( + UUID batchId, ListSecurityMonitoringBatchMigrationResourcesOptionalParameters parameters) + throws ApiException { + return listSecurityMonitoringBatchMigrationResourcesWithHttpInfo(batchId, parameters).getData(); } /** - * List rules. + * List batch migration resources. * - *

See {@link #listSecurityMonitoringRulesWithHttpInfoAsync}. + *

See {@link #listSecurityMonitoringBatchMigrationResourcesWithHttpInfoAsync}. * + * @param batchId The UUID of the batch migration. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<SecurityMonitoringListRulesResponse> + * @return CompletableFuture<SecurityMonitoringBatchMigrationResourcesListResponse> */ - public CompletableFuture listSecurityMonitoringRulesAsync( - ListSecurityMonitoringRulesOptionalParameters parameters) { - return listSecurityMonitoringRulesWithHttpInfoAsync(parameters) + public CompletableFuture + listSecurityMonitoringBatchMigrationResourcesAsync( + UUID batchId, + ListSecurityMonitoringBatchMigrationResourcesOptionalParameters parameters) { + return listSecurityMonitoringBatchMigrationResourcesWithHttpInfoAsync(batchId, parameters) .thenApply( response -> { return response.getData(); @@ -23971,10 +24016,12 @@ public CompletableFuture listSecurityMonito } /** - * List rules. + * List the resources of a batch migration, including the input of each source rule and, once + * translated, the proposed Cloud SIEM detection rule in output. * + * @param batchId The UUID of the batch migration. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<SecurityMonitoringListRulesResponse> + * @return ApiResponse<SecurityMonitoringBatchMigrationResourcesListResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -23982,30 +24029,50 @@ public CompletableFuture listSecurityMonito * * * + * + * + * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse listSecurityMonitoringRulesWithHttpInfo( - ListSecurityMonitoringRulesOptionalParameters parameters) throws ApiException { + public ApiResponse + listSecurityMonitoringBatchMigrationResourcesWithHttpInfo( + UUID batchId, ListSecurityMonitoringBatchMigrationResourcesOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listSecurityMonitoringBatchMigrationResources"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; + + // verify the required parameter 'batchId' is set + if (batchId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'batchId' when calling" + + " listSecurityMonitoringBatchMigrationResources"); + } Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; - String query = parameters.query; - SecurityMonitoringRuleSort sort = parameters.sort; + String filterQuery = parameters.filterQuery; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/rules"; + String localVarPath = + "/api/v2/security_monitoring/batch-migrations/{batch_id}/resources" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringRules", + "v2.SecurityMonitoringApi.listSecurityMonitoringBatchMigrationResources", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -24020,41 +24087,67 @@ public ApiResponse listSecurityMonitoringRu localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List rules. + * List batch migration resources. * - *

See {@link #listSecurityMonitoringRulesWithHttpInfo}. + *

See {@link #listSecurityMonitoringBatchMigrationResourcesWithHttpInfo}. * + * @param batchId The UUID of the batch migration. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<SecurityMonitoringListRulesResponse>> + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringBatchMigrationResourcesListResponse>> */ - public CompletableFuture> - listSecurityMonitoringRulesWithHttpInfoAsync( - ListSecurityMonitoringRulesOptionalParameters parameters) { + public CompletableFuture> + listSecurityMonitoringBatchMigrationResourcesWithHttpInfoAsync( + UUID batchId, + ListSecurityMonitoringBatchMigrationResourcesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listSecurityMonitoringBatchMigrationResources"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; + + // verify the required parameter 'batchId' is set + if (batchId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'batchId' when calling" + + " listSecurityMonitoringBatchMigrationResources")); + return result; + } Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; - String query = parameters.query; - SecurityMonitoringRuleSort sort = parameters.sort; + String filterQuery = parameters.filterQuery; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/rules"; + String localVarPath = + "/api/v2/security_monitoring/batch-migrations/{batch_id}/resources" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringRules", + "v2.SecurityMonitoringApi.listSecurityMonitoringBatchMigrationResources", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -24062,7 +24155,7 @@ public ApiResponse listSecurityMonitoringRu new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -24075,113 +24168,79 @@ public ApiResponse listSecurityMonitoringRu localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listSecurityMonitoringSignals. */ - public static class ListSecurityMonitoringSignalsOptionalParameters { + /** Manage optional parameters to listSecurityMonitoringBatchMigrations. */ + public static class ListSecurityMonitoringBatchMigrationsOptionalParameters { + private Long pageSize; + private Long pageNumber; private String filterQuery; - private OffsetDateTime filterFrom; - private OffsetDateTime filterTo; - private SecurityMonitoringSignalsSort sort; - private String pageCursor; - private Integer pageLimit; /** - * Set filterQuery. + * Set pageSize. * - * @param filterQuery The search query for security signals. (optional) - * @return ListSecurityMonitoringSignalsOptionalParameters + * @param pageSize Size for a given page. The maximum allowed value is 500. (optional, default + * to 50) + * @return ListSecurityMonitoringBatchMigrationsOptionalParameters */ - public ListSecurityMonitoringSignalsOptionalParameters filterQuery(String filterQuery) { - this.filterQuery = filterQuery; + public ListSecurityMonitoringBatchMigrationsOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; return this; } /** - * Set filterFrom. + * Set pageNumber. * - * @param filterFrom The minimum timestamp for requested security signals. (optional) - * @return ListSecurityMonitoringSignalsOptionalParameters + * @param pageNumber Specific page number to return, starting at 1. (optional, default to 1) + * @return ListSecurityMonitoringBatchMigrationsOptionalParameters */ - public ListSecurityMonitoringSignalsOptionalParameters filterFrom(OffsetDateTime filterFrom) { - this.filterFrom = filterFrom; + public ListSecurityMonitoringBatchMigrationsOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; return this; } /** - * Set filterTo. + * Set filterQuery. * - * @param filterTo The maximum timestamp for requested security signals. (optional) - * @return ListSecurityMonitoringSignalsOptionalParameters + * @param filterQuery A search query in Datadog search syntax to filter batch migrations, such + * as status:completed. Filterable attributes are id, name + * , description, status, createdBy, and + * lastUpdatedBy. Free text matches the batch migration name. (optional) + * @return ListSecurityMonitoringBatchMigrationsOptionalParameters */ - public ListSecurityMonitoringSignalsOptionalParameters filterTo(OffsetDateTime filterTo) { - this.filterTo = filterTo; - return this; - } - - /** - * Set sort. - * - * @param sort The order of the security signals in results. (optional) - * @return ListSecurityMonitoringSignalsOptionalParameters - */ - public ListSecurityMonitoringSignalsOptionalParameters sort( - SecurityMonitoringSignalsSort sort) { - this.sort = sort; - return this; - } - - /** - * Set pageCursor. - * - * @param pageCursor A list of results using the cursor provided in the previous query. - * (optional) - * @return ListSecurityMonitoringSignalsOptionalParameters - */ - public ListSecurityMonitoringSignalsOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; - return this; - } - - /** - * Set pageLimit. - * - * @param pageLimit The maximum number of security signals in the response. (optional, default - * to 10) - * @return ListSecurityMonitoringSignalsOptionalParameters - */ - public ListSecurityMonitoringSignalsOptionalParameters pageLimit(Integer pageLimit) { - this.pageLimit = pageLimit; + public ListSecurityMonitoringBatchMigrationsOptionalParameters filterQuery(String filterQuery) { + this.filterQuery = filterQuery; return this; } } /** - * Get a quick list of security signals. + * List batch migrations. * - *

See {@link #listSecurityMonitoringSignalsWithHttpInfo}. + *

See {@link #listSecurityMonitoringBatchMigrationsWithHttpInfo}. * - * @return SecurityMonitoringSignalsListResponse + * @return SecurityMonitoringBatchMigrationsListResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringSignalsListResponse listSecurityMonitoringSignals() throws ApiException { - return listSecurityMonitoringSignalsWithHttpInfo( - new ListSecurityMonitoringSignalsOptionalParameters()) + public SecurityMonitoringBatchMigrationsListResponse listSecurityMonitoringBatchMigrations() + throws ApiException { + return listSecurityMonitoringBatchMigrationsWithHttpInfo( + new ListSecurityMonitoringBatchMigrationsOptionalParameters()) .getData(); } /** - * Get a quick list of security signals. + * List batch migrations. * - *

See {@link #listSecurityMonitoringSignalsWithHttpInfoAsync}. + *

See {@link #listSecurityMonitoringBatchMigrationsWithHttpInfoAsync}. * - * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + * @return CompletableFuture<SecurityMonitoringBatchMigrationsListResponse> */ - public CompletableFuture - listSecurityMonitoringSignalsAsync() { - return listSecurityMonitoringSignalsWithHttpInfoAsync( - new ListSecurityMonitoringSignalsOptionalParameters()) + public CompletableFuture + listSecurityMonitoringBatchMigrationsAsync() { + return listSecurityMonitoringBatchMigrationsWithHttpInfoAsync( + new ListSecurityMonitoringBatchMigrationsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -24189,31 +24248,31 @@ public SecurityMonitoringSignalsListResponse listSecurityMonitoringSignals() thr } /** - * Get a quick list of security signals. + * List batch migrations. * - *

See {@link #listSecurityMonitoringSignalsWithHttpInfo}. + *

See {@link #listSecurityMonitoringBatchMigrationsWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return SecurityMonitoringSignalsListResponse + * @return SecurityMonitoringBatchMigrationsListResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringSignalsListResponse listSecurityMonitoringSignals( - ListSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { - return listSecurityMonitoringSignalsWithHttpInfo(parameters).getData(); + public SecurityMonitoringBatchMigrationsListResponse listSecurityMonitoringBatchMigrations( + ListSecurityMonitoringBatchMigrationsOptionalParameters parameters) throws ApiException { + return listSecurityMonitoringBatchMigrationsWithHttpInfo(parameters).getData(); } /** - * Get a quick list of security signals. + * List batch migrations. * - *

See {@link #listSecurityMonitoringSignalsWithHttpInfoAsync}. + *

See {@link #listSecurityMonitoringBatchMigrationsWithHttpInfoAsync}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + * @return CompletableFuture<SecurityMonitoringBatchMigrationsListResponse> */ - public CompletableFuture - listSecurityMonitoringSignalsAsync( - ListSecurityMonitoringSignalsOptionalParameters parameters) { - return listSecurityMonitoringSignalsWithHttpInfoAsync(parameters) + public CompletableFuture + listSecurityMonitoringBatchMigrationsAsync( + ListSecurityMonitoringBatchMigrationsOptionalParameters parameters) { + return listSecurityMonitoringBatchMigrationsWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -24221,67 +24280,14 @@ public SecurityMonitoringSignalsListResponse listSecurityMonitoringSignals( } /** - * Get a quick list of security signals. - * - *

See {@link #listSecurityMonitoringSignalsWithHttpInfo}. - * - * @return PaginationIterable<SecurityMonitoringSignal> - */ - public PaginationIterable - listSecurityMonitoringSignalsWithPagination() { - ListSecurityMonitoringSignalsOptionalParameters parameters = - new ListSecurityMonitoringSignalsOptionalParameters(); - return listSecurityMonitoringSignalsWithPagination(parameters); - } - - /** - * Get a quick list of security signals. - * - *

See {@link #listSecurityMonitoringSignalsWithHttpInfo}. - * - * @return SecurityMonitoringSignalsListResponse - */ - public PaginationIterable listSecurityMonitoringSignalsWithPagination( - ListSecurityMonitoringSignalsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "pageCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.pageLimit == null) { - limit = 10; - parameters.pageLimit(limit); - } else { - limit = parameters.pageLimit; - } - - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); - - PaginationIterable iterator = - new PaginationIterable( - this, - "listSecurityMonitoringSignals", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - true, - true, - limit, - args, - 0); - - return iterator; - } - - /** - * The list endpoint returns security signals that match a search query. Both this endpoint and - * the POST endpoint can be used interchangeably when listing security signals. + * List the batch migrations of your organization. A batch migration groups detection rules from + * another SIEM that the Datadog Detection Agent translates into Cloud SIEM detection rules. To + * retrieve a single batch migration, filter by its ID with + * filter[query]=id:<batch_id>. Poll this endpoint to follow the progress of a batch + * migration through its status and resourceStatusCounts. * * @param parameters Optional parameters for the request. - * @return ApiResponse<SecurityMonitoringSignalsListResponse> + * @return ApiResponse<SecurityMonitoringBatchMigrationsListResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -24289,36 +24295,38 @@ public PaginationIterable listSecurityMonitoringSignal * * * - * + * + * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse - listSecurityMonitoringSignalsWithHttpInfo( - ListSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { + public ApiResponse + listSecurityMonitoringBatchMigrationsWithHttpInfo( + ListSecurityMonitoringBatchMigrationsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listSecurityMonitoringBatchMigrations"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; String filterQuery = parameters.filterQuery; - OffsetDateTime filterFrom = parameters.filterFrom; - OffsetDateTime filterTo = parameters.filterTo; - SecurityMonitoringSignalsSort sort = parameters.sort; - String pageCursor = parameters.pageCursor; - Integer pageLimit = parameters.pageLimit; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/signals"; + String localVarPath = "/api/v2/security_monitoring/batch-migrations"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringSignals", + "v2.SecurityMonitoringApi.listSecurityMonitoringBatchMigrations", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -24333,45 +24341,51 @@ public PaginationIterable listSecurityMonitoringSignal localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a quick list of security signals. + * List batch migrations. * - *

See {@link #listSecurityMonitoringSignalsWithHttpInfo}. + *

See {@link #listSecurityMonitoringBatchMigrationsWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalsListResponse>> + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringBatchMigrationsListResponse>> */ - public CompletableFuture> - listSecurityMonitoringSignalsWithHttpInfoAsync( - ListSecurityMonitoringSignalsOptionalParameters parameters) { + public CompletableFuture> + listSecurityMonitoringBatchMigrationsWithHttpInfoAsync( + ListSecurityMonitoringBatchMigrationsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listSecurityMonitoringBatchMigrations"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; String filterQuery = parameters.filterQuery; - OffsetDateTime filterFrom = parameters.filterFrom; - OffsetDateTime filterTo = parameters.filterTo; - SecurityMonitoringSignalsSort sort = parameters.sort; - String pageCursor = parameters.pageCursor; - Integer pageLimit = parameters.pageLimit; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/signals"; + String localVarPath = "/api/v2/security_monitoring/batch-migrations"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringSignals", + "v2.SecurityMonitoringApi.listSecurityMonitoringBatchMigrations", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -24379,7 +24393,7 @@ public PaginationIterable listSecurityMonitoringSignal new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -24392,122 +24406,32 @@ public PaginationIterable listSecurityMonitoringSignal localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to listSecurityMonitoringSuppressions. */ - public static class ListSecurityMonitoringSuppressionsOptionalParameters { - private String query; - private SecurityMonitoringSuppressionSort sort; - private Long pageSize; - private Long pageNumber; - - /** - * Set query. - * - * @param query Query string. (optional) - * @return ListSecurityMonitoringSuppressionsOptionalParameters - */ - public ListSecurityMonitoringSuppressionsOptionalParameters query(String query) { - this.query = query; - return this; - } - - /** - * Set sort. - * - * @param sort Attribute used to sort the list of suppression rules. Prefix with - - * to sort in descending order. (optional) - * @return ListSecurityMonitoringSuppressionsOptionalParameters - */ - public ListSecurityMonitoringSuppressionsOptionalParameters sort( - SecurityMonitoringSuppressionSort sort) { - this.sort = sort; - return this; - } - - /** - * Set pageSize. - * - * @param pageSize Size for a given page. Use -1 to return all items. (optional, - * default to -1) - * @return ListSecurityMonitoringSuppressionsOptionalParameters - */ - public ListSecurityMonitoringSuppressionsOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Set pageNumber. - * - * @param pageNumber Specific page number to return. (optional, default to 0) - * @return ListSecurityMonitoringSuppressionsOptionalParameters - */ - public ListSecurityMonitoringSuppressionsOptionalParameters pageNumber(Long pageNumber) { - this.pageNumber = pageNumber; - return this; - } + new GenericType() {}); } /** - * Get all suppression rules. + * Get all critical assets. * - *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfo}. + *

See {@link #listSecurityMonitoringCriticalAssetsWithHttpInfo}. * - * @return SecurityMonitoringPaginatedSuppressionsResponse + * @return SecurityMonitoringCriticalAssetsResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSuppressions() + public SecurityMonitoringCriticalAssetsResponse listSecurityMonitoringCriticalAssets() throws ApiException { - return listSecurityMonitoringSuppressionsWithHttpInfo( - new ListSecurityMonitoringSuppressionsOptionalParameters()) - .getData(); + return listSecurityMonitoringCriticalAssetsWithHttpInfo().getData(); } /** - * Get all suppression rules. - * - *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfoAsync}. - * - * @return CompletableFuture<SecurityMonitoringPaginatedSuppressionsResponse> - */ - public CompletableFuture - listSecurityMonitoringSuppressionsAsync() { - return listSecurityMonitoringSuppressionsWithHttpInfoAsync( - new ListSecurityMonitoringSuppressionsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get all suppression rules. - * - *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return SecurityMonitoringPaginatedSuppressionsResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSuppressions( - ListSecurityMonitoringSuppressionsOptionalParameters parameters) throws ApiException { - return listSecurityMonitoringSuppressionsWithHttpInfo(parameters).getData(); - } - - /** - * Get all suppression rules. + * Get all critical assets. * - *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfoAsync}. + *

See {@link #listSecurityMonitoringCriticalAssetsWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SecurityMonitoringPaginatedSuppressionsResponse> + * @return CompletableFuture<SecurityMonitoringCriticalAssetsResponse> */ - public CompletableFuture - listSecurityMonitoringSuppressionsAsync( - ListSecurityMonitoringSuppressionsOptionalParameters parameters) { - return listSecurityMonitoringSuppressionsWithHttpInfoAsync(parameters) + public CompletableFuture + listSecurityMonitoringCriticalAssetsAsync() { + return listSecurityMonitoringCriticalAssetsWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -24515,10 +24439,9 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup } /** - * Get the list of all suppression rules. + * Get the list of all critical assets. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<SecurityMonitoringPaginatedSuppressionsResponse> + * @return ApiResponse<SecurityMonitoringCriticalAssetsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -24529,30 +24452,19 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup * *
429 Too many requests -
*/ - public ApiResponse - listSecurityMonitoringSuppressionsWithHttpInfo( - ListSecurityMonitoringSuppressionsOptionalParameters parameters) throws ApiException { + public ApiResponse + listSecurityMonitoringCriticalAssetsWithHttpInfo() throws ApiException { Object localVarPostBody = null; - String query = parameters.query; - SecurityMonitoringSuppressionSort sort = parameters.sort; - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/suppressions"; + String localVarPath = "/api/v2/security_monitoring/configuration/critical_assets"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringSuppressions", + "v2.SecurityMonitoringApi.listSecurityMonitoringCriticalAssets", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -24565,50 +24477,37 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get all suppression rules. + * Get all critical assets. * - *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfo}. + *

See {@link #listSecurityMonitoringCriticalAssetsWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return - * CompletableFuture<ApiResponse<SecurityMonitoringPaginatedSuppressionsResponse>> + * @return CompletableFuture<ApiResponse<SecurityMonitoringCriticalAssetsResponse>> */ - public CompletableFuture> - listSecurityMonitoringSuppressionsWithHttpInfoAsync( - ListSecurityMonitoringSuppressionsOptionalParameters parameters) { + public CompletableFuture> + listSecurityMonitoringCriticalAssetsWithHttpInfoAsync() { Object localVarPostBody = null; - String query = parameters.query; - SecurityMonitoringSuppressionSort sort = parameters.sort; - Long pageSize = parameters.pageSize; - Long pageNumber = parameters.pageNumber; // create path and map variables - String localVarPath = "/api/v2/security_monitoring/configuration/suppressions"; + String localVarPath = "/api/v2/security_monitoring/configuration/critical_assets"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listSecurityMonitoringSuppressions", + "v2.SecurityMonitoringApi.listSecurityMonitoringCriticalAssets", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -24621,30 +24520,89 @@ public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSup localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to listSecurityMonitoringDatasets. */ + public static class ListSecurityMonitoringDatasetsOptionalParameters { + private Long pageSize; + private Long pageNumber; + private String sort; + private String filterQuery; + + /** + * Set pageSize. + * + * @param pageSize Size for a given page. The maximum allowed value is 100. (optional, default + * to 50) + * @return ListSecurityMonitoringDatasetsOptionalParameters + */ + public ListSecurityMonitoringDatasetsOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageNumber. + * + * @param pageNumber Specific page number to return. (optional, default to 1) + * @return ListSecurityMonitoringDatasetsOptionalParameters + */ + public ListSecurityMonitoringDatasetsOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set sort. + * + * @param sort Attribute used to sort datasets. Prefix with - to sort in descending + * order. (optional) + * @return ListSecurityMonitoringDatasetsOptionalParameters + */ + public ListSecurityMonitoringDatasetsOptionalParameters sort(String sort) { + this.sort = sort; + return this; + } + + /** + * Set filterQuery. + * + * @param filterQuery A search query to filter datasets by name or description. (optional) + * @return ListSecurityMonitoringDatasetsOptionalParameters + */ + public ListSecurityMonitoringDatasetsOptionalParameters filterQuery(String filterQuery) { + this.filterQuery = filterQuery; + return this; + } } /** - * List codegen rulesets. + * List datasets. * - *

See {@link #listStaticAnalysisCodegenRulesetsWithHttpInfo}. + *

See {@link #listSecurityMonitoringDatasetsWithHttpInfo}. * - * @return SastRulesetsResponse + * @return SecurityMonitoringDatasetsListResponse * @throws ApiException if fails to make API call */ - public SastRulesetsResponse listStaticAnalysisCodegenRulesets() throws ApiException { - return listStaticAnalysisCodegenRulesetsWithHttpInfo().getData(); + public SecurityMonitoringDatasetsListResponse listSecurityMonitoringDatasets() + throws ApiException { + return listSecurityMonitoringDatasetsWithHttpInfo( + new ListSecurityMonitoringDatasetsOptionalParameters()) + .getData(); } /** - * List codegen rulesets. + * List datasets. * - *

See {@link #listStaticAnalysisCodegenRulesetsWithHttpInfoAsync}. + *

See {@link #listSecurityMonitoringDatasetsWithHttpInfoAsync}. * - * @return CompletableFuture<SastRulesetsResponse> + * @return CompletableFuture<SecurityMonitoringDatasetsListResponse> */ - public CompletableFuture listStaticAnalysisCodegenRulesetsAsync() { - return listStaticAnalysisCodegenRulesetsWithHttpInfoAsync() + public CompletableFuture + listSecurityMonitoringDatasetsAsync() { + return listSecurityMonitoringDatasetsWithHttpInfoAsync( + new ListSecurityMonitoringDatasetsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -24652,9 +24610,43 @@ public CompletableFuture listStaticAnalysisCodegenRulesets } /** - * Get the rulesets relevant for code generation for the authenticated user. + * List datasets. * - * @return ApiResponse<SastRulesetsResponse> + *

See {@link #listSecurityMonitoringDatasetsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SecurityMonitoringDatasetsListResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringDatasetsListResponse listSecurityMonitoringDatasets( + ListSecurityMonitoringDatasetsOptionalParameters parameters) throws ApiException { + return listSecurityMonitoringDatasetsWithHttpInfo(parameters).getData(); + } + + /** + * List datasets. + * + *

See {@link #listSecurityMonitoringDatasetsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SecurityMonitoringDatasetsListResponse> + */ + public CompletableFuture + listSecurityMonitoringDatasetsAsync( + ListSecurityMonitoringDatasetsOptionalParameters parameters) { + return listSecurityMonitoringDatasetsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all Cloud SIEM datasets available to the organization, including both customer-defined + * datasets and Datadog out-of-the-box datasets. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<SecurityMonitoringDatasetsListResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -24662,30 +24654,41 @@ public CompletableFuture listStaticAnalysisCodegenRulesets * * * - * + * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse listStaticAnalysisCodegenRulesetsWithHttpInfo() - throws ApiException { + public ApiResponse + listSecurityMonitoringDatasetsWithHttpInfo( + ListSecurityMonitoringDatasetsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listStaticAnalysisCodegenRulesets"; + String operationId = "listSecurityMonitoringDatasets"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + String sort = parameters.sort; + String filterQuery = parameters.filterQuery; // create path and map variables - String localVarPath = "/api/v2/static-analysis/codegen/rulesets"; + String localVarPath = "/api/v2/security_monitoring/datasets"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listStaticAnalysisCodegenRulesets", + "v2.SecurityMonitoringApi.listSecurityMonitoringDatasets", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -24698,47 +24701,61 @@ public ApiResponse listStaticAnalysisCodegenRulesetsWithHt localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List codegen rulesets. + * List datasets. * - *

See {@link #listStaticAnalysisCodegenRulesetsWithHttpInfo}. + *

See {@link #listSecurityMonitoringDatasetsWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<SastRulesetsResponse>> + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SecurityMonitoringDatasetsListResponse>> */ - public CompletableFuture> - listStaticAnalysisCodegenRulesetsWithHttpInfoAsync() { + public CompletableFuture> + listSecurityMonitoringDatasetsWithHttpInfoAsync( + ListSecurityMonitoringDatasetsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listStaticAnalysisCodegenRulesets"; + String operationId = "listSecurityMonitoringDatasets"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + String sort = parameters.sort; + String filterQuery = parameters.filterQuery; // create path and map variables - String localVarPath = "/api/v2/static-analysis/codegen/rulesets"; + String localVarPath = "/api/v2/security_monitoring/datasets"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listStaticAnalysisCodegenRulesets", + "v2.SecurityMonitoringApi.listSecurityMonitoringDatasets", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -24750,595 +24767,572 @@ public ApiResponse listStaticAnalysisCodegenRulesetsWithHt localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listVulnerabilities. */ - public static class ListVulnerabilitiesOptionalParameters { - private String pageToken; - private Long pageNumber; - private VulnerabilityType filterType; - private Double filterCvssBaseScoreOp; - private VulnerabilitySeverity filterCvssBaseSeverity; - private String filterCvssBaseVector; - private Double filterCvssDatadogScoreOp; - private VulnerabilitySeverity filterCvssDatadogSeverity; - private String filterCvssDatadogVector; - private VulnerabilityStatus filterStatus; - private VulnerabilityTool filterTool; - private String filterLibraryName; - private String filterLibraryVersion; - private String filterAdvisoryId; - private Boolean filterRisksExploitationProbability; - private Boolean filterRisksPocExploitAvailable; - private Boolean filterRisksExploitAvailable; - private Double filterRisksEpssScoreOp; - private VulnerabilitySeverity filterRisksEpssSeverity; - private String filterLanguage; - private VulnerabilityEcosystem filterEcosystem; - private String filterCodeLocationLocation; - private String filterCodeLocationFilePath; - private String filterCodeLocationMethod; - private Boolean filterFixAvailable; - private String filterRepoDigests; - private String filterOrigin; - private Boolean filterRunningKernel; - private String filterAssetName; - private AssetType filterAssetType; - private String filterAssetVersionFirst; - private String filterAssetVersionLast; - private String filterAssetRepositoryUrl; - private Boolean filterAssetRisksInProduction; - private Boolean filterAssetRisksUnderAttack; - private Boolean filterAssetRisksIsPubliclyAccessible; - private Boolean filterAssetRisksHasPrivilegedAccess; - private Boolean filterAssetRisksHasAccessToSensitiveData; - private String filterAssetEnvironments; - private String filterAssetTeams; - private String filterAssetArch; - private String filterAssetOperatingSystemName; - private String filterAssetOperatingSystemVersion; - - /** - * Set pageToken. - * - * @param pageToken Its value must come from the links section of the response of - * the first request. Do not manually edit it. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters pageToken(String pageToken) { - this.pageToken = pageToken; - return this; - } - - /** - * Set pageNumber. - * - * @param pageNumber The page number to be retrieved. It should be equal or greater than 1 - * (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters pageNumber(Long pageNumber) { - this.pageNumber = pageNumber; - return this; - } + /** Manage optional parameters to listSecurityMonitoringHistsignals. */ + public static class ListSecurityMonitoringHistsignalsOptionalParameters { + private String filterQuery; + private OffsetDateTime filterFrom; + private OffsetDateTime filterTo; + private SecurityMonitoringSignalsSort sort; + private String pageCursor; + private Integer pageLimit; /** - * Set filterType. + * Set filterQuery. * - * @param filterType Filter by vulnerability type. (optional) - * @return ListVulnerabilitiesOptionalParameters + * @param filterQuery The search query for security signals. (optional) + * @return ListSecurityMonitoringHistsignalsOptionalParameters */ - public ListVulnerabilitiesOptionalParameters filterType(VulnerabilityType filterType) { - this.filterType = filterType; + public ListSecurityMonitoringHistsignalsOptionalParameters filterQuery(String filterQuery) { + this.filterQuery = filterQuery; return this; } /** - * Set filterCvssBaseScoreOp. + * Set filterFrom. * - * @param filterCvssBaseScoreOp Filter by vulnerability base (i.e. from the original advisory) - * severity score. (optional) - * @return ListVulnerabilitiesOptionalParameters + * @param filterFrom The minimum timestamp for requested security signals. (optional) + * @return ListSecurityMonitoringHistsignalsOptionalParameters */ - public ListVulnerabilitiesOptionalParameters filterCvssBaseScoreOp( - Double filterCvssBaseScoreOp) { - this.filterCvssBaseScoreOp = filterCvssBaseScoreOp; + public ListSecurityMonitoringHistsignalsOptionalParameters filterFrom( + OffsetDateTime filterFrom) { + this.filterFrom = filterFrom; return this; } /** - * Set filterCvssBaseSeverity. + * Set filterTo. * - * @param filterCvssBaseSeverity Filter by vulnerability base severity. (optional) - * @return ListVulnerabilitiesOptionalParameters + * @param filterTo The maximum timestamp for requested security signals. (optional) + * @return ListSecurityMonitoringHistsignalsOptionalParameters */ - public ListVulnerabilitiesOptionalParameters filterCvssBaseSeverity( - VulnerabilitySeverity filterCvssBaseSeverity) { - this.filterCvssBaseSeverity = filterCvssBaseSeverity; + public ListSecurityMonitoringHistsignalsOptionalParameters filterTo(OffsetDateTime filterTo) { + this.filterTo = filterTo; return this; } /** - * Set filterCvssBaseVector. + * Set sort. * - * @param filterCvssBaseVector Filter by vulnerability base CVSS vector. (optional) - * @return ListVulnerabilitiesOptionalParameters + * @param sort The order of the security signals in results. (optional) + * @return ListSecurityMonitoringHistsignalsOptionalParameters */ - public ListVulnerabilitiesOptionalParameters filterCvssBaseVector(String filterCvssBaseVector) { - this.filterCvssBaseVector = filterCvssBaseVector; + public ListSecurityMonitoringHistsignalsOptionalParameters sort( + SecurityMonitoringSignalsSort sort) { + this.sort = sort; return this; } /** - * Set filterCvssDatadogScoreOp. + * Set pageCursor. * - * @param filterCvssDatadogScoreOp Filter by vulnerability Datadog severity score. (optional) - * @return ListVulnerabilitiesOptionalParameters + * @param pageCursor A list of results using the cursor provided in the previous query. + * (optional) + * @return ListSecurityMonitoringHistsignalsOptionalParameters */ - public ListVulnerabilitiesOptionalParameters filterCvssDatadogScoreOp( - Double filterCvssDatadogScoreOp) { - this.filterCvssDatadogScoreOp = filterCvssDatadogScoreOp; + public ListSecurityMonitoringHistsignalsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; return this; } /** - * Set filterCvssDatadogSeverity. + * Set pageLimit. * - * @param filterCvssDatadogSeverity Filter by vulnerability Datadog severity. (optional) - * @return ListVulnerabilitiesOptionalParameters + * @param pageLimit The maximum number of security signals in the response. (optional, default + * to 10) + * @return ListSecurityMonitoringHistsignalsOptionalParameters */ - public ListVulnerabilitiesOptionalParameters filterCvssDatadogSeverity( - VulnerabilitySeverity filterCvssDatadogSeverity) { - this.filterCvssDatadogSeverity = filterCvssDatadogSeverity; + public ListSecurityMonitoringHistsignalsOptionalParameters pageLimit(Integer pageLimit) { + this.pageLimit = pageLimit; return this; } + } - /** - * Set filterCvssDatadogVector. - * - * @param filterCvssDatadogVector Filter by vulnerability Datadog CVSS vector. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterCvssDatadogVector( - String filterCvssDatadogVector) { - this.filterCvssDatadogVector = filterCvssDatadogVector; - return this; - } + /** + * List hist signals. + * + *

See {@link #listSecurityMonitoringHistsignalsWithHttpInfo}. + * + * @return SecurityMonitoringSignalsListResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalsListResponse listSecurityMonitoringHistsignals() + throws ApiException { + return listSecurityMonitoringHistsignalsWithHttpInfo( + new ListSecurityMonitoringHistsignalsOptionalParameters()) + .getData(); + } - /** - * Set filterStatus. - * - * @param filterStatus Filter by the status of the vulnerability. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterStatus(VulnerabilityStatus filterStatus) { - this.filterStatus = filterStatus; - return this; - } + /** + * List hist signals. + * + *

See {@link #listSecurityMonitoringHistsignalsWithHttpInfoAsync}. + * + * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + */ + public CompletableFuture + listSecurityMonitoringHistsignalsAsync() { + return listSecurityMonitoringHistsignalsWithHttpInfoAsync( + new ListSecurityMonitoringHistsignalsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } - /** - * Set filterTool. - * - * @param filterTool Filter by the tool of the vulnerability. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterTool(VulnerabilityTool filterTool) { - this.filterTool = filterTool; - return this; - } + /** + * List hist signals. + * + *

See {@link #listSecurityMonitoringHistsignalsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SecurityMonitoringSignalsListResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalsListResponse listSecurityMonitoringHistsignals( + ListSecurityMonitoringHistsignalsOptionalParameters parameters) throws ApiException { + return listSecurityMonitoringHistsignalsWithHttpInfo(parameters).getData(); + } - /** - * Set filterLibraryName. - * - * @param filterLibraryName Filter by library name. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterLibraryName(String filterLibraryName) { - this.filterLibraryName = filterLibraryName; - return this; - } + /** + * List hist signals. + * + *

See {@link #listSecurityMonitoringHistsignalsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + */ + public CompletableFuture + listSecurityMonitoringHistsignalsAsync( + ListSecurityMonitoringHistsignalsOptionalParameters parameters) { + return listSecurityMonitoringHistsignalsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } - /** - * Set filterLibraryVersion. - * - * @param filterLibraryVersion Filter by library version. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterLibraryVersion(String filterLibraryVersion) { - this.filterLibraryVersion = filterLibraryVersion; - return this; + /** + * List hist signals. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<SecurityMonitoringSignalsListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + listSecurityMonitoringHistsignalsWithHttpInfo( + ListSecurityMonitoringHistsignalsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listSecurityMonitoringHistsignals"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } + Object localVarPostBody = null; + String filterQuery = parameters.filterQuery; + OffsetDateTime filterFrom = parameters.filterFrom; + OffsetDateTime filterTo = parameters.filterTo; + SecurityMonitoringSignalsSort sort = parameters.sort; + String pageCursor = parameters.pageCursor; + Integer pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = "/api/v2/siem-historical-detections/histsignals"; - /** - * Set filterAdvisoryId. - * - * @param filterAdvisoryId Filter by advisory ID. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAdvisoryId(String filterAdvisoryId) { - this.filterAdvisoryId = filterAdvisoryId; - return this; - } + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); - /** - * Set filterRisksExploitationProbability. - * - * @param filterRisksExploitationProbability Filter by exploitation probability. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterRisksExploitationProbability( - Boolean filterRisksExploitationProbability) { - this.filterRisksExploitationProbability = filterRisksExploitationProbability; - return this; - } + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - /** - * Set filterRisksPocExploitAvailable. - * - * @param filterRisksPocExploitAvailable Filter by POC exploit availability. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterRisksPocExploitAvailable( - Boolean filterRisksPocExploitAvailable) { - this.filterRisksPocExploitAvailable = filterRisksPocExploitAvailable; - return this; - } + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listSecurityMonitoringHistsignals", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } - /** - * Set filterRisksExploitAvailable. - * - * @param filterRisksExploitAvailable Filter by public exploit availability. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterRisksExploitAvailable( - Boolean filterRisksExploitAvailable) { - this.filterRisksExploitAvailable = filterRisksExploitAvailable; - return this; + /** + * List hist signals. + * + *

See {@link #listSecurityMonitoringHistsignalsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalsListResponse>> + */ + public CompletableFuture> + listSecurityMonitoringHistsignalsWithHttpInfoAsync( + ListSecurityMonitoringHistsignalsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listSecurityMonitoringHistsignals"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; } + Object localVarPostBody = null; + String filterQuery = parameters.filterQuery; + OffsetDateTime filterFrom = parameters.filterFrom; + OffsetDateTime filterTo = parameters.filterTo; + SecurityMonitoringSignalsSort sort = parameters.sort; + String pageCursor = parameters.pageCursor; + Integer pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = "/api/v2/siem-historical-detections/histsignals"; - /** - * Set filterRisksEpssScoreOp. - * - * @param filterRisksEpssScoreOp Filter by vulnerability EPSS severity score. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterRisksEpssScoreOp( - Double filterRisksEpssScoreOp) { - this.filterRisksEpssScoreOp = filterRisksEpssScoreOp; - return this; - } + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); - /** - * Set filterRisksEpssSeverity. - * - * @param filterRisksEpssSeverity Filter by vulnerability EPSS severity. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterRisksEpssSeverity( - VulnerabilitySeverity filterRisksEpssSeverity) { - this.filterRisksEpssSeverity = filterRisksEpssSeverity; - return this; - } + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - /** - * Set filterLanguage. - * - * @param filterLanguage Filter by language. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterLanguage(String filterLanguage) { - this.filterLanguage = filterLanguage; - return this; + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listSecurityMonitoringHistsignals", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listSecurityMonitoringIntegrationConfigs. */ + public static class ListSecurityMonitoringIntegrationConfigsOptionalParameters { + private SecurityMonitoringIntegrationType filterIntegrationType; /** - * Set filterEcosystem. + * Set filterIntegrationType. * - * @param filterEcosystem Filter by ecosystem. (optional) - * @return ListVulnerabilitiesOptionalParameters + * @param filterIntegrationType Filter the entity context sync configurations by source type. + * (optional) + * @return ListSecurityMonitoringIntegrationConfigsOptionalParameters */ - public ListVulnerabilitiesOptionalParameters filterEcosystem( - VulnerabilityEcosystem filterEcosystem) { - this.filterEcosystem = filterEcosystem; + public ListSecurityMonitoringIntegrationConfigsOptionalParameters filterIntegrationType( + SecurityMonitoringIntegrationType filterIntegrationType) { + this.filterIntegrationType = filterIntegrationType; return this; } + } - /** - * Set filterCodeLocationLocation. - * - * @param filterCodeLocationLocation Filter by vulnerability location. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterCodeLocationLocation( - String filterCodeLocationLocation) { - this.filterCodeLocationLocation = filterCodeLocationLocation; - return this; + /** + * List entity context sync configurations. + * + *

See {@link #listSecurityMonitoringIntegrationConfigsWithHttpInfo}. + * + * @return SecurityMonitoringIntegrationConfigsResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringIntegrationConfigsResponse listSecurityMonitoringIntegrationConfigs() + throws ApiException { + return listSecurityMonitoringIntegrationConfigsWithHttpInfo( + new ListSecurityMonitoringIntegrationConfigsOptionalParameters()) + .getData(); + } + + /** + * List entity context sync configurations. + * + *

See {@link #listSecurityMonitoringIntegrationConfigsWithHttpInfoAsync}. + * + * @return CompletableFuture<SecurityMonitoringIntegrationConfigsResponse> + */ + public CompletableFuture + listSecurityMonitoringIntegrationConfigsAsync() { + return listSecurityMonitoringIntegrationConfigsWithHttpInfoAsync( + new ListSecurityMonitoringIntegrationConfigsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List entity context sync configurations. + * + *

See {@link #listSecurityMonitoringIntegrationConfigsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SecurityMonitoringIntegrationConfigsResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringIntegrationConfigsResponse listSecurityMonitoringIntegrationConfigs( + ListSecurityMonitoringIntegrationConfigsOptionalParameters parameters) throws ApiException { + return listSecurityMonitoringIntegrationConfigsWithHttpInfo(parameters).getData(); + } + + /** + * List entity context sync configurations. + * + *

See {@link #listSecurityMonitoringIntegrationConfigsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SecurityMonitoringIntegrationConfigsResponse> + */ + public CompletableFuture + listSecurityMonitoringIntegrationConfigsAsync( + ListSecurityMonitoringIntegrationConfigsOptionalParameters parameters) { + return listSecurityMonitoringIntegrationConfigsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the entity context sync configurations for Cloud SIEM. Each configuration connects Cloud + * SIEM to an external source that provides entities (for example, users from an identity + * provider) for use in signals and the entity explorer. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<SecurityMonitoringIntegrationConfigsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
429 Too many requests -
+ */ + public ApiResponse + listSecurityMonitoringIntegrationConfigsWithHttpInfo( + ListSecurityMonitoringIntegrationConfigsOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listSecurityMonitoringIntegrationConfigs"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } + Object localVarPostBody = null; + SecurityMonitoringIntegrationType filterIntegrationType = parameters.filterIntegrationType; + // create path and map variables + String localVarPath = "/api/v2/security_monitoring/configuration/integration_config"; - /** - * Set filterCodeLocationFilePath. - * - * @param filterCodeLocationFilePath Filter by vulnerability file path. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterCodeLocationFilePath( - String filterCodeLocationFilePath) { - this.filterCodeLocationFilePath = filterCodeLocationFilePath; - return this; + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[integration_type]", filterIntegrationType)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listSecurityMonitoringIntegrationConfigs", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List entity context sync configurations. + * + *

See {@link #listSecurityMonitoringIntegrationConfigsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringIntegrationConfigsResponse>> + */ + public CompletableFuture> + listSecurityMonitoringIntegrationConfigsWithHttpInfoAsync( + ListSecurityMonitoringIntegrationConfigsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listSecurityMonitoringIntegrationConfigs"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; } + Object localVarPostBody = null; + SecurityMonitoringIntegrationType filterIntegrationType = parameters.filterIntegrationType; + // create path and map variables + String localVarPath = "/api/v2/security_monitoring/configuration/integration_config"; - /** - * Set filterCodeLocationMethod. - * - * @param filterCodeLocationMethod Filter by method. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterCodeLocationMethod( - String filterCodeLocationMethod) { - this.filterCodeLocationMethod = filterCodeLocationMethod; - return this; + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[integration_type]", filterIntegrationType)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listSecurityMonitoringIntegrationConfigs", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listSecurityMonitoringRules. */ + public static class ListSecurityMonitoringRulesOptionalParameters { + private Long pageSize; + private Long pageNumber; + private String query; + private SecurityMonitoringRuleSort sort; /** - * Set filterFixAvailable. + * Set pageSize. * - * @param filterFixAvailable Filter by fix availability. (optional) - * @return ListVulnerabilitiesOptionalParameters + * @param pageSize Number of items to return per page. The maximum allowed value is 100. + * (optional, default to 10) + * @return ListSecurityMonitoringRulesOptionalParameters */ - public ListVulnerabilitiesOptionalParameters filterFixAvailable(Boolean filterFixAvailable) { - this.filterFixAvailable = filterFixAvailable; + public ListSecurityMonitoringRulesOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; return this; } /** - * Set filterRepoDigests. + * Set pageNumber. * - * @param filterRepoDigests Filter by vulnerability repo_digest (when the - * vulnerability is related to Image asset). (optional) - * @return ListVulnerabilitiesOptionalParameters + * @param pageNumber Specific page number to return. (optional, default to 0) + * @return ListSecurityMonitoringRulesOptionalParameters */ - public ListVulnerabilitiesOptionalParameters filterRepoDigests(String filterRepoDigests) { - this.filterRepoDigests = filterRepoDigests; + public ListSecurityMonitoringRulesOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; return this; } /** - * Set filterOrigin. + * Set query. * - * @param filterOrigin Filter by origin. (optional) - * @return ListVulnerabilitiesOptionalParameters + * @param query A search query to filter security rules. You can filter by attributes such as + * type, source, tags. (optional) + * @return ListSecurityMonitoringRulesOptionalParameters */ - public ListVulnerabilitiesOptionalParameters filterOrigin(String filterOrigin) { - this.filterOrigin = filterOrigin; + public ListSecurityMonitoringRulesOptionalParameters query(String query) { + this.query = query; return this; } /** - * Set filterRunningKernel. + * Set sort. * - * @param filterRunningKernel Filter for whether the vulnerability affects a running kernel (for - * vulnerabilities related to a Host asset). (optional) - * @return ListVulnerabilitiesOptionalParameters + * @param sort Attribute used to sort rules. Prefix with - to sort in descending + * order. (optional) + * @return ListSecurityMonitoringRulesOptionalParameters */ - public ListVulnerabilitiesOptionalParameters filterRunningKernel(Boolean filterRunningKernel) { - this.filterRunningKernel = filterRunningKernel; - return this; - } - - /** - * Set filterAssetName. - * - * @param filterAssetName Filter by asset name. This field supports the usage of wildcards (*). - * (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAssetName(String filterAssetName) { - this.filterAssetName = filterAssetName; - return this; - } - - /** - * Set filterAssetType. - * - * @param filterAssetType Filter by asset type. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAssetType(AssetType filterAssetType) { - this.filterAssetType = filterAssetType; - return this; - } - - /** - * Set filterAssetVersionFirst. - * - * @param filterAssetVersionFirst Filter by the first version of the asset this vulnerability - * has been detected on. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAssetVersionFirst( - String filterAssetVersionFirst) { - this.filterAssetVersionFirst = filterAssetVersionFirst; - return this; - } - - /** - * Set filterAssetVersionLast. - * - * @param filterAssetVersionLast Filter by the last version of the asset this vulnerability has - * been detected on. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAssetVersionLast( - String filterAssetVersionLast) { - this.filterAssetVersionLast = filterAssetVersionLast; - return this; - } - - /** - * Set filterAssetRepositoryUrl. - * - * @param filterAssetRepositoryUrl Filter by the repository url associated to the asset. - * (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAssetRepositoryUrl( - String filterAssetRepositoryUrl) { - this.filterAssetRepositoryUrl = filterAssetRepositoryUrl; - return this; - } - - /** - * Set filterAssetRisksInProduction. - * - * @param filterAssetRisksInProduction Filter whether the asset is in production or not. - * (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAssetRisksInProduction( - Boolean filterAssetRisksInProduction) { - this.filterAssetRisksInProduction = filterAssetRisksInProduction; - return this; - } - - /** - * Set filterAssetRisksUnderAttack. - * - * @param filterAssetRisksUnderAttack Filter whether the asset is under attack or not. - * (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAssetRisksUnderAttack( - Boolean filterAssetRisksUnderAttack) { - this.filterAssetRisksUnderAttack = filterAssetRisksUnderAttack; - return this; - } - - /** - * Set filterAssetRisksIsPubliclyAccessible. - * - * @param filterAssetRisksIsPubliclyAccessible Filter whether the asset is publicly accessible - * or not. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAssetRisksIsPubliclyAccessible( - Boolean filterAssetRisksIsPubliclyAccessible) { - this.filterAssetRisksIsPubliclyAccessible = filterAssetRisksIsPubliclyAccessible; - return this; - } - - /** - * Set filterAssetRisksHasPrivilegedAccess. - * - * @param filterAssetRisksHasPrivilegedAccess Filter whether the asset is publicly accessible or - * not. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAssetRisksHasPrivilegedAccess( - Boolean filterAssetRisksHasPrivilegedAccess) { - this.filterAssetRisksHasPrivilegedAccess = filterAssetRisksHasPrivilegedAccess; - return this; - } - - /** - * Set filterAssetRisksHasAccessToSensitiveData. - * - * @param filterAssetRisksHasAccessToSensitiveData Filter whether the asset has access to - * sensitive data or not. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAssetRisksHasAccessToSensitiveData( - Boolean filterAssetRisksHasAccessToSensitiveData) { - this.filterAssetRisksHasAccessToSensitiveData = filterAssetRisksHasAccessToSensitiveData; - return this; - } - - /** - * Set filterAssetEnvironments. - * - * @param filterAssetEnvironments Filter by asset environments. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAssetEnvironments( - String filterAssetEnvironments) { - this.filterAssetEnvironments = filterAssetEnvironments; - return this; - } - - /** - * Set filterAssetTeams. - * - * @param filterAssetTeams Filter by asset teams. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAssetTeams(String filterAssetTeams) { - this.filterAssetTeams = filterAssetTeams; - return this; - } - - /** - * Set filterAssetArch. - * - * @param filterAssetArch Filter by asset architecture. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAssetArch(String filterAssetArch) { - this.filterAssetArch = filterAssetArch; - return this; - } - - /** - * Set filterAssetOperatingSystemName. - * - * @param filterAssetOperatingSystemName Filter by asset operating system name. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAssetOperatingSystemName( - String filterAssetOperatingSystemName) { - this.filterAssetOperatingSystemName = filterAssetOperatingSystemName; - return this; - } - - /** - * Set filterAssetOperatingSystemVersion. - * - * @param filterAssetOperatingSystemVersion Filter by asset operating system version. (optional) - * @return ListVulnerabilitiesOptionalParameters - */ - public ListVulnerabilitiesOptionalParameters filterAssetOperatingSystemVersion( - String filterAssetOperatingSystemVersion) { - this.filterAssetOperatingSystemVersion = filterAssetOperatingSystemVersion; + public ListSecurityMonitoringRulesOptionalParameters sort(SecurityMonitoringRuleSort sort) { + this.sort = sort; return this; } } /** - * List vulnerabilities. + * List rules. * - *

See {@link #listVulnerabilitiesWithHttpInfo}. + *

See {@link #listSecurityMonitoringRulesWithHttpInfo}. * - * @return ListVulnerabilitiesResponse + * @return SecurityMonitoringListRulesResponse * @throws ApiException if fails to make API call - * @deprecated */ - @Deprecated - public ListVulnerabilitiesResponse listVulnerabilities() throws ApiException { - return listVulnerabilitiesWithHttpInfo(new ListVulnerabilitiesOptionalParameters()).getData(); + public SecurityMonitoringListRulesResponse listSecurityMonitoringRules() throws ApiException { + return listSecurityMonitoringRulesWithHttpInfo( + new ListSecurityMonitoringRulesOptionalParameters()) + .getData(); } /** - * List vulnerabilities. + * List rules. * - *

See {@link #listVulnerabilitiesWithHttpInfoAsync}. + *

See {@link #listSecurityMonitoringRulesWithHttpInfoAsync}. * - * @return CompletableFuture<ListVulnerabilitiesResponse> - * @deprecated + * @return CompletableFuture<SecurityMonitoringListRulesResponse> */ - @Deprecated - public CompletableFuture listVulnerabilitiesAsync() { - return listVulnerabilitiesWithHttpInfoAsync(new ListVulnerabilitiesOptionalParameters()) + public CompletableFuture listSecurityMonitoringRulesAsync() { + return listSecurityMonitoringRulesWithHttpInfoAsync( + new ListSecurityMonitoringRulesOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -25346,34 +25340,30 @@ public CompletableFuture listVulnerabilitiesAsync() } /** - * List vulnerabilities. + * List rules. * - *

See {@link #listVulnerabilitiesWithHttpInfo}. + *

See {@link #listSecurityMonitoringRulesWithHttpInfo}. * * @param parameters Optional parameters for the request. - * @return ListVulnerabilitiesResponse + * @return SecurityMonitoringListRulesResponse * @throws ApiException if fails to make API call - * @deprecated */ - @Deprecated - public ListVulnerabilitiesResponse listVulnerabilities( - ListVulnerabilitiesOptionalParameters parameters) throws ApiException { - return listVulnerabilitiesWithHttpInfo(parameters).getData(); + public SecurityMonitoringListRulesResponse listSecurityMonitoringRules( + ListSecurityMonitoringRulesOptionalParameters parameters) throws ApiException { + return listSecurityMonitoringRulesWithHttpInfo(parameters).getData(); } /** - * List vulnerabilities. + * List rules. * - *

See {@link #listVulnerabilitiesWithHttpInfoAsync}. + *

See {@link #listSecurityMonitoringRulesWithHttpInfoAsync}. * * @param parameters Optional parameters for the request. - * @return CompletableFuture<ListVulnerabilitiesResponse> - * @deprecated + * @return CompletableFuture<SecurityMonitoringListRulesResponse> */ - @Deprecated - public CompletableFuture listVulnerabilitiesAsync( - ListVulnerabilitiesOptionalParameters parameters) { - return listVulnerabilitiesWithHttpInfoAsync(parameters) + public CompletableFuture listSecurityMonitoringRulesAsync( + ListSecurityMonitoringRulesOptionalParameters parameters) { + return listSecurityMonitoringRulesWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -25381,489 +25371,90 @@ public CompletableFuture listVulnerabilitiesAsync( } /** - * Get a list of vulnerabilities. - * - *

Pagination

- * - *

Pagination is enabled by default in both vulnerabilities and assets - * . The size of the page varies depending on the endpoint and cannot be modified. To - * automate the request of the next page, you can use the links section in the response. - * - *

This endpoint will return paginated responses. The pages are stored in the links section of - * the response: - * - *

JSON - * { - * "data": [...], - * "meta": {...}, - * "links": { - * "self": "https://.../api/v2/security/vulnerabilities", - * "first": "https://.../api/v2/security/vulnerabilities?page[number]=1&page[token]=abc", - * "last": "https://.../api/v2/security/vulnerabilities?page[number]=43&page[token]=abc", - * "next": "https://.../api/v2/security/vulnerabilities?page[number]=2&page[token]=abc" - * } - * } - * - *

    - *
  • links.previous is empty if the first page is requested. - *
  • links.next is empty if the last page is requested. - *
- * - *

Token

- * - *

Vulnerabilities can be created, updated or deleted at any point in time. - * - *

Upon the first request, a token is created to ensure consistency across subsequent paginated - * requests. - * - *

A token is valid only for 24 hours. - * - *

First request

- * - *

We consider a request to be the first request when there is no page[token] - * parameter. - * - *

The response of this first request contains the newly created token in the links - * section. - * - *

This token can then be used in the subsequent paginated requests. - * - *

Note: The first request may take longer to complete than subsequent requests. - * - *

Subsequent requests

- * - *

Any request containing valid page[token] and page[number] - * parameters will be considered a subsequent request. - * - *

If the token is invalid, a 404 response will be returned. - * - *

If the page number is invalid, a 400 response will be returned. - * - *

The returned token is valid for all requests in the pagination sequence. To - * send paginated requests in parallel, reuse the same token and change only the - * page[number] parameter. - * - *

Filtering

- * - *

The request can include some filter parameters to filter the data to be retrieved. The - * format of the filter parameters follows the JSON:API format: - * filter[$prop_name], where prop_name is the property name in the entity - * being filtered by. - * - *

All filters can include multiple values, where data will be filtered with an OR clause: - * filter[title]=Title1,Title2 will filter all vulnerabilities where title is equal - * to Title1 OR Title2. - * - *

String filters are case sensitive. - * - *

Boolean filters accept true or false as values. - * - *

Number filters must include an operator as a second filter input: - * filter[$prop_name][$operator]. For example, for the vulnerabilities endpoint: - * filter[cvss.base.score][lte]=8. - * - *

Available operators are: eq (==), lt (<), lte - * (<=), gt (>) and gte (>=). - * - *

Metadata

- * - *

Following JSON:API format, object - * including non-standard meta-information. - * - *

This endpoint includes the meta member in the response. For more details on each of the - * properties included in this section, check the endpoints response tables. - * - *

JSON - * { - * "data": [...], - * "meta": { - * "total": 1500, - * "count": 18732, - * "token": "some_token" - * }, - * "links": {...} - * } - * - *

Extensions

- * - *

Requests may include extensions to modify the behavior of the requested endpoint. The filter - * parameters follow the JSON:API format - * format: ext:$extension_name, where extension_name is the name of the - * modifier that is being applied. - * - *

Extensions can only include one value: ext:modifier=value. + * List rules. * * @param parameters Optional parameters for the request. - * @return ApiResponse<ListVulnerabilitiesResponse> + * @return ApiResponse<SecurityMonitoringListRulesResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * - * - * + * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad request: The server cannot process the request due to invalid syntax in the request. -
403 Forbidden: Access denied -
404 Not found: There is no request associated with the provided token. -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse listSecurityMonitoringRulesWithHttpInfo( + ListSecurityMonitoringRulesOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + String query = parameters.query; + SecurityMonitoringRuleSort sort = parameters.sort; + // create path and map variables + String localVarPath = "/api/v2/security_monitoring/rules"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listSecurityMonitoringRules", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List rules. * - * @deprecated + *

See {@link #listSecurityMonitoringRulesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SecurityMonitoringListRulesResponse>> */ - @Deprecated - public ApiResponse listVulnerabilitiesWithHttpInfo( - ListVulnerabilitiesOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "listVulnerabilities"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public CompletableFuture> + listSecurityMonitoringRulesWithHttpInfoAsync( + ListSecurityMonitoringRulesOptionalParameters parameters) { Object localVarPostBody = null; - String pageToken = parameters.pageToken; + Long pageSize = parameters.pageSize; Long pageNumber = parameters.pageNumber; - VulnerabilityType filterType = parameters.filterType; - Double filterCvssBaseScoreOp = parameters.filterCvssBaseScoreOp; - VulnerabilitySeverity filterCvssBaseSeverity = parameters.filterCvssBaseSeverity; - String filterCvssBaseVector = parameters.filterCvssBaseVector; - Double filterCvssDatadogScoreOp = parameters.filterCvssDatadogScoreOp; - VulnerabilitySeverity filterCvssDatadogSeverity = parameters.filterCvssDatadogSeverity; - String filterCvssDatadogVector = parameters.filterCvssDatadogVector; - VulnerabilityStatus filterStatus = parameters.filterStatus; - VulnerabilityTool filterTool = parameters.filterTool; - String filterLibraryName = parameters.filterLibraryName; - String filterLibraryVersion = parameters.filterLibraryVersion; - String filterAdvisoryId = parameters.filterAdvisoryId; - Boolean filterRisksExploitationProbability = parameters.filterRisksExploitationProbability; - Boolean filterRisksPocExploitAvailable = parameters.filterRisksPocExploitAvailable; - Boolean filterRisksExploitAvailable = parameters.filterRisksExploitAvailable; - Double filterRisksEpssScoreOp = parameters.filterRisksEpssScoreOp; - VulnerabilitySeverity filterRisksEpssSeverity = parameters.filterRisksEpssSeverity; - String filterLanguage = parameters.filterLanguage; - VulnerabilityEcosystem filterEcosystem = parameters.filterEcosystem; - String filterCodeLocationLocation = parameters.filterCodeLocationLocation; - String filterCodeLocationFilePath = parameters.filterCodeLocationFilePath; - String filterCodeLocationMethod = parameters.filterCodeLocationMethod; - Boolean filterFixAvailable = parameters.filterFixAvailable; - String filterRepoDigests = parameters.filterRepoDigests; - String filterOrigin = parameters.filterOrigin; - Boolean filterRunningKernel = parameters.filterRunningKernel; - String filterAssetName = parameters.filterAssetName; - AssetType filterAssetType = parameters.filterAssetType; - String filterAssetVersionFirst = parameters.filterAssetVersionFirst; - String filterAssetVersionLast = parameters.filterAssetVersionLast; - String filterAssetRepositoryUrl = parameters.filterAssetRepositoryUrl; - Boolean filterAssetRisksInProduction = parameters.filterAssetRisksInProduction; - Boolean filterAssetRisksUnderAttack = parameters.filterAssetRisksUnderAttack; - Boolean filterAssetRisksIsPubliclyAccessible = parameters.filterAssetRisksIsPubliclyAccessible; - Boolean filterAssetRisksHasPrivilegedAccess = parameters.filterAssetRisksHasPrivilegedAccess; - Boolean filterAssetRisksHasAccessToSensitiveData = - parameters.filterAssetRisksHasAccessToSensitiveData; - String filterAssetEnvironments = parameters.filterAssetEnvironments; - String filterAssetTeams = parameters.filterAssetTeams; - String filterAssetArch = parameters.filterAssetArch; - String filterAssetOperatingSystemName = parameters.filterAssetOperatingSystemName; - String filterAssetOperatingSystemVersion = parameters.filterAssetOperatingSystemVersion; + String query = parameters.query; + SecurityMonitoringRuleSort sort = parameters.sort; // create path and map variables - String localVarPath = "/api/v2/security/vulnerabilities"; + String localVarPath = "/api/v2/security_monitoring/rules"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[type]", filterType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[cvss.base.score][`$op`]", filterCvssBaseScoreOp)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[cvss.base.severity]", filterCvssBaseSeverity)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[cvss.base.vector]", filterCvssBaseVector)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[cvss.datadog.score][`$op`]", filterCvssDatadogScoreOp)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[cvss.datadog.severity]", filterCvssDatadogSeverity)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[cvss.datadog.vector]", filterCvssDatadogVector)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tool]", filterTool)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[library.name]", filterLibraryName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[library.version]", filterLibraryVersion)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[advisory.id]", filterAdvisoryId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[risks.exploitation_probability]", filterRisksExploitationProbability)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[risks.poc_exploit_available]", filterRisksPocExploitAvailable)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[risks.exploit_available]", filterRisksExploitAvailable)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[risks.epss.score][`$op`]", filterRisksEpssScoreOp)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[risks.epss.severity]", filterRisksEpssSeverity)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[language]", filterLanguage)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[ecosystem]", filterEcosystem)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[code_location.location]", filterCodeLocationLocation)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[code_location.file_path]", filterCodeLocationFilePath)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[code_location.method]", filterCodeLocationMethod)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[fix_available]", filterFixAvailable)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[repo_digests]", filterRepoDigests)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[origin]", filterOrigin)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[running_kernel]", filterRunningKernel)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.name]", filterAssetName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.type]", filterAssetType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.version.first]", filterAssetVersionFirst)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.version.last]", filterAssetVersionLast)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.repository_url]", filterAssetRepositoryUrl)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[asset.risks.in_production]", filterAssetRisksInProduction)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[asset.risks.under_attack]", filterAssetRisksUnderAttack)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", - "filter[asset.risks.is_publicly_accessible]", - filterAssetRisksIsPubliclyAccessible)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[asset.risks.has_privileged_access]", filterAssetRisksHasPrivilegedAccess)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", - "filter[asset.risks.has_access_to_sensitive_data]", - filterAssetRisksHasAccessToSensitiveData)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.environments]", filterAssetEnvironments)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.teams]", filterAssetTeams)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.arch]", filterAssetArch)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[asset.operating_system.name]", filterAssetOperatingSystemName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[asset.operating_system.version]", filterAssetOperatingSystemVersion)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.SecurityMonitoringApi.listVulnerabilities", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * List vulnerabilities. - * - *

See {@link #listVulnerabilitiesWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<ListVulnerabilitiesResponse>> - * @deprecated - */ - @Deprecated - public CompletableFuture> - listVulnerabilitiesWithHttpInfoAsync(ListVulnerabilitiesOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "listVulnerabilities"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = null; - String pageToken = parameters.pageToken; - Long pageNumber = parameters.pageNumber; - VulnerabilityType filterType = parameters.filterType; - Double filterCvssBaseScoreOp = parameters.filterCvssBaseScoreOp; - VulnerabilitySeverity filterCvssBaseSeverity = parameters.filterCvssBaseSeverity; - String filterCvssBaseVector = parameters.filterCvssBaseVector; - Double filterCvssDatadogScoreOp = parameters.filterCvssDatadogScoreOp; - VulnerabilitySeverity filterCvssDatadogSeverity = parameters.filterCvssDatadogSeverity; - String filterCvssDatadogVector = parameters.filterCvssDatadogVector; - VulnerabilityStatus filterStatus = parameters.filterStatus; - VulnerabilityTool filterTool = parameters.filterTool; - String filterLibraryName = parameters.filterLibraryName; - String filterLibraryVersion = parameters.filterLibraryVersion; - String filterAdvisoryId = parameters.filterAdvisoryId; - Boolean filterRisksExploitationProbability = parameters.filterRisksExploitationProbability; - Boolean filterRisksPocExploitAvailable = parameters.filterRisksPocExploitAvailable; - Boolean filterRisksExploitAvailable = parameters.filterRisksExploitAvailable; - Double filterRisksEpssScoreOp = parameters.filterRisksEpssScoreOp; - VulnerabilitySeverity filterRisksEpssSeverity = parameters.filterRisksEpssSeverity; - String filterLanguage = parameters.filterLanguage; - VulnerabilityEcosystem filterEcosystem = parameters.filterEcosystem; - String filterCodeLocationLocation = parameters.filterCodeLocationLocation; - String filterCodeLocationFilePath = parameters.filterCodeLocationFilePath; - String filterCodeLocationMethod = parameters.filterCodeLocationMethod; - Boolean filterFixAvailable = parameters.filterFixAvailable; - String filterRepoDigests = parameters.filterRepoDigests; - String filterOrigin = parameters.filterOrigin; - Boolean filterRunningKernel = parameters.filterRunningKernel; - String filterAssetName = parameters.filterAssetName; - AssetType filterAssetType = parameters.filterAssetType; - String filterAssetVersionFirst = parameters.filterAssetVersionFirst; - String filterAssetVersionLast = parameters.filterAssetVersionLast; - String filterAssetRepositoryUrl = parameters.filterAssetRepositoryUrl; - Boolean filterAssetRisksInProduction = parameters.filterAssetRisksInProduction; - Boolean filterAssetRisksUnderAttack = parameters.filterAssetRisksUnderAttack; - Boolean filterAssetRisksIsPubliclyAccessible = parameters.filterAssetRisksIsPubliclyAccessible; - Boolean filterAssetRisksHasPrivilegedAccess = parameters.filterAssetRisksHasPrivilegedAccess; - Boolean filterAssetRisksHasAccessToSensitiveData = - parameters.filterAssetRisksHasAccessToSensitiveData; - String filterAssetEnvironments = parameters.filterAssetEnvironments; - String filterAssetTeams = parameters.filterAssetTeams; - String filterAssetArch = parameters.filterAssetArch; - String filterAssetOperatingSystemName = parameters.filterAssetOperatingSystemName; - String filterAssetOperatingSystemVersion = parameters.filterAssetOperatingSystemVersion; - // create path and map variables - String localVarPath = "/api/v2/security/vulnerabilities"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[type]", filterType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[cvss.base.score][`$op`]", filterCvssBaseScoreOp)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[cvss.base.severity]", filterCvssBaseSeverity)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[cvss.base.vector]", filterCvssBaseVector)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[cvss.datadog.score][`$op`]", filterCvssDatadogScoreOp)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[cvss.datadog.severity]", filterCvssDatadogSeverity)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[cvss.datadog.vector]", filterCvssDatadogVector)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tool]", filterTool)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[library.name]", filterLibraryName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[library.version]", filterLibraryVersion)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[advisory.id]", filterAdvisoryId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[risks.exploitation_probability]", filterRisksExploitationProbability)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[risks.poc_exploit_available]", filterRisksPocExploitAvailable)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[risks.exploit_available]", filterRisksExploitAvailable)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[risks.epss.score][`$op`]", filterRisksEpssScoreOp)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[risks.epss.severity]", filterRisksEpssSeverity)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[language]", filterLanguage)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[ecosystem]", filterEcosystem)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[code_location.location]", filterCodeLocationLocation)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[code_location.file_path]", filterCodeLocationFilePath)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[code_location.method]", filterCodeLocationMethod)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[fix_available]", filterFixAvailable)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[repo_digests]", filterRepoDigests)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[origin]", filterOrigin)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[running_kernel]", filterRunningKernel)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.name]", filterAssetName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.type]", filterAssetType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.version.first]", filterAssetVersionFirst)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.version.last]", filterAssetVersionLast)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.repository_url]", filterAssetRepositoryUrl)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[asset.risks.in_production]", filterAssetRisksInProduction)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[asset.risks.under_attack]", filterAssetRisksUnderAttack)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", - "filter[asset.risks.is_publicly_accessible]", - filterAssetRisksIsPubliclyAccessible)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[asset.risks.has_privileged_access]", filterAssetRisksHasPrivilegedAccess)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", - "filter[asset.risks.has_access_to_sensitive_data]", - filterAssetRisksHasAccessToSensitiveData)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.environments]", filterAssetEnvironments)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.teams]", filterAssetTeams)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[asset.arch]", filterAssetArch)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[asset.operating_system.name]", filterAssetOperatingSystemName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[asset.operating_system.version]", filterAssetOperatingSystemVersion)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listVulnerabilities", + "v2.SecurityMonitoringApi.listSecurityMonitoringRules", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -25871,7 +25462,7 @@ public ApiResponse listVulnerabilitiesWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -25884,252 +25475,2650 @@ public ApiResponse listVulnerabilitiesWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listVulnerableAssets. */ - public static class ListVulnerableAssetsOptionalParameters { - private String pageToken; - private Long pageNumber; - private String filterName; - private AssetType filterType; - private String filterVersionFirst; - private String filterVersionLast; - private String filterRepositoryUrl; - private Boolean filterRisksInProduction; - private Boolean filterRisksUnderAttack; - private Boolean filterRisksIsPubliclyAccessible; - private Boolean filterRisksHasPrivilegedAccess; - private Boolean filterRisksHasAccessToSensitiveData; - private String filterEnvironments; - private String filterTeams; - private String filterArch; - private String filterOperatingSystemName; - private String filterOperatingSystemVersion; + /** Manage optional parameters to listSecurityMonitoringSignals. */ + public static class ListSecurityMonitoringSignalsOptionalParameters { + private String filterQuery; + private OffsetDateTime filterFrom; + private OffsetDateTime filterTo; + private SecurityMonitoringSignalsSort sort; + private String pageCursor; + private Integer pageLimit; /** - * Set pageToken. + * Set filterQuery. * - * @param pageToken Its value must come from the links section of the response of - * the first request. Do not manually edit it. (optional) - * @return ListVulnerableAssetsOptionalParameters + * @param filterQuery The search query for security signals. (optional) + * @return ListSecurityMonitoringSignalsOptionalParameters */ - public ListVulnerableAssetsOptionalParameters pageToken(String pageToken) { - this.pageToken = pageToken; + public ListSecurityMonitoringSignalsOptionalParameters filterQuery(String filterQuery) { + this.filterQuery = filterQuery; return this; } /** - * Set pageNumber. + * Set filterFrom. * - * @param pageNumber The page number to be retrieved. It should be equal or greater than 1 - * (optional) - * @return ListVulnerableAssetsOptionalParameters + * @param filterFrom The minimum timestamp for requested security signals. (optional) + * @return ListSecurityMonitoringSignalsOptionalParameters */ - public ListVulnerableAssetsOptionalParameters pageNumber(Long pageNumber) { - this.pageNumber = pageNumber; + public ListSecurityMonitoringSignalsOptionalParameters filterFrom(OffsetDateTime filterFrom) { + this.filterFrom = filterFrom; return this; } /** - * Set filterName. + * Set filterTo. * - * @param filterName Filter by name. This field supports the usage of wildcards (*). (optional) - * @return ListVulnerableAssetsOptionalParameters + * @param filterTo The maximum timestamp for requested security signals. (optional) + * @return ListSecurityMonitoringSignalsOptionalParameters */ - public ListVulnerableAssetsOptionalParameters filterName(String filterName) { - this.filterName = filterName; + public ListSecurityMonitoringSignalsOptionalParameters filterTo(OffsetDateTime filterTo) { + this.filterTo = filterTo; return this; } /** - * Set filterType. + * Set sort. * - * @param filterType Filter by type. (optional) - * @return ListVulnerableAssetsOptionalParameters + * @param sort The order of the security signals in results. (optional) + * @return ListSecurityMonitoringSignalsOptionalParameters */ - public ListVulnerableAssetsOptionalParameters filterType(AssetType filterType) { - this.filterType = filterType; + public ListSecurityMonitoringSignalsOptionalParameters sort( + SecurityMonitoringSignalsSort sort) { + this.sort = sort; return this; } /** - * Set filterVersionFirst. + * Set pageCursor. * - * @param filterVersionFirst Filter by the first version of the asset since it has been - * vulnerable. (optional) - * @return ListVulnerableAssetsOptionalParameters + * @param pageCursor A list of results using the cursor provided in the previous query. + * (optional) + * @return ListSecurityMonitoringSignalsOptionalParameters */ - public ListVulnerableAssetsOptionalParameters filterVersionFirst(String filterVersionFirst) { - this.filterVersionFirst = filterVersionFirst; + public ListSecurityMonitoringSignalsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; return this; } /** - * Set filterVersionLast. + * Set pageLimit. * - * @param filterVersionLast Filter by the last detected version of the asset. (optional) - * @return ListVulnerableAssetsOptionalParameters + * @param pageLimit The maximum number of security signals in the response. (optional, default + * to 10) + * @return ListSecurityMonitoringSignalsOptionalParameters */ - public ListVulnerableAssetsOptionalParameters filterVersionLast(String filterVersionLast) { - this.filterVersionLast = filterVersionLast; + public ListSecurityMonitoringSignalsOptionalParameters pageLimit(Integer pageLimit) { + this.pageLimit = pageLimit; return this; } + } - /** - * Set filterRepositoryUrl. - * - * @param filterRepositoryUrl Filter by the repository url associated to the asset. (optional) - * @return ListVulnerableAssetsOptionalParameters - */ - public ListVulnerableAssetsOptionalParameters filterRepositoryUrl(String filterRepositoryUrl) { - this.filterRepositoryUrl = filterRepositoryUrl; - return this; - } + /** + * Get a quick list of security signals. + * + *

See {@link #listSecurityMonitoringSignalsWithHttpInfo}. + * + * @return SecurityMonitoringSignalsListResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalsListResponse listSecurityMonitoringSignals() throws ApiException { + return listSecurityMonitoringSignalsWithHttpInfo( + new ListSecurityMonitoringSignalsOptionalParameters()) + .getData(); + } - /** - * Set filterRisksInProduction. - * - * @param filterRisksInProduction Filter whether the asset is in production or not. (optional) - * @return ListVulnerableAssetsOptionalParameters - */ - public ListVulnerableAssetsOptionalParameters filterRisksInProduction( - Boolean filterRisksInProduction) { - this.filterRisksInProduction = filterRisksInProduction; - return this; - } + /** + * Get a quick list of security signals. + * + *

See {@link #listSecurityMonitoringSignalsWithHttpInfoAsync}. + * + * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + */ + public CompletableFuture + listSecurityMonitoringSignalsAsync() { + return listSecurityMonitoringSignalsWithHttpInfoAsync( + new ListSecurityMonitoringSignalsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } - /** - * Set filterRisksUnderAttack. - * - * @param filterRisksUnderAttack Filter whether the asset (Service) is under attack or not. - * (optional) - * @return ListVulnerableAssetsOptionalParameters - */ - public ListVulnerableAssetsOptionalParameters filterRisksUnderAttack( - Boolean filterRisksUnderAttack) { - this.filterRisksUnderAttack = filterRisksUnderAttack; - return this; - } + /** + * Get a quick list of security signals. + * + *

See {@link #listSecurityMonitoringSignalsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SecurityMonitoringSignalsListResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalsListResponse listSecurityMonitoringSignals( + ListSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { + return listSecurityMonitoringSignalsWithHttpInfo(parameters).getData(); + } - /** - * Set filterRisksIsPubliclyAccessible. - * - * @param filterRisksIsPubliclyAccessible Filter whether the asset (Host) is publicly accessible - * or not. (optional) - * @return ListVulnerableAssetsOptionalParameters - */ - public ListVulnerableAssetsOptionalParameters filterRisksIsPubliclyAccessible( - Boolean filterRisksIsPubliclyAccessible) { - this.filterRisksIsPubliclyAccessible = filterRisksIsPubliclyAccessible; - return this; - } + /** + * Get a quick list of security signals. + * + *

See {@link #listSecurityMonitoringSignalsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + */ + public CompletableFuture + listSecurityMonitoringSignalsAsync( + ListSecurityMonitoringSignalsOptionalParameters parameters) { + return listSecurityMonitoringSignalsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } - /** - * Set filterRisksHasPrivilegedAccess. - * - * @param filterRisksHasPrivilegedAccess Filter whether the asset (Host) has privileged access - * or not. (optional) - * @return ListVulnerableAssetsOptionalParameters - */ - public ListVulnerableAssetsOptionalParameters filterRisksHasPrivilegedAccess( - Boolean filterRisksHasPrivilegedAccess) { - this.filterRisksHasPrivilegedAccess = filterRisksHasPrivilegedAccess; - return this; - } + /** + * Get a quick list of security signals. + * + *

See {@link #listSecurityMonitoringSignalsWithHttpInfo}. + * + * @return PaginationIterable<SecurityMonitoringSignal> + */ + public PaginationIterable + listSecurityMonitoringSignalsWithPagination() { + ListSecurityMonitoringSignalsOptionalParameters parameters = + new ListSecurityMonitoringSignalsOptionalParameters(); + return listSecurityMonitoringSignalsWithPagination(parameters); + } - /** - * Set filterRisksHasAccessToSensitiveData. - * - * @param filterRisksHasAccessToSensitiveData Filter whether the asset (Host) has access to - * sensitive data or not. (optional) - * @return ListVulnerableAssetsOptionalParameters - */ - public ListVulnerableAssetsOptionalParameters filterRisksHasAccessToSensitiveData( - Boolean filterRisksHasAccessToSensitiveData) { - this.filterRisksHasAccessToSensitiveData = filterRisksHasAccessToSensitiveData; - return this; - } + /** + * Get a quick list of security signals. + * + *

See {@link #listSecurityMonitoringSignalsWithHttpInfo}. + * + * @return SecurityMonitoringSignalsListResponse + */ + public PaginationIterable listSecurityMonitoringSignalsWithPagination( + ListSecurityMonitoringSignalsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "pageCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; - /** - * Set filterEnvironments. - * - * @param filterEnvironments Filter by environment. (optional) - * @return ListVulnerableAssetsOptionalParameters - */ - public ListVulnerableAssetsOptionalParameters filterEnvironments(String filterEnvironments) { - this.filterEnvironments = filterEnvironments; - return this; + if (parameters.pageLimit == null) { + limit = 10; + parameters.pageLimit(limit); + } else { + limit = parameters.pageLimit; } + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); + + PaginationIterable iterator = + new PaginationIterable( + this, + "listSecurityMonitoringSignals", + resultsPath, + valueGetterPath, + valueSetterPath, + valueSetterParamOptional, + true, + true, + limit, + args, + 0); + + return iterator; + } + + /** + * The list endpoint returns security signals that match a search query. Both this endpoint and + * the POST endpoint can be used interchangeably when listing security signals. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<SecurityMonitoringSignalsListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
+ */ + public ApiResponse + listSecurityMonitoringSignalsWithHttpInfo( + ListSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + String filterQuery = parameters.filterQuery; + OffsetDateTime filterFrom = parameters.filterFrom; + OffsetDateTime filterTo = parameters.filterTo; + SecurityMonitoringSignalsSort sort = parameters.sort; + String pageCursor = parameters.pageCursor; + Integer pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = "/api/v2/security_monitoring/signals"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listSecurityMonitoringSignals", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a quick list of security signals. + * + *

See {@link #listSecurityMonitoringSignalsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalsListResponse>> + */ + public CompletableFuture> + listSecurityMonitoringSignalsWithHttpInfoAsync( + ListSecurityMonitoringSignalsOptionalParameters parameters) { + Object localVarPostBody = null; + String filterQuery = parameters.filterQuery; + OffsetDateTime filterFrom = parameters.filterFrom; + OffsetDateTime filterTo = parameters.filterTo; + SecurityMonitoringSignalsSort sort = parameters.sort; + String pageCursor = parameters.pageCursor; + Integer pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = "/api/v2/security_monitoring/signals"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listSecurityMonitoringSignals", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listSecurityMonitoringSuppressions. */ + public static class ListSecurityMonitoringSuppressionsOptionalParameters { + private String query; + private SecurityMonitoringSuppressionSort sort; + private Long pageSize; + private Long pageNumber; + /** - * Set filterTeams. + * Set query. * - * @param filterTeams Filter by teams. (optional) - * @return ListVulnerableAssetsOptionalParameters + * @param query Query string. (optional) + * @return ListSecurityMonitoringSuppressionsOptionalParameters */ - public ListVulnerableAssetsOptionalParameters filterTeams(String filterTeams) { - this.filterTeams = filterTeams; + public ListSecurityMonitoringSuppressionsOptionalParameters query(String query) { + this.query = query; return this; } /** - * Set filterArch. + * Set sort. * - * @param filterArch Filter by architecture. (optional) - * @return ListVulnerableAssetsOptionalParameters + * @param sort Attribute used to sort the list of suppression rules. Prefix with - + * to sort in descending order. (optional) + * @return ListSecurityMonitoringSuppressionsOptionalParameters */ - public ListVulnerableAssetsOptionalParameters filterArch(String filterArch) { - this.filterArch = filterArch; + public ListSecurityMonitoringSuppressionsOptionalParameters sort( + SecurityMonitoringSuppressionSort sort) { + this.sort = sort; + return this; + } + + /** + * Set pageSize. + * + * @param pageSize Size for a given page. Use -1 to return all items. (optional, + * default to -1) + * @return ListSecurityMonitoringSuppressionsOptionalParameters + */ + public ListSecurityMonitoringSuppressionsOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageNumber. + * + * @param pageNumber Specific page number to return. (optional, default to 0) + * @return ListSecurityMonitoringSuppressionsOptionalParameters + */ + public ListSecurityMonitoringSuppressionsOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; return this; } + } + + /** + * Get all suppression rules. + * + *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfo}. + * + * @return SecurityMonitoringPaginatedSuppressionsResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSuppressions() + throws ApiException { + return listSecurityMonitoringSuppressionsWithHttpInfo( + new ListSecurityMonitoringSuppressionsOptionalParameters()) + .getData(); + } + + /** + * Get all suppression rules. + * + *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfoAsync}. + * + * @return CompletableFuture<SecurityMonitoringPaginatedSuppressionsResponse> + */ + public CompletableFuture + listSecurityMonitoringSuppressionsAsync() { + return listSecurityMonitoringSuppressionsWithHttpInfoAsync( + new ListSecurityMonitoringSuppressionsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get all suppression rules. + * + *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SecurityMonitoringPaginatedSuppressionsResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringPaginatedSuppressionsResponse listSecurityMonitoringSuppressions( + ListSecurityMonitoringSuppressionsOptionalParameters parameters) throws ApiException { + return listSecurityMonitoringSuppressionsWithHttpInfo(parameters).getData(); + } + + /** + * Get all suppression rules. + * + *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SecurityMonitoringPaginatedSuppressionsResponse> + */ + public CompletableFuture + listSecurityMonitoringSuppressionsAsync( + ListSecurityMonitoringSuppressionsOptionalParameters parameters) { + return listSecurityMonitoringSuppressionsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the list of all suppression rules. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<SecurityMonitoringPaginatedSuppressionsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
429 Too many requests -
+ */ + public ApiResponse + listSecurityMonitoringSuppressionsWithHttpInfo( + ListSecurityMonitoringSuppressionsOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + String query = parameters.query; + SecurityMonitoringSuppressionSort sort = parameters.sort; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + // create path and map variables + String localVarPath = "/api/v2/security_monitoring/configuration/suppressions"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listSecurityMonitoringSuppressions", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get all suppression rules. + * + *

See {@link #listSecurityMonitoringSuppressionsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringPaginatedSuppressionsResponse>> + */ + public CompletableFuture> + listSecurityMonitoringSuppressionsWithHttpInfoAsync( + ListSecurityMonitoringSuppressionsOptionalParameters parameters) { + Object localVarPostBody = null; + String query = parameters.query; + SecurityMonitoringSuppressionSort sort = parameters.sort; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + // create path and map variables + String localVarPath = "/api/v2/security_monitoring/configuration/suppressions"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listSecurityMonitoringSuppressions", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List codegen rulesets. + * + *

See {@link #listStaticAnalysisCodegenRulesetsWithHttpInfo}. + * + * @return SastRulesetsResponse + * @throws ApiException if fails to make API call + */ + public SastRulesetsResponse listStaticAnalysisCodegenRulesets() throws ApiException { + return listStaticAnalysisCodegenRulesetsWithHttpInfo().getData(); + } + + /** + * List codegen rulesets. + * + *

See {@link #listStaticAnalysisCodegenRulesetsWithHttpInfoAsync}. + * + * @return CompletableFuture<SastRulesetsResponse> + */ + public CompletableFuture listStaticAnalysisCodegenRulesetsAsync() { + return listStaticAnalysisCodegenRulesetsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the rulesets relevant for code generation for the authenticated user. + * + * @return ApiResponse<SastRulesetsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
429 Too many requests -
+ */ + public ApiResponse listStaticAnalysisCodegenRulesetsWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listStaticAnalysisCodegenRulesets"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/static-analysis/codegen/rulesets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listStaticAnalysisCodegenRulesets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List codegen rulesets. + * + *

See {@link #listStaticAnalysisCodegenRulesetsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<SastRulesetsResponse>> + */ + public CompletableFuture> + listStaticAnalysisCodegenRulesetsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listStaticAnalysisCodegenRulesets"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/static-analysis/codegen/rulesets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listStaticAnalysisCodegenRulesets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listVulnerabilities. */ + public static class ListVulnerabilitiesOptionalParameters { + private String pageToken; + private Long pageNumber; + private VulnerabilityType filterType; + private Double filterCvssBaseScoreOp; + private VulnerabilitySeverity filterCvssBaseSeverity; + private String filterCvssBaseVector; + private Double filterCvssDatadogScoreOp; + private VulnerabilitySeverity filterCvssDatadogSeverity; + private String filterCvssDatadogVector; + private VulnerabilityStatus filterStatus; + private VulnerabilityTool filterTool; + private String filterLibraryName; + private String filterLibraryVersion; + private String filterAdvisoryId; + private Boolean filterRisksExploitationProbability; + private Boolean filterRisksPocExploitAvailable; + private Boolean filterRisksExploitAvailable; + private Double filterRisksEpssScoreOp; + private VulnerabilitySeverity filterRisksEpssSeverity; + private String filterLanguage; + private VulnerabilityEcosystem filterEcosystem; + private String filterCodeLocationLocation; + private String filterCodeLocationFilePath; + private String filterCodeLocationMethod; + private Boolean filterFixAvailable; + private String filterRepoDigests; + private String filterOrigin; + private Boolean filterRunningKernel; + private String filterAssetName; + private AssetType filterAssetType; + private String filterAssetVersionFirst; + private String filterAssetVersionLast; + private String filterAssetRepositoryUrl; + private Boolean filterAssetRisksInProduction; + private Boolean filterAssetRisksUnderAttack; + private Boolean filterAssetRisksIsPubliclyAccessible; + private Boolean filterAssetRisksHasPrivilegedAccess; + private Boolean filterAssetRisksHasAccessToSensitiveData; + private String filterAssetEnvironments; + private String filterAssetTeams; + private String filterAssetArch; + private String filterAssetOperatingSystemName; + private String filterAssetOperatingSystemVersion; + + /** + * Set pageToken. + * + * @param pageToken Its value must come from the links section of the response of + * the first request. Do not manually edit it. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters pageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + /** + * Set pageNumber. + * + * @param pageNumber The page number to be retrieved. It should be equal or greater than 1 + * (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set filterType. + * + * @param filterType Filter by vulnerability type. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterType(VulnerabilityType filterType) { + this.filterType = filterType; + return this; + } + + /** + * Set filterCvssBaseScoreOp. + * + * @param filterCvssBaseScoreOp Filter by vulnerability base (i.e. from the original advisory) + * severity score. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterCvssBaseScoreOp( + Double filterCvssBaseScoreOp) { + this.filterCvssBaseScoreOp = filterCvssBaseScoreOp; + return this; + } + + /** + * Set filterCvssBaseSeverity. + * + * @param filterCvssBaseSeverity Filter by vulnerability base severity. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterCvssBaseSeverity( + VulnerabilitySeverity filterCvssBaseSeverity) { + this.filterCvssBaseSeverity = filterCvssBaseSeverity; + return this; + } + + /** + * Set filterCvssBaseVector. + * + * @param filterCvssBaseVector Filter by vulnerability base CVSS vector. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterCvssBaseVector(String filterCvssBaseVector) { + this.filterCvssBaseVector = filterCvssBaseVector; + return this; + } + + /** + * Set filterCvssDatadogScoreOp. + * + * @param filterCvssDatadogScoreOp Filter by vulnerability Datadog severity score. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterCvssDatadogScoreOp( + Double filterCvssDatadogScoreOp) { + this.filterCvssDatadogScoreOp = filterCvssDatadogScoreOp; + return this; + } + + /** + * Set filterCvssDatadogSeverity. + * + * @param filterCvssDatadogSeverity Filter by vulnerability Datadog severity. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterCvssDatadogSeverity( + VulnerabilitySeverity filterCvssDatadogSeverity) { + this.filterCvssDatadogSeverity = filterCvssDatadogSeverity; + return this; + } + + /** + * Set filterCvssDatadogVector. + * + * @param filterCvssDatadogVector Filter by vulnerability Datadog CVSS vector. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterCvssDatadogVector( + String filterCvssDatadogVector) { + this.filterCvssDatadogVector = filterCvssDatadogVector; + return this; + } + + /** + * Set filterStatus. + * + * @param filterStatus Filter by the status of the vulnerability. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterStatus(VulnerabilityStatus filterStatus) { + this.filterStatus = filterStatus; + return this; + } + + /** + * Set filterTool. + * + * @param filterTool Filter by the tool of the vulnerability. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterTool(VulnerabilityTool filterTool) { + this.filterTool = filterTool; + return this; + } + + /** + * Set filterLibraryName. + * + * @param filterLibraryName Filter by library name. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterLibraryName(String filterLibraryName) { + this.filterLibraryName = filterLibraryName; + return this; + } + + /** + * Set filterLibraryVersion. + * + * @param filterLibraryVersion Filter by library version. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterLibraryVersion(String filterLibraryVersion) { + this.filterLibraryVersion = filterLibraryVersion; + return this; + } + + /** + * Set filterAdvisoryId. + * + * @param filterAdvisoryId Filter by advisory ID. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAdvisoryId(String filterAdvisoryId) { + this.filterAdvisoryId = filterAdvisoryId; + return this; + } + + /** + * Set filterRisksExploitationProbability. + * + * @param filterRisksExploitationProbability Filter by exploitation probability. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterRisksExploitationProbability( + Boolean filterRisksExploitationProbability) { + this.filterRisksExploitationProbability = filterRisksExploitationProbability; + return this; + } + + /** + * Set filterRisksPocExploitAvailable. + * + * @param filterRisksPocExploitAvailable Filter by POC exploit availability. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterRisksPocExploitAvailable( + Boolean filterRisksPocExploitAvailable) { + this.filterRisksPocExploitAvailable = filterRisksPocExploitAvailable; + return this; + } + + /** + * Set filterRisksExploitAvailable. + * + * @param filterRisksExploitAvailable Filter by public exploit availability. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterRisksExploitAvailable( + Boolean filterRisksExploitAvailable) { + this.filterRisksExploitAvailable = filterRisksExploitAvailable; + return this; + } + + /** + * Set filterRisksEpssScoreOp. + * + * @param filterRisksEpssScoreOp Filter by vulnerability EPSS severity score. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterRisksEpssScoreOp( + Double filterRisksEpssScoreOp) { + this.filterRisksEpssScoreOp = filterRisksEpssScoreOp; + return this; + } + + /** + * Set filterRisksEpssSeverity. + * + * @param filterRisksEpssSeverity Filter by vulnerability EPSS severity. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterRisksEpssSeverity( + VulnerabilitySeverity filterRisksEpssSeverity) { + this.filterRisksEpssSeverity = filterRisksEpssSeverity; + return this; + } + + /** + * Set filterLanguage. + * + * @param filterLanguage Filter by language. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterLanguage(String filterLanguage) { + this.filterLanguage = filterLanguage; + return this; + } + + /** + * Set filterEcosystem. + * + * @param filterEcosystem Filter by ecosystem. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterEcosystem( + VulnerabilityEcosystem filterEcosystem) { + this.filterEcosystem = filterEcosystem; + return this; + } + + /** + * Set filterCodeLocationLocation. + * + * @param filterCodeLocationLocation Filter by vulnerability location. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterCodeLocationLocation( + String filterCodeLocationLocation) { + this.filterCodeLocationLocation = filterCodeLocationLocation; + return this; + } + + /** + * Set filterCodeLocationFilePath. + * + * @param filterCodeLocationFilePath Filter by vulnerability file path. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterCodeLocationFilePath( + String filterCodeLocationFilePath) { + this.filterCodeLocationFilePath = filterCodeLocationFilePath; + return this; + } + + /** + * Set filterCodeLocationMethod. + * + * @param filterCodeLocationMethod Filter by method. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterCodeLocationMethod( + String filterCodeLocationMethod) { + this.filterCodeLocationMethod = filterCodeLocationMethod; + return this; + } + + /** + * Set filterFixAvailable. + * + * @param filterFixAvailable Filter by fix availability. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterFixAvailable(Boolean filterFixAvailable) { + this.filterFixAvailable = filterFixAvailable; + return this; + } + + /** + * Set filterRepoDigests. + * + * @param filterRepoDigests Filter by vulnerability repo_digest (when the + * vulnerability is related to Image asset). (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterRepoDigests(String filterRepoDigests) { + this.filterRepoDigests = filterRepoDigests; + return this; + } + + /** + * Set filterOrigin. + * + * @param filterOrigin Filter by origin. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterOrigin(String filterOrigin) { + this.filterOrigin = filterOrigin; + return this; + } + + /** + * Set filterRunningKernel. + * + * @param filterRunningKernel Filter for whether the vulnerability affects a running kernel (for + * vulnerabilities related to a Host asset). (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterRunningKernel(Boolean filterRunningKernel) { + this.filterRunningKernel = filterRunningKernel; + return this; + } + + /** + * Set filterAssetName. + * + * @param filterAssetName Filter by asset name. This field supports the usage of wildcards (*). + * (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAssetName(String filterAssetName) { + this.filterAssetName = filterAssetName; + return this; + } + + /** + * Set filterAssetType. + * + * @param filterAssetType Filter by asset type. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAssetType(AssetType filterAssetType) { + this.filterAssetType = filterAssetType; + return this; + } + + /** + * Set filterAssetVersionFirst. + * + * @param filterAssetVersionFirst Filter by the first version of the asset this vulnerability + * has been detected on. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAssetVersionFirst( + String filterAssetVersionFirst) { + this.filterAssetVersionFirst = filterAssetVersionFirst; + return this; + } + + /** + * Set filterAssetVersionLast. + * + * @param filterAssetVersionLast Filter by the last version of the asset this vulnerability has + * been detected on. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAssetVersionLast( + String filterAssetVersionLast) { + this.filterAssetVersionLast = filterAssetVersionLast; + return this; + } + + /** + * Set filterAssetRepositoryUrl. + * + * @param filterAssetRepositoryUrl Filter by the repository url associated to the asset. + * (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAssetRepositoryUrl( + String filterAssetRepositoryUrl) { + this.filterAssetRepositoryUrl = filterAssetRepositoryUrl; + return this; + } + + /** + * Set filterAssetRisksInProduction. + * + * @param filterAssetRisksInProduction Filter whether the asset is in production or not. + * (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAssetRisksInProduction( + Boolean filterAssetRisksInProduction) { + this.filterAssetRisksInProduction = filterAssetRisksInProduction; + return this; + } + + /** + * Set filterAssetRisksUnderAttack. + * + * @param filterAssetRisksUnderAttack Filter whether the asset is under attack or not. + * (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAssetRisksUnderAttack( + Boolean filterAssetRisksUnderAttack) { + this.filterAssetRisksUnderAttack = filterAssetRisksUnderAttack; + return this; + } + + /** + * Set filterAssetRisksIsPubliclyAccessible. + * + * @param filterAssetRisksIsPubliclyAccessible Filter whether the asset is publicly accessible + * or not. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAssetRisksIsPubliclyAccessible( + Boolean filterAssetRisksIsPubliclyAccessible) { + this.filterAssetRisksIsPubliclyAccessible = filterAssetRisksIsPubliclyAccessible; + return this; + } + + /** + * Set filterAssetRisksHasPrivilegedAccess. + * + * @param filterAssetRisksHasPrivilegedAccess Filter whether the asset is publicly accessible or + * not. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAssetRisksHasPrivilegedAccess( + Boolean filterAssetRisksHasPrivilegedAccess) { + this.filterAssetRisksHasPrivilegedAccess = filterAssetRisksHasPrivilegedAccess; + return this; + } + + /** + * Set filterAssetRisksHasAccessToSensitiveData. + * + * @param filterAssetRisksHasAccessToSensitiveData Filter whether the asset has access to + * sensitive data or not. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAssetRisksHasAccessToSensitiveData( + Boolean filterAssetRisksHasAccessToSensitiveData) { + this.filterAssetRisksHasAccessToSensitiveData = filterAssetRisksHasAccessToSensitiveData; + return this; + } + + /** + * Set filterAssetEnvironments. + * + * @param filterAssetEnvironments Filter by asset environments. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAssetEnvironments( + String filterAssetEnvironments) { + this.filterAssetEnvironments = filterAssetEnvironments; + return this; + } + + /** + * Set filterAssetTeams. + * + * @param filterAssetTeams Filter by asset teams. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAssetTeams(String filterAssetTeams) { + this.filterAssetTeams = filterAssetTeams; + return this; + } + + /** + * Set filterAssetArch. + * + * @param filterAssetArch Filter by asset architecture. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAssetArch(String filterAssetArch) { + this.filterAssetArch = filterAssetArch; + return this; + } + + /** + * Set filterAssetOperatingSystemName. + * + * @param filterAssetOperatingSystemName Filter by asset operating system name. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAssetOperatingSystemName( + String filterAssetOperatingSystemName) { + this.filterAssetOperatingSystemName = filterAssetOperatingSystemName; + return this; + } + + /** + * Set filterAssetOperatingSystemVersion. + * + * @param filterAssetOperatingSystemVersion Filter by asset operating system version. (optional) + * @return ListVulnerabilitiesOptionalParameters + */ + public ListVulnerabilitiesOptionalParameters filterAssetOperatingSystemVersion( + String filterAssetOperatingSystemVersion) { + this.filterAssetOperatingSystemVersion = filterAssetOperatingSystemVersion; + return this; + } + } + + /** + * List vulnerabilities. + * + *

See {@link #listVulnerabilitiesWithHttpInfo}. + * + * @return ListVulnerabilitiesResponse + * @throws ApiException if fails to make API call + * @deprecated + */ + @Deprecated + public ListVulnerabilitiesResponse listVulnerabilities() throws ApiException { + return listVulnerabilitiesWithHttpInfo(new ListVulnerabilitiesOptionalParameters()).getData(); + } + + /** + * List vulnerabilities. + * + *

See {@link #listVulnerabilitiesWithHttpInfoAsync}. + * + * @return CompletableFuture<ListVulnerabilitiesResponse> + * @deprecated + */ + @Deprecated + public CompletableFuture listVulnerabilitiesAsync() { + return listVulnerabilitiesWithHttpInfoAsync(new ListVulnerabilitiesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List vulnerabilities. + * + *

See {@link #listVulnerabilitiesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return ListVulnerabilitiesResponse + * @throws ApiException if fails to make API call + * @deprecated + */ + @Deprecated + public ListVulnerabilitiesResponse listVulnerabilities( + ListVulnerabilitiesOptionalParameters parameters) throws ApiException { + return listVulnerabilitiesWithHttpInfo(parameters).getData(); + } + + /** + * List vulnerabilities. + * + *

See {@link #listVulnerabilitiesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ListVulnerabilitiesResponse> + * @deprecated + */ + @Deprecated + public CompletableFuture listVulnerabilitiesAsync( + ListVulnerabilitiesOptionalParameters parameters) { + return listVulnerabilitiesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a list of vulnerabilities. + * + *

Pagination

+ * + *

Pagination is enabled by default in both vulnerabilities and assets + * . The size of the page varies depending on the endpoint and cannot be modified. To + * automate the request of the next page, you can use the links section in the response. + * + *

This endpoint will return paginated responses. The pages are stored in the links section of + * the response: + * + *

JSON + * { + * "data": [...], + * "meta": {...}, + * "links": { + * "self": "https://.../api/v2/security/vulnerabilities", + * "first": "https://.../api/v2/security/vulnerabilities?page[number]=1&page[token]=abc", + * "last": "https://.../api/v2/security/vulnerabilities?page[number]=43&page[token]=abc", + * "next": "https://.../api/v2/security/vulnerabilities?page[number]=2&page[token]=abc" + * } + * } + * + *

    + *
  • links.previous is empty if the first page is requested. + *
  • links.next is empty if the last page is requested. + *
+ * + *

Token

+ * + *

Vulnerabilities can be created, updated or deleted at any point in time. + * + *

Upon the first request, a token is created to ensure consistency across subsequent paginated + * requests. + * + *

A token is valid only for 24 hours. + * + *

First request

+ * + *

We consider a request to be the first request when there is no page[token] + * parameter. + * + *

The response of this first request contains the newly created token in the links + * section. + * + *

This token can then be used in the subsequent paginated requests. + * + *

Note: The first request may take longer to complete than subsequent requests. + * + *

Subsequent requests

+ * + *

Any request containing valid page[token] and page[number] + * parameters will be considered a subsequent request. + * + *

If the token is invalid, a 404 response will be returned. + * + *

If the page number is invalid, a 400 response will be returned. + * + *

The returned token is valid for all requests in the pagination sequence. To + * send paginated requests in parallel, reuse the same token and change only the + * page[number] parameter. + * + *

Filtering

+ * + *

The request can include some filter parameters to filter the data to be retrieved. The + * format of the filter parameters follows the JSON:API format: + * filter[$prop_name], where prop_name is the property name in the entity + * being filtered by. + * + *

All filters can include multiple values, where data will be filtered with an OR clause: + * filter[title]=Title1,Title2 will filter all vulnerabilities where title is equal + * to Title1 OR Title2. + * + *

String filters are case sensitive. + * + *

Boolean filters accept true or false as values. + * + *

Number filters must include an operator as a second filter input: + * filter[$prop_name][$operator]. For example, for the vulnerabilities endpoint: + * filter[cvss.base.score][lte]=8. + * + *

Available operators are: eq (==), lt (<), lte + * (<=), gt (>) and gte (>=). + * + *

Metadata

+ * + *

Following JSON:API format, object + * including non-standard meta-information. + * + *

This endpoint includes the meta member in the response. For more details on each of the + * properties included in this section, check the endpoints response tables. + * + *

JSON + * { + * "data": [...], + * "meta": { + * "total": 1500, + * "count": 18732, + * "token": "some_token" + * }, + * "links": {...} + * } + * + *

Extensions

+ * + *

Requests may include extensions to modify the behavior of the requested endpoint. The filter + * parameters follow the JSON:API format + * format: ext:$extension_name, where extension_name is the name of the + * modifier that is being applied. + * + *

Extensions can only include one value: ext:modifier=value. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<ListVulnerabilitiesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad request: The server cannot process the request due to invalid syntax in the request. -
403 Forbidden: Access denied -
404 Not found: There is no request associated with the provided token. -
429 Too many requests -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse listVulnerabilitiesWithHttpInfo( + ListVulnerabilitiesOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listVulnerabilities"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + String pageToken = parameters.pageToken; + Long pageNumber = parameters.pageNumber; + VulnerabilityType filterType = parameters.filterType; + Double filterCvssBaseScoreOp = parameters.filterCvssBaseScoreOp; + VulnerabilitySeverity filterCvssBaseSeverity = parameters.filterCvssBaseSeverity; + String filterCvssBaseVector = parameters.filterCvssBaseVector; + Double filterCvssDatadogScoreOp = parameters.filterCvssDatadogScoreOp; + VulnerabilitySeverity filterCvssDatadogSeverity = parameters.filterCvssDatadogSeverity; + String filterCvssDatadogVector = parameters.filterCvssDatadogVector; + VulnerabilityStatus filterStatus = parameters.filterStatus; + VulnerabilityTool filterTool = parameters.filterTool; + String filterLibraryName = parameters.filterLibraryName; + String filterLibraryVersion = parameters.filterLibraryVersion; + String filterAdvisoryId = parameters.filterAdvisoryId; + Boolean filterRisksExploitationProbability = parameters.filterRisksExploitationProbability; + Boolean filterRisksPocExploitAvailable = parameters.filterRisksPocExploitAvailable; + Boolean filterRisksExploitAvailable = parameters.filterRisksExploitAvailable; + Double filterRisksEpssScoreOp = parameters.filterRisksEpssScoreOp; + VulnerabilitySeverity filterRisksEpssSeverity = parameters.filterRisksEpssSeverity; + String filterLanguage = parameters.filterLanguage; + VulnerabilityEcosystem filterEcosystem = parameters.filterEcosystem; + String filterCodeLocationLocation = parameters.filterCodeLocationLocation; + String filterCodeLocationFilePath = parameters.filterCodeLocationFilePath; + String filterCodeLocationMethod = parameters.filterCodeLocationMethod; + Boolean filterFixAvailable = parameters.filterFixAvailable; + String filterRepoDigests = parameters.filterRepoDigests; + String filterOrigin = parameters.filterOrigin; + Boolean filterRunningKernel = parameters.filterRunningKernel; + String filterAssetName = parameters.filterAssetName; + AssetType filterAssetType = parameters.filterAssetType; + String filterAssetVersionFirst = parameters.filterAssetVersionFirst; + String filterAssetVersionLast = parameters.filterAssetVersionLast; + String filterAssetRepositoryUrl = parameters.filterAssetRepositoryUrl; + Boolean filterAssetRisksInProduction = parameters.filterAssetRisksInProduction; + Boolean filterAssetRisksUnderAttack = parameters.filterAssetRisksUnderAttack; + Boolean filterAssetRisksIsPubliclyAccessible = parameters.filterAssetRisksIsPubliclyAccessible; + Boolean filterAssetRisksHasPrivilegedAccess = parameters.filterAssetRisksHasPrivilegedAccess; + Boolean filterAssetRisksHasAccessToSensitiveData = + parameters.filterAssetRisksHasAccessToSensitiveData; + String filterAssetEnvironments = parameters.filterAssetEnvironments; + String filterAssetTeams = parameters.filterAssetTeams; + String filterAssetArch = parameters.filterAssetArch; + String filterAssetOperatingSystemName = parameters.filterAssetOperatingSystemName; + String filterAssetOperatingSystemVersion = parameters.filterAssetOperatingSystemVersion; + // create path and map variables + String localVarPath = "/api/v2/security/vulnerabilities"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[type]", filterType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[cvss.base.score][`$op`]", filterCvssBaseScoreOp)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[cvss.base.severity]", filterCvssBaseSeverity)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[cvss.base.vector]", filterCvssBaseVector)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[cvss.datadog.score][`$op`]", filterCvssDatadogScoreOp)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[cvss.datadog.severity]", filterCvssDatadogSeverity)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[cvss.datadog.vector]", filterCvssDatadogVector)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tool]", filterTool)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[library.name]", filterLibraryName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[library.version]", filterLibraryVersion)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[advisory.id]", filterAdvisoryId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[risks.exploitation_probability]", filterRisksExploitationProbability)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[risks.poc_exploit_available]", filterRisksPocExploitAvailable)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[risks.exploit_available]", filterRisksExploitAvailable)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[risks.epss.score][`$op`]", filterRisksEpssScoreOp)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[risks.epss.severity]", filterRisksEpssSeverity)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[language]", filterLanguage)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[ecosystem]", filterEcosystem)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[code_location.location]", filterCodeLocationLocation)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[code_location.file_path]", filterCodeLocationFilePath)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[code_location.method]", filterCodeLocationMethod)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[fix_available]", filterFixAvailable)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[repo_digests]", filterRepoDigests)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[origin]", filterOrigin)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[running_kernel]", filterRunningKernel)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.name]", filterAssetName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.type]", filterAssetType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.version.first]", filterAssetVersionFirst)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.version.last]", filterAssetVersionLast)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.repository_url]", filterAssetRepositoryUrl)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[asset.risks.in_production]", filterAssetRisksInProduction)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[asset.risks.under_attack]", filterAssetRisksUnderAttack)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", + "filter[asset.risks.is_publicly_accessible]", + filterAssetRisksIsPubliclyAccessible)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[asset.risks.has_privileged_access]", filterAssetRisksHasPrivilegedAccess)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", + "filter[asset.risks.has_access_to_sensitive_data]", + filterAssetRisksHasAccessToSensitiveData)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.environments]", filterAssetEnvironments)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.teams]", filterAssetTeams)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.arch]", filterAssetArch)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[asset.operating_system.name]", filterAssetOperatingSystemName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[asset.operating_system.version]", filterAssetOperatingSystemVersion)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listVulnerabilities", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List vulnerabilities. + * + *

See {@link #listVulnerabilitiesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<ListVulnerabilitiesResponse>> + * @deprecated + */ + @Deprecated + public CompletableFuture> + listVulnerabilitiesWithHttpInfoAsync(ListVulnerabilitiesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listVulnerabilities"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + String pageToken = parameters.pageToken; + Long pageNumber = parameters.pageNumber; + VulnerabilityType filterType = parameters.filterType; + Double filterCvssBaseScoreOp = parameters.filterCvssBaseScoreOp; + VulnerabilitySeverity filterCvssBaseSeverity = parameters.filterCvssBaseSeverity; + String filterCvssBaseVector = parameters.filterCvssBaseVector; + Double filterCvssDatadogScoreOp = parameters.filterCvssDatadogScoreOp; + VulnerabilitySeverity filterCvssDatadogSeverity = parameters.filterCvssDatadogSeverity; + String filterCvssDatadogVector = parameters.filterCvssDatadogVector; + VulnerabilityStatus filterStatus = parameters.filterStatus; + VulnerabilityTool filterTool = parameters.filterTool; + String filterLibraryName = parameters.filterLibraryName; + String filterLibraryVersion = parameters.filterLibraryVersion; + String filterAdvisoryId = parameters.filterAdvisoryId; + Boolean filterRisksExploitationProbability = parameters.filterRisksExploitationProbability; + Boolean filterRisksPocExploitAvailable = parameters.filterRisksPocExploitAvailable; + Boolean filterRisksExploitAvailable = parameters.filterRisksExploitAvailable; + Double filterRisksEpssScoreOp = parameters.filterRisksEpssScoreOp; + VulnerabilitySeverity filterRisksEpssSeverity = parameters.filterRisksEpssSeverity; + String filterLanguage = parameters.filterLanguage; + VulnerabilityEcosystem filterEcosystem = parameters.filterEcosystem; + String filterCodeLocationLocation = parameters.filterCodeLocationLocation; + String filterCodeLocationFilePath = parameters.filterCodeLocationFilePath; + String filterCodeLocationMethod = parameters.filterCodeLocationMethod; + Boolean filterFixAvailable = parameters.filterFixAvailable; + String filterRepoDigests = parameters.filterRepoDigests; + String filterOrigin = parameters.filterOrigin; + Boolean filterRunningKernel = parameters.filterRunningKernel; + String filterAssetName = parameters.filterAssetName; + AssetType filterAssetType = parameters.filterAssetType; + String filterAssetVersionFirst = parameters.filterAssetVersionFirst; + String filterAssetVersionLast = parameters.filterAssetVersionLast; + String filterAssetRepositoryUrl = parameters.filterAssetRepositoryUrl; + Boolean filterAssetRisksInProduction = parameters.filterAssetRisksInProduction; + Boolean filterAssetRisksUnderAttack = parameters.filterAssetRisksUnderAttack; + Boolean filterAssetRisksIsPubliclyAccessible = parameters.filterAssetRisksIsPubliclyAccessible; + Boolean filterAssetRisksHasPrivilegedAccess = parameters.filterAssetRisksHasPrivilegedAccess; + Boolean filterAssetRisksHasAccessToSensitiveData = + parameters.filterAssetRisksHasAccessToSensitiveData; + String filterAssetEnvironments = parameters.filterAssetEnvironments; + String filterAssetTeams = parameters.filterAssetTeams; + String filterAssetArch = parameters.filterAssetArch; + String filterAssetOperatingSystemName = parameters.filterAssetOperatingSystemName; + String filterAssetOperatingSystemVersion = parameters.filterAssetOperatingSystemVersion; + // create path and map variables + String localVarPath = "/api/v2/security/vulnerabilities"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[type]", filterType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[cvss.base.score][`$op`]", filterCvssBaseScoreOp)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[cvss.base.severity]", filterCvssBaseSeverity)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[cvss.base.vector]", filterCvssBaseVector)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[cvss.datadog.score][`$op`]", filterCvssDatadogScoreOp)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[cvss.datadog.severity]", filterCvssDatadogSeverity)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[cvss.datadog.vector]", filterCvssDatadogVector)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tool]", filterTool)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[library.name]", filterLibraryName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[library.version]", filterLibraryVersion)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[advisory.id]", filterAdvisoryId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[risks.exploitation_probability]", filterRisksExploitationProbability)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[risks.poc_exploit_available]", filterRisksPocExploitAvailable)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[risks.exploit_available]", filterRisksExploitAvailable)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[risks.epss.score][`$op`]", filterRisksEpssScoreOp)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[risks.epss.severity]", filterRisksEpssSeverity)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[language]", filterLanguage)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[ecosystem]", filterEcosystem)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[code_location.location]", filterCodeLocationLocation)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[code_location.file_path]", filterCodeLocationFilePath)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[code_location.method]", filterCodeLocationMethod)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[fix_available]", filterFixAvailable)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[repo_digests]", filterRepoDigests)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[origin]", filterOrigin)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[running_kernel]", filterRunningKernel)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.name]", filterAssetName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.type]", filterAssetType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.version.first]", filterAssetVersionFirst)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.version.last]", filterAssetVersionLast)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.repository_url]", filterAssetRepositoryUrl)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[asset.risks.in_production]", filterAssetRisksInProduction)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[asset.risks.under_attack]", filterAssetRisksUnderAttack)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", + "filter[asset.risks.is_publicly_accessible]", + filterAssetRisksIsPubliclyAccessible)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[asset.risks.has_privileged_access]", filterAssetRisksHasPrivilegedAccess)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", + "filter[asset.risks.has_access_to_sensitive_data]", + filterAssetRisksHasAccessToSensitiveData)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.environments]", filterAssetEnvironments)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.teams]", filterAssetTeams)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[asset.arch]", filterAssetArch)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[asset.operating_system.name]", filterAssetOperatingSystemName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[asset.operating_system.version]", filterAssetOperatingSystemVersion)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listVulnerabilities", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listVulnerableAssets. */ + public static class ListVulnerableAssetsOptionalParameters { + private String pageToken; + private Long pageNumber; + private String filterName; + private AssetType filterType; + private String filterVersionFirst; + private String filterVersionLast; + private String filterRepositoryUrl; + private Boolean filterRisksInProduction; + private Boolean filterRisksUnderAttack; + private Boolean filterRisksIsPubliclyAccessible; + private Boolean filterRisksHasPrivilegedAccess; + private Boolean filterRisksHasAccessToSensitiveData; + private String filterEnvironments; + private String filterTeams; + private String filterArch; + private String filterOperatingSystemName; + private String filterOperatingSystemVersion; + + /** + * Set pageToken. + * + * @param pageToken Its value must come from the links section of the response of + * the first request. Do not manually edit it. (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters pageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + /** + * Set pageNumber. + * + * @param pageNumber The page number to be retrieved. It should be equal or greater than 1 + * (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set filterName. + * + * @param filterName Filter by name. This field supports the usage of wildcards (*). (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters filterName(String filterName) { + this.filterName = filterName; + return this; + } + + /** + * Set filterType. + * + * @param filterType Filter by type. (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters filterType(AssetType filterType) { + this.filterType = filterType; + return this; + } + + /** + * Set filterVersionFirst. + * + * @param filterVersionFirst Filter by the first version of the asset since it has been + * vulnerable. (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters filterVersionFirst(String filterVersionFirst) { + this.filterVersionFirst = filterVersionFirst; + return this; + } + + /** + * Set filterVersionLast. + * + * @param filterVersionLast Filter by the last detected version of the asset. (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters filterVersionLast(String filterVersionLast) { + this.filterVersionLast = filterVersionLast; + return this; + } + + /** + * Set filterRepositoryUrl. + * + * @param filterRepositoryUrl Filter by the repository url associated to the asset. (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters filterRepositoryUrl(String filterRepositoryUrl) { + this.filterRepositoryUrl = filterRepositoryUrl; + return this; + } + + /** + * Set filterRisksInProduction. + * + * @param filterRisksInProduction Filter whether the asset is in production or not. (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters filterRisksInProduction( + Boolean filterRisksInProduction) { + this.filterRisksInProduction = filterRisksInProduction; + return this; + } + + /** + * Set filterRisksUnderAttack. + * + * @param filterRisksUnderAttack Filter whether the asset (Service) is under attack or not. + * (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters filterRisksUnderAttack( + Boolean filterRisksUnderAttack) { + this.filterRisksUnderAttack = filterRisksUnderAttack; + return this; + } + + /** + * Set filterRisksIsPubliclyAccessible. + * + * @param filterRisksIsPubliclyAccessible Filter whether the asset (Host) is publicly accessible + * or not. (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters filterRisksIsPubliclyAccessible( + Boolean filterRisksIsPubliclyAccessible) { + this.filterRisksIsPubliclyAccessible = filterRisksIsPubliclyAccessible; + return this; + } + + /** + * Set filterRisksHasPrivilegedAccess. + * + * @param filterRisksHasPrivilegedAccess Filter whether the asset (Host) has privileged access + * or not. (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters filterRisksHasPrivilegedAccess( + Boolean filterRisksHasPrivilegedAccess) { + this.filterRisksHasPrivilegedAccess = filterRisksHasPrivilegedAccess; + return this; + } + + /** + * Set filterRisksHasAccessToSensitiveData. + * + * @param filterRisksHasAccessToSensitiveData Filter whether the asset (Host) has access to + * sensitive data or not. (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters filterRisksHasAccessToSensitiveData( + Boolean filterRisksHasAccessToSensitiveData) { + this.filterRisksHasAccessToSensitiveData = filterRisksHasAccessToSensitiveData; + return this; + } + + /** + * Set filterEnvironments. + * + * @param filterEnvironments Filter by environment. (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters filterEnvironments(String filterEnvironments) { + this.filterEnvironments = filterEnvironments; + return this; + } + + /** + * Set filterTeams. + * + * @param filterTeams Filter by teams. (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters filterTeams(String filterTeams) { + this.filterTeams = filterTeams; + return this; + } + + /** + * Set filterArch. + * + * @param filterArch Filter by architecture. (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters filterArch(String filterArch) { + this.filterArch = filterArch; + return this; + } + + /** + * Set filterOperatingSystemName. + * + * @param filterOperatingSystemName Filter by operating system name. (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters filterOperatingSystemName( + String filterOperatingSystemName) { + this.filterOperatingSystemName = filterOperatingSystemName; + return this; + } + + /** + * Set filterOperatingSystemVersion. + * + * @param filterOperatingSystemVersion Filter by operating system version. (optional) + * @return ListVulnerableAssetsOptionalParameters + */ + public ListVulnerableAssetsOptionalParameters filterOperatingSystemVersion( + String filterOperatingSystemVersion) { + this.filterOperatingSystemVersion = filterOperatingSystemVersion; + return this; + } + } + + /** + * List vulnerable assets. + * + *

See {@link #listVulnerableAssetsWithHttpInfo}. + * + * @return ListVulnerableAssetsResponse + * @throws ApiException if fails to make API call + */ + public ListVulnerableAssetsResponse listVulnerableAssets() throws ApiException { + return listVulnerableAssetsWithHttpInfo(new ListVulnerableAssetsOptionalParameters()).getData(); + } + + /** + * List vulnerable assets. + * + *

See {@link #listVulnerableAssetsWithHttpInfoAsync}. + * + * @return CompletableFuture<ListVulnerableAssetsResponse> + */ + public CompletableFuture listVulnerableAssetsAsync() { + return listVulnerableAssetsWithHttpInfoAsync(new ListVulnerableAssetsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List vulnerable assets. + * + *

See {@link #listVulnerableAssetsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return ListVulnerableAssetsResponse + * @throws ApiException if fails to make API call + */ + public ListVulnerableAssetsResponse listVulnerableAssets( + ListVulnerableAssetsOptionalParameters parameters) throws ApiException { + return listVulnerableAssetsWithHttpInfo(parameters).getData(); + } + + /** + * List vulnerable assets. + * + *

See {@link #listVulnerableAssetsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ListVulnerableAssetsResponse> + */ + public CompletableFuture listVulnerableAssetsAsync( + ListVulnerableAssetsOptionalParameters parameters) { + return listVulnerableAssetsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a list of vulnerable assets. + * + *

Pagination

+ * + *

Please review the Pagination section for the "List + * Vulnerabilities" endpoint. + * + *

Filtering

+ * + *

Please review the Filtering section for the "List Vulnerabilities" + * endpoint. + * + *

Metadata

+ * + *

Please review the Metadata section for the "List Vulnerabilities" + * endpoint. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<ListVulnerableAssetsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad request: The server cannot process the request due to invalid syntax in the request. -
403 Forbidden: Access denied -
404 Not found: There is no request associated with the provided token. -
429 Too many requests -
+ */ + public ApiResponse listVulnerableAssetsWithHttpInfo( + ListVulnerableAssetsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listVulnerableAssets"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + String pageToken = parameters.pageToken; + Long pageNumber = parameters.pageNumber; + String filterName = parameters.filterName; + AssetType filterType = parameters.filterType; + String filterVersionFirst = parameters.filterVersionFirst; + String filterVersionLast = parameters.filterVersionLast; + String filterRepositoryUrl = parameters.filterRepositoryUrl; + Boolean filterRisksInProduction = parameters.filterRisksInProduction; + Boolean filterRisksUnderAttack = parameters.filterRisksUnderAttack; + Boolean filterRisksIsPubliclyAccessible = parameters.filterRisksIsPubliclyAccessible; + Boolean filterRisksHasPrivilegedAccess = parameters.filterRisksHasPrivilegedAccess; + Boolean filterRisksHasAccessToSensitiveData = parameters.filterRisksHasAccessToSensitiveData; + String filterEnvironments = parameters.filterEnvironments; + String filterTeams = parameters.filterTeams; + String filterArch = parameters.filterArch; + String filterOperatingSystemName = parameters.filterOperatingSystemName; + String filterOperatingSystemVersion = parameters.filterOperatingSystemVersion; + // create path and map variables + String localVarPath = "/api/v2/security/vulnerable-assets"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[type]", filterType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[version.first]", filterVersionFirst)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[version.last]", filterVersionLast)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[repository_url]", filterRepositoryUrl)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[risks.in_production]", filterRisksInProduction)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[risks.under_attack]", filterRisksUnderAttack)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[risks.is_publicly_accessible]", filterRisksIsPubliclyAccessible)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[risks.has_privileged_access]", filterRisksHasPrivilegedAccess)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[risks.has_access_to_sensitive_data]", filterRisksHasAccessToSensitiveData)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[environments]", filterEnvironments)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[teams]", filterTeams)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[arch]", filterArch)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[operating_system.name]", filterOperatingSystemName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[operating_system.version]", filterOperatingSystemVersion)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listVulnerableAssets", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List vulnerable assets. + * + *

See {@link #listVulnerableAssetsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<ListVulnerableAssetsResponse>> + */ + public CompletableFuture> + listVulnerableAssetsWithHttpInfoAsync(ListVulnerableAssetsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listVulnerableAssets"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + String pageToken = parameters.pageToken; + Long pageNumber = parameters.pageNumber; + String filterName = parameters.filterName; + AssetType filterType = parameters.filterType; + String filterVersionFirst = parameters.filterVersionFirst; + String filterVersionLast = parameters.filterVersionLast; + String filterRepositoryUrl = parameters.filterRepositoryUrl; + Boolean filterRisksInProduction = parameters.filterRisksInProduction; + Boolean filterRisksUnderAttack = parameters.filterRisksUnderAttack; + Boolean filterRisksIsPubliclyAccessible = parameters.filterRisksIsPubliclyAccessible; + Boolean filterRisksHasPrivilegedAccess = parameters.filterRisksHasPrivilegedAccess; + Boolean filterRisksHasAccessToSensitiveData = parameters.filterRisksHasAccessToSensitiveData; + String filterEnvironments = parameters.filterEnvironments; + String filterTeams = parameters.filterTeams; + String filterArch = parameters.filterArch; + String filterOperatingSystemName = parameters.filterOperatingSystemName; + String filterOperatingSystemVersion = parameters.filterOperatingSystemVersion; + // create path and map variables + String localVarPath = "/api/v2/security/vulnerable-assets"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[type]", filterType)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[version.first]", filterVersionFirst)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[version.last]", filterVersionLast)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[repository_url]", filterRepositoryUrl)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[risks.in_production]", filterRisksInProduction)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[risks.under_attack]", filterRisksUnderAttack)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[risks.is_publicly_accessible]", filterRisksIsPubliclyAccessible)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[risks.has_privileged_access]", filterRisksHasPrivilegedAccess)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[risks.has_access_to_sensitive_data]", filterRisksHasAccessToSensitiveData)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[environments]", filterEnvironments)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[teams]", filterTeams)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[arch]", filterArch)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[operating_system.name]", filterOperatingSystemName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[operating_system.version]", filterOperatingSystemVersion)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listVulnerableAssets", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Mute or unmute security findings. + * + *

See {@link #muteSecurityFindingsWithHttpInfo}. + * + * @param body (required) + * @return MuteFindingsResponse + * @throws ApiException if fails to make API call + */ + public MuteFindingsResponse muteSecurityFindings(MuteFindingsRequest body) throws ApiException { + return muteSecurityFindingsWithHttpInfo(body).getData(); + } + + /** + * Mute or unmute security findings. + * + *

See {@link #muteSecurityFindingsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<MuteFindingsResponse> + */ + public CompletableFuture muteSecurityFindingsAsync( + MuteFindingsRequest body) { + return muteSecurityFindingsWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Mute or unmute security findings. You can mute or unmute up to 100 security findings per + * request. The request body must include is_muted and reason + * attributes. The allowed reasons depend on whether the finding is being muted or unmuted: - To + * mute a finding: PENDING_FIX, FALSE_POSITIVE, OTHER, + * NO_FIX, DUPLICATE, RISK_ACCEPTED. - To unmute a finding: + * NO_PENDING_FIX, HUMAN_ERROR, NO_LONGER_ACCEPTED_RISK, + * OTHER. + * + * @param body (required) + * @return ApiResponse<MuteFindingsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
202 Accepted -
400 Bad Request -
401 Unauthorized -
404 Not Found -
422 Unprocessable Entity -
429 Too many requests -
+ */ + public ApiResponse muteSecurityFindingsWithHttpInfo( + MuteFindingsRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling muteSecurityFindings"); + } + // create path and map variables + String localVarPath = "/api/v2/security/findings/mute"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.muteSecurityFindings", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Mute or unmute security findings. + * + *

See {@link #muteSecurityFindingsWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<MuteFindingsResponse>> + */ + public CompletableFuture> muteSecurityFindingsWithHttpInfoAsync( + MuteFindingsRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling muteSecurityFindings")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/security/findings/mute"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.muteSecurityFindings", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Patch a signal-based notification rule. + * + *

See {@link #patchSignalNotificationRuleWithHttpInfo}. + * + * @param id ID of the notification rule. (required) + * @param body (required) + * @return NotificationRuleResponse + * @throws ApiException if fails to make API call + */ + public NotificationRuleResponse patchSignalNotificationRule( + String id, PatchNotificationRuleParameters body) throws ApiException { + return patchSignalNotificationRuleWithHttpInfo(id, body).getData(); + } + + /** + * Patch a signal-based notification rule. + * + *

See {@link #patchSignalNotificationRuleWithHttpInfoAsync}. + * + * @param id ID of the notification rule. (required) + * @param body (required) + * @return CompletableFuture<NotificationRuleResponse> + */ + public CompletableFuture patchSignalNotificationRuleAsync( + String id, PatchNotificationRuleParameters body) { + return patchSignalNotificationRuleWithHttpInfoAsync(id, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Partially update the notification rule. All fields are optional; if a field is not provided, it + * is not updated. + * + * @param id ID of the notification rule. (required) + * @param body (required) + * @return ApiResponse<NotificationRuleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 Notification rule successfully patched. -
400 Bad Request -
403 Forbidden -
404 Not Found -
422 The server cannot process the request because it contains invalid data. -
429 Too many requests -
+ */ + public ApiResponse patchSignalNotificationRuleWithHttpInfo( + String id, PatchNotificationRuleParameters body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling patchSignalNotificationRule"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling patchSignalNotificationRule"); + } + // create path and map variables + String localVarPath = + "/api/v2/security/signals/notification_rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.patchSignalNotificationRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Patch a signal-based notification rule. + * + *

See {@link #patchSignalNotificationRuleWithHttpInfo}. + * + * @param id ID of the notification rule. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<NotificationRuleResponse>> + */ + public CompletableFuture> + patchSignalNotificationRuleWithHttpInfoAsync( + String id, PatchNotificationRuleParameters body) { + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling patchSignalNotificationRule")); + return result; + } - /** - * Set filterOperatingSystemName. - * - * @param filterOperatingSystemName Filter by operating system name. (optional) - * @return ListVulnerableAssetsOptionalParameters - */ - public ListVulnerableAssetsOptionalParameters filterOperatingSystemName( - String filterOperatingSystemName) { - this.filterOperatingSystemName = filterOperatingSystemName; - return this; + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling patchSignalNotificationRule")); + return result; } + // create path and map variables + String localVarPath = + "/api/v2/security/signals/notification_rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); - /** - * Set filterOperatingSystemVersion. - * - * @param filterOperatingSystemVersion Filter by operating system version. (optional) - * @return ListVulnerableAssetsOptionalParameters - */ - public ListVulnerableAssetsOptionalParameters filterOperatingSystemVersion( - String filterOperatingSystemVersion) { - this.filterOperatingSystemVersion = filterOperatingSystemVersion; - return this; + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.patchSignalNotificationRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); } /** - * List vulnerable assets. + * Patch a vulnerability-based notification rule. * - *

See {@link #listVulnerableAssetsWithHttpInfo}. + *

See {@link #patchVulnerabilityNotificationRuleWithHttpInfo}. * - * @return ListVulnerableAssetsResponse + * @param id ID of the notification rule. (required) + * @param body (required) + * @return NotificationRuleResponse * @throws ApiException if fails to make API call */ - public ListVulnerableAssetsResponse listVulnerableAssets() throws ApiException { - return listVulnerableAssetsWithHttpInfo(new ListVulnerableAssetsOptionalParameters()).getData(); + public NotificationRuleResponse patchVulnerabilityNotificationRule( + String id, PatchNotificationRuleParameters body) throws ApiException { + return patchVulnerabilityNotificationRuleWithHttpInfo(id, body).getData(); } /** - * List vulnerable assets. + * Patch a vulnerability-based notification rule. * - *

See {@link #listVulnerableAssetsWithHttpInfoAsync}. + *

See {@link #patchVulnerabilityNotificationRuleWithHttpInfoAsync}. * - * @return CompletableFuture<ListVulnerableAssetsResponse> + * @param id ID of the notification rule. (required) + * @param body (required) + * @return CompletableFuture<NotificationRuleResponse> */ - public CompletableFuture listVulnerableAssetsAsync() { - return listVulnerableAssetsWithHttpInfoAsync(new ListVulnerableAssetsOptionalParameters()) + public CompletableFuture patchVulnerabilityNotificationRuleAsync( + String id, PatchNotificationRuleParameters body) { + return patchVulnerabilityNotificationRuleWithHttpInfoAsync(id, body) .thenApply( response -> { return response.getData(); @@ -26137,30 +28126,166 @@ public CompletableFuture listVulnerableAssetsAsync } /** - * List vulnerable assets. + * Partially update the notification rule. All fields are optional; if a field is not provided, it + * is not updated. * - *

See {@link #listVulnerableAssetsWithHttpInfo}. + * @param id ID of the notification rule. (required) + * @param body (required) + * @return ApiResponse<NotificationRuleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 Notification rule successfully patched. -
400 Bad Request -
403 Forbidden -
404 Not Found -
422 The server cannot process the request because it contains invalid data. -
429 Too many requests -
+ */ + public ApiResponse patchVulnerabilityNotificationRuleWithHttpInfo( + String id, PatchNotificationRuleParameters body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, + "Missing the required parameter 'id' when calling patchVulnerabilityNotificationRule"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling patchVulnerabilityNotificationRule"); + } + // create path and map variables + String localVarPath = + "/api/v2/security/vulnerabilities/notification_rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.patchVulnerabilityNotificationRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Patch a vulnerability-based notification rule. * - * @param parameters Optional parameters for the request. - * @return ListVulnerableAssetsResponse + *

See {@link #patchVulnerabilityNotificationRuleWithHttpInfo}. + * + * @param id ID of the notification rule. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<NotificationRuleResponse>> + */ + public CompletableFuture> + patchVulnerabilityNotificationRuleWithHttpInfoAsync( + String id, PatchNotificationRuleParameters body) { + Object localVarPostBody = body; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'id' when calling" + + " patchVulnerabilityNotificationRule")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " patchVulnerabilityNotificationRule")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/security/vulnerabilities/notification_rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.patchVulnerabilityNotificationRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Publish a batch migration. + * + *

See {@link #publishSecurityMonitoringBatchMigrationWithHttpInfo}. + * + * @param batchId The UUID of the batch migration. (required) + * @param body (required) + * @return SecurityMonitoringBatchMigrationPublishResponse * @throws ApiException if fails to make API call */ - public ListVulnerableAssetsResponse listVulnerableAssets( - ListVulnerableAssetsOptionalParameters parameters) throws ApiException { - return listVulnerableAssetsWithHttpInfo(parameters).getData(); + public SecurityMonitoringBatchMigrationPublishResponse publishSecurityMonitoringBatchMigration( + UUID batchId, SecurityMonitoringBatchMigrationPublishRequest body) throws ApiException { + return publishSecurityMonitoringBatchMigrationWithHttpInfo(batchId, body).getData(); } /** - * List vulnerable assets. + * Publish a batch migration. * - *

See {@link #listVulnerableAssetsWithHttpInfoAsync}. + *

See {@link #publishSecurityMonitoringBatchMigrationWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ListVulnerableAssetsResponse> + * @param batchId The UUID of the batch migration. (required) + * @param body (required) + * @return CompletableFuture<SecurityMonitoringBatchMigrationPublishResponse> */ - public CompletableFuture listVulnerableAssetsAsync( - ListVulnerableAssetsOptionalParameters parameters) { - return listVulnerableAssetsWithHttpInfoAsync(parameters) + public CompletableFuture + publishSecurityMonitoringBatchMigrationAsync( + UUID batchId, SecurityMonitoringBatchMigrationPublishRequest body) { + return publishSecurityMonitoringBatchMigrationWithHttpInfoAsync(batchId, body) .thenApply( response -> { return response.getData(); @@ -26168,253 +28293,202 @@ public CompletableFuture listVulnerableAssetsAsync } /** - * Get a list of vulnerable assets. - * - *

Pagination

- * - *

Please review the Pagination section for the "List - * Vulnerabilities" endpoint. + * Create a Cloud SIEM detection rule from the output of each selected + * completed resource of a batch migration. Completed resources can be published while the + * rest of the batch migration is still being translated. When resourceIds is omitted + * or empty, every completed resource is published. Published rules are created + * disabled. * - *

Filtering

- * - *

Please review the Filtering section for the "List Vulnerabilities" - * endpoint. + *

Every requested resource must be publishable: completed, or left in + * publishing for more than one minute after an uncertain result. Otherwise, the request + * returns 409 Conflict and nothing is published. Already published resources are not + * publishable. * - *

Metadata

- * - *

Please review the Metadata section for the "List Vulnerabilities" - * endpoint. + *

The response reports the outcome of each resource, and some resources can be published while + * others fail. A failed result that contains a ruleId means the rule + * was created: do not retry that resource. Publishing a rule with a block_ip or + * block_user action requires the appsec_protect_write permission. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<ListVulnerableAssetsResponse> + * @param batchId The UUID of the batch migration. (required) + * @param body (required) + * @return ApiResponse<SecurityMonitoringBatchMigrationPublishResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * - * - * + * + * + * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad request: The server cannot process the request due to invalid syntax in the request. -
403 Forbidden: Access denied -
404 Not found: There is no request associated with the provided token. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too many requests -
*/ - public ApiResponse listVulnerableAssetsWithHttpInfo( - ListVulnerableAssetsOptionalParameters parameters) throws ApiException { + public ApiResponse + publishSecurityMonitoringBatchMigrationWithHttpInfo( + UUID batchId, SecurityMonitoringBatchMigrationPublishRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "listVulnerableAssets"; + String operationId = "publishSecurityMonitoringBatchMigration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; - String pageToken = parameters.pageToken; - Long pageNumber = parameters.pageNumber; - String filterName = parameters.filterName; - AssetType filterType = parameters.filterType; - String filterVersionFirst = parameters.filterVersionFirst; - String filterVersionLast = parameters.filterVersionLast; - String filterRepositoryUrl = parameters.filterRepositoryUrl; - Boolean filterRisksInProduction = parameters.filterRisksInProduction; - Boolean filterRisksUnderAttack = parameters.filterRisksUnderAttack; - Boolean filterRisksIsPubliclyAccessible = parameters.filterRisksIsPubliclyAccessible; - Boolean filterRisksHasPrivilegedAccess = parameters.filterRisksHasPrivilegedAccess; - Boolean filterRisksHasAccessToSensitiveData = parameters.filterRisksHasAccessToSensitiveData; - String filterEnvironments = parameters.filterEnvironments; - String filterTeams = parameters.filterTeams; - String filterArch = parameters.filterArch; - String filterOperatingSystemName = parameters.filterOperatingSystemName; - String filterOperatingSystemVersion = parameters.filterOperatingSystemVersion; + Object localVarPostBody = body; + + // verify the required parameter 'batchId' is set + if (batchId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'batchId' when calling" + + " publishSecurityMonitoringBatchMigration"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " publishSecurityMonitoringBatchMigration"); + } // create path and map variables - String localVarPath = "/api/v2/security/vulnerable-assets"; + String localVarPath = + "/api/v2/security_monitoring/batch-migrations/{batch_id}/publish" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[type]", filterType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[version.first]", filterVersionFirst)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[version.last]", filterVersionLast)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[repository_url]", filterRepositoryUrl)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[risks.in_production]", filterRisksInProduction)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[risks.under_attack]", filterRisksUnderAttack)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[risks.is_publicly_accessible]", filterRisksIsPubliclyAccessible)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[risks.has_privileged_access]", filterRisksHasPrivilegedAccess)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[risks.has_access_to_sensitive_data]", filterRisksHasAccessToSensitiveData)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[environments]", filterEnvironments)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[teams]", filterTeams)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[arch]", filterArch)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[operating_system.name]", filterOperatingSystemName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[operating_system.version]", filterOperatingSystemVersion)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listVulnerableAssets", + "v2.SecurityMonitoringApi.publishSecurityMonitoringBatchMigration", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List vulnerable assets. + * Publish a batch migration. * - *

See {@link #listVulnerableAssetsWithHttpInfo}. + *

See {@link #publishSecurityMonitoringBatchMigrationWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<ListVulnerableAssetsResponse>> + * @param batchId The UUID of the batch migration. (required) + * @param body (required) + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringBatchMigrationPublishResponse>> */ - public CompletableFuture> - listVulnerableAssetsWithHttpInfoAsync(ListVulnerableAssetsOptionalParameters parameters) { + public CompletableFuture> + publishSecurityMonitoringBatchMigrationWithHttpInfoAsync( + UUID batchId, SecurityMonitoringBatchMigrationPublishRequest body) { // Check if unstable operation is enabled - String operationId = "listVulnerableAssets"; + String operationId = "publishSecurityMonitoringBatchMigration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; - String pageToken = parameters.pageToken; - Long pageNumber = parameters.pageNumber; - String filterName = parameters.filterName; - AssetType filterType = parameters.filterType; - String filterVersionFirst = parameters.filterVersionFirst; - String filterVersionLast = parameters.filterVersionLast; - String filterRepositoryUrl = parameters.filterRepositoryUrl; - Boolean filterRisksInProduction = parameters.filterRisksInProduction; - Boolean filterRisksUnderAttack = parameters.filterRisksUnderAttack; - Boolean filterRisksIsPubliclyAccessible = parameters.filterRisksIsPubliclyAccessible; - Boolean filterRisksHasPrivilegedAccess = parameters.filterRisksHasPrivilegedAccess; - Boolean filterRisksHasAccessToSensitiveData = parameters.filterRisksHasAccessToSensitiveData; - String filterEnvironments = parameters.filterEnvironments; - String filterTeams = parameters.filterTeams; - String filterArch = parameters.filterArch; - String filterOperatingSystemName = parameters.filterOperatingSystemName; - String filterOperatingSystemVersion = parameters.filterOperatingSystemVersion; + Object localVarPostBody = body; + + // verify the required parameter 'batchId' is set + if (batchId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'batchId' when calling" + + " publishSecurityMonitoringBatchMigration")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " publishSecurityMonitoringBatchMigration")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/security/vulnerable-assets"; + String localVarPath = + "/api/v2/security_monitoring/batch-migrations/{batch_id}/publish" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[token]", pageToken)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[type]", filterType)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[version.first]", filterVersionFirst)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[version.last]", filterVersionLast)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[repository_url]", filterRepositoryUrl)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[risks.in_production]", filterRisksInProduction)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[risks.under_attack]", filterRisksUnderAttack)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[risks.is_publicly_accessible]", filterRisksIsPubliclyAccessible)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[risks.has_privileged_access]", filterRisksHasPrivilegedAccess)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[risks.has_access_to_sensitive_data]", filterRisksHasAccessToSensitiveData)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[environments]", filterEnvironments)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[teams]", filterTeams)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[arch]", filterArch)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[operating_system.name]", filterOperatingSystemName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[operating_system.version]", filterOperatingSystemVersion)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.listVulnerableAssets", + "v2.SecurityMonitoringApi.publishSecurityMonitoringBatchMigration", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Mute or unmute security findings. + * Reorder due date rules. * - *

See {@link #muteSecurityFindingsWithHttpInfo}. + *

See {@link #reorderSecurityFindingsAutomationDueDateRulesWithHttpInfo}. * * @param body (required) - * @return MuteFindingsResponse + * @return DueDateRuleReorderResponse * @throws ApiException if fails to make API call */ - public MuteFindingsResponse muteSecurityFindings(MuteFindingsRequest body) throws ApiException { - return muteSecurityFindingsWithHttpInfo(body).getData(); + public DueDateRuleReorderResponse reorderSecurityFindingsAutomationDueDateRules( + DueDateRuleReorderRequest body) throws ApiException { + return reorderSecurityFindingsAutomationDueDateRulesWithHttpInfo(body).getData(); } /** - * Mute or unmute security findings. + * Reorder due date rules. * - *

See {@link #muteSecurityFindingsWithHttpInfoAsync}. + *

See {@link #reorderSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<MuteFindingsResponse> + * @return CompletableFuture<DueDateRuleReorderResponse> */ - public CompletableFuture muteSecurityFindingsAsync( - MuteFindingsRequest body) { - return muteSecurityFindingsWithHttpInfoAsync(body) + public CompletableFuture + reorderSecurityFindingsAutomationDueDateRulesAsync(DueDateRuleReorderRequest body) { + return reorderSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -26422,46 +28496,49 @@ public CompletableFuture muteSecurityFindingsAsync( } /** - * Mute or unmute security findings. You can mute or unmute up to 100 security findings per - * request. The request body must include is_muted and reason - * attributes. The allowed reasons depend on whether the finding is being muted or unmuted: - To - * mute a finding: PENDING_FIX, FALSE_POSITIVE, OTHER, - * NO_FIX, DUPLICATE, RISK_ACCEPTED. - To unmute a finding: - * NO_PENDING_FIX, HUMAN_ERROR, NO_LONGER_ACCEPTED_RISK, - * OTHER. + * Reorder the list of due date rules for the current organization. * * @param body (required) - * @return ApiResponse<MuteFindingsResponse> + * @return ApiResponse<DueDateRuleReorderResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * - * + * * * *
Response details
Status Code Description Response Headers
202 Accepted -
200 Successfully reordered the due date rules -
400 Bad Request -
401 Unauthorized -
404 Not Found -
403 Forbidden -
422 Unprocessable Entity -
429 Too many requests -
*/ - public ApiResponse muteSecurityFindingsWithHttpInfo( - MuteFindingsRequest body) throws ApiException { + public ApiResponse + reorderSecurityFindingsAutomationDueDateRulesWithHttpInfo(DueDateRuleReorderRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "reorderSecurityFindingsAutomationDueDateRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling muteSecurityFindings"); + 400, + "Missing the required parameter 'body' when calling" + + " reorderSecurityFindingsAutomationDueDateRules"); } // create path and map variables - String localVarPath = "/api/v2/security/findings/mute"; + String localVarPath = "/api/v2/security/findings/automation/due_date_rules/reorder"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.muteSecurityFindings", + "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationDueDateRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -26469,38 +28546,51 @@ public ApiResponse muteSecurityFindingsWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "PATCH", + "POST", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Mute or unmute security findings. + * Reorder due date rules. * - *

See {@link #muteSecurityFindingsWithHttpInfo}. + *

See {@link #reorderSecurityFindingsAutomationDueDateRulesWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<MuteFindingsResponse>> + * @return CompletableFuture<ApiResponse<DueDateRuleReorderResponse>> */ - public CompletableFuture> muteSecurityFindingsWithHttpInfoAsync( - MuteFindingsRequest body) { + public CompletableFuture> + reorderSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync( + DueDateRuleReorderRequest body) { + // Check if unstable operation is enabled + String operationId = "reorderSecurityFindingsAutomationDueDateRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling muteSecurityFindings")); + 400, + "Missing the required parameter 'body' when calling" + + " reorderSecurityFindingsAutomationDueDateRules")); return result; } // create path and map variables - String localVarPath = "/api/v2/security/findings/mute"; + String localVarPath = "/api/v2/security/findings/automation/due_date_rules/reorder"; Map localVarHeaderParams = new HashMap(); @@ -26508,7 +28598,7 @@ public CompletableFuture> muteSecurityFindings try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.muteSecurityFindings", + "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationDueDateRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -26516,48 +28606,46 @@ public CompletableFuture> muteSecurityFindings new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PATCH", + "POST", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Patch a signal-based notification rule. + * Reorder inbox rules. * - *

See {@link #patchSignalNotificationRuleWithHttpInfo}. + *

See {@link #reorderSecurityFindingsAutomationInboxRulesWithHttpInfo}. * - * @param id ID of the notification rule. (required) * @param body (required) - * @return NotificationRuleResponse + * @return InboxRuleReorderResponse * @throws ApiException if fails to make API call */ - public NotificationRuleResponse patchSignalNotificationRule( - String id, PatchNotificationRuleParameters body) throws ApiException { - return patchSignalNotificationRuleWithHttpInfo(id, body).getData(); + public InboxRuleReorderResponse reorderSecurityFindingsAutomationInboxRules( + InboxRuleReorderRequest body) throws ApiException { + return reorderSecurityFindingsAutomationInboxRulesWithHttpInfo(body).getData(); } /** - * Patch a signal-based notification rule. + * Reorder inbox rules. * - *

See {@link #patchSignalNotificationRuleWithHttpInfoAsync}. + *

See {@link #reorderSecurityFindingsAutomationInboxRulesWithHttpInfoAsync}. * - * @param id ID of the notification rule. (required) * @param body (required) - * @return CompletableFuture<NotificationRuleResponse> + * @return CompletableFuture<InboxRuleReorderResponse> */ - public CompletableFuture patchSignalNotificationRuleAsync( - String id, PatchNotificationRuleParameters body) { - return patchSignalNotificationRuleWithHttpInfoAsync(id, body) + public CompletableFuture + reorderSecurityFindingsAutomationInboxRulesAsync(InboxRuleReorderRequest body) { + return reorderSecurityFindingsAutomationInboxRulesWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -26565,50 +28653,49 @@ public CompletableFuture patchSignalNotificationRuleAs } /** - * Partially update the notification rule. All fields are optional; if a field is not provided, it - * is not updated. + * Reorder the list of inbox rules for the current organization. * - * @param id ID of the notification rule. (required) * @param body (required) - * @return ApiResponse<NotificationRuleResponse> + * @return ApiResponse<InboxRuleReorderResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * - * - * + * * *
Response details
Status Code Description Response Headers
200 Notification rule successfully patched. -
200 Successfully reordered the inbox rules -
400 Bad Request -
403 Forbidden -
404 Not Found -
422 The server cannot process the request because it contains invalid data. -
422 Unprocessable Entity -
429 Too many requests -
*/ - public ApiResponse patchSignalNotificationRuleWithHttpInfo( - String id, PatchNotificationRuleParameters body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException( - 400, "Missing the required parameter 'id' when calling patchSignalNotificationRule"); + public ApiResponse + reorderSecurityFindingsAutomationInboxRulesWithHttpInfo(InboxRuleReorderRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "reorderSecurityFindingsAutomationInboxRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } + Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling patchSignalNotificationRule"); + 400, + "Missing the required parameter 'body' when calling" + + " reorderSecurityFindingsAutomationInboxRules"); } // create path and map variables - String localVarPath = - "/api/v2/security/signals/notification_rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + String localVarPath = "/api/v2/security/findings/automation/inbox_rules/reorder"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.patchSignalNotificationRule", + "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationInboxRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -26616,52 +28703,50 @@ public ApiResponse patchSignalNotificationRuleWithHttp new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "PATCH", + "POST", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Patch a signal-based notification rule. + * Reorder inbox rules. * - *

See {@link #patchSignalNotificationRuleWithHttpInfo}. + *

See {@link #reorderSecurityFindingsAutomationInboxRulesWithHttpInfo}. * - * @param id ID of the notification rule. (required) * @param body (required) - * @return CompletableFuture<ApiResponse<NotificationRuleResponse>> + * @return CompletableFuture<ApiResponse<InboxRuleReorderResponse>> */ - public CompletableFuture> - patchSignalNotificationRuleWithHttpInfoAsync( - String id, PatchNotificationRuleParameters body) { - Object localVarPostBody = body; - - // verify the required parameter 'id' is set - if (id == null) { - CompletableFuture> result = new CompletableFuture<>(); + public CompletableFuture> + reorderSecurityFindingsAutomationInboxRulesWithHttpInfoAsync(InboxRuleReorderRequest body) { + // Check if unstable operation is enabled + String operationId = "reorderSecurityFindingsAutomationInboxRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'id' when calling patchSignalNotificationRule")); + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } + Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling patchSignalNotificationRule")); + "Missing the required parameter 'body' when calling" + + " reorderSecurityFindingsAutomationInboxRules")); return result; } // create path and map variables - String localVarPath = - "/api/v2/security/signals/notification_rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + String localVarPath = "/api/v2/security/findings/automation/inbox_rules/reorder"; Map localVarHeaderParams = new HashMap(); @@ -26669,7 +28754,7 @@ public ApiResponse patchSignalNotificationRuleWithHttp try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.patchSignalNotificationRule", + "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationInboxRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -26677,48 +28762,46 @@ public ApiResponse patchSignalNotificationRuleWithHttp new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PATCH", + "POST", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Patch a vulnerability-based notification rule. + * Reorder mute rules. * - *

See {@link #patchVulnerabilityNotificationRuleWithHttpInfo}. + *

See {@link #reorderSecurityFindingsAutomationMuteRulesWithHttpInfo}. * - * @param id ID of the notification rule. (required) * @param body (required) - * @return NotificationRuleResponse + * @return MuteRuleReorderResponse * @throws ApiException if fails to make API call */ - public NotificationRuleResponse patchVulnerabilityNotificationRule( - String id, PatchNotificationRuleParameters body) throws ApiException { - return patchVulnerabilityNotificationRuleWithHttpInfo(id, body).getData(); + public MuteRuleReorderResponse reorderSecurityFindingsAutomationMuteRules( + MuteRuleReorderRequest body) throws ApiException { + return reorderSecurityFindingsAutomationMuteRulesWithHttpInfo(body).getData(); } /** - * Patch a vulnerability-based notification rule. + * Reorder mute rules. * - *

See {@link #patchVulnerabilityNotificationRuleWithHttpInfoAsync}. + *

See {@link #reorderSecurityFindingsAutomationMuteRulesWithHttpInfoAsync}. * - * @param id ID of the notification rule. (required) * @param body (required) - * @return CompletableFuture<NotificationRuleResponse> + * @return CompletableFuture<MuteRuleReorderResponse> */ - public CompletableFuture patchVulnerabilityNotificationRuleAsync( - String id, PatchNotificationRuleParameters body) { - return patchVulnerabilityNotificationRuleWithHttpInfoAsync(id, body) + public CompletableFuture reorderSecurityFindingsAutomationMuteRulesAsync( + MuteRuleReorderRequest body) { + return reorderSecurityFindingsAutomationMuteRulesWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -26726,52 +28809,49 @@ public CompletableFuture patchVulnerabilityNotificatio } /** - * Partially update the notification rule. All fields are optional; if a field is not provided, it - * is not updated. + * Reorder the list of mute rules for the current organization. * - * @param id ID of the notification rule. (required) * @param body (required) - * @return ApiResponse<NotificationRuleResponse> + * @return ApiResponse<MuteRuleReorderResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * - * - * + * * *
Response details
Status Code Description Response Headers
200 Notification rule successfully patched. -
200 Successfully reordered the mute rules -
400 Bad Request -
403 Forbidden -
404 Not Found -
422 The server cannot process the request because it contains invalid data. -
422 Unprocessable Entity -
429 Too many requests -
*/ - public ApiResponse patchVulnerabilityNotificationRuleWithHttpInfo( - String id, PatchNotificationRuleParameters body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException( - 400, - "Missing the required parameter 'id' when calling patchVulnerabilityNotificationRule"); + public ApiResponse + reorderSecurityFindingsAutomationMuteRulesWithHttpInfo(MuteRuleReorderRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "reorderSecurityFindingsAutomationMuteRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } + Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( 400, - "Missing the required parameter 'body' when calling patchVulnerabilityNotificationRule"); + "Missing the required parameter 'body' when calling" + + " reorderSecurityFindingsAutomationMuteRules"); } // create path and map variables - String localVarPath = - "/api/v2/security/vulnerabilities/notification_rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + String localVarPath = "/api/v2/security/findings/automation/mute_rules/reorder"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.patchVulnerabilityNotificationRule", + "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationMuteRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -26779,55 +28859,50 @@ public ApiResponse patchVulnerabilityNotificationRuleW new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "PATCH", + "POST", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Patch a vulnerability-based notification rule. + * Reorder mute rules. * - *

See {@link #patchVulnerabilityNotificationRuleWithHttpInfo}. + *

See {@link #reorderSecurityFindingsAutomationMuteRulesWithHttpInfo}. * - * @param id ID of the notification rule. (required) * @param body (required) - * @return CompletableFuture<ApiResponse<NotificationRuleResponse>> + * @return CompletableFuture<ApiResponse<MuteRuleReorderResponse>> */ - public CompletableFuture> - patchVulnerabilityNotificationRuleWithHttpInfoAsync( - String id, PatchNotificationRuleParameters body) { - Object localVarPostBody = body; - - // verify the required parameter 'id' is set - if (id == null) { - CompletableFuture> result = new CompletableFuture<>(); + public CompletableFuture> + reorderSecurityFindingsAutomationMuteRulesWithHttpInfoAsync(MuteRuleReorderRequest body) { + // Check if unstable operation is enabled + String operationId = "reorderSecurityFindingsAutomationMuteRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'id' when calling" - + " patchVulnerabilityNotificationRule")); + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } + Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling" - + " patchVulnerabilityNotificationRule")); + + " reorderSecurityFindingsAutomationMuteRules")); return result; } // create path and map variables - String localVarPath = - "/api/v2/security/vulnerabilities/notification_rules/{id}" - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + String localVarPath = "/api/v2/security/findings/automation/mute_rules/reorder"; Map localVarHeaderParams = new HashMap(); @@ -26835,7 +28910,7 @@ public ApiResponse patchVulnerabilityNotificationRuleW try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.patchVulnerabilityNotificationRule", + "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationMuteRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -26843,46 +28918,47 @@ public ApiResponse patchVulnerabilityNotificationRuleW new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PATCH", + "POST", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Reorder due date rules. + * Reorder severity modifier rules. * - *

See {@link #reorderSecurityFindingsAutomationDueDateRulesWithHttpInfo}. + *

See {@link #reorderSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo}. * * @param body (required) - * @return DueDateRuleReorderResponse + * @return SeverityModifierRuleReorderResponse * @throws ApiException if fails to make API call */ - public DueDateRuleReorderResponse reorderSecurityFindingsAutomationDueDateRules( - DueDateRuleReorderRequest body) throws ApiException { - return reorderSecurityFindingsAutomationDueDateRulesWithHttpInfo(body).getData(); + public SeverityModifierRuleReorderResponse reorderSecurityFindingsAutomationSeverityModifierRules( + SeverityModifierRuleReorderRequest body) throws ApiException { + return reorderSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo(body).getData(); } /** - * Reorder due date rules. + * Reorder severity modifier rules. * - *

See {@link #reorderSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync}. + *

See {@link #reorderSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<DueDateRuleReorderResponse> + * @return CompletableFuture<SeverityModifierRuleReorderResponse> */ - public CompletableFuture - reorderSecurityFindingsAutomationDueDateRulesAsync(DueDateRuleReorderRequest body) { - return reorderSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync(body) + public CompletableFuture + reorderSecurityFindingsAutomationSeverityModifierRulesAsync( + SeverityModifierRuleReorderRequest body) { + return reorderSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -26890,27 +28966,27 @@ public DueDateRuleReorderResponse reorderSecurityFindingsAutomationDueDateRules( } /** - * Reorder the list of due date rules for the current organization. + * Reorder the list of severity modifier rules for the current organization. * * @param body (required) - * @return ApiResponse<DueDateRuleReorderResponse> + * @return ApiResponse<SeverityModifierRuleReorderResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * * *
Response details
Status Code Description Response Headers
200 Successfully reordered the due date rules -
200 Successfully reordered the severity modifier rules -
400 Bad Request -
403 Forbidden -
422 Unprocessable Entity -
429 Too many requests -
*/ - public ApiResponse - reorderSecurityFindingsAutomationDueDateRulesWithHttpInfo(DueDateRuleReorderRequest body) - throws ApiException { + public ApiResponse + reorderSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo( + SeverityModifierRuleReorderRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "reorderSecurityFindingsAutomationDueDateRules"; + String operationId = "reorderSecurityFindingsAutomationSeverityModifierRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -26923,16 +28999,16 @@ public DueDateRuleReorderResponse reorderSecurityFindingsAutomationDueDateRules( throw new ApiException( 400, "Missing the required parameter 'body' when calling" - + " reorderSecurityFindingsAutomationDueDateRules"); + + " reorderSecurityFindingsAutomationSeverityModifierRules"); } // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/due_date_rules/reorder"; + String localVarPath = "/api/v2/security/findings/automation/severity_modifier_rules/reorder"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationDueDateRules", + "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationSeverityModifierRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -26947,26 +29023,27 @@ public DueDateRuleReorderResponse reorderSecurityFindingsAutomationDueDateRules( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Reorder due date rules. + * Reorder severity modifier rules. * - *

See {@link #reorderSecurityFindingsAutomationDueDateRulesWithHttpInfo}. + *

See {@link #reorderSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<DueDateRuleReorderResponse>> + * @return CompletableFuture<ApiResponse<SeverityModifierRuleReorderResponse>> */ - public CompletableFuture> - reorderSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync( - DueDateRuleReorderRequest body) { + public CompletableFuture> + reorderSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync( + SeverityModifierRuleReorderRequest body) { // Check if unstable operation is enabled - String operationId = "reorderSecurityFindingsAutomationDueDateRules"; + String operationId = "reorderSecurityFindingsAutomationSeverityModifierRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -26975,16 +29052,17 @@ public DueDateRuleReorderResponse reorderSecurityFindingsAutomationDueDateRules( // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling" - + " reorderSecurityFindingsAutomationDueDateRules")); + + " reorderSecurityFindingsAutomationSeverityModifierRules")); return result; } // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/due_date_rules/reorder"; + String localVarPath = "/api/v2/security/findings/automation/severity_modifier_rules/reorder"; Map localVarHeaderParams = new HashMap(); @@ -26992,7 +29070,7 @@ public DueDateRuleReorderResponse reorderSecurityFindingsAutomationDueDateRules( try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationDueDateRules", + "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationSeverityModifierRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -27000,7 +29078,8 @@ public DueDateRuleReorderResponse reorderSecurityFindingsAutomationDueDateRules( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -27012,34 +29091,35 @@ public DueDateRuleReorderResponse reorderSecurityFindingsAutomationDueDateRules( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Reorder inbox rules. + * Reorder ticket creation rules. * - *

See {@link #reorderSecurityFindingsAutomationInboxRulesWithHttpInfo}. + *

See {@link #reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfo}. * * @param body (required) - * @return InboxRuleReorderResponse + * @return TicketCreationRuleReorderResponse * @throws ApiException if fails to make API call */ - public InboxRuleReorderResponse reorderSecurityFindingsAutomationInboxRules( - InboxRuleReorderRequest body) throws ApiException { - return reorderSecurityFindingsAutomationInboxRulesWithHttpInfo(body).getData(); + public TicketCreationRuleReorderResponse reorderSecurityFindingsAutomationTicketCreationRules( + TicketCreationRuleReorderRequest body) throws ApiException { + return reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfo(body).getData(); } /** - * Reorder inbox rules. + * Reorder ticket creation rules. * - *

See {@link #reorderSecurityFindingsAutomationInboxRulesWithHttpInfoAsync}. + *

See {@link #reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<InboxRuleReorderResponse> + * @return CompletableFuture<TicketCreationRuleReorderResponse> */ - public CompletableFuture - reorderSecurityFindingsAutomationInboxRulesAsync(InboxRuleReorderRequest body) { - return reorderSecurityFindingsAutomationInboxRulesWithHttpInfoAsync(body) + public CompletableFuture + reorderSecurityFindingsAutomationTicketCreationRulesAsync( + TicketCreationRuleReorderRequest body) { + return reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -27047,27 +29127,27 @@ public InboxRuleReorderResponse reorderSecurityFindingsAutomationInboxRules( } /** - * Reorder the list of inbox rules for the current organization. + * Reorder the list of ticket creation rules for the current organization. * * @param body (required) - * @return ApiResponse<InboxRuleReorderResponse> + * @return ApiResponse<TicketCreationRuleReorderResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * * *
Response details
Status Code Description Response Headers
200 Successfully reordered the inbox rules -
200 Successfully reordered the ticket creation rules -
400 Bad Request -
403 Forbidden -
422 Unprocessable Entity -
429 Too many requests -
*/ - public ApiResponse - reorderSecurityFindingsAutomationInboxRulesWithHttpInfo(InboxRuleReorderRequest body) - throws ApiException { + public ApiResponse + reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfo( + TicketCreationRuleReorderRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "reorderSecurityFindingsAutomationInboxRules"; + String operationId = "reorderSecurityFindingsAutomationTicketCreationRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -27080,16 +29160,16 @@ public InboxRuleReorderResponse reorderSecurityFindingsAutomationInboxRules( throw new ApiException( 400, "Missing the required parameter 'body' when calling" - + " reorderSecurityFindingsAutomationInboxRules"); + + " reorderSecurityFindingsAutomationTicketCreationRules"); } // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/inbox_rules/reorder"; + String localVarPath = "/api/v2/security/findings/automation/ticket_creation_rules/reorder"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationInboxRules", + "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationTicketCreationRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -27104,25 +29184,27 @@ public InboxRuleReorderResponse reorderSecurityFindingsAutomationInboxRules( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Reorder inbox rules. + * Reorder ticket creation rules. * - *

See {@link #reorderSecurityFindingsAutomationInboxRulesWithHttpInfo}. + *

See {@link #reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<InboxRuleReorderResponse>> + * @return CompletableFuture<ApiResponse<TicketCreationRuleReorderResponse>> */ - public CompletableFuture> - reorderSecurityFindingsAutomationInboxRulesWithHttpInfoAsync(InboxRuleReorderRequest body) { + public CompletableFuture> + reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync( + TicketCreationRuleReorderRequest body) { // Check if unstable operation is enabled - String operationId = "reorderSecurityFindingsAutomationInboxRules"; + String operationId = "reorderSecurityFindingsAutomationTicketCreationRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -27131,16 +29213,17 @@ public InboxRuleReorderResponse reorderSecurityFindingsAutomationInboxRules( // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling" - + " reorderSecurityFindingsAutomationInboxRules")); + + " reorderSecurityFindingsAutomationTicketCreationRules")); return result; } // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/inbox_rules/reorder"; + String localVarPath = "/api/v2/security/findings/automation/ticket_creation_rules/reorder"; Map localVarHeaderParams = new HashMap(); @@ -27148,7 +29231,7 @@ public InboxRuleReorderResponse reorderSecurityFindingsAutomationInboxRules( try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationInboxRules", + "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationTicketCreationRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -27156,7 +29239,8 @@ public InboxRuleReorderResponse reorderSecurityFindingsAutomationInboxRules( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -27168,34 +29252,36 @@ public InboxRuleReorderResponse reorderSecurityFindingsAutomationInboxRules( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Reorder mute rules. + * Restore a rule to a historical version. * - *

See {@link #reorderSecurityFindingsAutomationMuteRulesWithHttpInfo}. + *

See {@link #restoreSecurityMonitoringRuleWithHttpInfo}. * - * @param body (required) - * @return MuteRuleReorderResponse + * @param ruleId The ID of the rule. (required) + * @param version The historical version number of the rule. (required) + * @return SecurityMonitoringRuleResponse * @throws ApiException if fails to make API call */ - public MuteRuleReorderResponse reorderSecurityFindingsAutomationMuteRules( - MuteRuleReorderRequest body) throws ApiException { - return reorderSecurityFindingsAutomationMuteRulesWithHttpInfo(body).getData(); + public SecurityMonitoringRuleResponse restoreSecurityMonitoringRule(String ruleId, Long version) + throws ApiException { + return restoreSecurityMonitoringRuleWithHttpInfo(ruleId, version).getData(); } /** - * Reorder mute rules. + * Restore a rule to a historical version. * - *

See {@link #reorderSecurityFindingsAutomationMuteRulesWithHttpInfoAsync}. + *

See {@link #restoreSecurityMonitoringRuleWithHttpInfoAsync}. * - * @param body (required) - * @return CompletableFuture<MuteRuleReorderResponse> + * @param ruleId The ID of the rule. (required) + * @param version The historical version number of the rule. (required) + * @return CompletableFuture<SecurityMonitoringRuleResponse> */ - public CompletableFuture reorderSecurityFindingsAutomationMuteRulesAsync( - MuteRuleReorderRequest body) { - return reorderSecurityFindingsAutomationMuteRulesWithHttpInfoAsync(body) + public CompletableFuture restoreSecurityMonitoringRuleAsync( + String ruleId, Long version) { + return restoreSecurityMonitoringRuleWithHttpInfoAsync(ruleId, version) .thenApply( response -> { return response.getData(); @@ -27203,49 +29289,61 @@ public CompletableFuture reorderSecurityFindingsAutomat } /** - * Reorder the list of mute rules for the current organization. + * Restores a custom detection rule to a previously saved historical version. Only custom rules + * can be restored. Default and partner rules return 400. The restore creates a new version entry; + * it does not overwrite history. * - * @param body (required) - * @return ApiResponse<MuteRuleReorderResponse> + * @param ruleId The ID of the rule. (required) + * @param version The historical version number of the rule. (required) + * @return ApiResponse<SecurityMonitoringRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * - * + * + * + * * *
Response details
Status Code Description Response Headers
200 Successfully reordered the mute rules -
200 OK -
400 Bad Request -
403 Forbidden -
422 Unprocessable Entity -
403 Not Authorized -
404 Not Found -
409 Conflict -
429 Too many requests -
*/ - public ApiResponse - reorderSecurityFindingsAutomationMuteRulesWithHttpInfo(MuteRuleReorderRequest body) - throws ApiException { + public ApiResponse restoreSecurityMonitoringRuleWithHttpInfo( + String ruleId, Long version) throws ApiException { // Check if unstable operation is enabled - String operationId = "reorderSecurityFindingsAutomationMuteRules"; + String operationId = "restoreSecurityMonitoringRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = body; + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( 400, - "Missing the required parameter 'body' when calling" - + " reorderSecurityFindingsAutomationMuteRules"); + "Missing the required parameter 'ruleId' when calling restoreSecurityMonitoringRule"); + } + + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException( + 400, + "Missing the required parameter 'version' when calling restoreSecurityMonitoringRule"); } // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/mute_rules/reorder"; + String localVarPath = + "/api/v2/security_monitoring/rules/{rule_id}/restore/{version}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationMuteRules", + "v2.SecurityMonitoringApi.restoreSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -27256,47 +29354,65 @@ public CompletableFuture reorderSecurityFindingsAutomat "POST", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Reorder mute rules. + * Restore a rule to a historical version. * - *

See {@link #reorderSecurityFindingsAutomationMuteRulesWithHttpInfo}. + *

See {@link #restoreSecurityMonitoringRuleWithHttpInfo}. * - * @param body (required) - * @return CompletableFuture<ApiResponse<MuteRuleReorderResponse>> + * @param ruleId The ID of the rule. (required) + * @param version The historical version number of the rule. (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleResponse>> */ - public CompletableFuture> - reorderSecurityFindingsAutomationMuteRulesWithHttpInfoAsync(MuteRuleReorderRequest body) { + public CompletableFuture> + restoreSecurityMonitoringRuleWithHttpInfoAsync(String ruleId, Long version) { // Check if unstable operation is enabled - String operationId = "reorderSecurityFindingsAutomationMuteRules"; + String operationId = "restoreSecurityMonitoringRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = body; + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'ruleId' when calling" + + " restoreSecurityMonitoringRule")); + return result; + } + + // verify the required parameter 'version' is set + if (version == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling" - + " reorderSecurityFindingsAutomationMuteRules")); + "Missing the required parameter 'version' when calling" + + " restoreSecurityMonitoringRule")); return result; } // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/mute_rules/reorder"; + String localVarPath = + "/api/v2/security_monitoring/rules/{rule_id}/restore/{version}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); Map localVarHeaderParams = new HashMap(); @@ -27304,7 +29420,7 @@ public CompletableFuture reorderSecurityFindingsAutomat try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationMuteRules", + "v2.SecurityMonitoringApi.restoreSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -27312,7 +29428,8 @@ public CompletableFuture reorderSecurityFindingsAutomat new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -27320,39 +29437,36 @@ public CompletableFuture reorderSecurityFindingsAutomat "POST", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Reorder severity modifier rules. + * Run a historical job. * - *

See {@link #reorderSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo}. + *

See {@link #runHistoricalJobWithHttpInfo}. * * @param body (required) - * @return SeverityModifierRuleReorderResponse + * @return JobCreateResponse * @throws ApiException if fails to make API call */ - public SeverityModifierRuleReorderResponse reorderSecurityFindingsAutomationSeverityModifierRules( - SeverityModifierRuleReorderRequest body) throws ApiException { - return reorderSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo(body).getData(); + public JobCreateResponse runHistoricalJob(RunHistoricalJobRequest body) throws ApiException { + return runHistoricalJobWithHttpInfo(body).getData(); } /** - * Reorder severity modifier rules. + * Run a historical job. * - *

See {@link #reorderSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync}. + *

See {@link #runHistoricalJobWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<SeverityModifierRuleReorderResponse> + * @return CompletableFuture<JobCreateResponse> */ - public CompletableFuture - reorderSecurityFindingsAutomationSeverityModifierRulesAsync( - SeverityModifierRuleReorderRequest body) { - return reorderSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync(body) + public CompletableFuture runHistoricalJobAsync(RunHistoricalJobRequest body) { + return runHistoricalJobWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -27360,27 +29474,27 @@ public SeverityModifierRuleReorderResponse reorderSecurityFindingsAutomationSeve } /** - * Reorder the list of severity modifier rules for the current organization. + * Run a historical job. * * @param body (required) - * @return ApiResponse<SeverityModifierRuleReorderResponse> + * @return ApiResponse<JobCreateResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * - * + * + * + * * *
Response details
Status Code Description Response Headers
200 Successfully reordered the severity modifier rules -
201 Status created -
400 Bad Request -
403 Forbidden -
422 Unprocessable Entity -
401 Concurrent Modification -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - reorderSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo( - SeverityModifierRuleReorderRequest body) throws ApiException { + public ApiResponse runHistoricalJobWithHttpInfo(RunHistoricalJobRequest body) + throws ApiException { // Check if unstable operation is enabled - String operationId = "reorderSecurityFindingsAutomationSeverityModifierRules"; + String operationId = "runHistoricalJob"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -27391,18 +29505,16 @@ public SeverityModifierRuleReorderResponse reorderSecurityFindingsAutomationSeve // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " reorderSecurityFindingsAutomationSeverityModifierRules"); + 400, "Missing the required parameter 'body' when calling runHistoricalJob"); } // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/severity_modifier_rules/reorder"; + String localVarPath = "/api/v2/siem-historical-detections/jobs"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationSeverityModifierRules", + "v2.SecurityMonitoringApi.runHistoricalJob", localVarPath, new ArrayList(), localVarHeaderParams, @@ -27417,27 +29529,25 @@ public SeverityModifierRuleReorderResponse reorderSecurityFindingsAutomationSeve localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Reorder severity modifier rules. + * Run a historical job. * - *

See {@link #reorderSecurityFindingsAutomationSeverityModifierRulesWithHttpInfo}. + *

See {@link #runHistoricalJobWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<SeverityModifierRuleReorderResponse>> + * @return CompletableFuture<ApiResponse<JobCreateResponse>> */ - public CompletableFuture> - reorderSecurityFindingsAutomationSeverityModifierRulesWithHttpInfoAsync( - SeverityModifierRuleReorderRequest body) { + public CompletableFuture> runHistoricalJobWithHttpInfoAsync( + RunHistoricalJobRequest body) { // Check if unstable operation is enabled - String operationId = "reorderSecurityFindingsAutomationSeverityModifierRules"; + String operationId = "runHistoricalJob"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -27446,17 +29556,14 @@ public SeverityModifierRuleReorderResponse reorderSecurityFindingsAutomationSeve // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " reorderSecurityFindingsAutomationSeverityModifierRules")); + 400, "Missing the required parameter 'body' when calling runHistoricalJob")); return result; } // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/severity_modifier_rules/reorder"; + String localVarPath = "/api/v2/siem-historical-detections/jobs"; Map localVarHeaderParams = new HashMap(); @@ -27464,7 +29571,7 @@ public SeverityModifierRuleReorderResponse reorderSecurityFindingsAutomationSeve try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationSeverityModifierRules", + "v2.SecurityMonitoringApi.runHistoricalJob", localVarPath, new ArrayList(), localVarHeaderParams, @@ -27472,8 +29579,7 @@ public SeverityModifierRuleReorderResponse reorderSecurityFindingsAutomationSeve new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -27485,35 +29591,34 @@ public SeverityModifierRuleReorderResponse reorderSecurityFindingsAutomationSeve localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Reorder ticket creation rules. + * Search security findings. * - *

See {@link #reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfo}. + *

See {@link #searchSecurityFindingsWithHttpInfo}. * * @param body (required) - * @return TicketCreationRuleReorderResponse + * @return ListSecurityFindingsResponse * @throws ApiException if fails to make API call */ - public TicketCreationRuleReorderResponse reorderSecurityFindingsAutomationTicketCreationRules( - TicketCreationRuleReorderRequest body) throws ApiException { - return reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfo(body).getData(); + public ListSecurityFindingsResponse searchSecurityFindings(SecurityFindingsSearchRequest body) + throws ApiException { + return searchSecurityFindingsWithHttpInfo(body).getData(); } /** - * Reorder ticket creation rules. + * Search security findings. * - *

See {@link #reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync}. + *

See {@link #searchSecurityFindingsWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<TicketCreationRuleReorderResponse> + * @return CompletableFuture<ListSecurityFindingsResponse> */ - public CompletableFuture - reorderSecurityFindingsAutomationTicketCreationRulesAsync( - TicketCreationRuleReorderRequest body) { - return reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync(body) + public CompletableFuture searchSecurityFindingsAsync( + SecurityFindingsSearchRequest body) { + return searchSecurityFindingsWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -27521,49 +29626,103 @@ public TicketCreationRuleReorderResponse reorderSecurityFindingsAutomationTicket } /** - * Reorder the list of ticket creation rules for the current organization. + * Search security findings. + * + *

See {@link #searchSecurityFindingsWithHttpInfo}. * * @param body (required) - * @return ApiResponse<TicketCreationRuleReorderResponse> + * @return PaginationIterable<SecurityFindingsData> + */ + public PaginationIterable searchSecurityFindingsWithPagination( + SecurityFindingsSearchRequest body) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "body.getData.getAttributes.getPage.setCursor"; + Boolean valueSetterParamOptional = false; + Long limit; + + if (body.getData() == null) { + body.setData(new SecurityFindingsSearchRequestData()); + } + + if (body.getData().getAttributes() == null) { + body.getData().setAttributes(new SecurityFindingsSearchRequestDataAttributes()); + } + + if (body.getData().getAttributes().getPage() == null) { + body.getData().getAttributes().setPage(new SecurityFindingsSearchRequestPage()); + } + + if (body.getData().getAttributes().getPage().getLimit() == null) { + limit = 10l; + body.getData().getAttributes().getPage().setLimit(limit); + } else { + limit = body.getData().getAttributes().getPage().getLimit(); + } + + LinkedHashMap args = new LinkedHashMap(); + args.put("body", body); + + PaginationIterable iterator = + new PaginationIterable( + this, + "searchSecurityFindings", + resultsPath, + valueGetterPath, + valueSetterPath, + valueSetterParamOptional, + true, + true, + limit, + args, + 0); + + return iterator; + } + + /** + * Get a list of security findings that match a search query. See the schema for security + * findings. + * + *

Query Syntax

+ * + *

The API uses the logs query syntax. Findings attributes (living in the + * attributes.attributes. namespace) are prefixed by @ when queried. Tags are queried without a + * prefix. + * + *

Example: @severity:(critical OR high) @status:open team:platform + * + * @param body (required) + * @return ApiResponse<ListSecurityFindingsResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * - * * *
Response details
Status Code Description Response Headers
200 Successfully reordered the ticket creation rules -
200 OK -
400 Bad Request -
403 Forbidden -
422 Unprocessable Entity -
429 Too many requests -
*/ - public ApiResponse - reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfo( - TicketCreationRuleReorderRequest body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "reorderSecurityFindingsAutomationTicketCreationRules"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse searchSecurityFindingsWithHttpInfo( + SecurityFindingsSearchRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " reorderSecurityFindingsAutomationTicketCreationRules"); + 400, "Missing the required parameter 'body' when calling searchSecurityFindings"); } // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/ticket_creation_rules/reorder"; + String localVarPath = "/api/v2/security/findings/search"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationTicketCreationRules", + "v2.SecurityMonitoringApi.searchSecurityFindings", localVarPath, new ArrayList(), localVarHeaderParams, @@ -27578,46 +29737,32 @@ public TicketCreationRuleReorderResponse reorderSecurityFindingsAutomationTicket localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Reorder ticket creation rules. + * Search security findings. * - *

See {@link #reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfo}. + *

See {@link #searchSecurityFindingsWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<TicketCreationRuleReorderResponse>> + * @return CompletableFuture<ApiResponse<ListSecurityFindingsResponse>> */ - public CompletableFuture> - reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync( - TicketCreationRuleReorderRequest body) { - // Check if unstable operation is enabled - String operationId = "reorderSecurityFindingsAutomationTicketCreationRules"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> + searchSecurityFindingsWithHttpInfoAsync(SecurityFindingsSearchRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " reorderSecurityFindingsAutomationTicketCreationRules")); + 400, "Missing the required parameter 'body' when calling searchSecurityFindings")); return result; } // create path and map variables - String localVarPath = "/api/v2/security/findings/automation/ticket_creation_rules/reorder"; + String localVarPath = "/api/v2/security/findings/search"; Map localVarHeaderParams = new HashMap(); @@ -27625,7 +29770,7 @@ public TicketCreationRuleReorderResponse reorderSecurityFindingsAutomationTicket try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationTicketCreationRules", + "v2.SecurityMonitoringApi.searchSecurityFindings", localVarPath, new ArrayList(), localVarHeaderParams, @@ -27633,7 +29778,7 @@ public TicketCreationRuleReorderResponse reorderSecurityFindingsAutomationTicket new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -27646,36 +29791,52 @@ public TicketCreationRuleReorderResponse reorderSecurityFindingsAutomationTicket localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to searchSecurityMonitoringHistsignals. */ + public static class SearchSecurityMonitoringHistsignalsOptionalParameters { + private SecurityMonitoringSignalListRequest body; + + /** + * Set body. + * + * @param body (optional) + * @return SearchSecurityMonitoringHistsignalsOptionalParameters + */ + public SearchSecurityMonitoringHistsignalsOptionalParameters body( + SecurityMonitoringSignalListRequest body) { + this.body = body; + return this; + } } /** - * Restore a rule to a historical version. + * Search hist signals. * - *

See {@link #restoreSecurityMonitoringRuleWithHttpInfo}. + *

See {@link #searchSecurityMonitoringHistsignalsWithHttpInfo}. * - * @param ruleId The ID of the rule. (required) - * @param version The historical version number of the rule. (required) - * @return SecurityMonitoringRuleResponse + * @return SecurityMonitoringSignalsListResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringRuleResponse restoreSecurityMonitoringRule(String ruleId, Long version) + public SecurityMonitoringSignalsListResponse searchSecurityMonitoringHistsignals() throws ApiException { - return restoreSecurityMonitoringRuleWithHttpInfo(ruleId, version).getData(); + return searchSecurityMonitoringHistsignalsWithHttpInfo( + new SearchSecurityMonitoringHistsignalsOptionalParameters()) + .getData(); } /** - * Restore a rule to a historical version. + * Search hist signals. * - *

See {@link #restoreSecurityMonitoringRuleWithHttpInfoAsync}. + *

See {@link #searchSecurityMonitoringHistsignalsWithHttpInfoAsync}. * - * @param ruleId The ID of the rule. (required) - * @param version The historical version number of the rule. (required) - * @return CompletableFuture<SecurityMonitoringRuleResponse> + * @return CompletableFuture<SecurityMonitoringSignalsListResponse> */ - public CompletableFuture restoreSecurityMonitoringRuleAsync( - String ruleId, Long version) { - return restoreSecurityMonitoringRuleWithHttpInfoAsync(ruleId, version) + public CompletableFuture + searchSecurityMonitoringHistsignalsAsync() { + return searchSecurityMonitoringHistsignalsWithHttpInfoAsync( + new SearchSecurityMonitoringHistsignalsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -27683,13 +29844,42 @@ public CompletableFuture restoreSecurityMonitori } /** - * Restores a custom detection rule to a previously saved historical version. Only custom rules - * can be restored. Default and partner rules return 400. The restore creates a new version entry; - * it does not overwrite history. + * Search hist signals. * - * @param ruleId The ID of the rule. (required) - * @param version The historical version number of the rule. (required) - * @return ApiResponse<SecurityMonitoringRuleResponse> + *

See {@link #searchSecurityMonitoringHistsignalsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SecurityMonitoringSignalsListResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalsListResponse searchSecurityMonitoringHistsignals( + SearchSecurityMonitoringHistsignalsOptionalParameters parameters) throws ApiException { + return searchSecurityMonitoringHistsignalsWithHttpInfo(parameters).getData(); + } + + /** + * Search hist signals. + * + *

See {@link #searchSecurityMonitoringHistsignalsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + */ + public CompletableFuture + searchSecurityMonitoringHistsignalsAsync( + SearchSecurityMonitoringHistsignalsOptionalParameters parameters) { + return searchSecurityMonitoringHistsignalsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search hist signals. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<SecurityMonitoringSignalsListResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -27699,45 +29889,28 @@ public CompletableFuture restoreSecurityMonitori * * * - * * *
400 Bad Request -
403 Not Authorized -
404 Not Found -
409 Conflict -
429 Too many requests -
*/ - public ApiResponse restoreSecurityMonitoringRuleWithHttpInfo( - String ruleId, Long version) throws ApiException { + public ApiResponse + searchSecurityMonitoringHistsignalsWithHttpInfo( + SearchSecurityMonitoringHistsignalsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "restoreSecurityMonitoringRule"; + String operationId = "searchSecurityMonitoringHistsignals"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; - - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling restoreSecurityMonitoringRule"); - } - - // verify the required parameter 'version' is set - if (version == null) { - throw new ApiException( - 400, - "Missing the required parameter 'version' when calling restoreSecurityMonitoringRule"); - } + Object localVarPostBody = parameters.body; // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}/restore/{version}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())) - .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + String localVarPath = "/api/v2/siem-historical-detections/histsignals/search"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.restoreSecurityMonitoringRule", + "v2.SecurityMonitoringApi.searchSecurityMonitoringHistsignals", localVarPath, new ArrayList(), localVarHeaderParams, @@ -27748,65 +29921,38 @@ public ApiResponse restoreSecurityMonitoringRule "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Restore a rule to a historical version. + * Search hist signals. * - *

See {@link #restoreSecurityMonitoringRuleWithHttpInfo}. + *

See {@link #searchSecurityMonitoringHistsignalsWithHttpInfo}. * - * @param ruleId The ID of the rule. (required) - * @param version The historical version number of the rule. (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleResponse>> + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalsListResponse>> */ - public CompletableFuture> - restoreSecurityMonitoringRuleWithHttpInfoAsync(String ruleId, Long version) { + public CompletableFuture> + searchSecurityMonitoringHistsignalsWithHttpInfoAsync( + SearchSecurityMonitoringHistsignalsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "restoreSecurityMonitoringRule"; + String operationId = "searchSecurityMonitoringHistsignals"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; - - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling" - + " restoreSecurityMonitoringRule")); - return result; - } - - // verify the required parameter 'version' is set - if (version == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'version' when calling" - + " restoreSecurityMonitoringRule")); - return result; - } + Object localVarPostBody = parameters.body; // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}/restore/{version}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())) - .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + String localVarPath = "/api/v2/siem-historical-detections/histsignals/search"; Map localVarHeaderParams = new HashMap(); @@ -27814,7 +29960,7 @@ public ApiResponse restoreSecurityMonitoringRule try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.restoreSecurityMonitoringRule", + "v2.SecurityMonitoringApi.searchSecurityMonitoringHistsignals", localVarPath, new ArrayList(), localVarHeaderParams, @@ -27822,7 +29968,7 @@ public ApiResponse restoreSecurityMonitoringRule new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -27831,84 +29977,187 @@ public ApiResponse restoreSecurityMonitoringRule "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to searchSecurityMonitoringSignals. */ + public static class SearchSecurityMonitoringSignalsOptionalParameters { + private SecurityMonitoringSignalListRequest body; + + /** + * Set body. + * + * @param body (optional) + * @return SearchSecurityMonitoringSignalsOptionalParameters + */ + public SearchSecurityMonitoringSignalsOptionalParameters body( + SecurityMonitoringSignalListRequest body) { + this.body = body; + return this; + } + } + + /** + * Get a list of security signals. + * + *

See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. + * + * @return SecurityMonitoringSignalsListResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalsListResponse searchSecurityMonitoringSignals() + throws ApiException { + return searchSecurityMonitoringSignalsWithHttpInfo( + new SearchSecurityMonitoringSignalsOptionalParameters()) + .getData(); + } + + /** + * Get a list of security signals. + * + *

See {@link #searchSecurityMonitoringSignalsWithHttpInfoAsync}. + * + * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + */ + public CompletableFuture + searchSecurityMonitoringSignalsAsync() { + return searchSecurityMonitoringSignalsWithHttpInfoAsync( + new SearchSecurityMonitoringSignalsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a list of security signals. + * + *

See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SecurityMonitoringSignalsListResponse + * @throws ApiException if fails to make API call + */ + public SecurityMonitoringSignalsListResponse searchSecurityMonitoringSignals( + SearchSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { + return searchSecurityMonitoringSignalsWithHttpInfo(parameters).getData(); + } + + /** + * Get a list of security signals. + * + *

See {@link #searchSecurityMonitoringSignalsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + */ + public CompletableFuture + searchSecurityMonitoringSignalsAsync( + SearchSecurityMonitoringSignalsOptionalParameters parameters) { + return searchSecurityMonitoringSignalsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); } /** - * Run a historical job. + * Get a list of security signals. * - *

See {@link #runHistoricalJobWithHttpInfo}. + *

See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. * - * @param body (required) - * @return JobCreateResponse - * @throws ApiException if fails to make API call + * @return PaginationIterable<SecurityMonitoringSignal> */ - public JobCreateResponse runHistoricalJob(RunHistoricalJobRequest body) throws ApiException { - return runHistoricalJobWithHttpInfo(body).getData(); + public PaginationIterable + searchSecurityMonitoringSignalsWithPagination() { + SearchSecurityMonitoringSignalsOptionalParameters parameters = + new SearchSecurityMonitoringSignalsOptionalParameters(); + return searchSecurityMonitoringSignalsWithPagination(parameters); } /** - * Run a historical job. + * Get a list of security signals. * - *

See {@link #runHistoricalJobWithHttpInfoAsync}. + *

See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. * - * @param body (required) - * @return CompletableFuture<JobCreateResponse> + * @return SecurityMonitoringSignalsListResponse */ - public CompletableFuture runHistoricalJobAsync(RunHistoricalJobRequest body) { - return runHistoricalJobWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); + public PaginationIterable searchSecurityMonitoringSignalsWithPagination( + SearchSecurityMonitoringSignalsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getAfter"; + String valueSetterPath = "body.getPage.setCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + if (parameters.body == null) { + parameters.body(new SecurityMonitoringSignalListRequest()); + } + + if (parameters.body.getPage() == null) { + parameters.body.setPage(new SecurityMonitoringSignalListRequestPage()); + } + + if (parameters.body.getPage().getLimit() == null) { + limit = 10; + parameters.body.getPage().setLimit(limit); + } else { + limit = parameters.body.getPage().getLimit(); + } + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); + + PaginationIterable iterator = + new PaginationIterable( + this, + "searchSecurityMonitoringSignals", + resultsPath, + valueGetterPath, + valueSetterPath, + valueSetterParamOptional, + true, + true, + limit, + args, + 0); + + return iterator; } /** - * Run a historical job. + * Returns security signals that match a search query. Both this endpoint and the GET endpoint can + * be used interchangeably for listing security signals. * - * @param body (required) - * @return ApiResponse<JobCreateResponse> + * @param parameters Optional parameters for the request. + * @return ApiResponse<SecurityMonitoringSignalsListResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * * - * * *
Response details
Status Code Description Response Headers
201 Status created -
200 OK -
400 Bad Request -
401 Concurrent Modification -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse runHistoricalJobWithHttpInfo(RunHistoricalJobRequest body) - throws ApiException { - // Check if unstable operation is enabled - String operationId = "runHistoricalJob"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling runHistoricalJob"); - } + public ApiResponse + searchSecurityMonitoringSignalsWithHttpInfo( + SearchSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { + Object localVarPostBody = parameters.body; // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/jobs"; + String localVarPath = "/api/v2/security_monitoring/signals/search"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.runHistoricalJob", + "v2.SecurityMonitoringApi.searchSecurityMonitoringSignals", localVarPath, new ArrayList(), localVarHeaderParams, @@ -27923,41 +30172,23 @@ public ApiResponse runHistoricalJobWithHttpInfo(RunHistorical localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Run a historical job. + * Get a list of security signals. * - *

See {@link #runHistoricalJobWithHttpInfo}. + *

See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. * - * @param body (required) - * @return CompletableFuture<ApiResponse<JobCreateResponse>> + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalsListResponse>> */ - public CompletableFuture> runHistoricalJobWithHttpInfoAsync( - RunHistoricalJobRequest body) { - // Check if unstable operation is enabled - String operationId = "runHistoricalJob"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling runHistoricalJob")); - return result; - } + public CompletableFuture> + searchSecurityMonitoringSignalsWithHttpInfoAsync( + SearchSecurityMonitoringSignalsOptionalParameters parameters) { + Object localVarPostBody = parameters.body; // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/jobs"; + String localVarPath = "/api/v2/security_monitoring/signals/search"; Map localVarHeaderParams = new HashMap(); @@ -27965,7 +30196,7 @@ public CompletableFuture> runHistoricalJobWithHtt try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.runHistoricalJob", + "v2.SecurityMonitoringApi.searchSecurityMonitoringSignals", localVarPath, new ArrayList(), localVarHeaderParams, @@ -27973,7 +30204,8 @@ public CompletableFuture> runHistoricalJobWithHtt new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -27985,34 +30217,34 @@ public CompletableFuture> runHistoricalJobWithHtt localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Search security findings. + * Test a notification rule. * - *

See {@link #searchSecurityFindingsWithHttpInfo}. + *

See {@link #sendSecurityMonitoringNotificationPreviewWithHttpInfo}. * * @param body (required) - * @return ListSecurityFindingsResponse + * @return NotificationRulePreviewResponse * @throws ApiException if fails to make API call */ - public ListSecurityFindingsResponse searchSecurityFindings(SecurityFindingsSearchRequest body) - throws ApiException { - return searchSecurityFindingsWithHttpInfo(body).getData(); + public NotificationRulePreviewResponse sendSecurityMonitoringNotificationPreview( + CreateNotificationRuleParameters body) throws ApiException { + return sendSecurityMonitoringNotificationPreviewWithHttpInfo(body).getData(); } /** - * Search security findings. + * Test a notification rule. * - *

See {@link #searchSecurityFindingsWithHttpInfoAsync}. + *

See {@link #sendSecurityMonitoringNotificationPreviewWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<ListSecurityFindingsResponse> + * @return CompletableFuture<NotificationRulePreviewResponse> */ - public CompletableFuture searchSecurityFindingsAsync( - SecurityFindingsSearchRequest body) { - return searchSecurityFindingsWithHttpInfoAsync(body) + public CompletableFuture + sendSecurityMonitoringNotificationPreviewAsync(CreateNotificationRuleParameters body) { + return sendSecurityMonitoringNotificationPreviewWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -28020,75 +30252,10 @@ public CompletableFuture searchSecurityFindingsAsy } /** - * Search security findings. - * - *

See {@link #searchSecurityFindingsWithHttpInfo}. - * - * @param body (required) - * @return PaginationIterable<SecurityFindingsData> - */ - public PaginationIterable searchSecurityFindingsWithPagination( - SecurityFindingsSearchRequest body) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "body.getData.getAttributes.getPage.setCursor"; - Boolean valueSetterParamOptional = false; - Long limit; - - if (body.getData() == null) { - body.setData(new SecurityFindingsSearchRequestData()); - } - - if (body.getData().getAttributes() == null) { - body.getData().setAttributes(new SecurityFindingsSearchRequestDataAttributes()); - } - - if (body.getData().getAttributes().getPage() == null) { - body.getData().getAttributes().setPage(new SecurityFindingsSearchRequestPage()); - } - - if (body.getData().getAttributes().getPage().getLimit() == null) { - limit = 10l; - body.getData().getAttributes().getPage().setLimit(limit); - } else { - limit = body.getData().getAttributes().getPage().getLimit(); - } - - LinkedHashMap args = new LinkedHashMap(); - args.put("body", body); - - PaginationIterable iterator = - new PaginationIterable( - this, - "searchSecurityFindings", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - true, - true, - limit, - args, - 0); - - return iterator; - } - - /** - * Get a list of security findings that match a search query. See the schema for security - * findings. - * - *

Query Syntax

- * - *

The API uses the logs query syntax. Findings attributes (living in the - * attributes.attributes. namespace) are prefixed by @ when queried. Tags are queried without a - * prefix. - * - *

Example: @severity:(critical OR high) @status:open team:platform + * Send a notification preview to test that a notification rule's targets are properly configured. * * @param body (required) - * @return ApiResponse<ListSecurityFindingsResponse> + * @return ApiResponse<NotificationRulePreviewResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -28096,27 +30263,31 @@ public PaginationIterable searchSecurityFindingsWithPagina * * * - * + * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
403 Not Authorized -
429 Too many requests -
*/ - public ApiResponse searchSecurityFindingsWithHttpInfo( - SecurityFindingsSearchRequest body) throws ApiException { + public ApiResponse + sendSecurityMonitoringNotificationPreviewWithHttpInfo(CreateNotificationRuleParameters body) + throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling searchSecurityFindings"); + 400, + "Missing the required parameter 'body' when calling" + + " sendSecurityMonitoringNotificationPreview"); } // create path and map variables - String localVarPath = "/api/v2/security/findings/search"; + String localVarPath = + "/api/v2/security_monitoring/configuration/notification_rules/send_notification_preview"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.searchSecurityFindings", + "v2.SecurityMonitoringApi.sendSecurityMonitoringNotificationPreview", localVarPath, new ArrayList(), localVarHeaderParams, @@ -28131,32 +30302,36 @@ public ApiResponse searchSecurityFindingsWithHttpI localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Search security findings. + * Test a notification rule. * - *

See {@link #searchSecurityFindingsWithHttpInfo}. + *

See {@link #sendSecurityMonitoringNotificationPreviewWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<ListSecurityFindingsResponse>> + * @return CompletableFuture<ApiResponse<NotificationRulePreviewResponse>> */ - public CompletableFuture> - searchSecurityFindingsWithHttpInfoAsync(SecurityFindingsSearchRequest body) { + public CompletableFuture> + sendSecurityMonitoringNotificationPreviewWithHttpInfoAsync( + CreateNotificationRuleParameters body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling searchSecurityFindings")); + 400, + "Missing the required parameter 'body' when calling" + + " sendSecurityMonitoringNotificationPreview")); return result; } // create path and map variables - String localVarPath = "/api/v2/security/findings/search"; + String localVarPath = + "/api/v2/security_monitoring/configuration/notification_rules/send_notification_preview"; Map localVarHeaderParams = new HashMap(); @@ -28164,7 +30339,7 @@ public ApiResponse searchSecurityFindingsWithHttpI try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.searchSecurityFindings", + "v2.SecurityMonitoringApi.sendSecurityMonitoringNotificationPreview", localVarPath, new ArrayList(), localVarHeaderParams, @@ -28172,7 +30347,7 @@ public ApiResponse searchSecurityFindingsWithHttpI new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -28185,52 +30360,31 @@ public ApiResponse searchSecurityFindingsWithHttpI localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to searchSecurityMonitoringHistsignals. */ - public static class SearchSecurityMonitoringHistsignalsOptionalParameters { - private SecurityMonitoringSignalListRequest body; - - /** - * Set body. - * - * @param body (optional) - * @return SearchSecurityMonitoringHistsignalsOptionalParameters - */ - public SearchSecurityMonitoringHistsignalsOptionalParameters body( - SecurityMonitoringSignalListRequest body) { - this.body = body; - return this; - } + new GenericType() {}); } /** - * Search hist signals. + * Start a batch migration. * - *

See {@link #searchSecurityMonitoringHistsignalsWithHttpInfo}. + *

See {@link #startSecurityMonitoringBatchMigrationWithHttpInfo}. * - * @return SecurityMonitoringSignalsListResponse + * @param batchId The UUID of the batch migration. (required) * @throws ApiException if fails to make API call */ - public SecurityMonitoringSignalsListResponse searchSecurityMonitoringHistsignals() - throws ApiException { - return searchSecurityMonitoringHistsignalsWithHttpInfo( - new SearchSecurityMonitoringHistsignalsOptionalParameters()) - .getData(); + public void startSecurityMonitoringBatchMigration(UUID batchId) throws ApiException { + startSecurityMonitoringBatchMigrationWithHttpInfo(batchId); } /** - * Search hist signals. + * Start a batch migration. * - *

See {@link #searchSecurityMonitoringHistsignalsWithHttpInfoAsync}. + *

See {@link #startSecurityMonitoringBatchMigrationWithHttpInfoAsync}. * - * @return CompletableFuture<SecurityMonitoringSignalsListResponse> + * @param batchId The UUID of the batch migration. (required) + * @return CompletableFuture */ - public CompletableFuture - searchSecurityMonitoringHistsignalsAsync() { - return searchSecurityMonitoringHistsignalsWithHttpInfoAsync( - new SearchSecurityMonitoringHistsignalsOptionalParameters()) + public CompletableFuture startSecurityMonitoringBatchMigrationAsync(UUID batchId) { + return startSecurityMonitoringBatchMigrationWithHttpInfoAsync(batchId) .thenApply( response -> { return response.getData(); @@ -28238,115 +30392,119 @@ public SecurityMonitoringSignalsListResponse searchSecurityMonitoringHistsignals } /** - * Search hist signals. - * - *

See {@link #searchSecurityMonitoringHistsignalsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return SecurityMonitoringSignalsListResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringSignalsListResponse searchSecurityMonitoringHistsignals( - SearchSecurityMonitoringHistsignalsOptionalParameters parameters) throws ApiException { - return searchSecurityMonitoringHistsignalsWithHttpInfo(parameters).getData(); - } - - /** - * Search hist signals. - * - *

See {@link #searchSecurityMonitoringHistsignalsWithHttpInfoAsync}. + * Start translating the pending resources of a draft batch migration + * into Cloud SIEM detection rules. The batch migration moves to in_progress, and its + * resources are translated asynchronously. Once no resource is pending or + * in_progress, the batch migration moves to completed. Starting an + * in_progress batch migration again does not queue duplicate work, so the request can be + * safely retried, including after a timeout or a 5xx error. Returns + * 409 Conflict if the batch migration is completed or canceled. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SecurityMonitoringSignalsListResponse> - */ - public CompletableFuture - searchSecurityMonitoringHistsignalsAsync( - SearchSecurityMonitoringHistsignalsOptionalParameters parameters) { - return searchSecurityMonitoringHistsignalsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Search hist signals. + *

An organization can translate up to 2000 resources in total across all of its batch + * migrations. Resources that were already processed count toward this limit even after they are + * deleted, and pending resources of in_progress batch migrations + * reserve capacity. Returns 409 Conflict if starting the batch migration would + * exceed this limit. To request a higher limit for your organization, contact Datadog support. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<SecurityMonitoringSignalsListResponse> + * @param batchId The UUID of the batch migration. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * + * + * * + * * + * *
Response details
Status Code Description Response Headers
200 OK -
202 Accepted -
400 Bad Request -
403 Not Authorized -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse - searchSecurityMonitoringHistsignalsWithHttpInfo( - SearchSecurityMonitoringHistsignalsOptionalParameters parameters) throws ApiException { + public ApiResponse startSecurityMonitoringBatchMigrationWithHttpInfo(UUID batchId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "searchSecurityMonitoringHistsignals"; + String operationId = "startSecurityMonitoringBatchMigration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = parameters.body; + Object localVarPostBody = null; + + // verify the required parameter 'batchId' is set + if (batchId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'batchId' when calling" + + " startSecurityMonitoringBatchMigration"); + } // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/histsignals/search"; + String localVarPath = + "/api/v2/security_monitoring/batch-migrations/{batch_id}/start" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.searchSecurityMonitoringHistsignals", + "v2.SecurityMonitoringApi.startSecurityMonitoringBatchMigration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( "POST", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Search hist signals. + * Start a batch migration. * - *

See {@link #searchSecurityMonitoringHistsignalsWithHttpInfo}. + *

See {@link #startSecurityMonitoringBatchMigrationWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalsListResponse>> + * @param batchId The UUID of the batch migration. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - searchSecurityMonitoringHistsignalsWithHttpInfoAsync( - SearchSecurityMonitoringHistsignalsOptionalParameters parameters) { + public CompletableFuture> + startSecurityMonitoringBatchMigrationWithHttpInfoAsync(UUID batchId) { // Check if unstable operation is enabled - String operationId = "searchSecurityMonitoringHistsignals"; + String operationId = "startSecurityMonitoringBatchMigration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = parameters.body; + Object localVarPostBody = null; + + // verify the required parameter 'batchId' is set + if (batchId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'batchId' when calling" + + " startSecurityMonitoringBatchMigration")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/histsignals/search"; + String localVarPath = + "/api/v2/security_monitoring/batch-migrations/{batch_id}/start" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); Map localVarHeaderParams = new HashMap(); @@ -28354,181 +30512,69 @@ public SecurityMonitoringSignalsListResponse searchSecurityMonitoringHistsignals try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.searchSecurityMonitoringHistsignals", + "v2.SecurityMonitoringApi.startSecurityMonitoringBatchMigration", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** Manage optional parameters to searchSecurityMonitoringSignals. */ - public static class SearchSecurityMonitoringSignalsOptionalParameters { - private SecurityMonitoringSignalListRequest body; - - /** - * Set body. - * - * @param body (optional) - * @return SearchSecurityMonitoringSignalsOptionalParameters - */ - public SearchSecurityMonitoringSignalsOptionalParameters body( - SecurityMonitoringSignalListRequest body) { - this.body = body; - return this; - } - } - - /** - * Get a list of security signals. - * - *

See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. - * - * @return SecurityMonitoringSignalsListResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringSignalsListResponse searchSecurityMonitoringSignals() - throws ApiException { - return searchSecurityMonitoringSignalsWithHttpInfo( - new SearchSecurityMonitoringSignalsOptionalParameters()) - .getData(); - } - - /** - * Get a list of security signals. - * - *

See {@link #searchSecurityMonitoringSignalsWithHttpInfoAsync}. - * - * @return CompletableFuture<SecurityMonitoringSignalsListResponse> - */ - public CompletableFuture - searchSecurityMonitoringSignalsAsync() { - return searchSecurityMonitoringSignalsWithHttpInfoAsync( - new SearchSecurityMonitoringSignalsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get a list of security signals. - * - *

See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return SecurityMonitoringSignalsListResponse - * @throws ApiException if fails to make API call - */ - public SecurityMonitoringSignalsListResponse searchSecurityMonitoringSignals( - SearchSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { - return searchSecurityMonitoringSignalsWithHttpInfo(parameters).getData(); - } - - /** - * Get a list of security signals. - * - *

See {@link #searchSecurityMonitoringSignalsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SecurityMonitoringSignalsListResponse> - */ - public CompletableFuture - searchSecurityMonitoringSignalsAsync( - SearchSecurityMonitoringSignalsOptionalParameters parameters) { - return searchSecurityMonitoringSignalsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); } /** - * Get a list of security signals. + * Test an existing rule. * - *

See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. + *

See {@link #testExistingSecurityMonitoringRuleWithHttpInfo}. * - * @return PaginationIterable<SecurityMonitoringSignal> + * @param ruleId The ID of the rule. (required) + * @param body (required) + * @return SecurityMonitoringRuleTestResponse + * @throws ApiException if fails to make API call */ - public PaginationIterable - searchSecurityMonitoringSignalsWithPagination() { - SearchSecurityMonitoringSignalsOptionalParameters parameters = - new SearchSecurityMonitoringSignalsOptionalParameters(); - return searchSecurityMonitoringSignalsWithPagination(parameters); + public SecurityMonitoringRuleTestResponse testExistingSecurityMonitoringRule( + String ruleId, SecurityMonitoringRuleTestRequest body) throws ApiException { + return testExistingSecurityMonitoringRuleWithHttpInfo(ruleId, body).getData(); } /** - * Get a list of security signals. + * Test an existing rule. * - *

See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. + *

See {@link #testExistingSecurityMonitoringRuleWithHttpInfoAsync}. * - * @return SecurityMonitoringSignalsListResponse + * @param ruleId The ID of the rule. (required) + * @param body (required) + * @return CompletableFuture<SecurityMonitoringRuleTestResponse> */ - public PaginationIterable searchSecurityMonitoringSignalsWithPagination( - SearchSecurityMonitoringSignalsOptionalParameters parameters) { - String resultsPath = "getData"; - String valueGetterPath = "getMeta.getPage.getAfter"; - String valueSetterPath = "body.getPage.setCursor"; - Boolean valueSetterParamOptional = true; - Integer limit; - - if (parameters.body == null) { - parameters.body(new SecurityMonitoringSignalListRequest()); - } - - if (parameters.body.getPage() == null) { - parameters.body.setPage(new SecurityMonitoringSignalListRequestPage()); - } - - if (parameters.body.getPage().getLimit() == null) { - limit = 10; - parameters.body.getPage().setLimit(limit); - } else { - limit = parameters.body.getPage().getLimit(); - } - - LinkedHashMap args = new LinkedHashMap(); - args.put("optionalParams", parameters); - - PaginationIterable iterator = - new PaginationIterable( - this, - "searchSecurityMonitoringSignals", - resultsPath, - valueGetterPath, - valueSetterPath, - valueSetterParamOptional, - true, - true, - limit, - args, - 0); - - return iterator; + public CompletableFuture + testExistingSecurityMonitoringRuleAsync( + String ruleId, SecurityMonitoringRuleTestRequest body) { + return testExistingSecurityMonitoringRuleWithHttpInfoAsync(ruleId, body) + .thenApply( + response -> { + return response.getData(); + }); } /** - * Returns security signals that match a search query. Both this endpoint and the GET endpoint can - * be used interchangeably for listing security signals. + * Test an existing rule. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<SecurityMonitoringSignalsListResponse> + * @param ruleId The ID of the rule. (required) + * @param body (required) + * @return ApiResponse<SecurityMonitoringRuleTestResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -28536,22 +30582,41 @@ public PaginationIterable searchSecurityMonitoringSign * * * + * * + * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Concurrent Modification -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - searchSecurityMonitoringSignalsWithHttpInfo( - SearchSecurityMonitoringSignalsOptionalParameters parameters) throws ApiException { - Object localVarPostBody = parameters.body; + public ApiResponse + testExistingSecurityMonitoringRuleWithHttpInfo( + String ruleId, SecurityMonitoringRuleTestRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'ruleId' when calling" + + " testExistingSecurityMonitoringRule"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling testExistingSecurityMonitoringRule"); + } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/signals/search"; + String localVarPath = + "/api/v2/security_monitoring/rules/{rule_id}/test" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.searchSecurityMonitoringSignals", + "v2.SecurityMonitoringApi.testExistingSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -28566,23 +30631,50 @@ public PaginationIterable searchSecurityMonitoringSign localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get a list of security signals. + * Test an existing rule. * - *

See {@link #searchSecurityMonitoringSignalsWithHttpInfo}. + *

See {@link #testExistingSecurityMonitoringRuleWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<SecurityMonitoringSignalsListResponse>> + * @param ruleId The ID of the rule. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleTestResponse>> */ - public CompletableFuture> - searchSecurityMonitoringSignalsWithHttpInfoAsync( - SearchSecurityMonitoringSignalsOptionalParameters parameters) { - Object localVarPostBody = parameters.body; + public CompletableFuture> + testExistingSecurityMonitoringRuleWithHttpInfoAsync( + String ruleId, SecurityMonitoringRuleTestRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'ruleId' when calling" + + " testExistingSecurityMonitoringRule")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " testExistingSecurityMonitoringRule")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/signals/search"; + String localVarPath = + "/api/v2/security_monitoring/rules/{rule_id}/test" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -28590,7 +30682,7 @@ public PaginationIterable searchSecurityMonitoringSign try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.searchSecurityMonitoringSignals", + "v2.SecurityMonitoringApi.testExistingSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -28598,7 +30690,7 @@ public PaginationIterable searchSecurityMonitoringSign new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -28611,34 +30703,34 @@ public PaginationIterable searchSecurityMonitoringSign localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Test a notification rule. + * Test a rule. * - *

See {@link #sendSecurityMonitoringNotificationPreviewWithHttpInfo}. + *

See {@link #testSecurityMonitoringRuleWithHttpInfo}. * * @param body (required) - * @return NotificationRulePreviewResponse + * @return SecurityMonitoringRuleTestResponse * @throws ApiException if fails to make API call */ - public NotificationRulePreviewResponse sendSecurityMonitoringNotificationPreview( - CreateNotificationRuleParameters body) throws ApiException { - return sendSecurityMonitoringNotificationPreviewWithHttpInfo(body).getData(); + public SecurityMonitoringRuleTestResponse testSecurityMonitoringRule( + SecurityMonitoringRuleTestRequest body) throws ApiException { + return testSecurityMonitoringRuleWithHttpInfo(body).getData(); } /** - * Test a notification rule. + * Test a rule. * - *

See {@link #sendSecurityMonitoringNotificationPreviewWithHttpInfoAsync}. + *

See {@link #testSecurityMonitoringRuleWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<NotificationRulePreviewResponse> + * @return CompletableFuture<SecurityMonitoringRuleTestResponse> */ - public CompletableFuture - sendSecurityMonitoringNotificationPreviewAsync(CreateNotificationRuleParameters body) { - return sendSecurityMonitoringNotificationPreviewWithHttpInfoAsync(body) + public CompletableFuture testSecurityMonitoringRuleAsync( + SecurityMonitoringRuleTestRequest body) { + return testSecurityMonitoringRuleWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -28646,10 +30738,10 @@ public NotificationRulePreviewResponse sendSecurityMonitoringNotificationPreview } /** - * Send a notification preview to test that a notification rule's targets are properly configured. + * Test a rule. * * @param body (required) - * @return ApiResponse<NotificationRulePreviewResponse> + * @return ApiResponse<SecurityMonitoringRuleTestResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -28657,31 +30749,29 @@ public NotificationRulePreviewResponse sendSecurityMonitoringNotificationPreview * * * + * * + * * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Concurrent Modification -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse - sendSecurityMonitoringNotificationPreviewWithHttpInfo(CreateNotificationRuleParameters body) - throws ApiException { + public ApiResponse testSecurityMonitoringRuleWithHttpInfo( + SecurityMonitoringRuleTestRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " sendSecurityMonitoringNotificationPreview"); + 400, "Missing the required parameter 'body' when calling testSecurityMonitoringRule"); } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/configuration/notification_rules/send_notification_preview"; + String localVarPath = "/api/v2/security_monitoring/rules/test"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.sendSecurityMonitoringNotificationPreview", + "v2.SecurityMonitoringApi.testSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -28696,36 +30786,33 @@ public NotificationRulePreviewResponse sendSecurityMonitoringNotificationPreview localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Test a notification rule. + * Test a rule. * - *

See {@link #sendSecurityMonitoringNotificationPreviewWithHttpInfo}. + *

See {@link #testSecurityMonitoringRuleWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<NotificationRulePreviewResponse>> + * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleTestResponse>> */ - public CompletableFuture> - sendSecurityMonitoringNotificationPreviewWithHttpInfoAsync( - CreateNotificationRuleParameters body) { + public CompletableFuture> + testSecurityMonitoringRuleWithHttpInfoAsync(SecurityMonitoringRuleTestRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling" - + " sendSecurityMonitoringNotificationPreview")); + "Missing the required parameter 'body' when calling testSecurityMonitoringRule")); return result; } // create path and map variables - String localVarPath = - "/api/v2/security_monitoring/configuration/notification_rules/send_notification_preview"; + String localVarPath = "/api/v2/security_monitoring/rules/test"; Map localVarHeaderParams = new HashMap(); @@ -28733,7 +30820,7 @@ public NotificationRulePreviewResponse sendSecurityMonitoringNotificationPreview try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.sendSecurityMonitoringNotificationPreview", + "v2.SecurityMonitoringApi.testSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -28741,7 +30828,7 @@ public NotificationRulePreviewResponse sendSecurityMonitoringNotificationPreview new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -28754,37 +30841,38 @@ public NotificationRulePreviewResponse sendSecurityMonitoringNotificationPreview localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Test an existing rule. + * Update a custom framework. * - *

See {@link #testExistingSecurityMonitoringRuleWithHttpInfo}. + *

See {@link #updateCustomFrameworkWithHttpInfo}. * - * @param ruleId The ID of the rule. (required) + * @param handle The framework handle (required) + * @param version The framework version (required) * @param body (required) - * @return SecurityMonitoringRuleTestResponse + * @return UpdateCustomFrameworkResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringRuleTestResponse testExistingSecurityMonitoringRule( - String ruleId, SecurityMonitoringRuleTestRequest body) throws ApiException { - return testExistingSecurityMonitoringRuleWithHttpInfo(ruleId, body).getData(); + public UpdateCustomFrameworkResponse updateCustomFramework( + String handle, String version, UpdateCustomFrameworkRequest body) throws ApiException { + return updateCustomFrameworkWithHttpInfo(handle, version, body).getData(); } /** - * Test an existing rule. + * Update a custom framework. * - *

See {@link #testExistingSecurityMonitoringRuleWithHttpInfoAsync}. + *

See {@link #updateCustomFrameworkWithHttpInfoAsync}. * - * @param ruleId The ID of the rule. (required) + * @param handle The framework handle (required) + * @param version The framework version (required) * @param body (required) - * @return CompletableFuture<SecurityMonitoringRuleTestResponse> + * @return CompletableFuture<UpdateCustomFrameworkResponse> */ - public CompletableFuture - testExistingSecurityMonitoringRuleAsync( - String ruleId, SecurityMonitoringRuleTestRequest body) { - return testExistingSecurityMonitoringRuleWithHttpInfoAsync(ruleId, body) + public CompletableFuture updateCustomFrameworkAsync( + String handle, String version, UpdateCustomFrameworkRequest body) { + return updateCustomFrameworkWithHttpInfoAsync(handle, version, body) .thenApply( response -> { return response.getData(); @@ -28792,11 +30880,12 @@ public SecurityMonitoringRuleTestResponse testExistingSecurityMonitoringRule( } /** - * Test an existing rule. + * Update a custom framework. * - * @param ruleId The ID of the rule. (required) + * @param handle The framework handle (required) + * @param version The framework version (required) * @param body (required) - * @return ApiResponse<SecurityMonitoringRuleTestResponse> + * @return ApiResponse<UpdateCustomFrameworkResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -28804,41 +30893,42 @@ public SecurityMonitoringRuleTestResponse testExistingSecurityMonitoringRule( * * * - * - * - * * + * *
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Concurrent Modification -
403 Not Authorized -
404 Not Found -
429 Too many requests -
500 Bad Request -
*/ - public ApiResponse - testExistingSecurityMonitoringRuleWithHttpInfo( - String ruleId, SecurityMonitoringRuleTestRequest body) throws ApiException { + public ApiResponse updateCustomFrameworkWithHttpInfo( + String handle, String version, UpdateCustomFrameworkRequest body) throws ApiException { Object localVarPostBody = body; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'handle' is set + if (handle == null) { throw new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling" - + " testExistingSecurityMonitoringRule"); + 400, "Missing the required parameter 'handle' when calling updateCustomFramework"); + } + + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException( + 400, "Missing the required parameter 'version' when calling updateCustomFramework"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'body' when calling testExistingSecurityMonitoringRule"); + 400, "Missing the required parameter 'body' when calling updateCustomFramework"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}/test" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" + .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.testExistingSecurityMonitoringRule", + "v2.SecurityMonitoringApi.updateCustomFramework", localVarPath, new ArrayList(), localVarHeaderParams, @@ -28846,57 +30936,65 @@ public SecurityMonitoringRuleTestResponse testExistingSecurityMonitoringRule( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "POST", + "PUT", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Test an existing rule. + * Update a custom framework. * - *

See {@link #testExistingSecurityMonitoringRuleWithHttpInfo}. + *

See {@link #updateCustomFrameworkWithHttpInfo}. * - * @param ruleId The ID of the rule. (required) + * @param handle The framework handle (required) + * @param version The framework version (required) * @param body (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleTestResponse>> + * @return CompletableFuture<ApiResponse<UpdateCustomFrameworkResponse>> */ - public CompletableFuture> - testExistingSecurityMonitoringRuleWithHttpInfoAsync( - String ruleId, SecurityMonitoringRuleTestRequest body) { + public CompletableFuture> + updateCustomFrameworkWithHttpInfoAsync( + String handle, String version, UpdateCustomFrameworkRequest body) { Object localVarPostBody = body; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = + // verify the required parameter 'handle' is set + if (handle == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'ruleId' when calling" - + " testExistingSecurityMonitoringRule")); + 400, "Missing the required parameter 'handle' when calling updateCustomFramework")); + return result; + } + + // verify the required parameter 'version' is set + if (version == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'version' when calling updateCustomFramework")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " testExistingSecurityMonitoringRule")); + 400, "Missing the required parameter 'body' when calling updateCustomFramework")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}/test" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" + .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); Map localVarHeaderParams = new HashMap(); @@ -28904,7 +31002,7 @@ public SecurityMonitoringRuleTestResponse testExistingSecurityMonitoringRule( try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.testExistingSecurityMonitoringRule", + "v2.SecurityMonitoringApi.updateCustomFramework", localVarPath, new ArrayList(), localVarHeaderParams, @@ -28912,47 +31010,45 @@ public SecurityMonitoringRuleTestResponse testExistingSecurityMonitoringRule( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "POST", + "PUT", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Test a rule. + * Assign or unassign security findings. * - *

See {@link #testSecurityMonitoringRuleWithHttpInfo}. + *

See {@link #updateFindingsAssigneeWithHttpInfo}. * * @param body (required) - * @return SecurityMonitoringRuleTestResponse + * @return AssigneeResponse * @throws ApiException if fails to make API call */ - public SecurityMonitoringRuleTestResponse testSecurityMonitoringRule( - SecurityMonitoringRuleTestRequest body) throws ApiException { - return testSecurityMonitoringRuleWithHttpInfo(body).getData(); + public AssigneeResponse updateFindingsAssignee(AssigneeRequest body) throws ApiException { + return updateFindingsAssigneeWithHttpInfo(body).getData(); } /** - * Test a rule. + * Assign or unassign security findings. * - *

See {@link #testSecurityMonitoringRuleWithHttpInfoAsync}. + *

See {@link #updateFindingsAssigneeWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<SecurityMonitoringRuleTestResponse> + * @return CompletableFuture<AssigneeResponse> */ - public CompletableFuture testSecurityMonitoringRuleAsync( - SecurityMonitoringRuleTestRequest body) { - return testSecurityMonitoringRuleWithHttpInfoAsync(body) + public CompletableFuture updateFindingsAssigneeAsync(AssigneeRequest body) { + return updateFindingsAssigneeWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -28960,40 +31056,49 @@ public CompletableFuture testSecurityMonitor } /** - * Test a rule. + * Assign or unassign security findings. You can assign up to 100 security findings per request. + * Set assignee_id to the unique identifier of the Datadog user you want to assign + * the findings to. Omit assignee_id (or set it to null) to unassign the + * findings. Per-finding warnings and failures are returned in the response meta + * object. * * @param body (required) - * @return ApiResponse<SecurityMonitoringRuleTestResponse> + * @return ApiResponse<AssigneeResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * - * * * *
Response details
Status Code Description Response Headers
200 OK -
202 Accepted -
400 Bad Request -
401 Concurrent Modification -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse testSecurityMonitoringRuleWithHttpInfo( - SecurityMonitoringRuleTestRequest body) throws ApiException { + public ApiResponse updateFindingsAssigneeWithHttpInfo(AssigneeRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateFindingsAssignee"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling testSecurityMonitoringRule"); + 400, "Missing the required parameter 'body' when calling updateFindingsAssignee"); } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/rules/test"; + String localVarPath = "/api/v2/security/findings/assignee"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.testSecurityMonitoringRule", + "v2.SecurityMonitoringApi.updateFindingsAssignee", localVarPath, new ArrayList(), localVarHeaderParams, @@ -29001,40 +31106,48 @@ public ApiResponse testSecurityMonitoringRul new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "POST", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Test a rule. + * Assign or unassign security findings. * - *

See {@link #testSecurityMonitoringRuleWithHttpInfo}. + *

See {@link #updateFindingsAssigneeWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleTestResponse>> + * @return CompletableFuture<ApiResponse<AssigneeResponse>> */ - public CompletableFuture> - testSecurityMonitoringRuleWithHttpInfoAsync(SecurityMonitoringRuleTestRequest body) { + public CompletableFuture> updateFindingsAssigneeWithHttpInfoAsync( + AssigneeRequest body) { + // Check if unstable operation is enabled + String operationId = "updateFindingsAssignee"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling testSecurityMonitoringRule")); + 400, "Missing the required parameter 'body' when calling updateFindingsAssignee")); return result; } // create path and map variables - String localVarPath = "/api/v2/security_monitoring/rules/test"; + String localVarPath = "/api/v2/security/findings/assignee"; Map localVarHeaderParams = new HashMap(); @@ -29042,7 +31155,7 @@ public ApiResponse testSecurityMonitoringRul try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.testSecurityMonitoringRule", + "v2.SecurityMonitoringApi.updateFindingsAssignee", localVarPath, new ArrayList(), localVarHeaderParams, @@ -29050,51 +31163,46 @@ public ApiResponse testSecurityMonitoringRul new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "POST", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update a custom framework. + * Override the severity of security findings. * - *

See {@link #updateCustomFrameworkWithHttpInfo}. + *

See {@link #updateFindingsSeverityWithHttpInfo}. * - * @param handle The framework handle (required) - * @param version The framework version (required) * @param body (required) - * @return UpdateCustomFrameworkResponse + * @return SeverityOverrideResponse * @throws ApiException if fails to make API call */ - public UpdateCustomFrameworkResponse updateCustomFramework( - String handle, String version, UpdateCustomFrameworkRequest body) throws ApiException { - return updateCustomFrameworkWithHttpInfo(handle, version, body).getData(); + public SeverityOverrideResponse updateFindingsSeverity(SeverityOverrideRequest body) + throws ApiException { + return updateFindingsSeverityWithHttpInfo(body).getData(); } /** - * Update a custom framework. + * Override the severity of security findings. * - *

See {@link #updateCustomFrameworkWithHttpInfoAsync}. + *

See {@link #updateFindingsSeverityWithHttpInfoAsync}. * - * @param handle The framework handle (required) - * @param version The framework version (required) * @param body (required) - * @return CompletableFuture<UpdateCustomFrameworkResponse> + * @return CompletableFuture<SeverityOverrideResponse> */ - public CompletableFuture updateCustomFrameworkAsync( - String handle, String version, UpdateCustomFrameworkRequest body) { - return updateCustomFrameworkWithHttpInfoAsync(handle, version, body) + public CompletableFuture updateFindingsSeverityAsync( + SeverityOverrideRequest body) { + return updateFindingsSeverityWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -29102,55 +31210,62 @@ public CompletableFuture updateCustomFrameworkAsy } /** - * Update a custom framework. + * Set or clear the manual severity override of security findings. + * + *

You can update up to 100 security findings per request. Use the set action with + * a value to apply a manual severity override. value is required for + * set and must be omitted for clear. The info value sets + * the lowest severity the finding type allows. Use the clear action to remove a + * manual severity override. clear does not remove a severity set by an automation + * rule. The optional description is accepted with both actions and has a limit of + * 280 characters. + * + *

Auto-closed findings are excluded. Findings whose severity was set by an automation rule are + * skipped and listed in the response meta.warnings. If every finding is skipped this + * way, the request fails with a 400 error. Findings that cannot be found are skipped + * without a warning. The request fails with a 404 error only if none of the findings + * can be found. * - * @param handle The framework handle (required) - * @param version The framework version (required) * @param body (required) - * @return ApiResponse<UpdateCustomFrameworkResponse> + * @return ApiResponse<SeverityOverrideResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * + * + * + * + * * - * *
Response details
Status Code Description Response Headers
200 OK -
202 Accepted -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
429 Too many requests -
500 Bad Request -
*/ - public ApiResponse updateCustomFrameworkWithHttpInfo( - String handle, String version, UpdateCustomFrameworkRequest body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'handle' is set - if (handle == null) { - throw new ApiException( - 400, "Missing the required parameter 'handle' when calling updateCustomFramework"); - } - - // verify the required parameter 'version' is set - if (version == null) { - throw new ApiException( - 400, "Missing the required parameter 'version' when calling updateCustomFramework"); + public ApiResponse updateFindingsSeverityWithHttpInfo( + SeverityOverrideRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateFindingsSeverity"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } + Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateCustomFramework"); + 400, "Missing the required parameter 'body' when calling updateFindingsSeverity"); } // create path and map variables - String localVarPath = - "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" - .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) - .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + String localVarPath = "/api/v2/security/findings/severity"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateCustomFramework", + "v2.SecurityMonitoringApi.updateFindingsSeverity", localVarPath, new ArrayList(), localVarHeaderParams, @@ -29158,65 +31273,48 @@ public ApiResponse updateCustomFrameworkWithHttpI new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "PUT", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update a custom framework. + * Override the severity of security findings. * - *

See {@link #updateCustomFrameworkWithHttpInfo}. + *

See {@link #updateFindingsSeverityWithHttpInfo}. * - * @param handle The framework handle (required) - * @param version The framework version (required) * @param body (required) - * @return CompletableFuture<ApiResponse<UpdateCustomFrameworkResponse>> + * @return CompletableFuture<ApiResponse<SeverityOverrideResponse>> */ - public CompletableFuture> - updateCustomFrameworkWithHttpInfoAsync( - String handle, String version, UpdateCustomFrameworkRequest body) { - Object localVarPostBody = body; - - // verify the required parameter 'handle' is set - if (handle == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'handle' when calling updateCustomFramework")); - return result; - } - - // verify the required parameter 'version' is set - if (version == null) { - CompletableFuture> result = - new CompletableFuture<>(); + public CompletableFuture> + updateFindingsSeverityWithHttpInfoAsync(SeverityOverrideRequest body) { + // Check if unstable operation is enabled + String operationId = "updateFindingsSeverity"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'version' when calling updateCustomFramework")); + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } + Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling updateCustomFramework")); + 400, "Missing the required parameter 'body' when calling updateFindingsSeverity")); return result; } // create path and map variables - String localVarPath = - "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" - .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) - .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + String localVarPath = "/api/v2/security/findings/severity"; Map localVarHeaderParams = new HashMap(); @@ -29224,7 +31322,7 @@ public ApiResponse updateCustomFrameworkWithHttpI try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateCustomFramework", + "v2.SecurityMonitoringApi.updateFindingsSeverity", localVarPath, new ArrayList(), localVarHeaderParams, @@ -29232,45 +31330,46 @@ public ApiResponse updateCustomFrameworkWithHttpI new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PUT", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Assign or unassign security findings. + * Update resource filters. * - *

See {@link #updateFindingsAssigneeWithHttpInfo}. + *

See {@link #updateResourceEvaluationFiltersWithHttpInfo}. * * @param body (required) - * @return AssigneeResponse + * @return UpdateResourceEvaluationFiltersResponse * @throws ApiException if fails to make API call */ - public AssigneeResponse updateFindingsAssignee(AssigneeRequest body) throws ApiException { - return updateFindingsAssigneeWithHttpInfo(body).getData(); + public UpdateResourceEvaluationFiltersResponse updateResourceEvaluationFilters( + UpdateResourceEvaluationFiltersRequest body) throws ApiException { + return updateResourceEvaluationFiltersWithHttpInfo(body).getData(); } /** - * Assign or unassign security findings. + * Update resource filters. * - *

See {@link #updateFindingsAssigneeWithHttpInfoAsync}. + *

See {@link #updateResourceEvaluationFiltersWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<AssigneeResponse> + * @return CompletableFuture<UpdateResourceEvaluationFiltersResponse> */ - public CompletableFuture updateFindingsAssigneeAsync(AssigneeRequest body) { - return updateFindingsAssigneeWithHttpInfoAsync(body) + public CompletableFuture + updateResourceEvaluationFiltersAsync(UpdateResourceEvaluationFiltersRequest body) { + return updateResourceEvaluationFiltersWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -29278,49 +31377,40 @@ public CompletableFuture updateFindingsAssigneeAsync(AssigneeR } /** - * Assign or unassign security findings. You can assign up to 100 security findings per request. - * Set assignee_id to the unique identifier of the Datadog user you want to assign - * the findings to. Omit assignee_id (or set it to null) to unassign the - * findings. Per-finding warnings and failures are returned in the response meta - * object. + * Update resource filters. * * @param body (required) - * @return ApiResponse<AssigneeResponse> + * @return ApiResponse<UpdateResourceEvaluationFiltersResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * + * * *
Response details
Status Code Description Response Headers
202 Accepted -
201 OK -
400 Bad Request -
404 Not Found -
403 Not Authorized -
429 Too many requests -
*/ - public ApiResponse updateFindingsAssigneeWithHttpInfo(AssigneeRequest body) - throws ApiException { - // Check if unstable operation is enabled - String operationId = "updateFindingsAssignee"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse + updateResourceEvaluationFiltersWithHttpInfo(UpdateResourceEvaluationFiltersRequest body) + throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateFindingsAssignee"); + 400, + "Missing the required parameter 'body' when calling updateResourceEvaluationFilters"); } // create path and map variables - String localVarPath = "/api/v2/security/findings/assignee"; + String localVarPath = "/api/v2/cloud_security_management/resource_filters"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateFindingsAssignee", + "v2.SecurityMonitoringApi.updateResourceEvaluationFilters", localVarPath, new ArrayList(), localVarHeaderParams, @@ -29328,48 +31418,42 @@ public ApiResponse updateFindingsAssigneeWithHttpInfo(Assignee new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "PATCH", + "PUT", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Assign or unassign security findings. + * Update resource filters. * - *

See {@link #updateFindingsAssigneeWithHttpInfo}. + *

See {@link #updateResourceEvaluationFiltersWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<AssigneeResponse>> + * @return CompletableFuture<ApiResponse<UpdateResourceEvaluationFiltersResponse>> */ - public CompletableFuture> updateFindingsAssigneeWithHttpInfoAsync( - AssigneeRequest body) { - // Check if unstable operation is enabled - String operationId = "updateFindingsAssignee"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } + public CompletableFuture> + updateResourceEvaluationFiltersWithHttpInfoAsync( + UpdateResourceEvaluationFiltersRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling updateFindingsAssignee")); + 400, + "Missing the required parameter 'body' when calling" + + " updateResourceEvaluationFilters")); return result; } // create path and map variables - String localVarPath = "/api/v2/security/findings/assignee"; + String localVarPath = "/api/v2/cloud_security_management/resource_filters"; Map localVarHeaderParams = new HashMap(); @@ -29377,7 +31461,7 @@ public CompletableFuture> updateFindingsAssigneeWi try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateFindingsAssignee", + "v2.SecurityMonitoringApi.updateResourceEvaluationFilters", localVarPath, new ArrayList(), localVarHeaderParams, @@ -29385,109 +31469,103 @@ public CompletableFuture> updateFindingsAssigneeWi new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PATCH", + "PUT", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Override the severity of security findings. + * Update a security filter. * - *

See {@link #updateFindingsSeverityWithHttpInfo}. + *

See {@link #updateSecurityFilterWithHttpInfo}. * - * @param body (required) - * @return SeverityOverrideResponse + * @param securityFilterId The ID of the security filter. (required) + * @param body New definition of the security filter. (required) + * @return SecurityFilterResponse * @throws ApiException if fails to make API call */ - public SeverityOverrideResponse updateFindingsSeverity(SeverityOverrideRequest body) - throws ApiException { - return updateFindingsSeverityWithHttpInfo(body).getData(); + public SecurityFilterResponse updateSecurityFilter( + String securityFilterId, SecurityFilterUpdateRequest body) throws ApiException { + return updateSecurityFilterWithHttpInfo(securityFilterId, body).getData(); } /** - * Override the severity of security findings. + * Update a security filter. * - *

See {@link #updateFindingsSeverityWithHttpInfoAsync}. + *

See {@link #updateSecurityFilterWithHttpInfoAsync}. * - * @param body (required) - * @return CompletableFuture<SeverityOverrideResponse> + * @param securityFilterId The ID of the security filter. (required) + * @param body New definition of the security filter. (required) + * @return CompletableFuture<SecurityFilterResponse> */ - public CompletableFuture updateFindingsSeverityAsync( - SeverityOverrideRequest body) { - return updateFindingsSeverityWithHttpInfoAsync(body) + public CompletableFuture updateSecurityFilterAsync( + String securityFilterId, SecurityFilterUpdateRequest body) { + return updateSecurityFilterWithHttpInfoAsync(securityFilterId, body) .thenApply( response -> { - return response.getData(); - }); - } - - /** - * Set or clear the manual severity override of security findings. - * - *

You can update up to 100 security findings per request. Use the set action with - * a value to apply a manual severity override. value is required for - * set and must be omitted for clear. The info value sets - * the lowest severity the finding type allows. Use the clear action to remove a - * manual severity override. clear does not remove a severity set by an automation - * rule. The optional description is accepted with both actions and has a limit of - * 280 characters. - * - *

Auto-closed findings are excluded. Findings whose severity was set by an automation rule are - * skipped and listed in the response meta.warnings. If every finding is skipped this - * way, the request fails with a 400 error. Findings that cannot be found are skipped - * without a warning. The request fails with a 404 error only if none of the findings - * can be found. + return response.getData(); + }); + } + + /** + * Update a specific security filter. Returns the security filter object when the request is + * successful. * - * @param body (required) - * @return ApiResponse<SeverityOverrideResponse> + * @param securityFilterId The ID of the security filter. (required) + * @param body New definition of the security filter. (required) + * @return ApiResponse<SecurityFilterResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * - * + * * - * + * * *
Response details
Status Code Description Response Headers
202 Accepted -
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
403 Not Authorized -
404 Not Found -
422 Unprocessable Entity -
409 Concurrent Modification -
429 Too many requests -
*/ - public ApiResponse updateFindingsSeverityWithHttpInfo( - SeverityOverrideRequest body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "updateFindingsSeverity"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } + public ApiResponse updateSecurityFilterWithHttpInfo( + String securityFilterId, SecurityFilterUpdateRequest body) throws ApiException { Object localVarPostBody = body; + // verify the required parameter 'securityFilterId' is set + if (securityFilterId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'securityFilterId' when calling updateSecurityFilter"); + } + // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateFindingsSeverity"); + 400, "Missing the required parameter 'body' when calling updateSecurityFilter"); } // create path and map variables - String localVarPath = "/api/v2/security/findings/severity"; + String localVarPath = + "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" + .replaceAll( + "\\{" + "security_filter_id" + "\\}", + apiClient.escapeString(securityFilterId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateFindingsSeverity", + "v2.SecurityMonitoringApi.updateSecurityFilter", localVarPath, new ArrayList(), localVarHeaderParams, @@ -29502,41 +31580,48 @@ public ApiResponse updateFindingsSeverityWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Override the severity of security findings. + * Update a security filter. * - *

See {@link #updateFindingsSeverityWithHttpInfo}. + *

See {@link #updateSecurityFilterWithHttpInfo}. * - * @param body (required) - * @return CompletableFuture<ApiResponse<SeverityOverrideResponse>> + * @param securityFilterId The ID of the security filter. (required) + * @param body New definition of the security filter. (required) + * @return CompletableFuture<ApiResponse<SecurityFilterResponse>> */ - public CompletableFuture> - updateFindingsSeverityWithHttpInfoAsync(SeverityOverrideRequest body) { - // Check if unstable operation is enabled - String operationId = "updateFindingsSeverity"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); + public CompletableFuture> + updateSecurityFilterWithHttpInfoAsync( + String securityFilterId, SecurityFilterUpdateRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'securityFilterId' is set + if (securityFilterId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + new ApiException( + 400, + "Missing the required parameter 'securityFilterId' when calling" + + " updateSecurityFilter")); return result; } - Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling updateFindingsSeverity")); + 400, "Missing the required parameter 'body' when calling updateSecurityFilter")); return result; } // create path and map variables - String localVarPath = "/api/v2/security/findings/severity"; + String localVarPath = + "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" + .replaceAll( + "\\{" + "security_filter_id" + "\\}", + apiClient.escapeString(securityFilterId.toString())); Map localVarHeaderParams = new HashMap(); @@ -29544,7 +31629,7 @@ public ApiResponse updateFindingsSeverityWithHttpInfo( try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateFindingsSeverity", + "v2.SecurityMonitoringApi.updateSecurityFilter", localVarPath, new ArrayList(), localVarHeaderParams, @@ -29552,7 +31637,7 @@ public ApiResponse updateFindingsSeverityWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -29564,34 +31649,36 @@ public ApiResponse updateFindingsSeverityWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update resource filters. + * Update a due date rule. * - *

See {@link #updateResourceEvaluationFiltersWithHttpInfo}. + *

See {@link #updateSecurityFindingsAutomationDueDateRuleWithHttpInfo}. * + * @param ruleId The ID of the due date rule. (required) * @param body (required) - * @return UpdateResourceEvaluationFiltersResponse + * @return DueDateRuleResponse * @throws ApiException if fails to make API call */ - public UpdateResourceEvaluationFiltersResponse updateResourceEvaluationFilters( - UpdateResourceEvaluationFiltersRequest body) throws ApiException { - return updateResourceEvaluationFiltersWithHttpInfo(body).getData(); + public DueDateRuleResponse updateSecurityFindingsAutomationDueDateRule( + UUID ruleId, DueDateRuleUpdateRequest body) throws ApiException { + return updateSecurityFindingsAutomationDueDateRuleWithHttpInfo(ruleId, body).getData(); } /** - * Update resource filters. + * Update a due date rule. * - *

See {@link #updateResourceEvaluationFiltersWithHttpInfoAsync}. + *

See {@link #updateSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync}. * + * @param ruleId The ID of the due date rule. (required) * @param body (required) - * @return CompletableFuture<UpdateResourceEvaluationFiltersResponse> + * @return CompletableFuture<DueDateRuleResponse> */ - public CompletableFuture - updateResourceEvaluationFiltersAsync(UpdateResourceEvaluationFiltersRequest body) { - return updateResourceEvaluationFiltersWithHttpInfoAsync(body) + public CompletableFuture updateSecurityFindingsAutomationDueDateRuleAsync( + UUID ruleId, DueDateRuleUpdateRequest body) { + return updateSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync(ruleId, body) .thenApply( response -> { return response.getData(); @@ -29599,40 +31686,60 @@ public UpdateResourceEvaluationFiltersResponse updateResourceEvaluationFilters( } /** - * Update resource filters. + * Update a due date rule by ID. * + * @param ruleId The ID of the due date rule. (required) * @param body (required) - * @return ApiResponse<UpdateResourceEvaluationFiltersResponse> + * @return ApiResponse<DueDateRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * + * + * + * * *
Response details
Status Code Description Response Headers
201 OK -
200 Successfully updated the due date rule -
400 Bad Request -
403 Not Authorized -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
429 Too many requests -
*/ - public ApiResponse - updateResourceEvaluationFiltersWithHttpInfo(UpdateResourceEvaluationFiltersRequest body) - throws ApiException { + public ApiResponse updateSecurityFindingsAutomationDueDateRuleWithHttpInfo( + UUID ruleId, DueDateRuleUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateSecurityFindingsAutomationDueDateRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = body; + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'ruleId' when calling" + + " updateSecurityFindingsAutomationDueDateRule"); + } + // verify the required parameter 'body' is set if (body == null) { throw new ApiException( 400, - "Missing the required parameter 'body' when calling updateResourceEvaluationFilters"); + "Missing the required parameter 'body' when calling" + + " updateSecurityFindingsAutomationDueDateRule"); } // create path and map variables - String localVarPath = "/api/v2/cloud_security_management/resource_filters"; + String localVarPath = + "/api/v2/security/findings/automation/due_date_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateResourceEvaluationFilters", + "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationDueDateRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -29647,35 +31754,58 @@ public UpdateResourceEvaluationFiltersResponse updateResourceEvaluationFilters( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update resource filters. + * Update a due date rule. * - *

See {@link #updateResourceEvaluationFiltersWithHttpInfo}. + *

See {@link #updateSecurityFindingsAutomationDueDateRuleWithHttpInfo}. * + * @param ruleId The ID of the due date rule. (required) * @param body (required) - * @return CompletableFuture<ApiResponse<UpdateResourceEvaluationFiltersResponse>> + * @return CompletableFuture<ApiResponse<DueDateRuleResponse>> */ - public CompletableFuture> - updateResourceEvaluationFiltersWithHttpInfoAsync( - UpdateResourceEvaluationFiltersRequest body) { + public CompletableFuture> + updateSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync( + UUID ruleId, DueDateRuleUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateSecurityFindingsAutomationDueDateRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = body; + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'ruleId' when calling" + + " updateSecurityFindingsAutomationDueDateRule")); + return result; + } + // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling" - + " updateResourceEvaluationFilters")); + + " updateSecurityFindingsAutomationDueDateRule")); return result; } // create path and map variables - String localVarPath = "/api/v2/cloud_security_management/resource_filters"; + String localVarPath = + "/api/v2/security/findings/automation/due_date_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -29683,7 +31813,7 @@ public UpdateResourceEvaluationFiltersResponse updateResourceEvaluationFilters( try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateResourceEvaluationFilters", + "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationDueDateRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -29691,8 +31821,7 @@ public UpdateResourceEvaluationFiltersResponse updateResourceEvaluationFilters( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -29704,36 +31833,36 @@ public UpdateResourceEvaluationFiltersResponse updateResourceEvaluationFilters( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update a security filter. + * Update an inbox rule. * - *

See {@link #updateSecurityFilterWithHttpInfo}. + *

See {@link #updateSecurityFindingsAutomationInboxRuleWithHttpInfo}. * - * @param securityFilterId The ID of the security filter. (required) - * @param body New definition of the security filter. (required) - * @return SecurityFilterResponse + * @param ruleId The ID of the inbox rule. (required) + * @param body (required) + * @return InboxRuleResponse * @throws ApiException if fails to make API call */ - public SecurityFilterResponse updateSecurityFilter( - String securityFilterId, SecurityFilterUpdateRequest body) throws ApiException { - return updateSecurityFilterWithHttpInfo(securityFilterId, body).getData(); + public InboxRuleResponse updateSecurityFindingsAutomationInboxRule( + UUID ruleId, InboxRuleUpdateRequest body) throws ApiException { + return updateSecurityFindingsAutomationInboxRuleWithHttpInfo(ruleId, body).getData(); } /** - * Update a security filter. + * Update an inbox rule. * - *

See {@link #updateSecurityFilterWithHttpInfoAsync}. + *

See {@link #updateSecurityFindingsAutomationInboxRuleWithHttpInfoAsync}. * - * @param securityFilterId The ID of the security filter. (required) - * @param body New definition of the security filter. (required) - * @return CompletableFuture<SecurityFilterResponse> + * @param ruleId The ID of the inbox rule. (required) + * @param body (required) + * @return CompletableFuture<InboxRuleResponse> */ - public CompletableFuture updateSecurityFilterAsync( - String securityFilterId, SecurityFilterUpdateRequest body) { - return updateSecurityFilterWithHttpInfoAsync(securityFilterId, body) + public CompletableFuture updateSecurityFindingsAutomationInboxRuleAsync( + UUID ruleId, InboxRuleUpdateRequest body) { + return updateSecurityFindingsAutomationInboxRuleWithHttpInfoAsync(ruleId, body) .thenApply( response -> { return response.getData(); @@ -29741,53 +31870,60 @@ public CompletableFuture updateSecurityFilterAsync( } /** - * Update a specific security filter. Returns the security filter object when the request is - * successful. + * Update an inbox rule by ID. * - * @param securityFilterId The ID of the security filter. (required) - * @param body New definition of the security filter. (required) - * @return ApiResponse<SecurityFilterResponse> + * @param ruleId The ID of the inbox rule. (required) + * @param body (required) + * @return ApiResponse<InboxRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * + * * - * + * * *
Response details
Status Code Description Response Headers
200 OK -
200 Successfully updated the inbox rule -
400 Bad Request -
403 Not Authorized -
403 Forbidden -
404 Not Found -
409 Concurrent Modification -
422 Unprocessable Entity -
429 Too many requests -
*/ - public ApiResponse updateSecurityFilterWithHttpInfo( - String securityFilterId, SecurityFilterUpdateRequest body) throws ApiException { + public ApiResponse updateSecurityFindingsAutomationInboxRuleWithHttpInfo( + UUID ruleId, InboxRuleUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateSecurityFindingsAutomationInboxRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = body; - // verify the required parameter 'securityFilterId' is set - if (securityFilterId == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( 400, - "Missing the required parameter 'securityFilterId' when calling updateSecurityFilter"); + "Missing the required parameter 'ruleId' when calling" + + " updateSecurityFindingsAutomationInboxRule"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateSecurityFilter"); + 400, + "Missing the required parameter 'body' when calling" + + " updateSecurityFindingsAutomationInboxRule"); } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" - .replaceAll( - "\\{" + "security_filter_id" + "\\}", - apiClient.escapeString(securityFilterId.toString())); + "/api/v2/security/findings/automation/inbox_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityFilter", + "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationInboxRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -29795,55 +31931,65 @@ public ApiResponse updateSecurityFilterWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "PATCH", + "PUT", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update a security filter. + * Update an inbox rule. * - *

See {@link #updateSecurityFilterWithHttpInfo}. + *

See {@link #updateSecurityFindingsAutomationInboxRuleWithHttpInfo}. * - * @param securityFilterId The ID of the security filter. (required) - * @param body New definition of the security filter. (required) - * @return CompletableFuture<ApiResponse<SecurityFilterResponse>> + * @param ruleId The ID of the inbox rule. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<InboxRuleResponse>> */ - public CompletableFuture> - updateSecurityFilterWithHttpInfoAsync( - String securityFilterId, SecurityFilterUpdateRequest body) { + public CompletableFuture> + updateSecurityFindingsAutomationInboxRuleWithHttpInfoAsync( + UUID ruleId, InboxRuleUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateSecurityFindingsAutomationInboxRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = body; - // verify the required parameter 'securityFilterId' is set - if (securityFilterId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'securityFilterId' when calling" - + " updateSecurityFilter")); + "Missing the required parameter 'ruleId' when calling" + + " updateSecurityFindingsAutomationInboxRule")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling updateSecurityFilter")); + 400, + "Missing the required parameter 'body' when calling" + + " updateSecurityFindingsAutomationInboxRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}" - .replaceAll( - "\\{" + "security_filter_id" + "\\}", - apiClient.escapeString(securityFilterId.toString())); + "/api/v2/security/findings/automation/inbox_rules/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -29851,7 +31997,7 @@ public ApiResponse updateSecurityFilterWithHttpInfo( try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityFilter", + "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationInboxRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -29859,48 +32005,48 @@ public ApiResponse updateSecurityFilterWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PATCH", + "PUT", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update a due date rule. + * Update a mute rule. * - *

See {@link #updateSecurityFindingsAutomationDueDateRuleWithHttpInfo}. + *

See {@link #updateSecurityFindingsAutomationMuteRuleWithHttpInfo}. * - * @param ruleId The ID of the due date rule. (required) + * @param ruleId The ID of the mute rule. (required) * @param body (required) - * @return DueDateRuleResponse + * @return MuteRuleResponse * @throws ApiException if fails to make API call */ - public DueDateRuleResponse updateSecurityFindingsAutomationDueDateRule( - UUID ruleId, DueDateRuleUpdateRequest body) throws ApiException { - return updateSecurityFindingsAutomationDueDateRuleWithHttpInfo(ruleId, body).getData(); + public MuteRuleResponse updateSecurityFindingsAutomationMuteRule( + UUID ruleId, MuteRuleUpdateRequest body) throws ApiException { + return updateSecurityFindingsAutomationMuteRuleWithHttpInfo(ruleId, body).getData(); } /** - * Update a due date rule. + * Update a mute rule. * - *

See {@link #updateSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync}. + *

See {@link #updateSecurityFindingsAutomationMuteRuleWithHttpInfoAsync}. * - * @param ruleId The ID of the due date rule. (required) + * @param ruleId The ID of the mute rule. (required) * @param body (required) - * @return CompletableFuture<DueDateRuleResponse> + * @return CompletableFuture<MuteRuleResponse> */ - public CompletableFuture updateSecurityFindingsAutomationDueDateRuleAsync( - UUID ruleId, DueDateRuleUpdateRequest body) { - return updateSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync(ruleId, body) + public CompletableFuture updateSecurityFindingsAutomationMuteRuleAsync( + UUID ruleId, MuteRuleUpdateRequest body) { + return updateSecurityFindingsAutomationMuteRuleWithHttpInfoAsync(ruleId, body) .thenApply( response -> { return response.getData(); @@ -29908,17 +32054,17 @@ public CompletableFuture updateSecurityFindingsAutomationDu } /** - * Update a due date rule by ID. + * Update a mute rule by ID. * - * @param ruleId The ID of the due date rule. (required) + * @param ruleId The ID of the mute rule. (required) * @param body (required) - * @return ApiResponse<DueDateRuleResponse> + * @return ApiResponse<MuteRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -29926,10 +32072,10 @@ public CompletableFuture updateSecurityFindingsAutomationDu * *
Response details
Status Code Description Response Headers
200 Successfully updated the due date rule -
200 Successfully updated the mute rule -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse updateSecurityFindingsAutomationDueDateRuleWithHttpInfo( - UUID ruleId, DueDateRuleUpdateRequest body) throws ApiException { + public ApiResponse updateSecurityFindingsAutomationMuteRuleWithHttpInfo( + UUID ruleId, MuteRuleUpdateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateSecurityFindingsAutomationDueDateRule"; + String operationId = "updateSecurityFindingsAutomationMuteRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -29942,7 +32088,7 @@ public ApiResponse updateSecurityFindingsAutomationDueDateR throw new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " updateSecurityFindingsAutomationDueDateRule"); + + " updateSecurityFindingsAutomationMuteRule"); } // verify the required parameter 'body' is set @@ -29950,18 +32096,18 @@ public ApiResponse updateSecurityFindingsAutomationDueDateR throw new ApiException( 400, "Missing the required parameter 'body' when calling" - + " updateSecurityFindingsAutomationDueDateRule"); + + " updateSecurityFindingsAutomationMuteRule"); } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/due_date_rules/{rule_id}" + "/api/v2/security/findings/automation/mute_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationDueDateRule", + "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationMuteRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -29976,27 +32122,27 @@ public ApiResponse updateSecurityFindingsAutomationDueDateR localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update a due date rule. + * Update a mute rule. * - *

See {@link #updateSecurityFindingsAutomationDueDateRuleWithHttpInfo}. + *

See {@link #updateSecurityFindingsAutomationMuteRuleWithHttpInfo}. * - * @param ruleId The ID of the due date rule. (required) + * @param ruleId The ID of the mute rule. (required) * @param body (required) - * @return CompletableFuture<ApiResponse<DueDateRuleResponse>> + * @return CompletableFuture<ApiResponse<MuteRuleResponse>> */ - public CompletableFuture> - updateSecurityFindingsAutomationDueDateRuleWithHttpInfoAsync( - UUID ruleId, DueDateRuleUpdateRequest body) { + public CompletableFuture> + updateSecurityFindingsAutomationMuteRuleWithHttpInfoAsync( + UUID ruleId, MuteRuleUpdateRequest body) { // Check if unstable operation is enabled - String operationId = "updateSecurityFindingsAutomationDueDateRule"; + String operationId = "updateSecurityFindingsAutomationMuteRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -30005,28 +32151,28 @@ public ApiResponse updateSecurityFindingsAutomationDueDateR // verify the required parameter 'ruleId' is set if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " updateSecurityFindingsAutomationDueDateRule")); + + " updateSecurityFindingsAutomationMuteRule")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling" - + " updateSecurityFindingsAutomationDueDateRule")); + + " updateSecurityFindingsAutomationMuteRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/due_date_rules/{rule_id}" + "/api/v2/security/findings/automation/mute_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -30035,7 +32181,7 @@ public ApiResponse updateSecurityFindingsAutomationDueDateR try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationDueDateRule", + "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationMuteRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -30043,7 +32189,7 @@ public ApiResponse updateSecurityFindingsAutomationDueDateR new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -30055,36 +32201,37 @@ public ApiResponse updateSecurityFindingsAutomationDueDateR localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an inbox rule. + * Update a severity modifier rule. * - *

See {@link #updateSecurityFindingsAutomationInboxRuleWithHttpInfo}. + *

See {@link #updateSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo}. * - * @param ruleId The ID of the inbox rule. (required) + * @param ruleId The ID of the severity modifier rule. (required) * @param body (required) - * @return InboxRuleResponse + * @return SeverityModifierRuleResponse * @throws ApiException if fails to make API call */ - public InboxRuleResponse updateSecurityFindingsAutomationInboxRule( - UUID ruleId, InboxRuleUpdateRequest body) throws ApiException { - return updateSecurityFindingsAutomationInboxRuleWithHttpInfo(ruleId, body).getData(); + public SeverityModifierRuleResponse updateSecurityFindingsAutomationSeverityModifierRule( + UUID ruleId, SeverityModifierRuleUpdateRequest body) throws ApiException { + return updateSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo(ruleId, body).getData(); } /** - * Update an inbox rule. + * Update a severity modifier rule. * - *

See {@link #updateSecurityFindingsAutomationInboxRuleWithHttpInfoAsync}. + *

See {@link #updateSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync}. * - * @param ruleId The ID of the inbox rule. (required) + * @param ruleId The ID of the severity modifier rule. (required) * @param body (required) - * @return CompletableFuture<InboxRuleResponse> + * @return CompletableFuture<SeverityModifierRuleResponse> */ - public CompletableFuture updateSecurityFindingsAutomationInboxRuleAsync( - UUID ruleId, InboxRuleUpdateRequest body) { - return updateSecurityFindingsAutomationInboxRuleWithHttpInfoAsync(ruleId, body) + public CompletableFuture + updateSecurityFindingsAutomationSeverityModifierRuleAsync( + UUID ruleId, SeverityModifierRuleUpdateRequest body) { + return updateSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync(ruleId, body) .thenApply( response -> { return response.getData(); @@ -30092,17 +32239,17 @@ public CompletableFuture updateSecurityFindingsAutomationInbo } /** - * Update an inbox rule by ID. + * Update a severity modifier rule by ID. * - * @param ruleId The ID of the inbox rule. (required) + * @param ruleId The ID of the severity modifier rule. (required) * @param body (required) - * @return ApiResponse<InboxRuleResponse> + * @return ApiResponse<SeverityModifierRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -30110,10 +32257,11 @@ public CompletableFuture updateSecurityFindingsAutomationInbo * *
Response details
Status Code Description Response Headers
200 Successfully updated the inbox rule -
200 Successfully updated the severity modifier rule -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse updateSecurityFindingsAutomationInboxRuleWithHttpInfo( - UUID ruleId, InboxRuleUpdateRequest body) throws ApiException { + public ApiResponse + updateSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo( + UUID ruleId, SeverityModifierRuleUpdateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateSecurityFindingsAutomationInboxRule"; + String operationId = "updateSecurityFindingsAutomationSeverityModifierRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -30126,7 +32274,7 @@ public ApiResponse updateSecurityFindingsAutomationInboxRuleW throw new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " updateSecurityFindingsAutomationInboxRule"); + + " updateSecurityFindingsAutomationSeverityModifierRule"); } // verify the required parameter 'body' is set @@ -30134,18 +32282,18 @@ public ApiResponse updateSecurityFindingsAutomationInboxRuleW throw new ApiException( 400, "Missing the required parameter 'body' when calling" - + " updateSecurityFindingsAutomationInboxRule"); + + " updateSecurityFindingsAutomationSeverityModifierRule"); } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/inbox_rules/{rule_id}" + "/api/v2/security/findings/automation/severity_modifier_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationInboxRule", + "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationSeverityModifierRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -30160,27 +32308,28 @@ public ApiResponse updateSecurityFindingsAutomationInboxRuleW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an inbox rule. + * Update a severity modifier rule. * - *

See {@link #updateSecurityFindingsAutomationInboxRuleWithHttpInfo}. + *

See {@link #updateSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo}. * - * @param ruleId The ID of the inbox rule. (required) + * @param ruleId The ID of the severity modifier rule. (required) * @param body (required) - * @return CompletableFuture<ApiResponse<InboxRuleResponse>> + * @return CompletableFuture<ApiResponse<SeverityModifierRuleResponse>> */ - public CompletableFuture> - updateSecurityFindingsAutomationInboxRuleWithHttpInfoAsync( - UUID ruleId, InboxRuleUpdateRequest body) { + public CompletableFuture> + updateSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync( + UUID ruleId, SeverityModifierRuleUpdateRequest body) { // Check if unstable operation is enabled - String operationId = "updateSecurityFindingsAutomationInboxRule"; + String operationId = "updateSecurityFindingsAutomationSeverityModifierRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -30189,28 +32338,30 @@ public ApiResponse updateSecurityFindingsAutomationInboxRuleW // verify the required parameter 'ruleId' is set if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " updateSecurityFindingsAutomationInboxRule")); + + " updateSecurityFindingsAutomationSeverityModifierRule")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling" - + " updateSecurityFindingsAutomationInboxRule")); + + " updateSecurityFindingsAutomationSeverityModifierRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/inbox_rules/{rule_id}" + "/api/v2/security/findings/automation/severity_modifier_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -30219,7 +32370,7 @@ public ApiResponse updateSecurityFindingsAutomationInboxRuleW try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationInboxRule", + "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationSeverityModifierRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -30227,7 +32378,8 @@ public ApiResponse updateSecurityFindingsAutomationInboxRuleW new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -30239,36 +32391,37 @@ public ApiResponse updateSecurityFindingsAutomationInboxRuleW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update a mute rule. + * Update a ticket creation rule. * - *

See {@link #updateSecurityFindingsAutomationMuteRuleWithHttpInfo}. + *

See {@link #updateSecurityFindingsAutomationTicketCreationRuleWithHttpInfo}. * - * @param ruleId The ID of the mute rule. (required) + * @param ruleId The ID of the ticket creation rule. (required) * @param body (required) - * @return MuteRuleResponse + * @return TicketCreationRuleResponse * @throws ApiException if fails to make API call */ - public MuteRuleResponse updateSecurityFindingsAutomationMuteRule( - UUID ruleId, MuteRuleUpdateRequest body) throws ApiException { - return updateSecurityFindingsAutomationMuteRuleWithHttpInfo(ruleId, body).getData(); + public TicketCreationRuleResponse updateSecurityFindingsAutomationTicketCreationRule( + UUID ruleId, TicketCreationRuleUpdateRequest body) throws ApiException { + return updateSecurityFindingsAutomationTicketCreationRuleWithHttpInfo(ruleId, body).getData(); } /** - * Update a mute rule. + * Update a ticket creation rule. * - *

See {@link #updateSecurityFindingsAutomationMuteRuleWithHttpInfoAsync}. + *

See {@link #updateSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync}. * - * @param ruleId The ID of the mute rule. (required) + * @param ruleId The ID of the ticket creation rule. (required) * @param body (required) - * @return CompletableFuture<MuteRuleResponse> + * @return CompletableFuture<TicketCreationRuleResponse> */ - public CompletableFuture updateSecurityFindingsAutomationMuteRuleAsync( - UUID ruleId, MuteRuleUpdateRequest body) { - return updateSecurityFindingsAutomationMuteRuleWithHttpInfoAsync(ruleId, body) + public CompletableFuture + updateSecurityFindingsAutomationTicketCreationRuleAsync( + UUID ruleId, TicketCreationRuleUpdateRequest body) { + return updateSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync(ruleId, body) .thenApply( response -> { return response.getData(); @@ -30276,17 +32429,17 @@ public CompletableFuture updateSecurityFindingsAutomationMuteR } /** - * Update a mute rule by ID. + * Update a ticket creation rule by ID. * - * @param ruleId The ID of the mute rule. (required) + * @param ruleId The ID of the ticket creation rule. (required) * @param body (required) - * @return ApiResponse<MuteRuleResponse> + * @return ApiResponse<TicketCreationRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * @@ -30294,10 +32447,11 @@ public CompletableFuture updateSecurityFindingsAutomationMuteR * *
Response details
Status Code Description Response Headers
200 Successfully updated the mute rule -
200 Successfully updated the ticket creation rule -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse updateSecurityFindingsAutomationMuteRuleWithHttpInfo( - UUID ruleId, MuteRuleUpdateRequest body) throws ApiException { + public ApiResponse + updateSecurityFindingsAutomationTicketCreationRuleWithHttpInfo( + UUID ruleId, TicketCreationRuleUpdateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateSecurityFindingsAutomationMuteRule"; + String operationId = "updateSecurityFindingsAutomationTicketCreationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -30310,7 +32464,7 @@ public ApiResponse updateSecurityFindingsAutomationMuteRuleWit throw new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " updateSecurityFindingsAutomationMuteRule"); + + " updateSecurityFindingsAutomationTicketCreationRule"); } // verify the required parameter 'body' is set @@ -30318,18 +32472,18 @@ public ApiResponse updateSecurityFindingsAutomationMuteRuleWit throw new ApiException( 400, "Missing the required parameter 'body' when calling" - + " updateSecurityFindingsAutomationMuteRule"); + + " updateSecurityFindingsAutomationTicketCreationRule"); } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/mute_rules/{rule_id}" + "/api/v2/security/findings/automation/ticket_creation_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationMuteRule", + "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationTicketCreationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -30344,27 +32498,27 @@ public ApiResponse updateSecurityFindingsAutomationMuteRuleWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update a mute rule. + * Update a ticket creation rule. * - *

See {@link #updateSecurityFindingsAutomationMuteRuleWithHttpInfo}. + *

See {@link #updateSecurityFindingsAutomationTicketCreationRuleWithHttpInfo}. * - * @param ruleId The ID of the mute rule. (required) + * @param ruleId The ID of the ticket creation rule. (required) * @param body (required) - * @return CompletableFuture<ApiResponse<MuteRuleResponse>> + * @return CompletableFuture<ApiResponse<TicketCreationRuleResponse>> */ - public CompletableFuture> - updateSecurityFindingsAutomationMuteRuleWithHttpInfoAsync( - UUID ruleId, MuteRuleUpdateRequest body) { + public CompletableFuture> + updateSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync( + UUID ruleId, TicketCreationRuleUpdateRequest body) { // Check if unstable operation is enabled - String operationId = "updateSecurityFindingsAutomationMuteRule"; + String operationId = "updateSecurityFindingsAutomationTicketCreationRule"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -30373,28 +32527,28 @@ public ApiResponse updateSecurityFindingsAutomationMuteRuleWit // verify the required parameter 'ruleId' is set if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'ruleId' when calling" - + " updateSecurityFindingsAutomationMuteRule")); + + " updateSecurityFindingsAutomationTicketCreationRule")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling" - + " updateSecurityFindingsAutomationMuteRule")); + + " updateSecurityFindingsAutomationTicketCreationRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/mute_rules/{rule_id}" + "/api/v2/security/findings/automation/ticket_creation_rules/{rule_id}" .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -30403,7 +32557,7 @@ public ApiResponse updateSecurityFindingsAutomationMuteRuleWit try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationMuteRule", + "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationTicketCreationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -30411,7 +32565,7 @@ public ApiResponse updateSecurityFindingsAutomationMuteRuleWit new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -30423,37 +32577,37 @@ public ApiResponse updateSecurityFindingsAutomationMuteRuleWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update a severity modifier rule. + * Update a batch migration. * - *

See {@link #updateSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo}. + *

See {@link #updateSecurityMonitoringBatchMigrationWithHttpInfo}. * - * @param ruleId The ID of the severity modifier rule. (required) + * @param batchId The UUID of the batch migration. (required) * @param body (required) - * @return SeverityModifierRuleResponse + * @return SecurityMonitoringBatchMigrationResponse * @throws ApiException if fails to make API call */ - public SeverityModifierRuleResponse updateSecurityFindingsAutomationSeverityModifierRule( - UUID ruleId, SeverityModifierRuleUpdateRequest body) throws ApiException { - return updateSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo(ruleId, body).getData(); + public SecurityMonitoringBatchMigrationResponse updateSecurityMonitoringBatchMigration( + UUID batchId, SecurityMonitoringBatchMigrationUpdateRequest body) throws ApiException { + return updateSecurityMonitoringBatchMigrationWithHttpInfo(batchId, body).getData(); } /** - * Update a severity modifier rule. + * Update a batch migration. * - *

See {@link #updateSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync}. + *

See {@link #updateSecurityMonitoringBatchMigrationWithHttpInfoAsync}. * - * @param ruleId The ID of the severity modifier rule. (required) + * @param batchId The UUID of the batch migration. (required) * @param body (required) - * @return CompletableFuture<SeverityModifierRuleResponse> + * @return CompletableFuture<SecurityMonitoringBatchMigrationResponse> */ - public CompletableFuture - updateSecurityFindingsAutomationSeverityModifierRuleAsync( - UUID ruleId, SeverityModifierRuleUpdateRequest body) { - return updateSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync(ruleId, body) + public CompletableFuture + updateSecurityMonitoringBatchMigrationAsync( + UUID batchId, SecurityMonitoringBatchMigrationUpdateRequest body) { + return updateSecurityMonitoringBatchMigrationWithHttpInfoAsync(batchId, body) .thenApply( response -> { return response.getData(); @@ -30461,29 +32615,31 @@ public SeverityModifierRuleResponse updateSecurityFindingsAutomationSeverityModi } /** - * Update a severity modifier rule by ID. + * Update the name, description, or tags of a batch migration, in any status. At least one of + * these attributes must be provided. Omitted attributes are left unchanged, and tags + * replaces the full list of tags. * - * @param ruleId The ID of the severity modifier rule. (required) + * @param batchId The UUID of the batch migration. (required) * @param body (required) - * @return ApiResponse<SeverityModifierRuleResponse> + * @return ApiResponse<SecurityMonitoringBatchMigrationResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * + * * * - * * *
Response details
Status Code Description Response Headers
200 Successfully updated the severity modifier rule -
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
429 Too many requests -
*/ - public ApiResponse - updateSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo( - UUID ruleId, SeverityModifierRuleUpdateRequest body) throws ApiException { + public ApiResponse + updateSecurityMonitoringBatchMigrationWithHttpInfo( + UUID batchId, SecurityMonitoringBatchMigrationUpdateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateSecurityFindingsAutomationSeverityModifierRule"; + String operationId = "updateSecurityMonitoringBatchMigration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -30491,12 +32647,12 @@ public SeverityModifierRuleResponse updateSecurityFindingsAutomationSeverityModi } Object localVarPostBody = body; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'batchId' is set + if (batchId == null) { throw new ApiException( 400, - "Missing the required parameter 'ruleId' when calling" - + " updateSecurityFindingsAutomationSeverityModifierRule"); + "Missing the required parameter 'batchId' when calling" + + " updateSecurityMonitoringBatchMigration"); } // verify the required parameter 'body' is set @@ -30504,18 +32660,18 @@ public SeverityModifierRuleResponse updateSecurityFindingsAutomationSeverityModi throw new ApiException( 400, "Missing the required parameter 'body' when calling" - + " updateSecurityFindingsAutomationSeverityModifierRule"); + + " updateSecurityMonitoringBatchMigration"); } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/severity_modifier_rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/batch-migrations/{batch_id}" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationSeverityModifierRule", + "v2.SecurityMonitoringApi.updateSecurityMonitoringBatchMigration", localVarPath, new ArrayList(), localVarHeaderParams, @@ -30523,34 +32679,34 @@ public SeverityModifierRuleResponse updateSecurityFindingsAutomationSeverityModi new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "PUT", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update a severity modifier rule. + * Update a batch migration. * - *

See {@link #updateSecurityFindingsAutomationSeverityModifierRuleWithHttpInfo}. + *

See {@link #updateSecurityMonitoringBatchMigrationWithHttpInfo}. * - * @param ruleId The ID of the severity modifier rule. (required) + * @param batchId The UUID of the batch migration. (required) * @param body (required) - * @return CompletableFuture<ApiResponse<SeverityModifierRuleResponse>> + * @return CompletableFuture<ApiResponse<SecurityMonitoringBatchMigrationResponse>> */ - public CompletableFuture> - updateSecurityFindingsAutomationSeverityModifierRuleWithHttpInfoAsync( - UUID ruleId, SeverityModifierRuleUpdateRequest body) { + public CompletableFuture> + updateSecurityMonitoringBatchMigrationWithHttpInfoAsync( + UUID batchId, SecurityMonitoringBatchMigrationUpdateRequest body) { // Check if unstable operation is enabled - String operationId = "updateSecurityFindingsAutomationSeverityModifierRule"; + String operationId = "updateSecurityMonitoringBatchMigration"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -30558,33 +32714,33 @@ public SeverityModifierRuleResponse updateSecurityFindingsAutomationSeverityModi } Object localVarPostBody = body; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = + // verify the required parameter 'batchId' is set + if (batchId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'ruleId' when calling" - + " updateSecurityFindingsAutomationSeverityModifierRule")); + "Missing the required parameter 'batchId' when calling" + + " updateSecurityMonitoringBatchMigration")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling" - + " updateSecurityFindingsAutomationSeverityModifierRule")); + + " updateSecurityMonitoringBatchMigration")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/severity_modifier_rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/batch-migrations/{batch_id}" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())); Map localVarHeaderParams = new HashMap(); @@ -30592,7 +32748,7 @@ public SeverityModifierRuleResponse updateSecurityFindingsAutomationSeverityModi try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationSeverityModifierRule", + "v2.SecurityMonitoringApi.updateSecurityMonitoringBatchMigration", localVarPath, new ArrayList(), localVarHeaderParams, @@ -30600,50 +32756,58 @@ public SeverityModifierRuleResponse updateSecurityFindingsAutomationSeverityModi new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PUT", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update a ticket creation rule. + * Update a batch migration resource. * - *

See {@link #updateSecurityFindingsAutomationTicketCreationRuleWithHttpInfo}. + *

See {@link #updateSecurityMonitoringBatchMigrationResourceWithHttpInfo}. * - * @param ruleId The ID of the ticket creation rule. (required) + * @param batchId The UUID of the batch migration. (required) + * @param resourceId The UUID of the batch migration resource. (required) * @param body (required) - * @return TicketCreationRuleResponse + * @return SecurityMonitoringBatchMigrationResourceResponse * @throws ApiException if fails to make API call */ - public TicketCreationRuleResponse updateSecurityFindingsAutomationTicketCreationRule( - UUID ruleId, TicketCreationRuleUpdateRequest body) throws ApiException { - return updateSecurityFindingsAutomationTicketCreationRuleWithHttpInfo(ruleId, body).getData(); + public SecurityMonitoringBatchMigrationResourceResponse + updateSecurityMonitoringBatchMigrationResource( + UUID batchId, UUID resourceId, SecurityMonitoringBatchMigrationResourceUpdateRequest body) + throws ApiException { + return updateSecurityMonitoringBatchMigrationResourceWithHttpInfo(batchId, resourceId, body) + .getData(); } /** - * Update a ticket creation rule. + * Update a batch migration resource. * - *

See {@link #updateSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync}. + *

See {@link #updateSecurityMonitoringBatchMigrationResourceWithHttpInfoAsync}. * - * @param ruleId The ID of the ticket creation rule. (required) + * @param batchId The UUID of the batch migration. (required) + * @param resourceId The UUID of the batch migration resource. (required) * @param body (required) - * @return CompletableFuture<TicketCreationRuleResponse> - */ - public CompletableFuture - updateSecurityFindingsAutomationTicketCreationRuleAsync( - UUID ruleId, TicketCreationRuleUpdateRequest body) { - return updateSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync(ruleId, body) + * @return CompletableFuture<SecurityMonitoringBatchMigrationResourceResponse> + */ + public CompletableFuture + updateSecurityMonitoringBatchMigrationResourceAsync( + UUID batchId, + UUID resourceId, + SecurityMonitoringBatchMigrationResourceUpdateRequest body) { + return updateSecurityMonitoringBatchMigrationResourceWithHttpInfoAsync( + batchId, resourceId, body) .thenApply( response -> { return response.getData(); @@ -30651,29 +32815,36 @@ public TicketCreationRuleResponse updateSecurityFindingsAutomationTicketCreation } /** - * Update a ticket creation rule by ID. + * Update a resource of a batch migration. At least one of name, description + * , inputType, or input must be provided. name and + * description can be updated at any time. inputType and input + * can only be updated while the resource is pending; otherwise, the request + * returns 409 Conflict. The translated output cannot be edited. * - * @param ruleId The ID of the ticket creation rule. (required) + * @param batchId The UUID of the batch migration. (required) + * @param resourceId The UUID of the batch migration resource. (required) * @param body (required) - * @return ApiResponse<TicketCreationRuleResponse> + * @return ApiResponse<SecurityMonitoringBatchMigrationResourceResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * + * * * - * + * * *
Response details
Status Code Description Response Headers
200 Successfully updated the ticket creation rule -
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
409 Conflict -
429 Too many requests -
*/ - public ApiResponse - updateSecurityFindingsAutomationTicketCreationRuleWithHttpInfo( - UUID ruleId, TicketCreationRuleUpdateRequest body) throws ApiException { + public ApiResponse + updateSecurityMonitoringBatchMigrationResourceWithHttpInfo( + UUID batchId, UUID resourceId, SecurityMonitoringBatchMigrationResourceUpdateRequest body) + throws ApiException { // Check if unstable operation is enabled - String operationId = "updateSecurityFindingsAutomationTicketCreationRule"; + String operationId = "updateSecurityMonitoringBatchMigrationResource"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -30681,12 +32852,20 @@ public TicketCreationRuleResponse updateSecurityFindingsAutomationTicketCreation } Object localVarPostBody = body; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'batchId' is set + if (batchId == null) { throw new ApiException( 400, - "Missing the required parameter 'ruleId' when calling" - + " updateSecurityFindingsAutomationTicketCreationRule"); + "Missing the required parameter 'batchId' when calling" + + " updateSecurityMonitoringBatchMigrationResource"); + } + + // verify the required parameter 'resourceId' is set + if (resourceId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'resourceId' when calling" + + " updateSecurityMonitoringBatchMigrationResource"); } // verify the required parameter 'body' is set @@ -30694,18 +32873,20 @@ public TicketCreationRuleResponse updateSecurityFindingsAutomationTicketCreation throw new ApiException( 400, "Missing the required parameter 'body' when calling" - + " updateSecurityFindingsAutomationTicketCreationRule"); + + " updateSecurityMonitoringBatchMigrationResource"); } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/ticket_creation_rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/batch-migrations/{batch_id}/resources/{resource_id}" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())) + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationTicketCreationRule", + "v2.SecurityMonitoringApi.updateSecurityMonitoringBatchMigrationResource", localVarPath, new ArrayList(), localVarHeaderParams, @@ -30713,65 +32894,86 @@ public TicketCreationRuleResponse updateSecurityFindingsAutomationTicketCreation new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "PUT", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update a ticket creation rule. + * Update a batch migration resource. * - *

See {@link #updateSecurityFindingsAutomationTicketCreationRuleWithHttpInfo}. + *

See {@link #updateSecurityMonitoringBatchMigrationResourceWithHttpInfo}. * - * @param ruleId The ID of the ticket creation rule. (required) + * @param batchId The UUID of the batch migration. (required) + * @param resourceId The UUID of the batch migration resource. (required) * @param body (required) - * @return CompletableFuture<ApiResponse<TicketCreationRuleResponse>> + * @return + * CompletableFuture<ApiResponse<SecurityMonitoringBatchMigrationResourceResponse>> */ - public CompletableFuture> - updateSecurityFindingsAutomationTicketCreationRuleWithHttpInfoAsync( - UUID ruleId, TicketCreationRuleUpdateRequest body) { + public CompletableFuture> + updateSecurityMonitoringBatchMigrationResourceWithHttpInfoAsync( + UUID batchId, + UUID resourceId, + SecurityMonitoringBatchMigrationResourceUpdateRequest body) { // Check if unstable operation is enabled - String operationId = "updateSecurityFindingsAutomationTicketCreationRule"; + String operationId = "updateSecurityMonitoringBatchMigrationResource"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'batchId' is set + if (batchId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'ruleId' when calling" - + " updateSecurityFindingsAutomationTicketCreationRule")); + "Missing the required parameter 'batchId' when calling" + + " updateSecurityMonitoringBatchMigrationResource")); + return result; + } + + // verify the required parameter 'resourceId' is set + if (resourceId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'resourceId' when calling" + + " updateSecurityMonitoringBatchMigrationResource")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling" - + " updateSecurityFindingsAutomationTicketCreationRule")); + + " updateSecurityMonitoringBatchMigrationResource")); return result; } // create path and map variables String localVarPath = - "/api/v2/security/findings/automation/ticket_creation_rules/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/security_monitoring/batch-migrations/{batch_id}/resources/{resource_id}" + .replaceAll("\\{" + "batch_id" + "\\}", apiClient.escapeString(batchId.toString())) + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); Map localVarHeaderParams = new HashMap(); @@ -30779,7 +32981,7 @@ public TicketCreationRuleResponse updateSecurityFindingsAutomationTicketCreation try { builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationTicketCreationRule", + "v2.SecurityMonitoringApi.updateSecurityMonitoringBatchMigrationResource", localVarPath, new ArrayList(), localVarHeaderParams, @@ -30787,19 +32989,20 @@ public TicketCreationRuleResponse updateSecurityFindingsAutomationTicketCreation new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PUT", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationAttributes.java new file mode 100644 index 00000000000..e26e7bf2f23 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationAttributes.java @@ -0,0 +1,479 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a batch migration. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationAttributes.JSON_PROPERTY_CREATED_AT, + SecurityMonitoringBatchMigrationAttributes.JSON_PROPERTY_CREATED_BY, + SecurityMonitoringBatchMigrationAttributes.JSON_PROPERTY_DESCRIPTION, + SecurityMonitoringBatchMigrationAttributes.JSON_PROPERTY_INPUT_SOURCE, + SecurityMonitoringBatchMigrationAttributes.JSON_PROPERTY_LAST_UPDATED_AT, + SecurityMonitoringBatchMigrationAttributes.JSON_PROPERTY_LAST_UPDATED_BY, + SecurityMonitoringBatchMigrationAttributes.JSON_PROPERTY_NAME, + SecurityMonitoringBatchMigrationAttributes.JSON_PROPERTY_ORG_ID, + SecurityMonitoringBatchMigrationAttributes.JSON_PROPERTY_RESOURCE_STATUS_COUNTS, + SecurityMonitoringBatchMigrationAttributes.JSON_PROPERTY_STATUS, + SecurityMonitoringBatchMigrationAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY = "createdBy"; + private String createdBy; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_INPUT_SOURCE = "inputSource"; + private SecurityMonitoringBatchMigrationInputSource inputSource; + + public static final String JSON_PROPERTY_LAST_UPDATED_AT = "lastUpdatedAt"; + private OffsetDateTime lastUpdatedAt; + + public static final String JSON_PROPERTY_LAST_UPDATED_BY = "lastUpdatedBy"; + private String lastUpdatedBy; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ORG_ID = "orgId"; + private Long orgId; + + public static final String JSON_PROPERTY_RESOURCE_STATUS_COUNTS = "resourceStatusCounts"; + private SecurityMonitoringBatchMigrationResourceStatusCounts resourceStatusCounts; + + public static final String JSON_PROPERTY_STATUS = "status"; + private SecurityMonitoringBatchMigrationStatus status; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = new ArrayList<>(); + + public SecurityMonitoringBatchMigrationAttributes() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_INPUT_SOURCE) + SecurityMonitoringBatchMigrationInputSource inputSource, + @JsonProperty(required = true, value = JSON_PROPERTY_LAST_UPDATED_AT) + OffsetDateTime lastUpdatedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_ORG_ID) Long orgId, + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_STATUS_COUNTS) + SecurityMonitoringBatchMigrationResourceStatusCounts resourceStatusCounts, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + SecurityMonitoringBatchMigrationStatus status, + @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) List tags) { + this.createdAt = createdAt; + this.inputSource = inputSource; + this.unparsed |= !inputSource.isValid(); + this.lastUpdatedAt = lastUpdatedAt; + this.name = name; + this.orgId = orgId; + this.resourceStatusCounts = resourceStatusCounts; + this.unparsed |= resourceStatusCounts.unparsed; + this.status = status; + this.unparsed |= !status.isValid(); + this.tags = tags; + } + + public SecurityMonitoringBatchMigrationAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The creation date of the batch migration, in RFC 3339 format. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public SecurityMonitoringBatchMigrationAttributes createdBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * The UUID of the user or service account who created the batch migration. + * + * @return createdBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public SecurityMonitoringBatchMigrationAttributes description(String description) { + this.description = description; + return this; + } + + /** + * The description of the batch migration. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public SecurityMonitoringBatchMigrationAttributes inputSource( + SecurityMonitoringBatchMigrationInputSource inputSource) { + this.inputSource = inputSource; + this.unparsed |= !inputSource.isValid(); + return this; + } + + /** + * The origin of a batch migration. Always batch_migration for batch migrations + * created through this API. + * + * @return inputSource + */ + @JsonProperty(JSON_PROPERTY_INPUT_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationInputSource getInputSource() { + return inputSource; + } + + public void setInputSource(SecurityMonitoringBatchMigrationInputSource inputSource) { + if (!inputSource.isValid()) { + this.unparsed = true; + } + this.inputSource = inputSource; + } + + public SecurityMonitoringBatchMigrationAttributes lastUpdatedAt(OffsetDateTime lastUpdatedAt) { + this.lastUpdatedAt = lastUpdatedAt; + return this; + } + + /** + * The last update date of the batch migration, in RFC 3339 format. + * + * @return lastUpdatedAt + */ + @JsonProperty(JSON_PROPERTY_LAST_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getLastUpdatedAt() { + return lastUpdatedAt; + } + + public void setLastUpdatedAt(OffsetDateTime lastUpdatedAt) { + this.lastUpdatedAt = lastUpdatedAt; + } + + public SecurityMonitoringBatchMigrationAttributes lastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + return this; + } + + /** + * The UUID of the user or service account who last updated the batch migration, or the name of a + * system actor. + * + * @return lastUpdatedBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_UPDATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public SecurityMonitoringBatchMigrationAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the batch migration. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SecurityMonitoringBatchMigrationAttributes orgId(Long orgId) { + this.orgId = orgId; + return this; + } + + /** + * The ID of the organization that owns the batch migration. + * + * @return orgId + */ + @JsonProperty(JSON_PROPERTY_ORG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getOrgId() { + return orgId; + } + + public void setOrgId(Long orgId) { + this.orgId = orgId; + } + + public SecurityMonitoringBatchMigrationAttributes resourceStatusCounts( + SecurityMonitoringBatchMigrationResourceStatusCounts resourceStatusCounts) { + this.resourceStatusCounts = resourceStatusCounts; + this.unparsed |= resourceStatusCounts.unparsed; + return this; + } + + /** + * The number of resources of a batch migration in each status. + * + * @return resourceStatusCounts + */ + @JsonProperty(JSON_PROPERTY_RESOURCE_STATUS_COUNTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourceStatusCounts getResourceStatusCounts() { + return resourceStatusCounts; + } + + public void setResourceStatusCounts( + SecurityMonitoringBatchMigrationResourceStatusCounts resourceStatusCounts) { + this.resourceStatusCounts = resourceStatusCounts; + if (resourceStatusCounts != null) { + this.unparsed |= resourceStatusCounts.unparsed; + } + } + + public SecurityMonitoringBatchMigrationAttributes status( + SecurityMonitoringBatchMigrationStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * The status of a batch migration. A batch migration is created as draft and moves + * to in_progress when started. It moves to completed once no resource + * is pending or in_progress, or to canceled when canceled. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationStatus getStatus() { + return status; + } + + public void setStatus(SecurityMonitoringBatchMigrationStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public SecurityMonitoringBatchMigrationAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public SecurityMonitoringBatchMigrationAttributes addTagsItem(String tagsItem) { + this.tags.add(tagsItem); + return this; + } + + /** + * Tags of the batch migration. Up to 50 tags, each up to 256 characters. + * + * @return tags + */ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationAttributes + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationAttributes securityMonitoringBatchMigrationAttributes = + (SecurityMonitoringBatchMigrationAttributes) o; + return Objects.equals(this.createdAt, securityMonitoringBatchMigrationAttributes.createdAt) + && Objects.equals(this.createdBy, securityMonitoringBatchMigrationAttributes.createdBy) + && Objects.equals(this.description, securityMonitoringBatchMigrationAttributes.description) + && Objects.equals(this.inputSource, securityMonitoringBatchMigrationAttributes.inputSource) + && Objects.equals( + this.lastUpdatedAt, securityMonitoringBatchMigrationAttributes.lastUpdatedAt) + && Objects.equals( + this.lastUpdatedBy, securityMonitoringBatchMigrationAttributes.lastUpdatedBy) + && Objects.equals(this.name, securityMonitoringBatchMigrationAttributes.name) + && Objects.equals(this.orgId, securityMonitoringBatchMigrationAttributes.orgId) + && Objects.equals( + this.resourceStatusCounts, + securityMonitoringBatchMigrationAttributes.resourceStatusCounts) + && Objects.equals(this.status, securityMonitoringBatchMigrationAttributes.status) + && Objects.equals(this.tags, securityMonitoringBatchMigrationAttributes.tags) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + createdBy, + description, + inputSource, + lastUpdatedAt, + lastUpdatedBy, + name, + orgId, + resourceStatusCounts, + status, + tags, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" inputSource: ").append(toIndentedString(inputSource)).append("\n"); + sb.append(" lastUpdatedAt: ").append(toIndentedString(lastUpdatedAt)).append("\n"); + sb.append(" lastUpdatedBy: ").append(toIndentedString(lastUpdatedBy)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" resourceStatusCounts: ") + .append(toIndentedString(resourceStatusCounts)) + .append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationCreateAttributes.java new file mode 100644 index 00000000000..6d2b224b521 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationCreateAttributes.java @@ -0,0 +1,263 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of the batch migration to create. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationCreateAttributes.JSON_PROPERTY_DESCRIPTION, + SecurityMonitoringBatchMigrationCreateAttributes.JSON_PROPERTY_NAME, + SecurityMonitoringBatchMigrationCreateAttributes.JSON_PROPERTY_RESOURCES, + SecurityMonitoringBatchMigrationCreateAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_RESOURCES = "resources"; + private List resources = new ArrayList<>(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public SecurityMonitoringBatchMigrationCreateAttributes() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCES) + List resources) { + this.resources = resources; + for (SecurityMonitoringBatchMigrationResourceCreateItem item : resources) { + this.unparsed |= item.unparsed; + } + } + + public SecurityMonitoringBatchMigrationCreateAttributes description(String description) { + this.description = description; + return this; + } + + /** + * The description of the batch migration. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public SecurityMonitoringBatchMigrationCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the batch migration. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SecurityMonitoringBatchMigrationCreateAttributes resources( + List resources) { + this.resources = resources; + for (SecurityMonitoringBatchMigrationResourceCreateItem item : resources) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SecurityMonitoringBatchMigrationCreateAttributes addResourcesItem( + SecurityMonitoringBatchMigrationResourceCreateItem resourcesItem) { + this.resources.add(resourcesItem); + this.unparsed |= resourcesItem.unparsed; + return this; + } + + /** + * The initial resources of the batch migration. From 1 to 100 resources. + * + * @return resources + */ + @JsonProperty(JSON_PROPERTY_RESOURCES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResources() { + return resources; + } + + public void setResources(List resources) { + this.resources = resources; + if (resources != null) { + for (SecurityMonitoringBatchMigrationResourceCreateItem item : resources) { + this.unparsed |= item.unparsed; + } + } + } + + public SecurityMonitoringBatchMigrationCreateAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public SecurityMonitoringBatchMigrationCreateAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tags of the batch migration. Up to 50 tags, each up to 256 characters. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationCreateAttributes + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationCreateAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationCreateAttributes + securityMonitoringBatchMigrationCreateAttributes = + (SecurityMonitoringBatchMigrationCreateAttributes) o; + return Objects.equals( + this.description, securityMonitoringBatchMigrationCreateAttributes.description) + && Objects.equals(this.name, securityMonitoringBatchMigrationCreateAttributes.name) + && Objects.equals( + this.resources, securityMonitoringBatchMigrationCreateAttributes.resources) + && Objects.equals(this.tags, securityMonitoringBatchMigrationCreateAttributes.tags) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(description, name, resources, tags, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationCreateAttributes {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationCreateData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationCreateData.java new file mode 100644 index 00000000000..1cd3a113477 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationCreateData.java @@ -0,0 +1,191 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data of the batch migration to create. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationCreateData.JSON_PROPERTY_ATTRIBUTES, + SecurityMonitoringBatchMigrationCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SecurityMonitoringBatchMigrationCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SecurityMonitoringBatchMigrationType type; + + public SecurityMonitoringBatchMigrationCreateData() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + SecurityMonitoringBatchMigrationCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + SecurityMonitoringBatchMigrationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SecurityMonitoringBatchMigrationCreateData attributes( + SecurityMonitoringBatchMigrationCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the batch migration to create. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SecurityMonitoringBatchMigrationCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public SecurityMonitoringBatchMigrationCreateData type( + SecurityMonitoringBatchMigrationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of resource for a batch migration. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationType getType() { + return type; + } + + public void setType(SecurityMonitoringBatchMigrationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationCreateData + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationCreateData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationCreateData securityMonitoringBatchMigrationCreateData = + (SecurityMonitoringBatchMigrationCreateData) o; + return Objects.equals(this.attributes, securityMonitoringBatchMigrationCreateData.attributes) + && Objects.equals(this.type, securityMonitoringBatchMigrationCreateData.type) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationCreateRequest.java new file mode 100644 index 00000000000..36f4ab113b6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationCreateRequest.java @@ -0,0 +1,154 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create a batch migration. */ +@JsonPropertyOrder({SecurityMonitoringBatchMigrationCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SecurityMonitoringBatchMigrationCreateData data; + + public SecurityMonitoringBatchMigrationCreateRequest() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + SecurityMonitoringBatchMigrationCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SecurityMonitoringBatchMigrationCreateRequest data( + SecurityMonitoringBatchMigrationCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data of the batch migration to create. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationCreateData getData() { + return data; + } + + public void setData(SecurityMonitoringBatchMigrationCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationCreateRequest + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationCreateRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationCreateRequest securityMonitoringBatchMigrationCreateRequest = + (SecurityMonitoringBatchMigrationCreateRequest) o; + return Objects.equals(this.data, securityMonitoringBatchMigrationCreateRequest.data) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationData.java new file mode 100644 index 00000000000..ffaf35d1522 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationData.java @@ -0,0 +1,217 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** A batch migration. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationData.JSON_PROPERTY_ATTRIBUTES, + SecurityMonitoringBatchMigrationData.JSON_PROPERTY_ID, + SecurityMonitoringBatchMigrationData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SecurityMonitoringBatchMigrationAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SecurityMonitoringBatchMigrationType type; + + public SecurityMonitoringBatchMigrationData() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + SecurityMonitoringBatchMigrationAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + SecurityMonitoringBatchMigrationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SecurityMonitoringBatchMigrationData attributes( + SecurityMonitoringBatchMigrationAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a batch migration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SecurityMonitoringBatchMigrationAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public SecurityMonitoringBatchMigrationData id(UUID id) { + this.id = id; + return this; + } + + /** + * The UUID of the batch migration. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public SecurityMonitoringBatchMigrationData type(SecurityMonitoringBatchMigrationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of resource for a batch migration. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationType getType() { + return type; + } + + public void setType(SecurityMonitoringBatchMigrationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationData + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationData securityMonitoringBatchMigrationData = + (SecurityMonitoringBatchMigrationData) o; + return Objects.equals(this.attributes, securityMonitoringBatchMigrationData.attributes) + && Objects.equals(this.id, securityMonitoringBatchMigrationData.id) + && Objects.equals(this.type, securityMonitoringBatchMigrationData.type) + && Objects.equals( + this.additionalProperties, securityMonitoringBatchMigrationData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationInputSource.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationInputSource.java new file mode 100644 index 00000000000..26636cf1bb3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationInputSource.java @@ -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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The origin of a batch migration. Always batch_migration for batch migrations created + * through this API. + */ +@JsonSerialize( + using = + SecurityMonitoringBatchMigrationInputSource + .SecurityMonitoringBatchMigrationInputSourceSerializer.class) +public class SecurityMonitoringBatchMigrationInputSource extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("batch_migration", "threat_hunting", "user")); + + public static final SecurityMonitoringBatchMigrationInputSource BATCH_MIGRATION = + new SecurityMonitoringBatchMigrationInputSource("batch_migration"); + public static final SecurityMonitoringBatchMigrationInputSource THREAT_HUNTING = + new SecurityMonitoringBatchMigrationInputSource("threat_hunting"); + public static final SecurityMonitoringBatchMigrationInputSource USER = + new SecurityMonitoringBatchMigrationInputSource("user"); + + SecurityMonitoringBatchMigrationInputSource(String value) { + super(value, allowedValues); + } + + public static class SecurityMonitoringBatchMigrationInputSourceSerializer + extends StdSerializer { + public SecurityMonitoringBatchMigrationInputSourceSerializer( + Class t) { + super(t); + } + + public SecurityMonitoringBatchMigrationInputSourceSerializer() { + this(null); + } + + @Override + public void serialize( + SecurityMonitoringBatchMigrationInputSource value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecurityMonitoringBatchMigrationInputSource fromValue(String value) { + return new SecurityMonitoringBatchMigrationInputSource(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationListMeta.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationListMeta.java new file mode 100644 index 00000000000..9db801b245e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationListMeta.java @@ -0,0 +1,146 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Metadata of a list response. */ +@JsonPropertyOrder({SecurityMonitoringBatchMigrationListMeta.JSON_PROPERTY_TOTAL_COUNT}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationListMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TOTAL_COUNT = "totalCount"; + private Long totalCount; + + public SecurityMonitoringBatchMigrationListMeta() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationListMeta( + @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL_COUNT) Long totalCount) { + this.totalCount = totalCount; + } + + public SecurityMonitoringBatchMigrationListMeta totalCount(Long totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * Total number of items matching the request. + * + * @return totalCount + */ + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTotalCount() { + return totalCount; + } + + public void setTotalCount(Long totalCount) { + this.totalCount = totalCount; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationListMeta + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationListMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationListMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationListMeta securityMonitoringBatchMigrationListMeta = + (SecurityMonitoringBatchMigrationListMeta) o; + return Objects.equals(this.totalCount, securityMonitoringBatchMigrationListMeta.totalCount) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationListMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(totalCount, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationListMeta {\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishAttributes.java new file mode 100644 index 00000000000..1110a792eae --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishAttributes.java @@ -0,0 +1,154 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Attributes of the batch migration publish request. */ +@JsonPropertyOrder({SecurityMonitoringBatchMigrationPublishAttributes.JSON_PROPERTY_RESOURCE_IDS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationPublishAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RESOURCE_IDS = "resourceIds"; + private List resourceIds = null; + + public SecurityMonitoringBatchMigrationPublishAttributes resourceIds(List resourceIds) { + this.resourceIds = resourceIds; + return this; + } + + public SecurityMonitoringBatchMigrationPublishAttributes addResourceIdsItem( + UUID resourceIdsItem) { + if (this.resourceIds == null) { + this.resourceIds = new ArrayList<>(); + } + this.resourceIds.add(resourceIdsItem); + return this; + } + + /** + * Unique UUIDs of the resources to publish. Up to 1000 IDs. When omitted or empty, every + * completed resource of the batch migration is published. + * + * @return resourceIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getResourceIds() { + return resourceIds; + } + + public void setResourceIds(List resourceIds) { + this.resourceIds = resourceIds; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationPublishAttributes + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationPublishAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationPublishAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationPublishAttributes + securityMonitoringBatchMigrationPublishAttributes = + (SecurityMonitoringBatchMigrationPublishAttributes) o; + return Objects.equals( + this.resourceIds, securityMonitoringBatchMigrationPublishAttributes.resourceIds) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationPublishAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(resourceIds, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationPublishAttributes {\n"); + sb.append(" resourceIds: ").append(toIndentedString(resourceIds)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishData.java new file mode 100644 index 00000000000..3ac459a95e7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishData.java @@ -0,0 +1,191 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data of the batch migration publish request. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationPublishData.JSON_PROPERTY_ATTRIBUTES, + SecurityMonitoringBatchMigrationPublishData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationPublishData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SecurityMonitoringBatchMigrationPublishAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SecurityMonitoringBatchMigrationPublishType type; + + public SecurityMonitoringBatchMigrationPublishData() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationPublishData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + SecurityMonitoringBatchMigrationPublishAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + SecurityMonitoringBatchMigrationPublishType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SecurityMonitoringBatchMigrationPublishData attributes( + SecurityMonitoringBatchMigrationPublishAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the batch migration publish request. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationPublishAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SecurityMonitoringBatchMigrationPublishAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public SecurityMonitoringBatchMigrationPublishData type( + SecurityMonitoringBatchMigrationPublishType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of resource for a batch migration publish request. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationPublishType getType() { + return type; + } + + public void setType(SecurityMonitoringBatchMigrationPublishType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationPublishData + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationPublishData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationPublishData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationPublishData securityMonitoringBatchMigrationPublishData = + (SecurityMonitoringBatchMigrationPublishData) o; + return Objects.equals(this.attributes, securityMonitoringBatchMigrationPublishData.attributes) + && Objects.equals(this.type, securityMonitoringBatchMigrationPublishData.type) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationPublishData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationPublishData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishRequest.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishRequest.java new file mode 100644 index 00000000000..9de6ea1d8ad --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishRequest.java @@ -0,0 +1,154 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to publish the resources of a batch migration. */ +@JsonPropertyOrder({SecurityMonitoringBatchMigrationPublishRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationPublishRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SecurityMonitoringBatchMigrationPublishData data; + + public SecurityMonitoringBatchMigrationPublishRequest() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationPublishRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + SecurityMonitoringBatchMigrationPublishData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SecurityMonitoringBatchMigrationPublishRequest data( + SecurityMonitoringBatchMigrationPublishData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data of the batch migration publish request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationPublishData getData() { + return data; + } + + public void setData(SecurityMonitoringBatchMigrationPublishData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationPublishRequest + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationPublishRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationPublishRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationPublishRequest securityMonitoringBatchMigrationPublishRequest = + (SecurityMonitoringBatchMigrationPublishRequest) o; + return Objects.equals(this.data, securityMonitoringBatchMigrationPublishRequest.data) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationPublishRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationPublishRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishResponse.java new file mode 100644 index 00000000000..b5a68d72217 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishResponse.java @@ -0,0 +1,170 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing the publication outcome of each resource. */ +@JsonPropertyOrder({SecurityMonitoringBatchMigrationPublishResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationPublishResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public SecurityMonitoringBatchMigrationPublishResponse() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationPublishResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (SecurityMonitoringBatchMigrationPublishedResourceData item : data) { + this.unparsed |= item.unparsed; + } + } + + public SecurityMonitoringBatchMigrationPublishResponse data( + List data) { + this.data = data; + for (SecurityMonitoringBatchMigrationPublishedResourceData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SecurityMonitoringBatchMigrationPublishResponse addDataItem( + SecurityMonitoringBatchMigrationPublishedResourceData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The publication outcome of each resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (SecurityMonitoringBatchMigrationPublishedResourceData item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationPublishResponse + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationPublishResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationPublishResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationPublishResponse + securityMonitoringBatchMigrationPublishResponse = + (SecurityMonitoringBatchMigrationPublishResponse) o; + return Objects.equals(this.data, securityMonitoringBatchMigrationPublishResponse.data) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationPublishResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationPublishResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishType.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishType.java new file mode 100644 index 00000000000..0fe08ad1c9d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishType.java @@ -0,0 +1,63 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of resource for a batch migration publish request. */ +@JsonSerialize( + using = + SecurityMonitoringBatchMigrationPublishType + .SecurityMonitoringBatchMigrationPublishTypeSerializer.class) +public class SecurityMonitoringBatchMigrationPublishType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("batchMigrationPublish")); + + public static final SecurityMonitoringBatchMigrationPublishType BATCH_MIGRATION_PUBLISH = + new SecurityMonitoringBatchMigrationPublishType("batchMigrationPublish"); + + SecurityMonitoringBatchMigrationPublishType(String value) { + super(value, allowedValues); + } + + public static class SecurityMonitoringBatchMigrationPublishTypeSerializer + extends StdSerializer { + public SecurityMonitoringBatchMigrationPublishTypeSerializer( + Class t) { + super(t); + } + + public SecurityMonitoringBatchMigrationPublishTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SecurityMonitoringBatchMigrationPublishType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecurityMonitoringBatchMigrationPublishType fromValue(String value) { + return new SecurityMonitoringBatchMigrationPublishType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceAttributes.java new file mode 100644 index 00000000000..a075c01c482 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceAttributes.java @@ -0,0 +1,217 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of the publication outcome of a batch migration resource. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationPublishedResourceAttributes.JSON_PROPERTY_ERROR, + SecurityMonitoringBatchMigrationPublishedResourceAttributes.JSON_PROPERTY_RULE_ID, + SecurityMonitoringBatchMigrationPublishedResourceAttributes.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationPublishedResourceAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ERROR = "error"; + private String error; + + public static final String JSON_PROPERTY_RULE_ID = "ruleId"; + private String ruleId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private SecurityMonitoringBatchMigrationPublishedResourceStatus status; + + public SecurityMonitoringBatchMigrationPublishedResourceAttributes() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationPublishedResourceAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + SecurityMonitoringBatchMigrationPublishedResourceStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + } + + public SecurityMonitoringBatchMigrationPublishedResourceAttributes error(String error) { + this.error = error; + return this; + } + + /** + * The reason why the resource could not be published. + * + * @return error + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getError() { + return error; + } + + public void setError(String error) { + this.error = error; + } + + public SecurityMonitoringBatchMigrationPublishedResourceAttributes ruleId(String ruleId) { + this.ruleId = ruleId; + return this; + } + + /** + * The ID of the created Cloud SIEM detection rule. + * + * @return ruleId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RULE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRuleId() { + return ruleId; + } + + public void setRuleId(String ruleId) { + this.ruleId = ruleId; + } + + public SecurityMonitoringBatchMigrationPublishedResourceAttributes status( + SecurityMonitoringBatchMigrationPublishedResourceStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * The outcome of publishing a batch migration resource. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationPublishedResourceStatus getStatus() { + return status; + } + + public void setStatus(SecurityMonitoringBatchMigrationPublishedResourceStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationPublishedResourceAttributes + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationPublishedResourceAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SecurityMonitoringBatchMigrationPublishedResourceAttributes object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationPublishedResourceAttributes + securityMonitoringBatchMigrationPublishedResourceAttributes = + (SecurityMonitoringBatchMigrationPublishedResourceAttributes) o; + return Objects.equals( + this.error, securityMonitoringBatchMigrationPublishedResourceAttributes.error) + && Objects.equals( + this.ruleId, securityMonitoringBatchMigrationPublishedResourceAttributes.ruleId) + && Objects.equals( + this.status, securityMonitoringBatchMigrationPublishedResourceAttributes.status) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationPublishedResourceAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(error, ruleId, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationPublishedResourceAttributes {\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" ruleId: ").append(toIndentedString(ruleId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceData.java new file mode 100644 index 00000000000..a2bb44741b1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceData.java @@ -0,0 +1,225 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** The publication outcome of a batch migration resource. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationPublishedResourceData.JSON_PROPERTY_ATTRIBUTES, + SecurityMonitoringBatchMigrationPublishedResourceData.JSON_PROPERTY_ID, + SecurityMonitoringBatchMigrationPublishedResourceData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationPublishedResourceData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SecurityMonitoringBatchMigrationPublishedResourceAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SecurityMonitoringBatchMigrationPublishedResourceType type; + + public SecurityMonitoringBatchMigrationPublishedResourceData() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationPublishedResourceData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + SecurityMonitoringBatchMigrationPublishedResourceAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + SecurityMonitoringBatchMigrationPublishedResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SecurityMonitoringBatchMigrationPublishedResourceData attributes( + SecurityMonitoringBatchMigrationPublishedResourceAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the publication outcome of a batch migration resource. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationPublishedResourceAttributes getAttributes() { + return attributes; + } + + public void setAttributes( + SecurityMonitoringBatchMigrationPublishedResourceAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public SecurityMonitoringBatchMigrationPublishedResourceData id(UUID id) { + this.id = id; + return this; + } + + /** + * The UUID of the batch migration resource. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public SecurityMonitoringBatchMigrationPublishedResourceData type( + SecurityMonitoringBatchMigrationPublishedResourceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of resource for a published batch migration resource. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationPublishedResourceType getType() { + return type; + } + + public void setType(SecurityMonitoringBatchMigrationPublishedResourceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationPublishedResourceData + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationPublishedResourceData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SecurityMonitoringBatchMigrationPublishedResourceData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationPublishedResourceData + securityMonitoringBatchMigrationPublishedResourceData = + (SecurityMonitoringBatchMigrationPublishedResourceData) o; + return Objects.equals( + this.attributes, securityMonitoringBatchMigrationPublishedResourceData.attributes) + && Objects.equals(this.id, securityMonitoringBatchMigrationPublishedResourceData.id) + && Objects.equals(this.type, securityMonitoringBatchMigrationPublishedResourceData.type) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationPublishedResourceData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationPublishedResourceData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceStatus.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceStatus.java new file mode 100644 index 00000000000..9c5f8b1b105 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceStatus.java @@ -0,0 +1,65 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The outcome of publishing a batch migration resource. */ +@JsonSerialize( + using = + SecurityMonitoringBatchMigrationPublishedResourceStatus + .SecurityMonitoringBatchMigrationPublishedResourceStatusSerializer.class) +public class SecurityMonitoringBatchMigrationPublishedResourceStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("published", "failed")); + + public static final SecurityMonitoringBatchMigrationPublishedResourceStatus PUBLISHED = + new SecurityMonitoringBatchMigrationPublishedResourceStatus("published"); + public static final SecurityMonitoringBatchMigrationPublishedResourceStatus FAILED = + new SecurityMonitoringBatchMigrationPublishedResourceStatus("failed"); + + SecurityMonitoringBatchMigrationPublishedResourceStatus(String value) { + super(value, allowedValues); + } + + public static class SecurityMonitoringBatchMigrationPublishedResourceStatusSerializer + extends StdSerializer { + public SecurityMonitoringBatchMigrationPublishedResourceStatusSerializer( + Class t) { + super(t); + } + + public SecurityMonitoringBatchMigrationPublishedResourceStatusSerializer() { + this(null); + } + + @Override + public void serialize( + SecurityMonitoringBatchMigrationPublishedResourceStatus value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecurityMonitoringBatchMigrationPublishedResourceStatus fromValue(String value) { + return new SecurityMonitoringBatchMigrationPublishedResourceStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceType.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceType.java new file mode 100644 index 00000000000..acd87a7e227 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationPublishedResourceType.java @@ -0,0 +1,65 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of resource for a published batch migration resource. */ +@JsonSerialize( + using = + SecurityMonitoringBatchMigrationPublishedResourceType + .SecurityMonitoringBatchMigrationPublishedResourceTypeSerializer.class) +public class SecurityMonitoringBatchMigrationPublishedResourceType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("batchMigrationPublishedResource")); + + public static final SecurityMonitoringBatchMigrationPublishedResourceType + BATCH_MIGRATION_PUBLISHED_RESOURCE = + new SecurityMonitoringBatchMigrationPublishedResourceType( + "batchMigrationPublishedResource"); + + SecurityMonitoringBatchMigrationPublishedResourceType(String value) { + super(value, allowedValues); + } + + public static class SecurityMonitoringBatchMigrationPublishedResourceTypeSerializer + extends StdSerializer { + public SecurityMonitoringBatchMigrationPublishedResourceTypeSerializer( + Class t) { + super(t); + } + + public SecurityMonitoringBatchMigrationPublishedResourceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SecurityMonitoringBatchMigrationPublishedResourceType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecurityMonitoringBatchMigrationPublishedResourceType fromValue(String value) { + return new SecurityMonitoringBatchMigrationPublishedResourceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceAttributes.java new file mode 100644 index 00000000000..019a1e82657 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceAttributes.java @@ -0,0 +1,542 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Attributes of a batch migration resource. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationResourceAttributes.JSON_PROPERTY_BATCH_ID, + SecurityMonitoringBatchMigrationResourceAttributes.JSON_PROPERTY_CREATED_AT, + SecurityMonitoringBatchMigrationResourceAttributes.JSON_PROPERTY_CREATED_BY, + SecurityMonitoringBatchMigrationResourceAttributes.JSON_PROPERTY_DESCRIPTION, + SecurityMonitoringBatchMigrationResourceAttributes.JSON_PROPERTY_INPUT, + SecurityMonitoringBatchMigrationResourceAttributes.JSON_PROPERTY_INPUT_TYPE, + SecurityMonitoringBatchMigrationResourceAttributes.JSON_PROPERTY_LAST_UPDATED_AT, + SecurityMonitoringBatchMigrationResourceAttributes.JSON_PROPERTY_LAST_UPDATED_BY, + SecurityMonitoringBatchMigrationResourceAttributes.JSON_PROPERTY_NAME, + SecurityMonitoringBatchMigrationResourceAttributes.JSON_PROPERTY_OUTPUT, + SecurityMonitoringBatchMigrationResourceAttributes.JSON_PROPERTY_OUTPUT_TYPE, + SecurityMonitoringBatchMigrationResourceAttributes.JSON_PROPERTY_RULE_ID, + SecurityMonitoringBatchMigrationResourceAttributes.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourceAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BATCH_ID = "batchId"; + private UUID batchId; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY = "createdBy"; + private String createdBy; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_INPUT = "input"; + private String input; + + public static final String JSON_PROPERTY_INPUT_TYPE = "inputType"; + private SecurityMonitoringBatchMigrationResourceInputType inputType; + + public static final String JSON_PROPERTY_LAST_UPDATED_AT = "lastUpdatedAt"; + private OffsetDateTime lastUpdatedAt; + + public static final String JSON_PROPERTY_LAST_UPDATED_BY = "lastUpdatedBy"; + private String lastUpdatedBy; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_OUTPUT = "output"; + private Map output = new HashMap(); + + public static final String JSON_PROPERTY_OUTPUT_TYPE = "outputType"; + private String outputType; + + public static final String JSON_PROPERTY_RULE_ID = "ruleId"; + private String ruleId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private SecurityMonitoringBatchMigrationResourceStatus status; + + public SecurityMonitoringBatchMigrationResourceAttributes() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResourceAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_BATCH_ID) UUID batchId, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_INPUT) String input, + @JsonProperty(required = true, value = JSON_PROPERTY_INPUT_TYPE) + SecurityMonitoringBatchMigrationResourceInputType inputType, + @JsonProperty(required = true, value = JSON_PROPERTY_LAST_UPDATED_AT) + OffsetDateTime lastUpdatedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_OUTPUT) Map output, + @JsonProperty(required = true, value = JSON_PROPERTY_OUTPUT_TYPE) String outputType, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + SecurityMonitoringBatchMigrationResourceStatus status) { + this.batchId = batchId; + this.createdAt = createdAt; + this.input = input; + this.inputType = inputType; + this.unparsed |= !inputType.isValid(); + this.lastUpdatedAt = lastUpdatedAt; + this.name = name; + this.output = output; + if (output != null) {} + this.outputType = outputType; + this.status = status; + this.unparsed |= !status.isValid(); + } + + public SecurityMonitoringBatchMigrationResourceAttributes batchId(UUID batchId) { + this.batchId = batchId; + return this; + } + + /** + * The UUID of the batch migration that contains the resource. + * + * @return batchId + */ + @JsonProperty(JSON_PROPERTY_BATCH_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getBatchId() { + return batchId; + } + + public void setBatchId(UUID batchId) { + this.batchId = batchId; + } + + public SecurityMonitoringBatchMigrationResourceAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The creation date of the resource, in RFC 3339 format. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public SecurityMonitoringBatchMigrationResourceAttributes createdBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * The UUID of the user or service account who created the resource. + * + * @return createdBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public SecurityMonitoringBatchMigrationResourceAttributes description(String description) { + this.description = description; + return this; + } + + /** + * The description of the resource. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public SecurityMonitoringBatchMigrationResourceAttributes input(String input) { + this.input = input; + return this; + } + + /** + * The source query or natural language description to translate. + * + * @return input + */ + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInput() { + return input; + } + + public void setInput(String input) { + this.input = input; + } + + public SecurityMonitoringBatchMigrationResourceAttributes inputType( + SecurityMonitoringBatchMigrationResourceInputType inputType) { + this.inputType = inputType; + this.unparsed |= !inputType.isValid(); + return this; + } + + /** + * The type of the source rule: spl for a Splunk SPL search or saved search + * definition, natural_language for a plain-English description of the behavior to + * detect, or kql for a Microsoft KQL query. SPL inputs must be self-contained, with + * search macros expanded. + * + * @return inputType + */ + @JsonProperty(JSON_PROPERTY_INPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourceInputType getInputType() { + return inputType; + } + + public void setInputType(SecurityMonitoringBatchMigrationResourceInputType inputType) { + if (!inputType.isValid()) { + this.unparsed = true; + } + this.inputType = inputType; + } + + public SecurityMonitoringBatchMigrationResourceAttributes lastUpdatedAt( + OffsetDateTime lastUpdatedAt) { + this.lastUpdatedAt = lastUpdatedAt; + return this; + } + + /** + * The last update date of the resource, in RFC 3339 format. + * + * @return lastUpdatedAt + */ + @JsonProperty(JSON_PROPERTY_LAST_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getLastUpdatedAt() { + return lastUpdatedAt; + } + + public void setLastUpdatedAt(OffsetDateTime lastUpdatedAt) { + this.lastUpdatedAt = lastUpdatedAt; + } + + public SecurityMonitoringBatchMigrationResourceAttributes lastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + return this; + } + + /** + * The UUID of the user or service account who last updated the resource, or the name of a system + * actor. + * + * @return lastUpdatedBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_UPDATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public SecurityMonitoringBatchMigrationResourceAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the resource. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SecurityMonitoringBatchMigrationResourceAttributes output(Map output) { + this.output = output; + if (output != null) {} + return this; + } + + public SecurityMonitoringBatchMigrationResourceAttributes putOutputItem( + String key, Object outputItem) { + this.output.put(key, outputItem); + return this; + } + + /** + * The translation output. When the resource is completed, a Cloud SIEM detection + * rule definition in the same format as the create detection rule API. When the resource is + * failed, an object with an error describing the failure, with + * kind set to translation_error or internal_error, and optional + * type and message. Otherwise, null. + * + * @return output + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getOutput() { + return output; + } + + public void setOutput(Map output) { + this.output = output; + } + + public SecurityMonitoringBatchMigrationResourceAttributes outputType(String outputType) { + this.outputType = outputType; + return this; + } + + /** + * The type of the translation output. Currently always siem_rule. + * + * @return outputType + */ + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOutputType() { + return outputType; + } + + public void setOutputType(String outputType) { + this.outputType = outputType; + } + + public SecurityMonitoringBatchMigrationResourceAttributes ruleId(String ruleId) { + this.ruleId = ruleId; + return this; + } + + /** + * The ID of the Cloud SIEM detection rule created when the resource was published. + * + * @return ruleId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RULE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRuleId() { + return ruleId; + } + + public void setRuleId(String ruleId) { + this.ruleId = ruleId; + } + + public SecurityMonitoringBatchMigrationResourceAttributes status( + SecurityMonitoringBatchMigrationResourceStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * The status of a batch migration resource. completed resources have a translation + * in output that is ready to be published. duplicate is reserved for + * future duplicate rule detection. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourceStatus getStatus() { + return status; + } + + public void setStatus(SecurityMonitoringBatchMigrationResourceStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResourceAttributes + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResourceAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SecurityMonitoringBatchMigrationResourceAttributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourceAttributes + securityMonitoringBatchMigrationResourceAttributes = + (SecurityMonitoringBatchMigrationResourceAttributes) o; + return Objects.equals(this.batchId, securityMonitoringBatchMigrationResourceAttributes.batchId) + && Objects.equals( + this.createdAt, securityMonitoringBatchMigrationResourceAttributes.createdAt) + && Objects.equals( + this.createdBy, securityMonitoringBatchMigrationResourceAttributes.createdBy) + && Objects.equals( + this.description, securityMonitoringBatchMigrationResourceAttributes.description) + && Objects.equals(this.input, securityMonitoringBatchMigrationResourceAttributes.input) + && Objects.equals( + this.inputType, securityMonitoringBatchMigrationResourceAttributes.inputType) + && Objects.equals( + this.lastUpdatedAt, securityMonitoringBatchMigrationResourceAttributes.lastUpdatedAt) + && Objects.equals( + this.lastUpdatedBy, securityMonitoringBatchMigrationResourceAttributes.lastUpdatedBy) + && Objects.equals(this.name, securityMonitoringBatchMigrationResourceAttributes.name) + && Objects.equals(this.output, securityMonitoringBatchMigrationResourceAttributes.output) + && Objects.equals( + this.outputType, securityMonitoringBatchMigrationResourceAttributes.outputType) + && Objects.equals(this.ruleId, securityMonitoringBatchMigrationResourceAttributes.ruleId) + && Objects.equals(this.status, securityMonitoringBatchMigrationResourceAttributes.status) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResourceAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + batchId, + createdAt, + createdBy, + description, + input, + inputType, + lastUpdatedAt, + lastUpdatedBy, + name, + output, + outputType, + ruleId, + status, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourceAttributes {\n"); + sb.append(" batchId: ").append(toIndentedString(batchId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" inputType: ").append(toIndentedString(inputType)).append("\n"); + sb.append(" lastUpdatedAt: ").append(toIndentedString(lastUpdatedAt)).append("\n"); + sb.append(" lastUpdatedBy: ").append(toIndentedString(lastUpdatedBy)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" outputType: ").append(toIndentedString(outputType)).append("\n"); + sb.append(" ruleId: ").append(toIndentedString(ruleId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceCreateItem.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceCreateItem.java new file mode 100644 index 00000000000..d438e392dc1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceCreateItem.java @@ -0,0 +1,246 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A source rule to translate into a Cloud SIEM detection rule. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationResourceCreateItem.JSON_PROPERTY_DESCRIPTION, + SecurityMonitoringBatchMigrationResourceCreateItem.JSON_PROPERTY_INPUT, + SecurityMonitoringBatchMigrationResourceCreateItem.JSON_PROPERTY_INPUT_TYPE, + SecurityMonitoringBatchMigrationResourceCreateItem.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourceCreateItem { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_INPUT = "input"; + private String input; + + public static final String JSON_PROPERTY_INPUT_TYPE = "inputType"; + private SecurityMonitoringBatchMigrationResourceInputType inputType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public SecurityMonitoringBatchMigrationResourceCreateItem() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResourceCreateItem( + @JsonProperty(required = true, value = JSON_PROPERTY_INPUT) String input, + @JsonProperty(required = true, value = JSON_PROPERTY_INPUT_TYPE) + SecurityMonitoringBatchMigrationResourceInputType inputType) { + this.input = input; + this.inputType = inputType; + this.unparsed |= !inputType.isValid(); + } + + public SecurityMonitoringBatchMigrationResourceCreateItem description(String description) { + this.description = description; + return this; + } + + /** + * The description of the resource. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public SecurityMonitoringBatchMigrationResourceCreateItem input(String input) { + this.input = input; + return this; + } + + /** + * The source query or natural language description to translate. Must not be blank. + * + * @return input + */ + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInput() { + return input; + } + + public void setInput(String input) { + this.input = input; + } + + public SecurityMonitoringBatchMigrationResourceCreateItem inputType( + SecurityMonitoringBatchMigrationResourceInputType inputType) { + this.inputType = inputType; + this.unparsed |= !inputType.isValid(); + return this; + } + + /** + * The type of the source rule: spl for a Splunk SPL search or saved search + * definition, natural_language for a plain-English description of the behavior to + * detect, or kql for a Microsoft KQL query. SPL inputs must be self-contained, with + * search macros expanded. + * + * @return inputType + */ + @JsonProperty(JSON_PROPERTY_INPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourceInputType getInputType() { + return inputType; + } + + public void setInputType(SecurityMonitoringBatchMigrationResourceInputType inputType) { + if (!inputType.isValid()) { + this.unparsed = true; + } + this.inputType = inputType; + } + + public SecurityMonitoringBatchMigrationResourceCreateItem name(String name) { + this.name = name; + return this; + } + + /** + * The name of the resource. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResourceCreateItem + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResourceCreateItem putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SecurityMonitoringBatchMigrationResourceCreateItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourceCreateItem + securityMonitoringBatchMigrationResourceCreateItem = + (SecurityMonitoringBatchMigrationResourceCreateItem) o; + return Objects.equals( + this.description, securityMonitoringBatchMigrationResourceCreateItem.description) + && Objects.equals(this.input, securityMonitoringBatchMigrationResourceCreateItem.input) + && Objects.equals( + this.inputType, securityMonitoringBatchMigrationResourceCreateItem.inputType) + && Objects.equals(this.name, securityMonitoringBatchMigrationResourceCreateItem.name) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResourceCreateItem.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(description, input, inputType, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourceCreateItem {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" inputType: ").append(toIndentedString(inputType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceData.java new file mode 100644 index 00000000000..fea9e8c4814 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceData.java @@ -0,0 +1,220 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** A batch migration resource. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationResourceData.JSON_PROPERTY_ATTRIBUTES, + SecurityMonitoringBatchMigrationResourceData.JSON_PROPERTY_ID, + SecurityMonitoringBatchMigrationResourceData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourceData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SecurityMonitoringBatchMigrationResourceAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SecurityMonitoringBatchMigrationResourceType type; + + public SecurityMonitoringBatchMigrationResourceData() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResourceData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + SecurityMonitoringBatchMigrationResourceAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + SecurityMonitoringBatchMigrationResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SecurityMonitoringBatchMigrationResourceData attributes( + SecurityMonitoringBatchMigrationResourceAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a batch migration resource. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourceAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SecurityMonitoringBatchMigrationResourceAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public SecurityMonitoringBatchMigrationResourceData id(UUID id) { + this.id = id; + return this; + } + + /** + * The UUID of the batch migration resource. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public SecurityMonitoringBatchMigrationResourceData type( + SecurityMonitoringBatchMigrationResourceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of resource for a batch migration resource. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourceType getType() { + return type; + } + + public void setType(SecurityMonitoringBatchMigrationResourceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResourceData + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResourceData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationResourceData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourceData securityMonitoringBatchMigrationResourceData = + (SecurityMonitoringBatchMigrationResourceData) o; + return Objects.equals(this.attributes, securityMonitoringBatchMigrationResourceData.attributes) + && Objects.equals(this.id, securityMonitoringBatchMigrationResourceData.id) + && Objects.equals(this.type, securityMonitoringBatchMigrationResourceData.type) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResourceData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourceData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceInputType.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceInputType.java new file mode 100644 index 00000000000..02bbdb5feb2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceInputType.java @@ -0,0 +1,72 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The type of the source rule: spl for a Splunk SPL search or saved search definition, + * natural_language for a plain-English description of the behavior to detect, or + * kql for a Microsoft KQL query. SPL inputs must be self-contained, with search macros + * expanded. + */ +@JsonSerialize( + using = + SecurityMonitoringBatchMigrationResourceInputType + .SecurityMonitoringBatchMigrationResourceInputTypeSerializer.class) +public class SecurityMonitoringBatchMigrationResourceInputType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("natural_language", "spl", "kql")); + + public static final SecurityMonitoringBatchMigrationResourceInputType NATURAL_LANGUAGE = + new SecurityMonitoringBatchMigrationResourceInputType("natural_language"); + public static final SecurityMonitoringBatchMigrationResourceInputType SPL = + new SecurityMonitoringBatchMigrationResourceInputType("spl"); + public static final SecurityMonitoringBatchMigrationResourceInputType KQL = + new SecurityMonitoringBatchMigrationResourceInputType("kql"); + + SecurityMonitoringBatchMigrationResourceInputType(String value) { + super(value, allowedValues); + } + + public static class SecurityMonitoringBatchMigrationResourceInputTypeSerializer + extends StdSerializer { + public SecurityMonitoringBatchMigrationResourceInputTypeSerializer( + Class t) { + super(t); + } + + public SecurityMonitoringBatchMigrationResourceInputTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SecurityMonitoringBatchMigrationResourceInputType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecurityMonitoringBatchMigrationResourceInputType fromValue(String value) { + return new SecurityMonitoringBatchMigrationResourceInputType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceResponse.java new file mode 100644 index 00000000000..8be794bab3b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceResponse.java @@ -0,0 +1,155 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a batch migration resource. */ +@JsonPropertyOrder({SecurityMonitoringBatchMigrationResourceResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourceResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SecurityMonitoringBatchMigrationResourceData data; + + public SecurityMonitoringBatchMigrationResourceResponse() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResourceResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + SecurityMonitoringBatchMigrationResourceData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SecurityMonitoringBatchMigrationResourceResponse data( + SecurityMonitoringBatchMigrationResourceData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * A batch migration resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourceData getData() { + return data; + } + + public void setData(SecurityMonitoringBatchMigrationResourceData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResourceResponse + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResourceResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationResourceResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourceResponse + securityMonitoringBatchMigrationResourceResponse = + (SecurityMonitoringBatchMigrationResourceResponse) o; + return Objects.equals(this.data, securityMonitoringBatchMigrationResourceResponse.data) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResourceResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourceResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceStatus.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceStatus.java new file mode 100644 index 00000000000..eba4572dafe --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceStatus.java @@ -0,0 +1,90 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The status of a batch migration resource. completed resources have a translation in + * output that is ready to be published. duplicate is reserved for future + * duplicate rule detection. + */ +@JsonSerialize( + using = + SecurityMonitoringBatchMigrationResourceStatus + .SecurityMonitoringBatchMigrationResourceStatusSerializer.class) +public class SecurityMonitoringBatchMigrationResourceStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "pending", + "in_progress", + "completed", + "canceled", + "failed", + "publishing", + "published", + "duplicate")); + + public static final SecurityMonitoringBatchMigrationResourceStatus PENDING = + new SecurityMonitoringBatchMigrationResourceStatus("pending"); + public static final SecurityMonitoringBatchMigrationResourceStatus IN_PROGRESS = + new SecurityMonitoringBatchMigrationResourceStatus("in_progress"); + public static final SecurityMonitoringBatchMigrationResourceStatus COMPLETED = + new SecurityMonitoringBatchMigrationResourceStatus("completed"); + public static final SecurityMonitoringBatchMigrationResourceStatus CANCELED = + new SecurityMonitoringBatchMigrationResourceStatus("canceled"); + public static final SecurityMonitoringBatchMigrationResourceStatus FAILED = + new SecurityMonitoringBatchMigrationResourceStatus("failed"); + public static final SecurityMonitoringBatchMigrationResourceStatus PUBLISHING = + new SecurityMonitoringBatchMigrationResourceStatus("publishing"); + public static final SecurityMonitoringBatchMigrationResourceStatus PUBLISHED = + new SecurityMonitoringBatchMigrationResourceStatus("published"); + public static final SecurityMonitoringBatchMigrationResourceStatus DUPLICATE = + new SecurityMonitoringBatchMigrationResourceStatus("duplicate"); + + SecurityMonitoringBatchMigrationResourceStatus(String value) { + super(value, allowedValues); + } + + public static class SecurityMonitoringBatchMigrationResourceStatusSerializer + extends StdSerializer { + public SecurityMonitoringBatchMigrationResourceStatusSerializer( + Class t) { + super(t); + } + + public SecurityMonitoringBatchMigrationResourceStatusSerializer() { + this(null); + } + + @Override + public void serialize( + SecurityMonitoringBatchMigrationResourceStatus value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecurityMonitoringBatchMigrationResourceStatus fromValue(String value) { + return new SecurityMonitoringBatchMigrationResourceStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceStatusCounts.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceStatusCounts.java new file mode 100644 index 00000000000..0ace5cf0aca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceStatusCounts.java @@ -0,0 +1,364 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The number of resources of a batch migration in each status. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationResourceStatusCounts.JSON_PROPERTY_CANCELED, + SecurityMonitoringBatchMigrationResourceStatusCounts.JSON_PROPERTY_COMPLETED, + SecurityMonitoringBatchMigrationResourceStatusCounts.JSON_PROPERTY_DUPLICATE, + SecurityMonitoringBatchMigrationResourceStatusCounts.JSON_PROPERTY_FAILED, + SecurityMonitoringBatchMigrationResourceStatusCounts.JSON_PROPERTY_IN_PROGRESS, + SecurityMonitoringBatchMigrationResourceStatusCounts.JSON_PROPERTY_PENDING, + SecurityMonitoringBatchMigrationResourceStatusCounts.JSON_PROPERTY_PUBLISHED, + SecurityMonitoringBatchMigrationResourceStatusCounts.JSON_PROPERTY_PUBLISHING +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourceStatusCounts { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CANCELED = "canceled"; + private Long canceled; + + public static final String JSON_PROPERTY_COMPLETED = "completed"; + private Long completed; + + public static final String JSON_PROPERTY_DUPLICATE = "duplicate"; + private Long duplicate; + + public static final String JSON_PROPERTY_FAILED = "failed"; + private Long failed; + + public static final String JSON_PROPERTY_IN_PROGRESS = "inProgress"; + private Long inProgress; + + public static final String JSON_PROPERTY_PENDING = "pending"; + private Long pending; + + public static final String JSON_PROPERTY_PUBLISHED = "published"; + private Long published; + + public static final String JSON_PROPERTY_PUBLISHING = "publishing"; + private Long publishing; + + public SecurityMonitoringBatchMigrationResourceStatusCounts() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResourceStatusCounts( + @JsonProperty(required = true, value = JSON_PROPERTY_CANCELED) Long canceled, + @JsonProperty(required = true, value = JSON_PROPERTY_COMPLETED) Long completed, + @JsonProperty(required = true, value = JSON_PROPERTY_DUPLICATE) Long duplicate, + @JsonProperty(required = true, value = JSON_PROPERTY_FAILED) Long failed, + @JsonProperty(required = true, value = JSON_PROPERTY_IN_PROGRESS) Long inProgress, + @JsonProperty(required = true, value = JSON_PROPERTY_PENDING) Long pending, + @JsonProperty(required = true, value = JSON_PROPERTY_PUBLISHED) Long published, + @JsonProperty(required = true, value = JSON_PROPERTY_PUBLISHING) Long publishing) { + this.canceled = canceled; + this.completed = completed; + this.duplicate = duplicate; + this.failed = failed; + this.inProgress = inProgress; + this.pending = pending; + this.published = published; + this.publishing = publishing; + } + + public SecurityMonitoringBatchMigrationResourceStatusCounts canceled(Long canceled) { + this.canceled = canceled; + return this; + } + + /** + * Number of resources whose translation was canceled. + * + * @return canceled + */ + @JsonProperty(JSON_PROPERTY_CANCELED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getCanceled() { + return canceled; + } + + public void setCanceled(Long canceled) { + this.canceled = canceled; + } + + public SecurityMonitoringBatchMigrationResourceStatusCounts completed(Long completed) { + this.completed = completed; + return this; + } + + /** + * Number of resources translated and ready to be published. + * + * @return completed + */ + @JsonProperty(JSON_PROPERTY_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getCompleted() { + return completed; + } + + public void setCompleted(Long completed) { + this.completed = completed; + } + + public SecurityMonitoringBatchMigrationResourceStatusCounts duplicate(Long duplicate) { + this.duplicate = duplicate; + return this; + } + + /** + * Number of resources identified as duplicates of an existing rule. Reserved for future use. + * + * @return duplicate + */ + @JsonProperty(JSON_PROPERTY_DUPLICATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getDuplicate() { + return duplicate; + } + + public void setDuplicate(Long duplicate) { + this.duplicate = duplicate; + } + + public SecurityMonitoringBatchMigrationResourceStatusCounts failed(Long failed) { + this.failed = failed; + return this; + } + + /** + * Number of resources whose translation failed. + * + * @return failed + */ + @JsonProperty(JSON_PROPERTY_FAILED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getFailed() { + return failed; + } + + public void setFailed(Long failed) { + this.failed = failed; + } + + public SecurityMonitoringBatchMigrationResourceStatusCounts inProgress(Long inProgress) { + this.inProgress = inProgress; + return this; + } + + /** + * Number of resources being translated. + * + * @return inProgress + */ + @JsonProperty(JSON_PROPERTY_IN_PROGRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getInProgress() { + return inProgress; + } + + public void setInProgress(Long inProgress) { + this.inProgress = inProgress; + } + + public SecurityMonitoringBatchMigrationResourceStatusCounts pending(Long pending) { + this.pending = pending; + return this; + } + + /** + * Number of resources waiting to be translated. + * + * @return pending + */ + @JsonProperty(JSON_PROPERTY_PENDING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPending() { + return pending; + } + + public void setPending(Long pending) { + this.pending = pending; + } + + public SecurityMonitoringBatchMigrationResourceStatusCounts published(Long published) { + this.published = published; + return this; + } + + /** + * Number of resources published as Cloud SIEM detection rules. + * + * @return published + */ + @JsonProperty(JSON_PROPERTY_PUBLISHED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPublished() { + return published; + } + + public void setPublished(Long published) { + this.published = published; + } + + public SecurityMonitoringBatchMigrationResourceStatusCounts publishing(Long publishing) { + this.publishing = publishing; + return this; + } + + /** + * Number of resources being published. + * + * @return publishing + */ + @JsonProperty(JSON_PROPERTY_PUBLISHING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPublishing() { + return publishing; + } + + public void setPublishing(Long publishing) { + this.publishing = publishing; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResourceStatusCounts + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResourceStatusCounts putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SecurityMonitoringBatchMigrationResourceStatusCounts object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourceStatusCounts + securityMonitoringBatchMigrationResourceStatusCounts = + (SecurityMonitoringBatchMigrationResourceStatusCounts) o; + return Objects.equals( + this.canceled, securityMonitoringBatchMigrationResourceStatusCounts.canceled) + && Objects.equals( + this.completed, securityMonitoringBatchMigrationResourceStatusCounts.completed) + && Objects.equals( + this.duplicate, securityMonitoringBatchMigrationResourceStatusCounts.duplicate) + && Objects.equals(this.failed, securityMonitoringBatchMigrationResourceStatusCounts.failed) + && Objects.equals( + this.inProgress, securityMonitoringBatchMigrationResourceStatusCounts.inProgress) + && Objects.equals( + this.pending, securityMonitoringBatchMigrationResourceStatusCounts.pending) + && Objects.equals( + this.published, securityMonitoringBatchMigrationResourceStatusCounts.published) + && Objects.equals( + this.publishing, securityMonitoringBatchMigrationResourceStatusCounts.publishing) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResourceStatusCounts.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + canceled, + completed, + duplicate, + failed, + inProgress, + pending, + published, + publishing, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourceStatusCounts {\n"); + sb.append(" canceled: ").append(toIndentedString(canceled)).append("\n"); + sb.append(" completed: ").append(toIndentedString(completed)).append("\n"); + sb.append(" duplicate: ").append(toIndentedString(duplicate)).append("\n"); + sb.append(" failed: ").append(toIndentedString(failed)).append("\n"); + sb.append(" inProgress: ").append(toIndentedString(inProgress)).append("\n"); + sb.append(" pending: ").append(toIndentedString(pending)).append("\n"); + sb.append(" published: ").append(toIndentedString(published)).append("\n"); + sb.append(" publishing: ").append(toIndentedString(publishing)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceType.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceType.java new file mode 100644 index 00000000000..50ab7d49c9c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceType.java @@ -0,0 +1,63 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of resource for a batch migration resource. */ +@JsonSerialize( + using = + SecurityMonitoringBatchMigrationResourceType + .SecurityMonitoringBatchMigrationResourceTypeSerializer.class) +public class SecurityMonitoringBatchMigrationResourceType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("batchMigrationResource")); + + public static final SecurityMonitoringBatchMigrationResourceType BATCH_MIGRATION_RESOURCE = + new SecurityMonitoringBatchMigrationResourceType("batchMigrationResource"); + + SecurityMonitoringBatchMigrationResourceType(String value) { + super(value, allowedValues); + } + + public static class SecurityMonitoringBatchMigrationResourceTypeSerializer + extends StdSerializer { + public SecurityMonitoringBatchMigrationResourceTypeSerializer( + Class t) { + super(t); + } + + public SecurityMonitoringBatchMigrationResourceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SecurityMonitoringBatchMigrationResourceType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecurityMonitoringBatchMigrationResourceType fromValue(String value) { + return new SecurityMonitoringBatchMigrationResourceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceUpdateAttributes.java new file mode 100644 index 00000000000..c0ac4ecf7ed --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceUpdateAttributes.java @@ -0,0 +1,180 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** Attributes of the batch migration resource to update. At least one attribute is required. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationResourceUpdateAttributes.JSON_PROPERTY_DESCRIPTION, + SecurityMonitoringBatchMigrationResourceUpdateAttributes.JSON_PROPERTY_INPUT, + SecurityMonitoringBatchMigrationResourceUpdateAttributes.JSON_PROPERTY_INPUT_TYPE, + SecurityMonitoringBatchMigrationResourceUpdateAttributes.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourceUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_INPUT = "input"; + private String input; + + public static final String JSON_PROPERTY_INPUT_TYPE = "inputType"; + private SecurityMonitoringBatchMigrationResourceInputType inputType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public SecurityMonitoringBatchMigrationResourceUpdateAttributes description(String description) { + this.description = description; + return this; + } + + /** + * The description of the resource. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public SecurityMonitoringBatchMigrationResourceUpdateAttributes input(String input) { + this.input = input; + return this; + } + + /** + * The source query or natural language description to translate. Must not be blank. + * + * @return input + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInput() { + return input; + } + + public void setInput(String input) { + this.input = input; + } + + public SecurityMonitoringBatchMigrationResourceUpdateAttributes inputType( + SecurityMonitoringBatchMigrationResourceInputType inputType) { + this.inputType = inputType; + this.unparsed |= !inputType.isValid(); + return this; + } + + /** + * The type of the source rule: spl for a Splunk SPL search or saved search + * definition, natural_language for a plain-English description of the behavior to + * detect, or kql for a Microsoft KQL query. SPL inputs must be self-contained, with + * search macros expanded. + * + * @return inputType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SecurityMonitoringBatchMigrationResourceInputType getInputType() { + return inputType; + } + + public void setInputType(SecurityMonitoringBatchMigrationResourceInputType inputType) { + if (!inputType.isValid()) { + this.unparsed = true; + } + this.inputType = inputType; + } + + public SecurityMonitoringBatchMigrationResourceUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the resource. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + /** + * Return true if this SecurityMonitoringBatchMigrationResourceUpdateAttributes object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourceUpdateAttributes + securityMonitoringBatchMigrationResourceUpdateAttributes = + (SecurityMonitoringBatchMigrationResourceUpdateAttributes) o; + return Objects.equals( + this.description, securityMonitoringBatchMigrationResourceUpdateAttributes.description) + && Objects.equals( + this.input, securityMonitoringBatchMigrationResourceUpdateAttributes.input) + && Objects.equals( + this.inputType, securityMonitoringBatchMigrationResourceUpdateAttributes.inputType) + && Objects.equals(this.name, securityMonitoringBatchMigrationResourceUpdateAttributes.name); + } + + @Override + public int hashCode() { + return Objects.hash(description, input, inputType, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourceUpdateAttributes {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" inputType: ").append(toIndentedString(inputType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceUpdateData.java new file mode 100644 index 00000000000..06649457ddc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceUpdateData.java @@ -0,0 +1,195 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data of the batch migration resource to update. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationResourceUpdateData.JSON_PROPERTY_ATTRIBUTES, + SecurityMonitoringBatchMigrationResourceUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourceUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SecurityMonitoringBatchMigrationResourceUpdateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SecurityMonitoringBatchMigrationResourceType type; + + public SecurityMonitoringBatchMigrationResourceUpdateData() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResourceUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + SecurityMonitoringBatchMigrationResourceUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + SecurityMonitoringBatchMigrationResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SecurityMonitoringBatchMigrationResourceUpdateData attributes( + SecurityMonitoringBatchMigrationResourceUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the batch migration resource to update. At least one attribute is required. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourceUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SecurityMonitoringBatchMigrationResourceUpdateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public SecurityMonitoringBatchMigrationResourceUpdateData type( + SecurityMonitoringBatchMigrationResourceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of resource for a batch migration resource. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourceType getType() { + return type; + } + + public void setType(SecurityMonitoringBatchMigrationResourceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResourceUpdateData + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResourceUpdateData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SecurityMonitoringBatchMigrationResourceUpdateData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourceUpdateData + securityMonitoringBatchMigrationResourceUpdateData = + (SecurityMonitoringBatchMigrationResourceUpdateData) o; + return Objects.equals( + this.attributes, securityMonitoringBatchMigrationResourceUpdateData.attributes) + && Objects.equals(this.type, securityMonitoringBatchMigrationResourceUpdateData.type) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResourceUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourceUpdateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceUpdateRequest.java new file mode 100644 index 00000000000..242f94ba018 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourceUpdateRequest.java @@ -0,0 +1,157 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to update a batch migration resource. */ +@JsonPropertyOrder({SecurityMonitoringBatchMigrationResourceUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourceUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SecurityMonitoringBatchMigrationResourceUpdateData data; + + public SecurityMonitoringBatchMigrationResourceUpdateRequest() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResourceUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + SecurityMonitoringBatchMigrationResourceUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SecurityMonitoringBatchMigrationResourceUpdateRequest data( + SecurityMonitoringBatchMigrationResourceUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data of the batch migration resource to update. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourceUpdateData getData() { + return data; + } + + public void setData(SecurityMonitoringBatchMigrationResourceUpdateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResourceUpdateRequest + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResourceUpdateRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SecurityMonitoringBatchMigrationResourceUpdateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourceUpdateRequest + securityMonitoringBatchMigrationResourceUpdateRequest = + (SecurityMonitoringBatchMigrationResourceUpdateRequest) o; + return Objects.equals(this.data, securityMonitoringBatchMigrationResourceUpdateRequest.data) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResourceUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourceUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateAttributes.java new file mode 100644 index 00000000000..09d1f056444 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateAttributes.java @@ -0,0 +1,176 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of the resources to add to a batch migration. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationResourcesCreateAttributes.JSON_PROPERTY_RESOURCES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourcesCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RESOURCES = "resources"; + private List resources = new ArrayList<>(); + + public SecurityMonitoringBatchMigrationResourcesCreateAttributes() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResourcesCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCES) + List resources) { + this.resources = resources; + for (SecurityMonitoringBatchMigrationResourceCreateItem item : resources) { + this.unparsed |= item.unparsed; + } + } + + public SecurityMonitoringBatchMigrationResourcesCreateAttributes resources( + List resources) { + this.resources = resources; + for (SecurityMonitoringBatchMigrationResourceCreateItem item : resources) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SecurityMonitoringBatchMigrationResourcesCreateAttributes addResourcesItem( + SecurityMonitoringBatchMigrationResourceCreateItem resourcesItem) { + this.resources.add(resourcesItem); + this.unparsed |= resourcesItem.unparsed; + return this; + } + + /** + * The resources to add. From 1 to 1000 resources. + * + * @return resources + */ + @JsonProperty(JSON_PROPERTY_RESOURCES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResources() { + return resources; + } + + public void setResources(List resources) { + this.resources = resources; + if (resources != null) { + for (SecurityMonitoringBatchMigrationResourceCreateItem item : resources) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResourcesCreateAttributes + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResourcesCreateAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SecurityMonitoringBatchMigrationResourcesCreateAttributes object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourcesCreateAttributes + securityMonitoringBatchMigrationResourcesCreateAttributes = + (SecurityMonitoringBatchMigrationResourcesCreateAttributes) o; + return Objects.equals( + this.resources, securityMonitoringBatchMigrationResourcesCreateAttributes.resources) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResourcesCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(resources, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourcesCreateAttributes {\n"); + sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateData.java new file mode 100644 index 00000000000..f7012efbcf3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateData.java @@ -0,0 +1,195 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data of the resources to add to a batch migration. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationResourcesCreateData.JSON_PROPERTY_ATTRIBUTES, + SecurityMonitoringBatchMigrationResourcesCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourcesCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SecurityMonitoringBatchMigrationResourcesCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SecurityMonitoringBatchMigrationResourcesType type; + + public SecurityMonitoringBatchMigrationResourcesCreateData() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResourcesCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + SecurityMonitoringBatchMigrationResourcesCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + SecurityMonitoringBatchMigrationResourcesType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SecurityMonitoringBatchMigrationResourcesCreateData attributes( + SecurityMonitoringBatchMigrationResourcesCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the resources to add to a batch migration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourcesCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SecurityMonitoringBatchMigrationResourcesCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public SecurityMonitoringBatchMigrationResourcesCreateData type( + SecurityMonitoringBatchMigrationResourcesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of resource for a request on a set of batch migration resources. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourcesType getType() { + return type; + } + + public void setType(SecurityMonitoringBatchMigrationResourcesType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResourcesCreateData + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResourcesCreateData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SecurityMonitoringBatchMigrationResourcesCreateData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourcesCreateData + securityMonitoringBatchMigrationResourcesCreateData = + (SecurityMonitoringBatchMigrationResourcesCreateData) o; + return Objects.equals( + this.attributes, securityMonitoringBatchMigrationResourcesCreateData.attributes) + && Objects.equals(this.type, securityMonitoringBatchMigrationResourcesCreateData.type) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResourcesCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourcesCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateRequest.java new file mode 100644 index 00000000000..db8fe35a3a5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateRequest.java @@ -0,0 +1,158 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to add resources to a batch migration. */ +@JsonPropertyOrder({SecurityMonitoringBatchMigrationResourcesCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourcesCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SecurityMonitoringBatchMigrationResourcesCreateData data; + + public SecurityMonitoringBatchMigrationResourcesCreateRequest() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResourcesCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + SecurityMonitoringBatchMigrationResourcesCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SecurityMonitoringBatchMigrationResourcesCreateRequest data( + SecurityMonitoringBatchMigrationResourcesCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data of the resources to add to a batch migration. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourcesCreateData getData() { + return data; + } + + public void setData(SecurityMonitoringBatchMigrationResourcesCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResourcesCreateRequest + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResourcesCreateRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SecurityMonitoringBatchMigrationResourcesCreateRequest object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourcesCreateRequest + securityMonitoringBatchMigrationResourcesCreateRequest = + (SecurityMonitoringBatchMigrationResourcesCreateRequest) o; + return Objects.equals(this.data, securityMonitoringBatchMigrationResourcesCreateRequest.data) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResourcesCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourcesCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateResponse.java new file mode 100644 index 00000000000..1b306921549 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesCreateResponse.java @@ -0,0 +1,173 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing the batch migration resources that were added. */ +@JsonPropertyOrder({SecurityMonitoringBatchMigrationResourcesCreateResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourcesCreateResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public SecurityMonitoringBatchMigrationResourcesCreateResponse() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResourcesCreateResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (SecurityMonitoringBatchMigrationResourceData item : data) { + this.unparsed |= item.unparsed; + } + } + + public SecurityMonitoringBatchMigrationResourcesCreateResponse data( + List data) { + this.data = data; + for (SecurityMonitoringBatchMigrationResourceData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SecurityMonitoringBatchMigrationResourcesCreateResponse addDataItem( + SecurityMonitoringBatchMigrationResourceData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The added batch migration resources. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (SecurityMonitoringBatchMigrationResourceData item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResourcesCreateResponse + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResourcesCreateResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SecurityMonitoringBatchMigrationResourcesCreateResponse object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourcesCreateResponse + securityMonitoringBatchMigrationResourcesCreateResponse = + (SecurityMonitoringBatchMigrationResourcesCreateResponse) o; + return Objects.equals(this.data, securityMonitoringBatchMigrationResourcesCreateResponse.data) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResourcesCreateResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourcesCreateResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesDeleteAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesDeleteAttributes.java new file mode 100644 index 00000000000..1d0fe53f768 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesDeleteAttributes.java @@ -0,0 +1,164 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Attributes of the resources to delete from a batch migration. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationResourcesDeleteAttributes.JSON_PROPERTY_RESOURCE_IDS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourcesDeleteAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RESOURCE_IDS = "resourceIds"; + private List resourceIds = new ArrayList<>(); + + public SecurityMonitoringBatchMigrationResourcesDeleteAttributes() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResourcesDeleteAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_IDS) List resourceIds) { + this.resourceIds = resourceIds; + } + + public SecurityMonitoringBatchMigrationResourcesDeleteAttributes resourceIds( + List resourceIds) { + this.resourceIds = resourceIds; + return this; + } + + public SecurityMonitoringBatchMigrationResourcesDeleteAttributes addResourceIdsItem( + UUID resourceIdsItem) { + this.resourceIds.add(resourceIdsItem); + return this; + } + + /** + * Unique UUIDs of batch migration resources. From 1 to 1000 IDs. + * + * @return resourceIds + */ + @JsonProperty(JSON_PROPERTY_RESOURCE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResourceIds() { + return resourceIds; + } + + public void setResourceIds(List resourceIds) { + this.resourceIds = resourceIds; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResourcesDeleteAttributes + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResourcesDeleteAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SecurityMonitoringBatchMigrationResourcesDeleteAttributes object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourcesDeleteAttributes + securityMonitoringBatchMigrationResourcesDeleteAttributes = + (SecurityMonitoringBatchMigrationResourcesDeleteAttributes) o; + return Objects.equals( + this.resourceIds, securityMonitoringBatchMigrationResourcesDeleteAttributes.resourceIds) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResourcesDeleteAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(resourceIds, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourcesDeleteAttributes {\n"); + sb.append(" resourceIds: ").append(toIndentedString(resourceIds)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesDeleteData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesDeleteData.java new file mode 100644 index 00000000000..2684aec2a69 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesDeleteData.java @@ -0,0 +1,195 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data of the resources to delete from a batch migration. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationResourcesDeleteData.JSON_PROPERTY_ATTRIBUTES, + SecurityMonitoringBatchMigrationResourcesDeleteData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourcesDeleteData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SecurityMonitoringBatchMigrationResourcesDeleteAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SecurityMonitoringBatchMigrationResourcesType type; + + public SecurityMonitoringBatchMigrationResourcesDeleteData() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResourcesDeleteData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + SecurityMonitoringBatchMigrationResourcesDeleteAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + SecurityMonitoringBatchMigrationResourcesType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SecurityMonitoringBatchMigrationResourcesDeleteData attributes( + SecurityMonitoringBatchMigrationResourcesDeleteAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the resources to delete from a batch migration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourcesDeleteAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SecurityMonitoringBatchMigrationResourcesDeleteAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public SecurityMonitoringBatchMigrationResourcesDeleteData type( + SecurityMonitoringBatchMigrationResourcesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of resource for a request on a set of batch migration resources. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourcesType getType() { + return type; + } + + public void setType(SecurityMonitoringBatchMigrationResourcesType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResourcesDeleteData + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResourcesDeleteData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SecurityMonitoringBatchMigrationResourcesDeleteData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourcesDeleteData + securityMonitoringBatchMigrationResourcesDeleteData = + (SecurityMonitoringBatchMigrationResourcesDeleteData) o; + return Objects.equals( + this.attributes, securityMonitoringBatchMigrationResourcesDeleteData.attributes) + && Objects.equals(this.type, securityMonitoringBatchMigrationResourcesDeleteData.type) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResourcesDeleteData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourcesDeleteData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesDeleteRequest.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesDeleteRequest.java new file mode 100644 index 00000000000..c5698a749e6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesDeleteRequest.java @@ -0,0 +1,158 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to delete resources from a batch migration. */ +@JsonPropertyOrder({SecurityMonitoringBatchMigrationResourcesDeleteRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourcesDeleteRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SecurityMonitoringBatchMigrationResourcesDeleteData data; + + public SecurityMonitoringBatchMigrationResourcesDeleteRequest() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResourcesDeleteRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + SecurityMonitoringBatchMigrationResourcesDeleteData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SecurityMonitoringBatchMigrationResourcesDeleteRequest data( + SecurityMonitoringBatchMigrationResourcesDeleteData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data of the resources to delete from a batch migration. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationResourcesDeleteData getData() { + return data; + } + + public void setData(SecurityMonitoringBatchMigrationResourcesDeleteData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResourcesDeleteRequest + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResourcesDeleteRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SecurityMonitoringBatchMigrationResourcesDeleteRequest object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourcesDeleteRequest + securityMonitoringBatchMigrationResourcesDeleteRequest = + (SecurityMonitoringBatchMigrationResourcesDeleteRequest) o; + return Objects.equals(this.data, securityMonitoringBatchMigrationResourcesDeleteRequest.data) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResourcesDeleteRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourcesDeleteRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesListResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesListResponse.java new file mode 100644 index 00000000000..f9e2a573d85 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesListResponse.java @@ -0,0 +1,209 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing batch migration resources. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationResourcesListResponse.JSON_PROPERTY_DATA, + SecurityMonitoringBatchMigrationResourcesListResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResourcesListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_META = "meta"; + private SecurityMonitoringBatchMigrationListMeta meta; + + public SecurityMonitoringBatchMigrationResourcesListResponse() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResourcesListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data, + @JsonProperty(required = true, value = JSON_PROPERTY_META) + SecurityMonitoringBatchMigrationListMeta meta) { + this.data = data; + for (SecurityMonitoringBatchMigrationResourceData item : data) { + this.unparsed |= item.unparsed; + } + this.meta = meta; + this.unparsed |= meta.unparsed; + } + + public SecurityMonitoringBatchMigrationResourcesListResponse data( + List data) { + this.data = data; + for (SecurityMonitoringBatchMigrationResourceData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SecurityMonitoringBatchMigrationResourcesListResponse addDataItem( + SecurityMonitoringBatchMigrationResourceData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The batch migration resources. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (SecurityMonitoringBatchMigrationResourceData item : data) { + this.unparsed |= item.unparsed; + } + } + } + + public SecurityMonitoringBatchMigrationResourcesListResponse meta( + SecurityMonitoringBatchMigrationListMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Metadata of a list response. + * + * @return meta + */ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationListMeta getMeta() { + return meta; + } + + public void setMeta(SecurityMonitoringBatchMigrationListMeta meta) { + this.meta = meta; + if (meta != null) { + this.unparsed |= meta.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResourcesListResponse + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResourcesListResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SecurityMonitoringBatchMigrationResourcesListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResourcesListResponse + securityMonitoringBatchMigrationResourcesListResponse = + (SecurityMonitoringBatchMigrationResourcesListResponse) o; + return Objects.equals(this.data, securityMonitoringBatchMigrationResourcesListResponse.data) + && Objects.equals(this.meta, securityMonitoringBatchMigrationResourcesListResponse.meta) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResourcesListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResourcesListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesType.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesType.java new file mode 100644 index 00000000000..31c6dae1754 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResourcesType.java @@ -0,0 +1,63 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of resource for a request on a set of batch migration resources. */ +@JsonSerialize( + using = + SecurityMonitoringBatchMigrationResourcesType + .SecurityMonitoringBatchMigrationResourcesTypeSerializer.class) +public class SecurityMonitoringBatchMigrationResourcesType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("batchMigrationResources")); + + public static final SecurityMonitoringBatchMigrationResourcesType BATCH_MIGRATION_RESOURCES = + new SecurityMonitoringBatchMigrationResourcesType("batchMigrationResources"); + + SecurityMonitoringBatchMigrationResourcesType(String value) { + super(value, allowedValues); + } + + public static class SecurityMonitoringBatchMigrationResourcesTypeSerializer + extends StdSerializer { + public SecurityMonitoringBatchMigrationResourcesTypeSerializer( + Class t) { + super(t); + } + + public SecurityMonitoringBatchMigrationResourcesTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SecurityMonitoringBatchMigrationResourcesType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecurityMonitoringBatchMigrationResourcesType fromValue(String value) { + return new SecurityMonitoringBatchMigrationResourcesType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResponse.java new file mode 100644 index 00000000000..0f0935ecf47 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationResponse.java @@ -0,0 +1,152 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a batch migration. */ +@JsonPropertyOrder({SecurityMonitoringBatchMigrationResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SecurityMonitoringBatchMigrationData data; + + public SecurityMonitoringBatchMigrationResponse() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + SecurityMonitoringBatchMigrationData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SecurityMonitoringBatchMigrationResponse data(SecurityMonitoringBatchMigrationData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * A batch migration. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationData getData() { + return data; + } + + public void setData(SecurityMonitoringBatchMigrationData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationResponse + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationResponse securityMonitoringBatchMigrationResponse = + (SecurityMonitoringBatchMigrationResponse) o; + return Objects.equals(this.data, securityMonitoringBatchMigrationResponse.data) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationStatus.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationStatus.java new file mode 100644 index 00000000000..20f1b2c51cd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationStatus.java @@ -0,0 +1,73 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The status of a batch migration. A batch migration is created as draft and moves to + * in_progress when started. It moves to completed once no resource is + * pending or in_progress, or to canceled when canceled. + */ +@JsonSerialize( + using = + SecurityMonitoringBatchMigrationStatus.SecurityMonitoringBatchMigrationStatusSerializer + .class) +public class SecurityMonitoringBatchMigrationStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("draft", "in_progress", "canceled", "completed")); + + public static final SecurityMonitoringBatchMigrationStatus DRAFT = + new SecurityMonitoringBatchMigrationStatus("draft"); + public static final SecurityMonitoringBatchMigrationStatus IN_PROGRESS = + new SecurityMonitoringBatchMigrationStatus("in_progress"); + public static final SecurityMonitoringBatchMigrationStatus CANCELED = + new SecurityMonitoringBatchMigrationStatus("canceled"); + public static final SecurityMonitoringBatchMigrationStatus COMPLETED = + new SecurityMonitoringBatchMigrationStatus("completed"); + + SecurityMonitoringBatchMigrationStatus(String value) { + super(value, allowedValues); + } + + public static class SecurityMonitoringBatchMigrationStatusSerializer + extends StdSerializer { + public SecurityMonitoringBatchMigrationStatusSerializer( + Class t) { + super(t); + } + + public SecurityMonitoringBatchMigrationStatusSerializer() { + this(null); + } + + @Override + public void serialize( + SecurityMonitoringBatchMigrationStatus value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecurityMonitoringBatchMigrationStatus fromValue(String value) { + return new SecurityMonitoringBatchMigrationStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationType.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationType.java new file mode 100644 index 00000000000..8949ea1635d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationType.java @@ -0,0 +1,60 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of resource for a batch migration. */ +@JsonSerialize( + using = + SecurityMonitoringBatchMigrationType.SecurityMonitoringBatchMigrationTypeSerializer.class) +public class SecurityMonitoringBatchMigrationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("batchMigration")); + + public static final SecurityMonitoringBatchMigrationType BATCH_MIGRATION = + new SecurityMonitoringBatchMigrationType("batchMigration"); + + SecurityMonitoringBatchMigrationType(String value) { + super(value, allowedValues); + } + + public static class SecurityMonitoringBatchMigrationTypeSerializer + extends StdSerializer { + public SecurityMonitoringBatchMigrationTypeSerializer( + Class t) { + super(t); + } + + public SecurityMonitoringBatchMigrationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SecurityMonitoringBatchMigrationType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecurityMonitoringBatchMigrationType fromValue(String value) { + return new SecurityMonitoringBatchMigrationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationUpdateAttributes.java new file mode 100644 index 00000000000..0876875875e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationUpdateAttributes.java @@ -0,0 +1,150 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** Attributes of the batch migration to update. At least one attribute is required. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationUpdateAttributes.JSON_PROPERTY_DESCRIPTION, + SecurityMonitoringBatchMigrationUpdateAttributes.JSON_PROPERTY_NAME, + SecurityMonitoringBatchMigrationUpdateAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public SecurityMonitoringBatchMigrationUpdateAttributes description(String description) { + this.description = description; + return this; + } + + /** + * The description of the batch migration. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public SecurityMonitoringBatchMigrationUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the batch migration. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SecurityMonitoringBatchMigrationUpdateAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public SecurityMonitoringBatchMigrationUpdateAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tags of the batch migration. Up to 50 tags, each up to 256 characters. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + /** Return true if this SecurityMonitoringBatchMigrationUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationUpdateAttributes + securityMonitoringBatchMigrationUpdateAttributes = + (SecurityMonitoringBatchMigrationUpdateAttributes) o; + return Objects.equals( + this.description, securityMonitoringBatchMigrationUpdateAttributes.description) + && Objects.equals(this.name, securityMonitoringBatchMigrationUpdateAttributes.name) + && Objects.equals(this.tags, securityMonitoringBatchMigrationUpdateAttributes.tags); + } + + @Override + public int hashCode() { + return Objects.hash(description, name, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationUpdateAttributes {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationUpdateData.java new file mode 100644 index 00000000000..9291e98b4ba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationUpdateData.java @@ -0,0 +1,191 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data of the batch migration to update. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationUpdateData.JSON_PROPERTY_ATTRIBUTES, + SecurityMonitoringBatchMigrationUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SecurityMonitoringBatchMigrationUpdateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SecurityMonitoringBatchMigrationType type; + + public SecurityMonitoringBatchMigrationUpdateData() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + SecurityMonitoringBatchMigrationUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + SecurityMonitoringBatchMigrationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SecurityMonitoringBatchMigrationUpdateData attributes( + SecurityMonitoringBatchMigrationUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the batch migration to update. At least one attribute is required. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SecurityMonitoringBatchMigrationUpdateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public SecurityMonitoringBatchMigrationUpdateData type( + SecurityMonitoringBatchMigrationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of resource for a batch migration. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationType getType() { + return type; + } + + public void setType(SecurityMonitoringBatchMigrationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationUpdateData + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationUpdateData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationUpdateData securityMonitoringBatchMigrationUpdateData = + (SecurityMonitoringBatchMigrationUpdateData) o; + return Objects.equals(this.attributes, securityMonitoringBatchMigrationUpdateData.attributes) + && Objects.equals(this.type, securityMonitoringBatchMigrationUpdateData.type) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationUpdateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationUpdateRequest.java new file mode 100644 index 00000000000..7684744701a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationUpdateRequest.java @@ -0,0 +1,154 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to update a batch migration. */ +@JsonPropertyOrder({SecurityMonitoringBatchMigrationUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SecurityMonitoringBatchMigrationUpdateData data; + + public SecurityMonitoringBatchMigrationUpdateRequest() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + SecurityMonitoringBatchMigrationUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SecurityMonitoringBatchMigrationUpdateRequest data( + SecurityMonitoringBatchMigrationUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data of the batch migration to update. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationUpdateData getData() { + return data; + } + + public void setData(SecurityMonitoringBatchMigrationUpdateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationUpdateRequest + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationUpdateRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationUpdateRequest securityMonitoringBatchMigrationUpdateRequest = + (SecurityMonitoringBatchMigrationUpdateRequest) o; + return Objects.equals(this.data, securityMonitoringBatchMigrationUpdateRequest.data) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationsListResponse.java b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationsListResponse.java new file mode 100644 index 00000000000..5085c4df194 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecurityMonitoringBatchMigrationsListResponse.java @@ -0,0 +1,206 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing a page of batch migrations. */ +@JsonPropertyOrder({ + SecurityMonitoringBatchMigrationsListResponse.JSON_PROPERTY_DATA, + SecurityMonitoringBatchMigrationsListResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecurityMonitoringBatchMigrationsListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_META = "meta"; + private SecurityMonitoringBatchMigrationListMeta meta; + + public SecurityMonitoringBatchMigrationsListResponse() {} + + @JsonCreator + public SecurityMonitoringBatchMigrationsListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data, + @JsonProperty(required = true, value = JSON_PROPERTY_META) + SecurityMonitoringBatchMigrationListMeta meta) { + this.data = data; + for (SecurityMonitoringBatchMigrationData item : data) { + this.unparsed |= item.unparsed; + } + this.meta = meta; + this.unparsed |= meta.unparsed; + } + + public SecurityMonitoringBatchMigrationsListResponse data( + List data) { + this.data = data; + for (SecurityMonitoringBatchMigrationData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SecurityMonitoringBatchMigrationsListResponse addDataItem( + SecurityMonitoringBatchMigrationData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The batch migrations. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (SecurityMonitoringBatchMigrationData item : data) { + this.unparsed |= item.unparsed; + } + } + } + + public SecurityMonitoringBatchMigrationsListResponse meta( + SecurityMonitoringBatchMigrationListMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Metadata of a list response. + * + * @return meta + */ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecurityMonitoringBatchMigrationListMeta getMeta() { + return meta; + } + + public void setMeta(SecurityMonitoringBatchMigrationListMeta meta) { + this.meta = meta; + if (meta != null) { + this.unparsed |= meta.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecurityMonitoringBatchMigrationsListResponse + */ + @JsonAnySetter + public SecurityMonitoringBatchMigrationsListResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SecurityMonitoringBatchMigrationsListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityMonitoringBatchMigrationsListResponse securityMonitoringBatchMigrationsListResponse = + (SecurityMonitoringBatchMigrationsListResponse) o; + return Objects.equals(this.data, securityMonitoringBatchMigrationsListResponse.data) + && Objects.equals(this.meta, securityMonitoringBatchMigrationsListResponse.meta) + && Objects.equals( + this.additionalProperties, + securityMonitoringBatchMigrationsListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityMonitoringBatchMigrationsListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index b307445fc2c..e20aaeae64f 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/given.json @@ -1618,6 +1618,31 @@ "tag": "Security Monitoring", "operationId": "CreateVulnerabilityNotificationRule" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"batchMigration\",\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"description\": \"Rules imported from Splunk\",\n \"tags\": [\"source:splunk\"],\n \"resources\": [\n {\n \"name\": \"Repeated Windows login failures\",\n \"inputType\": \"spl\",\n \"input\": \"index=wineventlog EventCode=4625\"\n }\n ]\n }\n }\n}" + } + ], + "step": "there is a valid \"batch_migration\" in the system", + "key": "batch_migration", + "tag": "Security Monitoring", + "operationId": "CreateSecurityMonitoringBatchMigration" + }, + { + "parameters": [ + { + "name": "batch_id", + "value": "\"{{ batch_migration.data.id }}\"" + } + ], + "source": "data[0]", + "step": "there is a valid \"batch_migration_resource\" in the system", + "key": "batch_migration_resource", + "tag": "Security Monitoring", + "operationId": "ListSecurityMonitoringBatchMigrationResources" + }, { "parameters": [ { diff --git a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature index 3a2ac120f41..49b1f7aeecd 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature @@ -52,6 +52,46 @@ Feature: Security Monitoring When the request is sent Then the response status is 404 Not Found + @generated @skip @team:ddoghq/cloud-siem + Scenario: Add resources to a batch migration returns "Bad Request" response + Given operation "CreateSecurityMonitoringBatchMigrationResources" enabled + And new "CreateSecurityMonitoringBatchMigrationResources" request + And request contains "batch_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"resources": [{"description": "Detects repeated failed Windows authentication attempts.", "input": "index=wineventlog EventCode=4625", "inputType": "spl", "name": "Repeated Windows login failures"}]}, "type": "batchMigrationResources"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Add resources to a batch migration returns "Conflict" response + Given operation "CreateSecurityMonitoringBatchMigrationResources" enabled + And new "CreateSecurityMonitoringBatchMigrationResources" request + And request contains "batch_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"resources": [{"description": "Detects repeated failed Windows authentication attempts.", "input": "index=wineventlog EventCode=4625", "inputType": "spl", "name": "Repeated Windows login failures"}]}, "type": "batchMigrationResources"}} + When the request is sent + Then the response status is 409 Conflict + + @team:ddoghq/cloud-siem + Scenario: Add resources to a batch migration returns "Created" response + Given operation "CreateSecurityMonitoringBatchMigrationResources" enabled + And there is a valid "batch_migration" in the system + And new "CreateSecurityMonitoringBatchMigrationResources" request + And request contains "batch_id" parameter from "batch_migration.data.id" + And body with value {"data": {"type": "batchMigrationResources", "attributes": {"resources": [{"name": "Linux sudo abuse", "inputType": "spl", "input": "index=linux process=sudo \"authentication failure\" | stats count by user, host"}]}}} + When the request is sent + Then the response status is 201 Created + And the response "data" has length 1 + And the response "data[0].attributes.name" is equal to "Linux sudo abuse" + And the response "data[0].attributes.status" is equal to "pending" + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Add resources to a batch migration returns "Not Found" response + Given operation "CreateSecurityMonitoringBatchMigrationResources" enabled + And new "CreateSecurityMonitoringBatchMigrationResources" request + And request contains "batch_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"resources": [{"description": "Detects repeated failed Windows authentication attempts.", "input": "index=wineventlog EventCode=4625", "inputType": "spl", "name": "Repeated Windows login failures"}]}, "type": "batchMigrationResources"}} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:ddoghq/k9-vm-ast Scenario: Analyze code returns "Bad Request" response Given operation "CreateStaticAnalysisServerAnalysis" enabled @@ -357,6 +397,38 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK + @generated @skip @team:ddoghq/cloud-siem + Scenario: Cancel a batch migration returns "Accepted" response + Given operation "CancelSecurityMonitoringBatchMigration" enabled + And new "CancelSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 202 Accepted + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Cancel a batch migration returns "Bad Request" response + Given operation "CancelSecurityMonitoringBatchMigration" enabled + And new "CancelSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Cancel a batch migration returns "Conflict" response + Given operation "CancelSecurityMonitoringBatchMigration" enabled + And new "CancelSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Cancel a batch migration returns "Not Found" response + Given operation "CancelSecurityMonitoringBatchMigration" enabled + And new "CancelSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @team:ddoghq/cloud-siem Scenario: Cancel a historical job returns "Bad Request" response Given operation "CancelHistoricalJob" enabled @@ -651,6 +723,26 @@ Feature: Security Monitoring When the request is sent Then the response status is 404 Not Found + @generated @skip @team:ddoghq/cloud-siem + Scenario: Create a batch migration returns "Bad Request" response + Given operation "CreateSecurityMonitoringBatchMigration" enabled + And new "CreateSecurityMonitoringBatchMigration" request + And body with value {"data": {"attributes": {"description": "Rules imported from Splunk", "name": "Splunk migration", "resources": [{"description": "Detects repeated failed Windows authentication attempts.", "input": "index=wineventlog EventCode=4625", "inputType": "spl", "name": "Repeated Windows login failures"}], "tags": ["source:splunk"]}, "type": "batchMigration"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:ddoghq/cloud-siem + Scenario: Create a batch migration returns "Created" response + Given operation "CreateSecurityMonitoringBatchMigration" enabled + And new "CreateSecurityMonitoringBatchMigration" request + And body with value {"data": {"type": "batchMigration", "attributes": {"name": "{{ unique }}", "description": "Rules imported from Splunk", "tags": ["source:splunk"], "resources": [{"name": "Repeated Windows login failures", "description": "Detects repeated failed Windows authentication attempts.", "inputType": "spl", "input": "index=wineventlog EventCode=4625"}]}}} + When the request is sent + Then the response status is 201 Created + And the response "data.type" is equal to "batchMigration" + And the response "data.attributes.name" is equal to "{{ unique }}" + And the response "data.attributes.status" is equal to "draft" + And the response "data.attributes.resourceStatusCounts.pending" is equal to 1 + @skip-validation @team:ddoghq/cloud-siem Scenario: Create a cloud_configuration rule returns "OK" response Given new "CreateSecurityMonitoringRule" request @@ -1218,6 +1310,39 @@ Feature: Security Monitoring When the request is sent Then the response status is 404 Not Found + @generated @skip @team:ddoghq/cloud-siem + Scenario: Delete a batch migration returns "Bad Request" response + Given operation "DeleteSecurityMonitoringBatchMigration" enabled + And new "DeleteSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Delete a batch migration returns "Conflict" response + Given operation "DeleteSecurityMonitoringBatchMigration" enabled + And new "DeleteSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 409 Conflict + + @team:ddoghq/cloud-siem + Scenario: Delete a batch migration returns "No Content" response + Given operation "DeleteSecurityMonitoringBatchMigration" enabled + And there is a valid "batch_migration" in the system + And new "DeleteSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "batch_migration.data.id" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Delete a batch migration returns "Not Found" response + Given operation "DeleteSecurityMonitoringBatchMigration" enabled + And new "DeleteSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @team:ddoghq/cloud-siem Scenario: Delete a critical asset returns "Not Found" response Given new "DeleteSecurityMonitoringCriticalAsset" request @@ -1536,6 +1661,44 @@ Feature: Security Monitoring When the request is sent Then the response status is 204 Successfully deleted the inbox rule + @generated @skip @team:ddoghq/cloud-siem + Scenario: Delete resources from a batch migration returns "Bad Request" response + Given operation "DeleteSecurityMonitoringBatchMigrationResources" enabled + And new "DeleteSecurityMonitoringBatchMigrationResources" request + And request contains "batch_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"resourceIds": ["c968cf83-56c2-4d54-a993-6c86dfb83527"]}, "type": "batchMigrationResources"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Delete resources from a batch migration returns "Conflict" response + Given operation "DeleteSecurityMonitoringBatchMigrationResources" enabled + And new "DeleteSecurityMonitoringBatchMigrationResources" request + And request contains "batch_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"resourceIds": ["c968cf83-56c2-4d54-a993-6c86dfb83527"]}, "type": "batchMigrationResources"}} + When the request is sent + Then the response status is 409 Conflict + + @team:ddoghq/cloud-siem + Scenario: Delete resources from a batch migration returns "No Content" response + Given operation "DeleteSecurityMonitoringBatchMigrationResources" enabled + And there is a valid "batch_migration" in the system + And there is a valid "batch_migration_resource" in the system + And new "DeleteSecurityMonitoringBatchMigrationResources" request + And request contains "batch_id" parameter from "batch_migration.data.id" + And body with value {"data": {"type": "batchMigrationResources", "attributes": {"resourceIds": ["{{ batch_migration_resource.id }}"]}}} + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Delete resources from a batch migration returns "Not Found" response + Given operation "DeleteSecurityMonitoringBatchMigrationResources" enabled + And new "DeleteSecurityMonitoringBatchMigrationResources" request + And request contains "batch_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"resourceIds": ["c968cf83-56c2-4d54-a993-6c86dfb83527"]}, "type": "batchMigrationResources"}} + When the request is sent + Then the response status is 404 Not Found + @team:ddoghq/k9-investigation Scenario: Detach security findings from their case returns "Bad Request" response Given new "DetachCase" request @@ -2763,6 +2926,52 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK + @generated @skip @team:ddoghq/cloud-siem + Scenario: List batch migration resources returns "Bad Request" response + Given operation "ListSecurityMonitoringBatchMigrationResources" enabled + And new "ListSecurityMonitoringBatchMigrationResources" request + And request contains "batch_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/cloud-siem + Scenario: List batch migration resources returns "Not Found" response + Given operation "ListSecurityMonitoringBatchMigrationResources" enabled + And new "ListSecurityMonitoringBatchMigrationResources" request + And request contains "batch_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:ddoghq/cloud-siem + Scenario: List batch migration resources returns "OK" response + Given operation "ListSecurityMonitoringBatchMigrationResources" enabled + And there is a valid "batch_migration" in the system + And new "ListSecurityMonitoringBatchMigrationResources" request + And request contains "batch_id" parameter from "batch_migration.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + And the response "data[0].attributes.batchId" has the same value as "batch_migration.data.id" + And the response "data[0].attributes.status" is equal to "pending" + + @generated @skip @team:ddoghq/cloud-siem + Scenario: List batch migrations returns "Bad Request" response + Given operation "ListSecurityMonitoringBatchMigrations" enabled + And new "ListSecurityMonitoringBatchMigrations" request + When the request is sent + Then the response status is 400 Bad Request + + @team:ddoghq/cloud-siem + Scenario: List batch migrations returns "OK" response + Given operation "ListSecurityMonitoringBatchMigrations" enabled + And there is a valid "batch_migration" in the system + And new "ListSecurityMonitoringBatchMigrations" request + And request contains "filter[query]" parameter with value "id:{{ batch_migration.data.id }}" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + And the response "data[0].id" has the same value as "batch_migration.data.id" + @generated @skip @team:ddoghq/k9-vm-ast Scenario: List codegen rulesets returns "Bad Request" response Given operation "ListStaticAnalysisCodegenRulesets" enabled @@ -3213,6 +3422,42 @@ Feature: Security Monitoring When the request is sent Then the response status is 422 The server cannot process the request because it contains invalid data. + @generated @skip @team:ddoghq/cloud-siem + Scenario: Publish a batch migration returns "Bad Request" response + Given operation "PublishSecurityMonitoringBatchMigration" enabled + And new "PublishSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"resourceIds": ["c968cf83-56c2-4d54-a993-6c86dfb83527"]}, "type": "batchMigrationPublish"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Publish a batch migration returns "Conflict" response + Given operation "PublishSecurityMonitoringBatchMigration" enabled + And new "PublishSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"resourceIds": ["c968cf83-56c2-4d54-a993-6c86dfb83527"]}, "type": "batchMigrationPublish"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Publish a batch migration returns "Not Found" response + Given operation "PublishSecurityMonitoringBatchMigration" enabled + And new "PublishSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"resourceIds": ["c968cf83-56c2-4d54-a993-6c86dfb83527"]}, "type": "batchMigrationPublish"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Publish a batch migration returns "OK" response + Given operation "PublishSecurityMonitoringBatchMigration" enabled + And new "PublishSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"resourceIds": ["c968cf83-56c2-4d54-a993-6c86dfb83527"]}, "type": "batchMigrationPublish"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:ddoghq/k9-automation Scenario: Reorder due date rules returns "Bad Request" response Given operation "ReorderSecurityFindingsAutomationDueDateRules" enabled @@ -3467,6 +3712,38 @@ Feature: Security Monitoring And the response "meta.page" has field "after" And the response "links" has field "next" + @generated @skip @team:ddoghq/cloud-siem + Scenario: Start a batch migration returns "Accepted" response + Given operation "StartSecurityMonitoringBatchMigration" enabled + And new "StartSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 202 Accepted + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Start a batch migration returns "Bad Request" response + Given operation "StartSecurityMonitoringBatchMigration" enabled + And new "StartSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Start a batch migration returns "Conflict" response + Given operation "StartSecurityMonitoringBatchMigration" enabled + And new "StartSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Start a batch migration returns "Not Found" response + Given operation "StartSecurityMonitoringBatchMigration" enabled + And new "StartSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:ddoghq/cloud-siem Scenario: Subscribe to sample log generation returns "Bad Request" response Given operation "CreateSampleLogGenerationSubscription" enabled @@ -3580,6 +3857,81 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK + @generated @skip @team:ddoghq/cloud-siem + Scenario: Update a batch migration resource returns "Bad Request" response + Given operation "UpdateSecurityMonitoringBatchMigrationResource" enabled + And new "UpdateSecurityMonitoringBatchMigrationResource" request + And request contains "batch_id" parameter from "REPLACE.ME" + And request contains "resource_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Detects repeated failed Windows authentication attempts.", "input": "index=wineventlog EventCode=4625 | stats count by user", "inputType": "spl", "name": "Repeated Windows login failures"}, "type": "batchMigrationResource"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Update a batch migration resource returns "Conflict" response + Given operation "UpdateSecurityMonitoringBatchMigrationResource" enabled + And new "UpdateSecurityMonitoringBatchMigrationResource" request + And request contains "batch_id" parameter from "REPLACE.ME" + And request contains "resource_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Detects repeated failed Windows authentication attempts.", "input": "index=wineventlog EventCode=4625 | stats count by user", "inputType": "spl", "name": "Repeated Windows login failures"}, "type": "batchMigrationResource"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Update a batch migration resource returns "Not Found" response + Given operation "UpdateSecurityMonitoringBatchMigrationResource" enabled + And new "UpdateSecurityMonitoringBatchMigrationResource" request + And request contains "batch_id" parameter from "REPLACE.ME" + And request contains "resource_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Detects repeated failed Windows authentication attempts.", "input": "index=wineventlog EventCode=4625 | stats count by user", "inputType": "spl", "name": "Repeated Windows login failures"}, "type": "batchMigrationResource"}} + When the request is sent + Then the response status is 404 Not Found + + @team:ddoghq/cloud-siem + Scenario: Update a batch migration resource returns "OK" response + Given operation "UpdateSecurityMonitoringBatchMigrationResource" enabled + And there is a valid "batch_migration" in the system + And there is a valid "batch_migration_resource" in the system + And new "UpdateSecurityMonitoringBatchMigrationResource" request + And request contains "batch_id" parameter from "batch_migration.data.id" + And request contains "resource_id" parameter from "batch_migration_resource.id" + And body with value {"data": {"type": "batchMigrationResource", "attributes": {"input": "index=wineventlog EventCode=4625 | stats count by user"}}} + When the request is sent + Then the response status is 200 OK + And the response "data.id" has the same value as "batch_migration_resource.id" + And the response "data.attributes.input" is equal to "index=wineventlog EventCode=4625 | stats count by user" + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Update a batch migration returns "Bad Request" response + Given operation "UpdateSecurityMonitoringBatchMigration" enabled + And new "UpdateSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Rules imported from Splunk", "name": "Splunk migration - Windows", "tags": ["source:splunk"]}, "type": "batchMigration"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/cloud-siem + Scenario: Update a batch migration returns "Not Found" response + Given operation "UpdateSecurityMonitoringBatchMigration" enabled + And new "UpdateSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Rules imported from Splunk", "name": "Splunk migration - Windows", "tags": ["source:splunk"]}, "type": "batchMigration"}} + When the request is sent + Then the response status is 404 Not Found + + @team:ddoghq/cloud-siem + Scenario: Update a batch migration returns "OK" response + Given operation "UpdateSecurityMonitoringBatchMigration" enabled + And there is a valid "batch_migration" in the system + And new "UpdateSecurityMonitoringBatchMigration" request + And request contains "batch_id" parameter from "batch_migration.data.id" + And body with value {"data": {"type": "batchMigration", "attributes": {"name": "{{ unique }}-updated", "tags": ["source:splunk", "team:secops"]}}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" is equal to "{{ unique }}-updated" + And the response "data.attributes.tags" is equal to ["source:splunk", "team:secops"] + And the response "data.attributes.description" has the same value as "batch_migration.data.attributes.description" + @skip-validation @team:ddoghq/cloud-siem Scenario: Update a cloud configuration rule's details returns "OK" response Given new "UpdateSecurityMonitoringRule" request diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 8b44c941575..b467adbbf53 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -8960,6 +8960,87 @@ "type": "safe" } }, + "ListSecurityMonitoringBatchMigrations": { + "tag": "Security Monitoring", + "undo": { + "type": "safe" + } + }, + "CreateSecurityMonitoringBatchMigration": { + "tag": "Security Monitoring", + "undo": { + "operationId": "DeleteSecurityMonitoringBatchMigration", + "parameters": [ + { + "name": "batch_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteSecurityMonitoringBatchMigration": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "UpdateSecurityMonitoringBatchMigration": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "CancelSecurityMonitoringBatchMigration": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "PublishSecurityMonitoringBatchMigration": { + "tag": "Security Monitoring", + "undo": { + "type": "unsafe" + } + }, + "DeleteSecurityMonitoringBatchMigrationResources": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "ListSecurityMonitoringBatchMigrationResources": { + "tag": "Security Monitoring", + "undo": { + "type": "safe" + } + }, + "CreateSecurityMonitoringBatchMigrationResources": { + "tag": "Security Monitoring", + "undo": { + "operationId": "DeleteSecurityMonitoringBatchMigration", + "parameters": [ + { + "name": "batch_id", + "origin": "path", + "source": "batch_id" + } + ], + "type": "unsafe" + } + }, + "UpdateSecurityMonitoringBatchMigrationResource": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "StartSecurityMonitoringBatchMigration": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, "ListCloudWorkloadSecurityAgentRules": { "tag": "CSM Threats", "undo": { diff --git a/src/test/resources/generated-test/test-runner-data/manifest.json b/src/test/resources/generated-test/test-runner-data/manifest.json index b9b66fc3b14..599a12bf6f1 100644 --- a/src/test/resources/generated-test/test-runner-data/manifest.json +++ b/src/test/resources/generated-test/test-runner-data/manifest.json @@ -9723,6 +9723,13 @@ "scenario": "Unassign seats from users returns \"Unprocessable Entity\" response when user_uuids is empty", "version": "v2" }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/add-resources-to-a-batch-migration-returns-created-response.json", + "scenario": "Add resources to a batch migration returns \"Created\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", @@ -9912,6 +9919,13 @@ "scenario": "Create Jira issues for security findings returns \"Not Found\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/create-a-batch-migration-returns-created-response.json", + "scenario": "Create a batch migration returns \"Created\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", @@ -10150,6 +10164,13 @@ "scenario": "Create or update an indicator triage state returns \"Created\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/delete-a-batch-migration-returns-no-content-response.json", + "scenario": "Delete a batch migration returns \"No Content\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", @@ -10276,6 +10297,13 @@ "scenario": "Delete an inbox rule returns \"Successfully deleted the inbox rule\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/delete-resources-from-a-batch-migration-returns-no-content-response.json", + "scenario": "Delete resources from a batch migration returns \"No Content\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", @@ -10710,6 +10738,20 @@ "scenario": "List assets SBOMs returns \"OK\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/list-batch-migration-resources-returns-ok-response.json", + "scenario": "List batch migration resources returns \"OK\" response", + "version": "v2" + }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/list-batch-migrations-returns-ok-response.json", + "scenario": "List batch migrations returns \"OK\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", @@ -11032,6 +11074,20 @@ "scenario": "Unmute security findings returns \"Unprocessable Entity\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/update-a-batch-migration-resource-returns-ok-response.json", + "scenario": "Update a batch migration resource returns \"OK\" response", + "version": "v2" + }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/update-a-batch-migration-returns-ok-response.json", + "scenario": "Update a batch migration returns \"OK\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/add-resources-to-a-batch-migration-returns-created-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/add-resources-to-a-batch-migration-returns-created-response.json new file mode 100644 index 00000000000..c704e45d854 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/add-resources-to-a-batch-migration-returns-created-response.json @@ -0,0 +1,56 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 201, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Add resources to a batch migration returns \"Created\" response", + "operation_id": "CreateSecurityMonitoringBatchMigrationResources", + "request": { + "body": { + "schema": { + "format": null, + "ref": "SecurityMonitoringBatchMigrationResourcesCreateRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "resources": [ + { + "input": "index=linux process=sudo \"authentication failure\" | stats count by user, host", + "inputType": "spl", + "name": "Linux sudo abuse" + } + ] + }, + "type": "batchMigrationResources" + } + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "batch_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "batch_migration.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/security_monitoring/batch-migrations/{batch_id}/resources" + }, + "scenario": "Add resources to a batch migration returns \"Created\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/create-a-batch-migration-returns-created-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/create-a-batch-migration-returns-created-response.json new file mode 100644 index 00000000000..f400718abd0 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/create-a-batch-migration-returns-created-response.json @@ -0,0 +1,45 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 201, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Create a batch migration returns \"Created\" response", + "operation_id": "CreateSecurityMonitoringBatchMigration", + "request": { + "body": { + "schema": { + "format": null, + "ref": "SecurityMonitoringBatchMigrationCreateRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "description": "Rules imported from Splunk", + "name": "{{ unique }}", + "resources": [ + { + "description": "Detects repeated failed Windows authentication attempts.", + "input": "index=wineventlog EventCode=4625", + "inputType": "spl", + "name": "Repeated Windows login failures" + } + ], + "tags": [ + "source:splunk" + ] + }, + "type": "batchMigration" + } + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [], + "path": "/api/v2/security_monitoring/batch-migrations" + }, + "scenario": "Create a batch migration returns \"Created\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/delete-a-batch-migration-returns-no-content-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/delete-a-batch-migration-returns-no-content-response.json new file mode 100644 index 00000000000..2ee775a52e2 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/delete-a-batch-migration-returns-no-content-response.json @@ -0,0 +1,35 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 204, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Delete a batch migration returns \"No Content\" response", + "operation_id": "DeleteSecurityMonitoringBatchMigration", + "request": { + "body": null, + "content_type": null, + "method": "DELETE", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "batch_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "batch_migration.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/security_monitoring/batch-migrations/{batch_id}" + }, + "scenario": "Delete a batch migration returns \"No Content\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/delete-resources-from-a-batch-migration-returns-no-content-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/delete-resources-from-a-batch-migration-returns-no-content-response.json new file mode 100644 index 00000000000..96f23357f93 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/delete-resources-from-a-batch-migration-returns-no-content-response.json @@ -0,0 +1,52 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 204, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Delete resources from a batch migration returns \"No Content\" response", + "operation_id": "DeleteSecurityMonitoringBatchMigrationResources", + "request": { + "body": { + "schema": { + "format": null, + "ref": "SecurityMonitoringBatchMigrationResourcesDeleteRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "resourceIds": [ + "{{ batch_migration_resource.id }}" + ] + }, + "type": "batchMigrationResources" + } + } + }, + "content_type": "application/json", + "method": "DELETE", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "batch_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "batch_migration.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/security_monitoring/batch-migrations/{batch_id}/resources" + }, + "scenario": "Delete resources from a batch migration returns \"No Content\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/list-batch-migration-resources-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/list-batch-migration-resources-returns-ok-response.json new file mode 100644 index 00000000000..bb3a1ea4327 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/list-batch-migration-resources-returns-ok-response.json @@ -0,0 +1,35 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 200, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/List batch migration resources returns \"OK\" response", + "operation_id": "ListSecurityMonitoringBatchMigrationResources", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "batch_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "batch_migration.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/security_monitoring/batch-migrations/{batch_id}/resources" + }, + "scenario": "List batch migration resources returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/list-batch-migrations-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/list-batch-migrations-returns-ok-response.json new file mode 100644 index 00000000000..a92497acb9d --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/list-batch-migrations-returns-ok-response.json @@ -0,0 +1,35 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 200, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/List batch migrations returns \"OK\" response", + "operation_id": "ListSecurityMonitoringBatchMigrations", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "query", + "name": "filter[query]", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "id:{{ batch_migration.data.id }}" + }, + "style": null + } + ], + "path": "/api/v2/security_monitoring/batch-migrations" + }, + "scenario": "List batch migrations returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-batch-migration-resource-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-batch-migration-resource-returns-ok-response.json new file mode 100644 index 00000000000..38916579d02 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-batch-migration-resource-returns-ok-response.json @@ -0,0 +1,66 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 200, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Update a batch migration resource returns \"OK\" response", + "operation_id": "UpdateSecurityMonitoringBatchMigrationResource", + "request": { + "body": { + "schema": { + "format": null, + "ref": "SecurityMonitoringBatchMigrationResourceUpdateRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "input": "index=wineventlog EventCode=4625 | stats count by user" + }, + "type": "batchMigrationResource" + } + } + }, + "content_type": "application/json", + "method": "PATCH", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "batch_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "batch_migration.data.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": null, + "in": "path", + "name": "resource_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "batch_migration_resource.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/security_monitoring/batch-migrations/{batch_id}/resources/{resource_id}" + }, + "scenario": "Update a batch migration resource returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-batch-migration-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-batch-migration-returns-ok-response.json new file mode 100644 index 00000000000..8b8c8a4526f --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-batch-migration-returns-ok-response.json @@ -0,0 +1,54 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 200, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Update a batch migration returns \"OK\" response", + "operation_id": "UpdateSecurityMonitoringBatchMigration", + "request": { + "body": { + "schema": { + "format": null, + "ref": "SecurityMonitoringBatchMigrationUpdateRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "name": "{{ unique }}-updated", + "tags": [ + "source:splunk", + "team:secops" + ] + }, + "type": "batchMigration" + } + } + }, + "content_type": "application/json", + "method": "PATCH", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "batch_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "batch_migration.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/security_monitoring/batch-migrations/{batch_id}" + }, + "scenario": "Update a batch migration returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-server-data/v2/security-monitoring.json b/src/test/resources/generated-test/test-server-data/v2/security-monitoring.json index 43e65f4bef5..a1d8f896f0c 100644 --- a/src/test/resources/generated-test/test-server-data/v2/security-monitoring.json +++ b/src/test/resources/generated-test/test-server-data/v2/security-monitoring.json @@ -1,6 +1,135 @@ { "feature": "Security Monitoring", "recordings": [ + { + "feature": "Security Monitoring", + "frozen_at": "2026-10-16T11:40:25.719Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "description": "Rules imported from Splunk", + "name": "Test-Add_resources_to_a_batch_migration_returns_Created_response-1792150825", + "resources": [ + { + "input": "index=wineventlog EventCode=4625", + "inputType": "spl", + "name": "Repeated Windows login failures" + } + ], + "tags": [ + "source:splunk" + ] + }, + "type": "batchMigration" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/security_monitoring/batch-migrations", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"c8acb77f-ab3f-4d81-ba8c-7a63ce5ad84e\",\"type\":\"batchMigration\",\"attributes\":{\"createdAt\":\"2026-10-16T11:40:27.371898Z\",\"createdBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"description\":\"Rules imported from Splunk\",\"inputSource\":\"batch_migration\",\"lastUpdatedAt\":\"2026-10-16T11:40:27.371898Z\",\"lastUpdatedBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"name\":\"Test-Add_resources_to_a_batch_migration_returns_Created_response-1792150825\",\"orgId\":321813,\"resourceStatusCounts\":{\"pending\":1,\"inProgress\":0,\"completed\":0,\"canceled\":0,\"failed\":0,\"publishing\":0,\"published\":0,\"duplicate\":0},\"status\":\"draft\",\"tags\":[\"source:splunk\"]}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "resources": [ + { + "input": "index=linux process=sudo \"authentication failure\" | stats count by user, host", + "inputType": "spl", + "name": "Linux sudo abuse" + } + ] + }, + "type": "batchMigrationResources" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/security_monitoring/batch-migrations/c8acb77f-ab3f-4d81-ba8c-7a63ce5ad84e/resources", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"ed73ea28-42dc-4313-8340-a62ccddff61b\",\"type\":\"batchMigrationResource\",\"attributes\":{\"batchId\":\"c8acb77f-ab3f-4d81-ba8c-7a63ce5ad84e\",\"createdAt\":\"2026-10-16T11:40:27.543286Z\",\"createdBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"input\":\"index=linux process=sudo \\\"authentication failure\\\" | stats count by user, host\",\"inputType\":\"spl\",\"lastUpdatedAt\":\"2026-10-16T11:40:27.543286Z\",\"lastUpdatedBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"name\":\"Linux sudo abuse\",\"output\":null,\"outputType\":\"siem_rule\",\"status\":\"pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security_monitoring/batch-migrations/c8acb77f-ab3f-4d81-ba8c-7a63ce5ad84e", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security_monitoring/batch-migrations/c8acb77f-ab3f-4d81-ba8c-7a63ce5ad84e", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"detail\":\"batch migration not found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Add resources to a batch migration returns \"Created\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "frozen_at": "2026-10-08T12:23:32.869Z", @@ -1601,6 +1730,77 @@ "scenario": "Create Jira issues for security findings returns \"Not Found\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-10-16T11:40:27.944Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "description": "Rules imported from Splunk", + "name": "Test-Create_a_batch_migration_returns_Created_response-1792150827", + "resources": [ + { + "description": "Detects repeated failed Windows authentication attempts.", + "input": "index=wineventlog EventCode=4625", + "inputType": "spl", + "name": "Repeated Windows login failures" + } + ], + "tags": [ + "source:splunk" + ] + }, + "type": "batchMigration" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/security_monitoring/batch-migrations", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"1d186fc0-0dee-47c1-8a42-6f1626b46253\",\"type\":\"batchMigration\",\"attributes\":{\"createdAt\":\"2026-10-16T11:40:28.064962Z\",\"createdBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"description\":\"Rules imported from Splunk\",\"inputSource\":\"batch_migration\",\"lastUpdatedAt\":\"2026-10-16T11:40:28.064962Z\",\"lastUpdatedBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"name\":\"Test-Create_a_batch_migration_returns_Created_response-1792150827\",\"orgId\":321813,\"resourceStatusCounts\":{\"pending\":1,\"inProgress\":0,\"completed\":0,\"canceled\":0,\"failed\":0,\"publishing\":0,\"published\":0,\"duplicate\":0},\"status\":\"draft\",\"tags\":[\"source:splunk\"]}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security_monitoring/batch-migrations/1d186fc0-0dee-47c1-8a42-6f1626b46253", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Create a batch migration returns \"Created\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "frozen_at": "2024-05-10T16:34:27.362Z", @@ -4328,6 +4528,99 @@ "scenario": "Create or update an indicator triage state returns \"Created\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-10-16T11:40:28.297Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "description": "Rules imported from Splunk", + "name": "Test-Delete_a_batch_migration_returns_No_Content_response-1792150828", + "resources": [ + { + "input": "index=wineventlog EventCode=4625", + "inputType": "spl", + "name": "Repeated Windows login failures" + } + ], + "tags": [ + "source:splunk" + ] + }, + "type": "batchMigration" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/security_monitoring/batch-migrations", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"5e372cc3-56e1-48e0-9628-8f94c8486483\",\"type\":\"batchMigration\",\"attributes\":{\"createdAt\":\"2026-10-16T11:40:28.408635Z\",\"createdBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"description\":\"Rules imported from Splunk\",\"inputSource\":\"batch_migration\",\"lastUpdatedAt\":\"2026-10-16T11:40:28.408635Z\",\"lastUpdatedBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"name\":\"Test-Delete_a_batch_migration_returns_No_Content_response-1792150828\",\"orgId\":321813,\"resourceStatusCounts\":{\"pending\":1,\"inProgress\":0,\"completed\":0,\"canceled\":0,\"failed\":0,\"publishing\":0,\"published\":0,\"duplicate\":0},\"status\":\"draft\",\"tags\":[\"source:splunk\"]}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security_monitoring/batch-migrations/5e372cc3-56e1-48e0-9628-8f94c8486483", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security_monitoring/batch-migrations/5e372cc3-56e1-48e0-9628-8f94c8486483", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"detail\":\"batch migration not found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Delete a batch migration returns \"No Content\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "frozen_at": "2026-01-02T19:09:07.983Z", @@ -5653,7 +5946,7 @@ }, { "feature": "Security Monitoring", - "frozen_at": "2025-11-20T16:07:27.292Z", + "frozen_at": "2026-10-16T11:40:28.793Z", "interactions": [ { "request": { @@ -5661,18 +5954,141 @@ "type": "json", "value": { "data": { - "relationships": { - "findings": { - "data": [] - } + "attributes": { + "description": "Rules imported from Splunk", + "name": "Test-Delete_resources_from_a_batch_migration_returns_No_Content_response-1792150828", + "resources": [ + { + "input": "index=wineventlog EventCode=4625", + "inputType": "spl", + "name": "Repeated Windows login failures" + } + ], + "tags": [ + "source:splunk" + ] }, - "type": "cases" + "type": "batchMigration" } } }, "content_type": "application/json", - "method": "DELETE", - "path": "/api/v2/security/findings/cases", + "method": "POST", + "path": "/api/v2/security_monitoring/batch-migrations", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"41c9062b-cc72-4892-9edd-e12d063e1b3e\",\"type\":\"batchMigration\",\"attributes\":{\"createdAt\":\"2026-10-16T11:40:28.894065Z\",\"createdBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"description\":\"Rules imported from Splunk\",\"inputSource\":\"batch_migration\",\"lastUpdatedAt\":\"2026-10-16T11:40:28.894065Z\",\"lastUpdatedBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"name\":\"Test-Delete_resources_from_a_batch_migration_returns_No_Content_response-1792150828\",\"orgId\":321813,\"resourceStatusCounts\":{\"pending\":1,\"inProgress\":0,\"completed\":0,\"canceled\":0,\"failed\":0,\"publishing\":0,\"published\":0,\"duplicate\":0},\"status\":\"draft\",\"tags\":[\"source:splunk\"]}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/security_monitoring/batch-migrations/41c9062b-cc72-4892-9edd-e12d063e1b3e/resources", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"3ac8ef63-32f5-421a-ba9c-5e13cf538aab\",\"type\":\"batchMigrationResource\",\"attributes\":{\"batchId\":\"41c9062b-cc72-4892-9edd-e12d063e1b3e\",\"createdAt\":\"2026-10-16T11:40:28.894065Z\",\"createdBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"input\":\"index=wineventlog EventCode=4625\",\"inputType\":\"spl\",\"lastUpdatedAt\":\"2026-10-16T11:40:28.894065Z\",\"lastUpdatedBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"name\":\"Repeated Windows login failures\",\"output\":null,\"outputType\":\"siem_rule\",\"status\":\"pending\"}}],\"meta\":{\"totalCount\":1}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "resourceIds": [ + "3ac8ef63-32f5-421a-ba9c-5e13cf538aab" + ] + }, + "type": "batchMigrationResources" + } + } + }, + "content_type": "application/json", + "method": "DELETE", + "path": "/api/v2/security_monitoring/batch-migrations/41c9062b-cc72-4892-9edd-e12d063e1b3e/resources", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security_monitoring/batch-migrations/41c9062b-cc72-4892-9edd-e12d063e1b3e", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Delete resources from a batch migration returns \"No Content\" response", + "version": "v2" + }, + { + "feature": "Security Monitoring", + "frozen_at": "2025-11-20T16:07:27.292Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "relationships": { + "findings": { + "data": [] + } + }, + "type": "cases" + } + } + }, + "content_type": "application/json", + "method": "DELETE", + "path": "/api/v2/security/findings/cases", "query": [] }, "response": { @@ -10038,6 +10454,197 @@ "scenario": "List assets SBOMs returns \"OK\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-10-16T11:40:29.430Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "description": "Rules imported from Splunk", + "name": "Test-List_batch_migration_resources_returns_OK_response-1792150829", + "resources": [ + { + "input": "index=wineventlog EventCode=4625", + "inputType": "spl", + "name": "Repeated Windows login failures" + } + ], + "tags": [ + "source:splunk" + ] + }, + "type": "batchMigration" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/security_monitoring/batch-migrations", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"98125ff6-2691-4222-b62d-01a146ca7314\",\"type\":\"batchMigration\",\"attributes\":{\"createdAt\":\"2026-10-16T11:40:29.536705Z\",\"createdBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"description\":\"Rules imported from Splunk\",\"inputSource\":\"batch_migration\",\"lastUpdatedAt\":\"2026-10-16T11:40:29.536705Z\",\"lastUpdatedBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"name\":\"Test-List_batch_migration_resources_returns_OK_response-1792150829\",\"orgId\":321813,\"resourceStatusCounts\":{\"pending\":1,\"inProgress\":0,\"completed\":0,\"canceled\":0,\"failed\":0,\"publishing\":0,\"published\":0,\"duplicate\":0},\"status\":\"draft\",\"tags\":[\"source:splunk\"]}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/security_monitoring/batch-migrations/98125ff6-2691-4222-b62d-01a146ca7314/resources", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"b34397f1-e95a-486c-8960-409bfa6989db\",\"type\":\"batchMigrationResource\",\"attributes\":{\"batchId\":\"98125ff6-2691-4222-b62d-01a146ca7314\",\"createdAt\":\"2026-10-16T11:40:29.536705Z\",\"createdBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"input\":\"index=wineventlog EventCode=4625\",\"inputType\":\"spl\",\"lastUpdatedAt\":\"2026-10-16T11:40:29.536705Z\",\"lastUpdatedBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"name\":\"Repeated Windows login failures\",\"output\":null,\"outputType\":\"siem_rule\",\"status\":\"pending\"}}],\"meta\":{\"totalCount\":1}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security_monitoring/batch-migrations/98125ff6-2691-4222-b62d-01a146ca7314", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "List batch migration resources returns \"OK\" response", + "version": "v2" + }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-10-16T11:40:29.908Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "description": "Rules imported from Splunk", + "name": "Test-List_batch_migrations_returns_OK_response-1792150829", + "resources": [ + { + "input": "index=wineventlog EventCode=4625", + "inputType": "spl", + "name": "Repeated Windows login failures" + } + ], + "tags": [ + "source:splunk" + ] + }, + "type": "batchMigration" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/security_monitoring/batch-migrations", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"80b4557e-efc6-45ce-84b9-2ce4d2b8bd58\",\"type\":\"batchMigration\",\"attributes\":{\"createdAt\":\"2026-10-16T11:40:30.025529Z\",\"createdBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"description\":\"Rules imported from Splunk\",\"inputSource\":\"batch_migration\",\"lastUpdatedAt\":\"2026-10-16T11:40:30.025529Z\",\"lastUpdatedBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"name\":\"Test-List_batch_migrations_returns_OK_response-1792150829\",\"orgId\":321813,\"resourceStatusCounts\":{\"pending\":1,\"inProgress\":0,\"completed\":0,\"canceled\":0,\"failed\":0,\"publishing\":0,\"published\":0,\"duplicate\":0},\"status\":\"draft\",\"tags\":[\"source:splunk\"]}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/security_monitoring/batch-migrations", + "query": [ + [ + "filter[query]", + "id:80b4557e-efc6-45ce-84b9-2ce4d2b8bd58" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"80b4557e-efc6-45ce-84b9-2ce4d2b8bd58\",\"type\":\"batchMigration\",\"attributes\":{\"createdAt\":\"2026-10-16T11:40:30.025529Z\",\"createdBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"description\":\"Rules imported from Splunk\",\"inputSource\":\"batch_migration\",\"lastUpdatedAt\":\"2026-10-16T11:40:30.025529Z\",\"lastUpdatedBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"name\":\"Test-List_batch_migrations_returns_OK_response-1792150829\",\"orgId\":321813,\"resourceStatusCounts\":{\"pending\":1,\"inProgress\":0,\"completed\":0,\"canceled\":0,\"failed\":0,\"publishing\":0,\"published\":0,\"duplicate\":0},\"status\":\"draft\",\"tags\":[\"source:splunk\"]}}],\"meta\":{\"totalCount\":1}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security_monitoring/batch-migrations/80b4557e-efc6-45ce-84b9-2ce4d2b8bd58", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "List batch migrations returns \"OK\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "frozen_at": "2023-04-13T12:26:02.750Z", @@ -13058,6 +13665,233 @@ "scenario": "Unmute security findings returns \"Unprocessable Entity\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-10-16T11:40:30.425Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "description": "Rules imported from Splunk", + "name": "Test-Update_a_batch_migration_resource_returns_OK_response-1792150830", + "resources": [ + { + "input": "index=wineventlog EventCode=4625", + "inputType": "spl", + "name": "Repeated Windows login failures" + } + ], + "tags": [ + "source:splunk" + ] + }, + "type": "batchMigration" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/security_monitoring/batch-migrations", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"e0d9aff4-46cb-4ffd-8e72-7752878e09ec\",\"type\":\"batchMigration\",\"attributes\":{\"createdAt\":\"2026-10-16T11:40:30.529101Z\",\"createdBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"description\":\"Rules imported from Splunk\",\"inputSource\":\"batch_migration\",\"lastUpdatedAt\":\"2026-10-16T11:40:30.529101Z\",\"lastUpdatedBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"name\":\"Test-Update_a_batch_migration_resource_returns_OK_response-1792150830\",\"orgId\":321813,\"resourceStatusCounts\":{\"pending\":1,\"inProgress\":0,\"completed\":0,\"canceled\":0,\"failed\":0,\"publishing\":0,\"published\":0,\"duplicate\":0},\"status\":\"draft\",\"tags\":[\"source:splunk\"]}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/security_monitoring/batch-migrations/e0d9aff4-46cb-4ffd-8e72-7752878e09ec/resources", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"968512c2-fbbe-43ed-8ec1-c718cf97b19b\",\"type\":\"batchMigrationResource\",\"attributes\":{\"batchId\":\"e0d9aff4-46cb-4ffd-8e72-7752878e09ec\",\"createdAt\":\"2026-10-16T11:40:30.529101Z\",\"createdBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"input\":\"index=wineventlog EventCode=4625\",\"inputType\":\"spl\",\"lastUpdatedAt\":\"2026-10-16T11:40:30.529101Z\",\"lastUpdatedBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"name\":\"Repeated Windows login failures\",\"output\":null,\"outputType\":\"siem_rule\",\"status\":\"pending\"}}],\"meta\":{\"totalCount\":1}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "input": "index=wineventlog EventCode=4625 | stats count by user" + }, + "type": "batchMigrationResource" + } + } + }, + "content_type": "application/json", + "method": "PATCH", + "path": "/api/v2/security_monitoring/batch-migrations/e0d9aff4-46cb-4ffd-8e72-7752878e09ec/resources/968512c2-fbbe-43ed-8ec1-c718cf97b19b", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"968512c2-fbbe-43ed-8ec1-c718cf97b19b\",\"type\":\"batchMigrationResource\",\"attributes\":{\"batchId\":\"e0d9aff4-46cb-4ffd-8e72-7752878e09ec\",\"createdAt\":\"2026-10-16T11:40:30.529101Z\",\"createdBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"input\":\"index=wineventlog EventCode=4625 | stats count by user\",\"inputType\":\"spl\",\"lastUpdatedAt\":\"2026-10-16T11:40:30.854488Z\",\"lastUpdatedBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"name\":\"Repeated Windows login failures\",\"output\":null,\"outputType\":\"siem_rule\",\"status\":\"pending\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security_monitoring/batch-migrations/e0d9aff4-46cb-4ffd-8e72-7752878e09ec", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Update a batch migration resource returns \"OK\" response", + "version": "v2" + }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-10-16T11:40:31.062Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "description": "Rules imported from Splunk", + "name": "Test-Update_a_batch_migration_returns_OK_response-1792150831", + "resources": [ + { + "input": "index=wineventlog EventCode=4625", + "inputType": "spl", + "name": "Repeated Windows login failures" + } + ], + "tags": [ + "source:splunk" + ] + }, + "type": "batchMigration" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/security_monitoring/batch-migrations", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"6ec704f1-29d6-47a3-b0ed-1a68ae58ee8b\",\"type\":\"batchMigration\",\"attributes\":{\"createdAt\":\"2026-10-16T11:40:31.174851Z\",\"createdBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"description\":\"Rules imported from Splunk\",\"inputSource\":\"batch_migration\",\"lastUpdatedAt\":\"2026-10-16T11:40:31.174851Z\",\"lastUpdatedBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"name\":\"Test-Update_a_batch_migration_returns_OK_response-1792150831\",\"orgId\":321813,\"resourceStatusCounts\":{\"pending\":1,\"inProgress\":0,\"completed\":0,\"canceled\":0,\"failed\":0,\"publishing\":0,\"published\":0,\"duplicate\":0},\"status\":\"draft\",\"tags\":[\"source:splunk\"]}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "name": "Test-Update_a_batch_migration_returns_OK_response-1792150831-updated", + "tags": [ + "source:splunk", + "team:secops" + ] + }, + "type": "batchMigration" + } + } + }, + "content_type": "application/json", + "method": "PATCH", + "path": "/api/v2/security_monitoring/batch-migrations/6ec704f1-29d6-47a3-b0ed-1a68ae58ee8b", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"6ec704f1-29d6-47a3-b0ed-1a68ae58ee8b\",\"type\":\"batchMigration\",\"attributes\":{\"createdAt\":\"2026-10-16T11:40:31.174851Z\",\"createdBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"description\":\"Rules imported from Splunk\",\"inputSource\":\"batch_migration\",\"lastUpdatedAt\":\"2026-10-16T11:40:31.344792Z\",\"lastUpdatedBy\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"name\":\"Test-Update_a_batch_migration_returns_OK_response-1792150831-updated\",\"orgId\":321813,\"resourceStatusCounts\":{\"pending\":1,\"inProgress\":0,\"completed\":0,\"canceled\":0,\"failed\":0,\"publishing\":0,\"published\":0,\"duplicate\":0},\"status\":\"draft\",\"tags\":[\"source:splunk\",\"team:secops\"]}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security_monitoring/batch-migrations/6ec704f1-29d6-47a3-b0ed-1a68ae58ee8b", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Update a batch migration returns \"OK\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "frozen_at": "2024-11-22T13:52:07.331Z",