diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 92c1c1fc720d..97b673c86d7d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -11187,6 +11187,27 @@ components: required: - data type: object + AutomationRuleCreator: + description: The user who created or last modified the rule. + properties: + id: + description: The ID of the user who created or modified the rule. + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + name: + description: The name of the user who created or modified the rule. + example: "Jane Doe" + type: string + type: + description: The type of actor who created or modified the rule. + example: user + type: string + required: + - type + - id + - name + type: object AutomationRuleRelationships: description: Related resources for the automation rule, including the users who created and last modified it. properties: @@ -11203,6 +11224,19 @@ components: required: - data type: object + AutomationRuleScope: + description: Defines the scope of findings to which the automation rule applies. + properties: + finding_types: + $ref: "#/components/schemas/SecurityFindingTypes" + query: + description: A search query to further filter the findings matched by this rule. The `@workflow.*` namespace, and the `@is_in_security_inbox` and `@status` fields, are not permitted. + example: "env:prod team:platform" + maxLength: 30000 + type: string + required: + - finding_types + type: object AutomationRuleTrigger: description: Defines when the rule activates. Combines a trigger type (the case event to listen for) with optional trigger data (conditions that narrow when the trigger fires). properties: @@ -31390,6 +31424,213 @@ components: - type - attributes type: object + DueDateFrom: + description: The reference point from which the due date is calculated. + enum: + - first_seen + - fix_available + example: first_seen + type: string + x-enum-varnames: + - FIRST_SEEN + - FIX_AVAILABLE + DueDatePerSeverityItem: + description: A mapping of a severity level to the number of days until a finding is due. + properties: + due_in_days: + description: The number of days from the reference point until the finding is due. + example: 7 + format: int64 + minimum: 1 + type: integer + severity: + $ref: "#/components/schemas/DueDateSeverity" + required: + - severity + - due_in_days + type: object + DueDatePerSeverityList: + description: A list of severity-to-due-date mappings. + items: + $ref: "#/components/schemas/DueDatePerSeverityItem" + type: array + DueDateRuleAction: + description: The action to take when the due date rule matches a finding. + properties: + due_days_per_severity: + $ref: "#/components/schemas/DueDatePerSeverityList" + due_from: + $ref: "#/components/schemas/DueDateFrom" + reason_description: + description: An optional description providing more context for the due date assignment. + example: "Applied for production findings only" + maxLength: 20000 + type: string + required: + - due_days_per_severity + - due_from + type: object + DueDateRuleAttributesCreate: + description: Attributes for creating or updating a due date rule. + properties: + action: + $ref: "#/components/schemas/DueDateRuleAction" + enabled: + description: Whether the due date rule is enabled. + example: true + type: boolean + name: + description: The name of the due date rule. + example: "Critical findings due in 7 days" + maxLength: 255 + type: string + rule: + $ref: "#/components/schemas/AutomationRuleScope" + required: + - name + - enabled + - rule + - action + type: object + DueDateRuleAttributesResponse: + description: Attributes of a due date rule returned by the API. + properties: + action: + $ref: "#/components/schemas/DueDateRuleAction" + created_at: + description: The Unix timestamp in milliseconds when the rule was created. + example: 1722439510282 + format: int64 + type: integer + created_by: + $ref: "#/components/schemas/AutomationRuleCreator" + enabled: + description: Whether the due date rule is enabled. + example: true + type: boolean + modified_at: + description: The Unix timestamp in milliseconds when the rule was last modified. + example: 1722439510282 + format: int64 + type: integer + modified_by: + $ref: "#/components/schemas/AutomationRuleCreator" + name: + description: The name of the due date rule. + example: "Critical findings due in 7 days" + maxLength: 255 + type: string + rule: + $ref: "#/components/schemas/AutomationRuleScope" + required: + - name + - enabled + - rule + - action + - created_at + - created_by + - modified_at + - modified_by + type: object + DueDateRuleCreateRequest: + description: The body of a due date rule create request. + properties: + data: + $ref: "#/components/schemas/DueDateRuleDataCreate" + required: + - data + type: object + DueDateRuleDataCreate: + description: The data object for a due date rule create or update request. + properties: + attributes: + $ref: "#/components/schemas/DueDateRuleAttributesCreate" + type: + $ref: "#/components/schemas/DueDateRuleType" + required: + - type + - attributes + type: object + DueDateRuleDataResponse: + description: The data object for a due date rule returned by the API. + properties: + attributes: + $ref: "#/components/schemas/DueDateRuleAttributesResponse" + id: + description: The ID of the due date rule. + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + type: + $ref: "#/components/schemas/DueDateRuleType" + required: + - id + - type + - attributes + type: object + DueDateRuleResponse: + description: A single due date rule response. + properties: + data: + $ref: "#/components/schemas/DueDateRuleDataResponse" + required: + - data + type: object + DueDateRuleType: + description: The JSON:API type for due date rules. + enum: + - due_date_rules + example: due_date_rules + type: string + x-enum-varnames: + - DUE_DATE_RULES + DueDateRuleUpdateRequest: + description: The body of a due date rule update request. + properties: + data: + $ref: "#/components/schemas/DueDateRuleDataCreate" + required: + - data + type: object + DueDateRulesDataList: + description: A list of due date rule data objects. + items: + $ref: "#/components/schemas/DueDateRuleDataResponse" + type: array + DueDateRulesResponse: + description: A list of due date rules with pagination metadata. + properties: + data: + $ref: "#/components/schemas/DueDateRulesDataList" + links: + $ref: "#/components/schemas/SecurityAutomationRulesLinks" + meta: + $ref: "#/components/schemas/SecurityAutomationRulesMeta" + required: + - data + - meta + - links + type: object + DueDateSeverity: + description: A severity level used to configure due date thresholds. + enum: + - critical + - high + - medium + - low + - unknown + - info + - none + example: critical + type: string + x-enum-varnames: + - CRITICAL + - HIGH + - MEDIUM + - LOW + - UNKNOWN + - INFO + - NONE ELFSourcemapAttributes: description: Attributes of an ELF symbol file. properties: @@ -60281,6 +60522,183 @@ components: - type - id type: object + MuteReason: + description: The reason for muting a security finding. + enum: + - duplicate + - false_positive + - no_fix + - other + - pending_fix + - risk_accepted + example: risk_accepted + type: string + x-enum-varnames: + - DUPLICATE + - FALSE_POSITIVE + - NO_FIX + - OTHER + - PENDING_FIX + - RISK_ACCEPTED + MuteRuleAction: + description: The action to take when the mute rule matches a finding. + properties: + expire_at: + description: The Unix timestamp in milliseconds at which the mute expires. If omitted, the mute does not expire. + example: 4070908800000 + format: int64 + type: integer + reason: + $ref: "#/components/schemas/MuteReason" + reason_description: + description: An optional description providing more context for the mute reason. + example: "Accepted for dev environments only" + maxLength: 20000 + type: string + required: + - reason + type: object + MuteRuleAttributesCreate: + description: Attributes for creating or updating a mute rule. + properties: + action: + $ref: "#/components/schemas/MuteRuleAction" + enabled: + description: Whether the mute rule is enabled. + example: true + type: boolean + name: + description: The name of the mute rule. + example: "Mute accepted risks in dev" + maxLength: 255 + type: string + rule: + $ref: "#/components/schemas/AutomationRuleScope" + required: + - name + - enabled + - rule + - action + type: object + MuteRuleAttributesResponse: + description: Attributes of a mute rule returned by the API. + properties: + action: + $ref: "#/components/schemas/MuteRuleAction" + created_at: + description: The Unix timestamp in milliseconds when the rule was created. + example: 1722439510282 + format: int64 + type: integer + created_by: + $ref: "#/components/schemas/AutomationRuleCreator" + enabled: + description: Whether the mute rule is enabled. + example: true + type: boolean + modified_at: + description: The Unix timestamp in milliseconds when the rule was last modified. + example: 1722439510282 + format: int64 + type: integer + modified_by: + $ref: "#/components/schemas/AutomationRuleCreator" + name: + description: The name of the mute rule. + example: "Mute accepted risks in dev" + maxLength: 255 + type: string + rule: + $ref: "#/components/schemas/AutomationRuleScope" + required: + - name + - enabled + - rule + - action + - created_at + - created_by + - modified_at + - modified_by + type: object + MuteRuleCreateRequest: + description: The body of a mute rule create request. + properties: + data: + $ref: "#/components/schemas/MuteRuleDataCreate" + required: + - data + type: object + MuteRuleDataCreate: + description: The data object for a mute rule create or update request. + properties: + attributes: + $ref: "#/components/schemas/MuteRuleAttributesCreate" + type: + $ref: "#/components/schemas/MuteRuleType" + required: + - type + - attributes + type: object + MuteRuleDataResponse: + description: The data object for a mute rule returned by the API. + properties: + attributes: + $ref: "#/components/schemas/MuteRuleAttributesResponse" + id: + description: The ID of the mute rule. + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + type: + $ref: "#/components/schemas/MuteRuleType" + required: + - id + - type + - attributes + type: object + MuteRuleResponse: + description: A single mute rule response. + properties: + data: + $ref: "#/components/schemas/MuteRuleDataResponse" + required: + - data + type: object + MuteRuleType: + description: The JSON:API type for mute rules. + enum: + - mute_rules + example: mute_rules + type: string + x-enum-varnames: + - MUTE_RULES + MuteRuleUpdateRequest: + description: The body of a mute rule update request. + properties: + data: + $ref: "#/components/schemas/MuteRuleDataCreate" + required: + - data + type: object + MuteRulesDataList: + description: A list of mute rule data objects. + items: + $ref: "#/components/schemas/MuteRuleDataResponse" + type: array + MuteRulesResponse: + description: A list of mute rules with pagination metadata. + properties: + data: + $ref: "#/components/schemas/MuteRulesDataList" + links: + $ref: "#/components/schemas/SecurityAutomationRulesLinks" + meta: + $ref: "#/components/schemas/SecurityAutomationRulesMeta" + required: + - data + - meta + - links + type: object NDKSourcemapAttributes: description: Attributes of an Android NDK symbol file. properties: @@ -81933,6 +82351,77 @@ components: - SYSTEM - LIGHT - DARK + SecurityAutomationRuleReorderData: + description: An ordered list of rule references representing the desired rule order. + items: + $ref: "#/components/schemas/SecurityAutomationRuleReorderItem" + type: array + SecurityAutomationRuleReorderItem: + description: A reference to an automation rule used for reordering. + properties: + id: + description: The ID of the automation rule. + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + type: + description: The type of the automation rule. + example: mute_rules + type: string + required: + - type + - id + type: object + SecurityAutomationRuleReorderRequest: + description: The body of the reorder request. + properties: + data: + $ref: "#/components/schemas/SecurityAutomationRuleReorderData" + required: + - data + type: object + SecurityAutomationRulesLinks: + description: Pagination links for the list of automation rules. + properties: + first: + description: Link to the first page of results. + example: "/api/v2/security/findings/automation/mute_rules?page[size]=10&page[number]=0" + type: string + last: + description: Link to the last page of results. + example: "/api/v2/security/findings/automation/mute_rules?page[size]=10&page[number]=5" + type: string + next: + description: Link to the next page of results. + example: "/api/v2/security/findings/automation/mute_rules?page[size]=10&page[number]=2" + type: string + prev: + description: Link to the previous page of results. + example: "/api/v2/security/findings/automation/mute_rules?page[size]=10&page[number]=0" + type: string + required: + - first + - last + type: object + SecurityAutomationRulesMeta: + description: Metadata for the list of automation rules. + properties: + page: + $ref: "#/components/schemas/SecurityAutomationRulesPageInfo" + required: + - page + type: object + SecurityAutomationRulesPageInfo: + description: Pagination information for the list of automation rules. + properties: + total_filtered_count: + description: The total number of rules matching the current filter. + example: 42 + format: int64 + type: integer + required: + - total_filtered_count + type: object SecurityEntityConfigRisks: description: Configuration risks associated with the entity properties: @@ -82537,6 +83026,41 @@ components: meta: $ref: "#/components/schemas/SecurityFilterMeta" type: object + SecurityFindingType: + description: The type of security finding that the automation rule applies to. + enum: + - api_security + - attack_path + - host_and_container_vulnerability + - iac_misconfiguration + - identity_risk + - library_vulnerability + - misconfiguration + - runtime_code_vulnerability + - secret + - static_code_vulnerability + - workload_activity + example: misconfiguration + type: string + x-enum-varnames: + - API_SECURITY + - ATTACK_PATH + - HOST_AND_CONTAINER_VULNERABILITY + - IAC_MISCONFIGURATION + - IDENTITY_RISK + - LIBRARY_VULNERABILITY + - MISCONFIGURATION + - RUNTIME_CODE_VULNERABILITY + - SECRET + - STATIC_CODE_VULNERABILITY + - WORKLOAD_ACTIVITY + SecurityFindingTypes: + description: The list of security finding types that the automation rule applies to. + example: + - misconfiguration + items: + $ref: "#/components/schemas/SecurityFindingType" + type: array SecurityFindingsAttributes: description: The JSON object containing all attributes of the security finding. properties: @@ -101019,6 +101543,194 @@ components: type: string x-enum-varnames: - TEST_OPTIMIZATION_UPDATE_SERVICE_SETTINGS_REQUEST + TicketCreationRuleAction: + description: The action to take when the ticket creation rule matches a finding. + properties: + assignee_id: + description: The UUID of the default assignee for created tickets. + example: "22222222-2222-2222-2222-222222222222" + format: uuid + type: string + auto_disabled_reason: + description: The reason the rule was automatically disabled by the system due to a ticketing integration error. + example: "Daily ticket creation limit exceeded" + type: string + fields: + description: Custom fields of the Jira issue to create. For the list of available fields, see [Jira documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-createmeta-projectidorkey-issuetypes-issuetypeid-get). + example: + labels: + - security + type: object + max_tickets_per_day: + description: The maximum number of tickets the rule may create per day. If exceeded, one final ticket will be created, explaining the limit was hit and link back to the responsible rule. + example: 100 + format: int64 + maximum: 500 + minimum: 1 + type: integer + project_id: + description: The UUID of the case management project. + example: "11111111-1111-1111-1111-111111111111" + format: uuid + type: string + target: + $ref: "#/components/schemas/TicketCreationTarget" + required: + - project_id + - target + - max_tickets_per_day + type: object + TicketCreationRuleAttributesCreate: + description: Attributes for creating or updating a ticket creation rule. + properties: + action: + $ref: "#/components/schemas/TicketCreationRuleAction" + enabled: + description: Whether the ticket creation rule is enabled. + example: true + type: boolean + name: + description: The name of the ticket creation rule. + example: "Auto-create Jira tickets for critical findings" + maxLength: 255 + type: string + rule: + $ref: "#/components/schemas/AutomationRuleScope" + required: + - name + - enabled + - rule + - action + type: object + TicketCreationRuleAttributesResponse: + description: Attributes of a ticket creation rule returned by the API. + properties: + action: + $ref: "#/components/schemas/TicketCreationRuleAction" + created_at: + description: The Unix timestamp in milliseconds when the rule was created. + example: 1722439510282 + format: int64 + type: integer + created_by: + $ref: "#/components/schemas/AutomationRuleCreator" + enabled: + description: Whether the ticket creation rule is enabled. + example: true + type: boolean + modified_at: + description: The Unix timestamp in milliseconds when the rule was last modified. + example: 1722439510282 + format: int64 + type: integer + modified_by: + $ref: "#/components/schemas/AutomationRuleCreator" + name: + description: The name of the ticket creation rule. + example: "Auto-create Jira tickets for critical findings" + maxLength: 255 + type: string + rule: + $ref: "#/components/schemas/AutomationRuleScope" + required: + - name + - enabled + - rule + - action + - created_at + - created_by + - modified_at + - modified_by + type: object + TicketCreationRuleCreateRequest: + description: The body of a ticket creation rule create request. + properties: + data: + $ref: "#/components/schemas/TicketCreationRuleDataCreate" + required: + - data + type: object + TicketCreationRuleDataCreate: + description: The data object for a ticket creation rule create or update request. + properties: + attributes: + $ref: "#/components/schemas/TicketCreationRuleAttributesCreate" + type: + $ref: "#/components/schemas/TicketCreationRuleType" + required: + - type + - attributes + type: object + TicketCreationRuleDataResponse: + description: The data object for a ticket creation rule returned by the API. + properties: + attributes: + $ref: "#/components/schemas/TicketCreationRuleAttributesResponse" + id: + description: The ID of the ticket creation rule. + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + type: + $ref: "#/components/schemas/TicketCreationRuleType" + required: + - id + - type + - attributes + type: object + TicketCreationRuleResponse: + description: A single ticket creation rule response. + properties: + data: + $ref: "#/components/schemas/TicketCreationRuleDataResponse" + required: + - data + type: object + TicketCreationRuleType: + description: The JSON:API type for ticket creation rules. + enum: + - ticket_creation_rules + example: ticket_creation_rules + type: string + x-enum-varnames: + - TICKET_CREATION_RULES + TicketCreationRuleUpdateRequest: + description: The body of a ticket creation rule update request. + properties: + data: + $ref: "#/components/schemas/TicketCreationRuleDataCreate" + required: + - data + type: object + TicketCreationRulesDataList: + description: A list of ticket creation rule data objects. + items: + $ref: "#/components/schemas/TicketCreationRuleDataResponse" + type: array + TicketCreationRulesResponse: + description: A list of ticket creation rules with pagination metadata. + properties: + data: + $ref: "#/components/schemas/TicketCreationRulesDataList" + links: + $ref: "#/components/schemas/SecurityAutomationRulesLinks" + meta: + $ref: "#/components/schemas/SecurityAutomationRulesMeta" + required: + - data + - meta + - links + type: object + TicketCreationTarget: + description: The ticketing system to create tickets in. + enum: + - jira + - case_management + example: jira + type: string + x-enum-varnames: + - JIRA + - CASE_MANAGEMENT TimeAggregation: description: |- Time aggregation period (in seconds) is used to aggregate the results of the notification rule evaluation. @@ -165936,6 +166648,1329 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/security/findings/automation/due_date_rules: + get: + description: Get all due date rules for the current organization. + operationId: ListSecurityFindingsAutomationDueDateRules + parameters: + - description: The number of rules per page. Maximum is 1000. + in: query + name: page[size] + required: false + schema: + default: 1000 + example: 10 + format: int64 + maximum: 1000 + minimum: 1 + type: integer + - description: The page number to return. + in: query + name: page[number] + required: false + schema: + default: 0 + example: 0 + format: int64 + minimum: 0 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + action: + due_days_per_severity: + - due_in_days: 7 + severity: critical + - due_in_days: 30 + severity: high + due_from: first_seen + created_at: 1722439510282 + created_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + enabled: true + modified_at: 1722439510282 + modified_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + name: "Critical findings due in 7 days" + rule: + finding_types: + - misconfiguration + query: "env:prod" + id: "00000000-0000-0000-0000-000000000000" + type: due_date_rules + links: + first: "/api/v2/security/findings/automation/due_date_rules?page[size]=1000&page[number]=0" + last: "/api/v2/security/findings/automation/due_date_rules?page[size]=1000&page[number]=0" + meta: + page: + total_filtered_count: 1 + schema: + $ref: "#/components/schemas/DueDateRulesResponse" + description: Successfully retrieved the list of due date rules + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get all due date rules + tags: + - Security Monitoring + x-permission: + operator: OR + permissions: + - security_pipelines_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a new due date rule for the current organization. + operationId: CreateSecurityFindingsAutomationDueDateRule + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + action: + due_days_per_severity: + - due_in_days: 7 + severity: critical + - due_in_days: 30 + severity: high + due_from: first_seen + enabled: true + name: "Critical findings due in 7 days" + rule: + finding_types: + - misconfiguration + query: "env:prod" + type: due_date_rules + schema: + $ref: "#/components/schemas/DueDateRuleCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + action: + due_days_per_severity: + - due_in_days: 7 + severity: critical + - due_in_days: 30 + severity: high + due_from: first_seen + created_at: 1722439510282 + created_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + enabled: true + modified_at: 1722439510282 + modified_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + name: "Critical findings due in 7 days" + rule: + finding_types: + - misconfiguration + query: "env:prod" + id: "00000000-0000-0000-0000-000000000000" + type: due_date_rules + schema: + $ref: "#/components/schemas/DueDateRuleResponse" + description: Successfully created the due date rule + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/ForbiddenResponse" + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unprocessable Entity + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create a due date rule + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - security_pipelines_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/security/findings/automation/due_date_rules/reorder: + post: + description: Reorder the list of due date rules for the current organization. + operationId: ReorderSecurityFindingsAutomationDueDateRules + requestBody: + content: + application/json: + examples: + default: + value: + data: + - id: "00000000-0000-0000-0000-000000000000" + type: due_date_rules + - id: "11111111-1111-1111-1111-111111111111" + type: due_date_rules + schema: + $ref: "#/components/schemas/SecurityAutomationRuleReorderRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - id: "00000000-0000-0000-0000-000000000000" + type: due_date_rules + - id: "11111111-1111-1111-1111-111111111111" + type: due_date_rules + schema: + $ref: "#/components/schemas/SecurityAutomationRuleReorderRequest" + description: Successfully reordered the due date rules + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/ForbiddenResponse" + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unprocessable Entity + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Reorder due date rules + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - security_pipelines_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/security/findings/automation/due_date_rules/{rule_id}: + delete: + description: Delete an existing due date rule by ID. + operationId: DeleteSecurityFindingsAutomationDueDateRule + parameters: + - description: The ID of the due date rule. + in: path + name: rule_id + required: true + schema: + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + responses: + "204": + description: "Rule successfully deleted." + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete a due date rule + tags: + - Security Monitoring + x-permission: + operator: OR + permissions: + - security_pipelines_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get the details of a due date rule by ID. + operationId: GetSecurityFindingsAutomationDueDateRule + parameters: + - description: The ID of the due date rule. + in: path + name: rule_id + required: true + schema: + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + action: + due_days_per_severity: + - due_in_days: 7 + severity: critical + - due_in_days: 30 + severity: high + due_from: first_seen + created_at: 1722439510282 + created_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + enabled: true + modified_at: 1722439510282 + modified_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + name: "Critical findings due in 7 days" + rule: + finding_types: + - misconfiguration + query: "env:prod" + id: "00000000-0000-0000-0000-000000000000" + type: due_date_rules + schema: + $ref: "#/components/schemas/DueDateRuleResponse" + description: Successfully retrieved the due date rule + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get a due date rule + tags: + - Security Monitoring + x-permission: + operator: OR + permissions: + - security_pipelines_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + put: + description: Update an existing due date rule by ID. + operationId: UpdateSecurityFindingsAutomationDueDateRule + parameters: + - description: The ID of the due date rule. + in: path + name: rule_id + required: true + schema: + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + action: + due_days_per_severity: + - due_in_days: 7 + severity: critical + - due_in_days: 30 + severity: high + - due_in_days: 90 + severity: medium + due_from: fix_available + enabled: true + name: "Critical findings due in 7 days" + rule: + finding_types: + - misconfiguration + query: "env:prod" + type: due_date_rules + schema: + $ref: "#/components/schemas/DueDateRuleUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + action: + due_days_per_severity: + - due_in_days: 7 + severity: critical + - due_in_days: 30 + severity: high + - due_in_days: 90 + severity: medium + due_from: fix_available + created_at: 1722439510282 + created_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + enabled: true + modified_at: 1722439510999 + modified_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + name: "Critical findings due in 7 days" + rule: + finding_types: + - misconfiguration + query: "env:prod" + id: "00000000-0000-0000-0000-000000000000" + type: due_date_rules + schema: + $ref: "#/components/schemas/DueDateRuleResponse" + description: Successfully updated the due date rule + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unprocessable Entity + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update a due date rule + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - security_pipelines_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/security/findings/automation/mute_rules: + get: + description: Get all mute rules for the current organization. + operationId: ListSecurityFindingsAutomationMuteRules + parameters: + - description: The number of rules per page. Maximum is 1000. + in: query + name: page[size] + required: false + schema: + default: 1000 + example: 10 + format: int64 + maximum: 1000 + minimum: 1 + type: integer + - description: The page number to return. + in: query + name: page[number] + required: false + schema: + default: 0 + example: 0 + format: int64 + minimum: 0 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + action: + expire_at: 4070908800000 + reason: risk_accepted + reason_description: "Accepted for dev environments only" + created_at: 1722439510282 + created_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + enabled: true + modified_at: 1722439510282 + modified_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + name: "Mute accepted risks in dev" + rule: + finding_types: + - misconfiguration + query: "env:dev team:platform @severity:low" + id: "00000000-0000-0000-0000-000000000000" + type: mute_rules + links: + first: "/api/v2/security/findings/automation/mute_rules?page[size]=1000&page[number]=0" + last: "/api/v2/security/findings/automation/mute_rules?page[size]=1000&page[number]=0" + meta: + page: + total_filtered_count: 1 + schema: + $ref: "#/components/schemas/MuteRulesResponse" + description: Successfully retrieved the list of mute rules + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get all mute rules + tags: + - Security Monitoring + x-permission: + operator: OR + permissions: + - security_pipelines_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a new mute rule for the current organization. + operationId: CreateSecurityFindingsAutomationMuteRule + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + action: + expire_at: 4070908800000 + reason: risk_accepted + reason_description: "Accepted for dev environments only" + enabled: true + name: "Mute accepted risks in dev" + rule: + finding_types: + - misconfiguration + query: "env:dev team:platform @severity:low" + type: mute_rules + schema: + $ref: "#/components/schemas/MuteRuleCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + action: + expire_at: 4070908800000 + reason: risk_accepted + reason_description: "Accepted for dev environments only" + created_at: 1722439510282 + created_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + enabled: true + modified_at: 1722439510282 + modified_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + name: "Mute accepted risks in dev" + rule: + finding_types: + - misconfiguration + query: "env:dev team:platform @severity:low" + id: "00000000-0000-0000-0000-000000000000" + type: mute_rules + schema: + $ref: "#/components/schemas/MuteRuleResponse" + description: Successfully created the mute rule + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/ForbiddenResponse" + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unprocessable Entity + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create a mute rule + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - security_pipelines_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/security/findings/automation/mute_rules/reorder: + post: + description: Reorder the list of mute rules for the current organization. + operationId: ReorderSecurityFindingsAutomationMuteRules + requestBody: + content: + application/json: + examples: + default: + value: + data: + - id: "00000000-0000-0000-0000-000000000000" + type: mute_rules + - id: "11111111-1111-1111-1111-111111111111" + type: mute_rules + schema: + $ref: "#/components/schemas/SecurityAutomationRuleReorderRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - id: "00000000-0000-0000-0000-000000000000" + type: mute_rules + - id: "11111111-1111-1111-1111-111111111111" + type: mute_rules + schema: + $ref: "#/components/schemas/SecurityAutomationRuleReorderRequest" + description: Successfully reordered the mute rules + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/ForbiddenResponse" + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unprocessable Entity + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Reorder mute rules + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - security_pipelines_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/security/findings/automation/mute_rules/{rule_id}: + delete: + description: Delete an existing mute rule by ID. + operationId: DeleteSecurityFindingsAutomationMuteRule + parameters: + - description: The ID of the mute rule. + in: path + name: rule_id + required: true + schema: + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + responses: + "204": + description: "Rule successfully deleted." + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete a mute rule + tags: + - Security Monitoring + x-permission: + operator: OR + permissions: + - security_pipelines_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get the details of a mute rule by ID. + operationId: GetSecurityFindingsAutomationMuteRule + parameters: + - description: The ID of the mute rule. + in: path + name: rule_id + required: true + schema: + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + action: + expire_at: 4070908800000 + reason: risk_accepted + reason_description: "Accepted for dev environments only" + created_at: 1722439510282 + created_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + enabled: true + modified_at: 1722439510282 + modified_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + name: "Mute accepted risks in dev" + rule: + finding_types: + - misconfiguration + query: "env:dev team:platform @severity:low" + id: "00000000-0000-0000-0000-000000000000" + type: mute_rules + schema: + $ref: "#/components/schemas/MuteRuleResponse" + description: Successfully retrieved the mute rule + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get a mute rule + tags: + - Security Monitoring + x-permission: + operator: OR + permissions: + - security_pipelines_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + put: + description: Update an existing mute rule by ID. + operationId: UpdateSecurityFindingsAutomationMuteRule + parameters: + - description: The ID of the mute rule. + in: path + name: rule_id + required: true + schema: + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + action: + reason: risk_accepted + enabled: false + name: "Mute accepted risks in dev" + rule: + finding_types: + - misconfiguration + query: "env:dev" + type: mute_rules + schema: + $ref: "#/components/schemas/MuteRuleUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + action: + reason: risk_accepted + created_at: 1722439510282 + created_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + enabled: false + modified_at: 1722439510999 + modified_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + name: "Mute accepted risks in dev" + rule: + finding_types: + - misconfiguration + query: "env:dev" + id: "00000000-0000-0000-0000-000000000000" + type: mute_rules + schema: + $ref: "#/components/schemas/MuteRuleResponse" + description: Successfully updated the mute rule + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unprocessable Entity + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update a mute rule + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - security_pipelines_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/security/findings/automation/ticket_creation_rules: + get: + description: Get all ticket creation rules for the current organization. + operationId: ListSecurityFindingsAutomationTicketCreationRules + parameters: + - description: The number of rules per page. Maximum is 1000. + in: query + name: page[size] + required: false + schema: + default: 1000 + example: 10 + format: int64 + maximum: 1000 + minimum: 1 + type: integer + - description: The page number to return. + in: query + name: page[number] + required: false + schema: + default: 0 + example: 0 + format: int64 + minimum: 0 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + action: + max_tickets_per_day: 100 + project_id: "11111111-1111-1111-1111-111111111111" + target: jira + created_at: 1722439510282 + created_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + enabled: true + modified_at: 1722439510282 + modified_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + name: "Auto-create Jira tickets for critical findings" + rule: + finding_types: + - misconfiguration + query: "env:prod" + id: "00000000-0000-0000-0000-000000000000" + type: ticket_creation_rules + links: + first: "/api/v2/security/findings/automation/ticket_creation_rules?page[size]=1000&page[number]=0" + last: "/api/v2/security/findings/automation/ticket_creation_rules?page[size]=1000&page[number]=0" + meta: + page: + total_filtered_count: 1 + schema: + $ref: "#/components/schemas/TicketCreationRulesResponse" + description: Successfully retrieved the list of ticket creation rules + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get all ticket creation rules + tags: + - Security Monitoring + x-permission: + operator: OR + permissions: + - security_pipelines_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a new ticket creation rule for the current organization. + operationId: CreateSecurityFindingsAutomationTicketCreationRule + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + action: + max_tickets_per_day: 100 + project_id: "11111111-1111-1111-1111-111111111111" + target: jira + enabled: true + name: "Auto-create Jira tickets for critical findings" + rule: + finding_types: + - misconfiguration + query: "env:prod" + type: ticket_creation_rules + schema: + $ref: "#/components/schemas/TicketCreationRuleCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + action: + max_tickets_per_day: 100 + project_id: "11111111-1111-1111-1111-111111111111" + target: jira + created_at: 1722439510282 + created_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + enabled: true + modified_at: 1722439510282 + modified_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + name: "Auto-create Jira tickets for critical findings" + rule: + finding_types: + - misconfiguration + query: "env:prod" + id: "00000000-0000-0000-0000-000000000000" + type: ticket_creation_rules + schema: + $ref: "#/components/schemas/TicketCreationRuleResponse" + description: Successfully created the ticket creation rule + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/ForbiddenResponse" + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unprocessable Entity + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create a ticket creation rule + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - security_pipelines_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/security/findings/automation/ticket_creation_rules/reorder: + post: + description: Reorder the list of ticket creation rules for the current organization. + operationId: ReorderSecurityFindingsAutomationTicketCreationRules + requestBody: + content: + application/json: + examples: + default: + value: + data: + - id: "00000000-0000-0000-0000-000000000000" + type: ticket_creation_rules + - id: "11111111-1111-1111-1111-111111111111" + type: ticket_creation_rules + schema: + $ref: "#/components/schemas/SecurityAutomationRuleReorderRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - id: "00000000-0000-0000-0000-000000000000" + type: ticket_creation_rules + - id: "11111111-1111-1111-1111-111111111111" + type: ticket_creation_rules + schema: + $ref: "#/components/schemas/SecurityAutomationRuleReorderRequest" + description: Successfully reordered the ticket creation rules + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/ForbiddenResponse" + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unprocessable Entity + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Reorder ticket creation rules + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - security_pipelines_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/security/findings/automation/ticket_creation_rules/{rule_id}: + delete: + description: Delete an existing ticket creation rule by ID. + operationId: DeleteSecurityFindingsAutomationTicketCreationRule + parameters: + - description: The ID of the ticket creation rule. + in: path + name: rule_id + required: true + schema: + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + responses: + "204": + description: "Rule successfully deleted." + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete a ticket creation rule + tags: + - Security Monitoring + x-permission: + operator: OR + permissions: + - security_pipelines_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get the details of a ticket creation rule by ID. + operationId: GetSecurityFindingsAutomationTicketCreationRule + parameters: + - description: The ID of the ticket creation rule. + in: path + name: rule_id + required: true + schema: + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + action: + max_tickets_per_day: 100 + project_id: "11111111-1111-1111-1111-111111111111" + target: jira + created_at: 1722439510282 + created_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + enabled: true + modified_at: 1722439510282 + modified_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + name: "Auto-create Jira tickets for critical findings" + rule: + finding_types: + - misconfiguration + query: "env:prod" + id: "00000000-0000-0000-0000-000000000000" + type: ticket_creation_rules + schema: + $ref: "#/components/schemas/TicketCreationRuleResponse" + description: Successfully retrieved the ticket creation rule + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get a ticket creation rule + tags: + - Security Monitoring + x-permission: + operator: OR + permissions: + - security_pipelines_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + put: + description: Update an existing ticket creation rule by ID. + operationId: UpdateSecurityFindingsAutomationTicketCreationRule + parameters: + - description: The ID of the ticket creation rule. + in: path + name: rule_id + required: true + schema: + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + action: + max_tickets_per_day: 50 + project_id: "11111111-1111-1111-1111-111111111111" + target: jira + enabled: true + name: "Auto-create Jira tickets for critical findings" + rule: + finding_types: + - misconfiguration + query: "env:prod" + type: ticket_creation_rules + schema: + $ref: "#/components/schemas/TicketCreationRuleUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + action: + max_tickets_per_day: 50 + project_id: "11111111-1111-1111-1111-111111111111" + target: jira + created_at: 1722439510282 + created_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + enabled: true + modified_at: 1722439510999 + modified_by: + id: "00000000-0000-0000-0000-000000000000" + name: "Jane Doe" + type: user + name: "Auto-create Jira tickets for critical findings" + rule: + finding_types: + - misconfiguration + query: "env:prod" + id: "00000000-0000-0000-0000-000000000000" + type: ticket_creation_rules + schema: + $ref: "#/components/schemas/TicketCreationRuleResponse" + description: Successfully updated the ticket creation rule + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unprocessable Entity + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update a ticket creation rule + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - security_pipelines_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/security/findings/cases: delete: description: >- diff --git a/cassettes/v2/Security-Monitoring_1187227211/Create-a-due-date-rule-returns-Successfully-created-the-due-date-rule-response_1441633492/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Create-a-due-date-rule-returns-Successfully-created-the-due-date-rule-response_1441633492/frozen.json new file mode 100644 index 000000000000..7ade0fd469ff --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Create-a-due-date-rule-returns-Successfully-created-the-due-date-rule-response_1441633492/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:00.178Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Create-a-due-date-rule-returns-Successfully-created-the-due-date-rule-response_1441633492/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Create-a-due-date-rule-returns-Successfully-created-the-due-date-rule-response_1441633492/recording.har new file mode 100644 index 000000000000..0e3da0f17982 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Create-a-due-date-rule-returns-Successfully-created-the-due-date-rule-response_1441633492/recording.har @@ -0,0 +1,104 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Create a due date rule returns \"Successfully created the due date rule\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "ebfb2a42bade48cc247b105afdde25cd", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 337, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 621, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"due_in_days\":7,\"severity\":\"critical\"}],\"due_from\":\"first_seen\"},\"enabled\":true,\"name\":\"Test-Create_a_due_date_rule_returns_Successfully_created_the_due_date_rule_response-1781624460\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"due_date_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules" + }, + "response": { + "bodySize": 623, + "content": { + "mimeType": "application/vnd.api+json", + "size": 623, + "text": "{\"data\":{\"id\":\"51eb64b5-a519-408a-961a-137e4fe31d3c\",\"type\":\"due_date_rules\",\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"severity\":\"critical\",\"due_in_days\":7}],\"due_from\":\"first_seen\"},\"created_at\":1781624462372,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624462372,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Create_a_due_date_rule_returns_Successfully_created_the_due_date_rule_response-1781624460\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:02.153Z", + "time": 416 + }, + { + "_id": "e388715556627f0e8191c6d88dbb4799", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 594, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules/51eb64b5-a519-408a-961a-137e4fe31d3c" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:02.576Z", + "time": 404 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Create-a-mute-rule-returns-Successfully-created-the-mute-rule-response_986061872/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Create-a-mute-rule-returns-Successfully-created-the-mute-rule-response_986061872/frozen.json new file mode 100644 index 000000000000..99c5b6c20137 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Create-a-mute-rule-returns-Successfully-created-the-mute-rule-response_986061872/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:02.989Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Create-a-mute-rule-returns-Successfully-created-the-mute-rule-response_986061872/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Create-a-mute-rule-returns-Successfully-created-the-mute-rule-response_986061872/recording.har new file mode 100644 index 000000000000..d6e1a4b9843d --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Create-a-mute-rule-returns-Successfully-created-the-mute-rule-response_986061872/recording.har @@ -0,0 +1,104 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Create a mute rule returns \"Successfully created the mute rule\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "08628b8a26edda34c04592a3e0158c1e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 260, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 614, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"enabled\":true,\"name\":\"Test-Create_a_mute_rule_returns_Successfully_created_the_mute_rule_response-1781624462\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"mute_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules" + }, + "response": { + "bodySize": 546, + "content": { + "mimeType": "application/vnd.api+json", + "size": 546, + "text": "{\"data\":{\"id\":\"a23423e0-da14-4698-9c01-7897eb56b76c\",\"type\":\"mute_rules\",\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"created_at\":1781624463227,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624463227,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Create_a_mute_rule_returns_Successfully_created_the_mute_rule_response-1781624462\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:02.993Z", + "time": 423 + }, + { + "_id": "ac00630a2b26759e15d5a64fd1b03ae7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 587, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules/a23423e0-da14-4698-9c01-7897eb56b76c" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:03.422Z", + "time": 403 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Create-a-ticket-creation-rule-returns-Successfully-created-the-ticket-creation-rule-respo_3951122172/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Create-a-ticket-creation-rule-returns-Successfully-created-the-ticket-creation-rule-respo_3951122172/frozen.json new file mode 100644 index 000000000000..faaaaed23904 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Create-a-ticket-creation-rule-returns-Successfully-created-the-ticket-creation-rule-respo_3951122172/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:03.837Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Create-a-ticket-creation-rule-returns-Successfully-created-the-ticket-creation-rule-respo_3951122172/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Create-a-ticket-creation-rule-returns-Successfully-created-the-ticket-creation-rule-respo_3951122172/recording.har new file mode 100644 index 000000000000..b738294783b5 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Create-a-ticket-creation-rule-returns-Successfully-created-the-ticket-creation-rule-respo_3951122172/recording.har @@ -0,0 +1,104 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Create a ticket creation rule returns \"Successfully created the ticket creation rule\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "023e89d1654057c3812638c4ec55901a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 361, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 635, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"max_tickets_per_day\":10,\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\"},\"enabled\":true,\"name\":\"Test-Create_a_ticket_creation_rule_returns_Successfully_created_the_ticket_creation_rule_response-1781624463\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"ticket_creation_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules" + }, + "response": { + "bodySize": 647, + "content": { + "mimeType": "application/vnd.api+json", + "size": 647, + "text": "{\"data\":{\"id\":\"c24fb7cb-e877-491e-ae6e-2e8676b20dcb\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":10},\"created_at\":1781624464096,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624464096,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Create_a_ticket_creation_rule_returns_Successfully_created_the_ticket_creation_rule_response-1781624463\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:03.840Z", + "time": 443 + }, + { + "_id": "144b3e6d665eba8bbbc19ba02f4ddab9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 608, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules/c24fb7cb-e877-491e-ae6e-2e8676b20dcb" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:04.288Z", + "time": 367 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Delete-a-due-date-rule-returns-Rule-successfully-deleted-response_2112246817/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Delete-a-due-date-rule-returns-Rule-successfully-deleted-response_2112246817/frozen.json new file mode 100644 index 000000000000..b6d467ad8adb --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Delete-a-due-date-rule-returns-Rule-successfully-deleted-response_2112246817/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:04.669Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Delete-a-due-date-rule-returns-Rule-successfully-deleted-response_2112246817/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Delete-a-due-date-rule-returns-Rule-successfully-deleted-response_2112246817/recording.har new file mode 100644 index 000000000000..cfe5de64c148 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Delete-a-due-date-rule-returns-Rule-successfully-deleted-response_2112246817/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Delete a due date rule returns \"Rule successfully deleted.\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "4131754f9e175da9001d9cf813d8487f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 324, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 621, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"due_in_days\":7,\"severity\":\"critical\"}],\"due_from\":\"first_seen\"},\"enabled\":true,\"name\":\"Test-Delete_a_due_date_rule_returns_Rule_successfully_deleted_response-1781624464\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"due_date_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules" + }, + "response": { + "bodySize": 610, + "content": { + "mimeType": "application/vnd.api+json", + "size": 610, + "text": "{\"data\":{\"id\":\"139c64ad-97f6-4b26-8579-05a2e2792b6c\",\"type\":\"due_date_rules\",\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"severity\":\"critical\",\"due_in_days\":7}],\"due_from\":\"first_seen\"},\"created_at\":1781624464907,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624464907,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Delete_a_due_date_rule_returns_Rule_successfully_deleted_response-1781624464\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:04.672Z", + "time": 416 + }, + { + "_id": "c6822ec31f37327d4bf7b3e74bc85e0a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 594, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules/139c64ad-97f6-4b26-8579-05a2e2792b6c" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:05.093Z", + "time": 362 + }, + { + "_id": "c6822ec31f37327d4bf7b3e74bc85e0a", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 594, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules/139c64ad-97f6-4b26-8579-05a2e2792b6c" + }, + "response": { + "bodySize": 80, + "content": { + "mimeType": "application/vnd.api+json", + "size": 80, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"rule does not exist\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 664, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2026-06-16T15:41:05.459Z", + "time": 268 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Delete-a-mute-rule-returns-Rule-successfully-deleted-response_1107219380/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Delete-a-mute-rule-returns-Rule-successfully-deleted-response_1107219380/frozen.json new file mode 100644 index 000000000000..610625d68fe8 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Delete-a-mute-rule-returns-Rule-successfully-deleted-response_1107219380/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:05.734Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Delete-a-mute-rule-returns-Rule-successfully-deleted-response_1107219380/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Delete-a-mute-rule-returns-Rule-successfully-deleted-response_1107219380/recording.har new file mode 100644 index 000000000000..4c0bac5909bb --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Delete-a-mute-rule-returns-Rule-successfully-deleted-response_1107219380/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Delete a mute rule returns \"Rule successfully deleted.\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "8b01cf2222433050e33c331a17f63d2b", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 251, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 613, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"enabled\":true,\"name\":\"Test-Delete_a_mute_rule_returns_Rule_successfully_deleted_response-1781624465\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"mute_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules" + }, + "response": { + "bodySize": 537, + "content": { + "mimeType": "application/vnd.api+json", + "size": 537, + "text": "{\"data\":{\"id\":\"03c9e010-5a46-40b2-af26-5ff613828897\",\"type\":\"mute_rules\",\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"created_at\":1781624465962,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624465962,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Delete_a_mute_rule_returns_Rule_successfully_deleted_response-1781624465\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:05.740Z", + "time": 400 + }, + { + "_id": "9d8d8b395bde0cf4b18ba3dce716aca3", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 587, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules/03c9e010-5a46-40b2-af26-5ff613828897" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:06.145Z", + "time": 374 + }, + { + "_id": "9d8d8b395bde0cf4b18ba3dce716aca3", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 587, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules/03c9e010-5a46-40b2-af26-5ff613828897" + }, + "response": { + "bodySize": 80, + "content": { + "mimeType": "application/vnd.api+json", + "size": 80, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"rule does not exist\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 664, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2026-06-16T15:41:06.524Z", + "time": 273 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Delete-a-ticket-creation-rule-returns-Rule-successfully-deleted-response_800043294/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Delete-a-ticket-creation-rule-returns-Rule-successfully-deleted-response_800043294/frozen.json new file mode 100644 index 000000000000..69223243246f --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Delete-a-ticket-creation-rule-returns-Rule-successfully-deleted-response_800043294/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:06.806Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Delete-a-ticket-creation-rule-returns-Rule-successfully-deleted-response_800043294/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Delete-a-ticket-creation-rule-returns-Rule-successfully-deleted-response_800043294/recording.har new file mode 100644 index 000000000000..f8c541ef96b3 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Delete-a-ticket-creation-rule-returns-Rule-successfully-deleted-response_800043294/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Delete a ticket creation rule returns \"Rule successfully deleted.\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "fc0e246f2dca9c8e8ad61612e7ce583b", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 341, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 634, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"max_tickets_per_day\":10,\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\"},\"enabled\":true,\"name\":\"Test-Delete_a_ticket_creation_rule_returns_Rule_successfully_deleted_response-1781624466\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"ticket_creation_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules" + }, + "response": { + "bodySize": 627, + "content": { + "mimeType": "application/vnd.api+json", + "size": 627, + "text": "{\"data\":{\"id\":\"6b2c813c-cd92-4531-b4aa-f79e1194bcb2\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":10},\"created_at\":1781624467064,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624467064,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Delete_a_ticket_creation_rule_returns_Rule_successfully_deleted_response-1781624466\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:06.808Z", + "time": 441 + }, + { + "_id": "64dc402114cb7e703452212e71f66385", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 607, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules/6b2c813c-cd92-4531-b4aa-f79e1194bcb2" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:07.254Z", + "time": 390 + }, + { + "_id": "64dc402114cb7e703452212e71f66385", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 607, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules/6b2c813c-cd92-4531-b4aa-f79e1194bcb2" + }, + "response": { + "bodySize": 80, + "content": { + "mimeType": "application/vnd.api+json", + "size": 80, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"rule does not exist\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 664, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2026-06-16T15:41:07.648Z", + "time": 273 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Get-a-due-date-rule-returns-Successfully-retrieved-the-due-date-rule-response_1934287866/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Get-a-due-date-rule-returns-Successfully-retrieved-the-due-date-rule-response_1934287866/frozen.json new file mode 100644 index 000000000000..51109ebd8b89 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Get-a-due-date-rule-returns-Successfully-retrieved-the-due-date-rule-response_1934287866/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:07.946Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Get-a-due-date-rule-returns-Successfully-retrieved-the-due-date-rule-response_1934287866/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Get-a-due-date-rule-returns-Successfully-retrieved-the-due-date-rule-response_1934287866/recording.har new file mode 100644 index 000000000000..4e40eafef1be --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Get-a-due-date-rule-returns-Successfully-retrieved-the-due-date-rule-response_1934287866/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Get a due date rule returns \"Successfully retrieved the due date rule\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "35d47c5f7714f2efa1c48a46fd47c451", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 336, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 621, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"due_in_days\":7,\"severity\":\"critical\"}],\"due_from\":\"first_seen\"},\"enabled\":true,\"name\":\"Test-Get_a_due_date_rule_returns_Successfully_retrieved_the_due_date_rule_response-1781624467\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"due_date_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules" + }, + "response": { + "bodySize": 622, + "content": { + "mimeType": "application/vnd.api+json", + "size": 622, + "text": "{\"data\":{\"id\":\"7842abcf-795f-47cd-b6ba-6e05790668d5\",\"type\":\"due_date_rules\",\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"severity\":\"critical\",\"due_in_days\":7}],\"due_from\":\"first_seen\"},\"created_at\":1781624468200,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624468200,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_a_due_date_rule_returns_Successfully_retrieved_the_due_date_rule_response-1781624467\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:07.952Z", + "time": 425 + }, + { + "_id": "42a9e4dbf4a92e550a70d40def427545", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 600, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules/7842abcf-795f-47cd-b6ba-6e05790668d5" + }, + "response": { + "bodySize": 622, + "content": { + "mimeType": "application/vnd.api+json", + "size": 622, + "text": "{\"data\":{\"id\":\"7842abcf-795f-47cd-b6ba-6e05790668d5\",\"type\":\"due_date_rules\",\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"severity\":\"critical\",\"due_in_days\":7}],\"due_from\":\"first_seen\"},\"created_at\":1781624468200,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624468200,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_a_due_date_rule_returns_Successfully_retrieved_the_due_date_rule_response-1781624467\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-06-16T15:41:08.381Z", + "time": 276 + }, + { + "_id": "8cdeedaacf87dad685b61c75eedc7fdd", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 594, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules/7842abcf-795f-47cd-b6ba-6e05790668d5" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:08.662Z", + "time": 362 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Get-a-mute-rule-returns-Successfully-retrieved-the-mute-rule-response_3462467454/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Get-a-mute-rule-returns-Successfully-retrieved-the-mute-rule-response_3462467454/frozen.json new file mode 100644 index 000000000000..3a06381f8b76 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Get-a-mute-rule-returns-Successfully-retrieved-the-mute-rule-response_3462467454/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:09.039Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Get-a-mute-rule-returns-Successfully-retrieved-the-mute-rule-response_3462467454/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Get-a-mute-rule-returns-Successfully-retrieved-the-mute-rule-response_3462467454/recording.har new file mode 100644 index 000000000000..77856a080feb --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Get-a-mute-rule-returns-Successfully-retrieved-the-mute-rule-response_3462467454/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Get a mute rule returns \"Successfully retrieved the mute rule\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "5bff7cf7f4d2826abd2d488884e1dea6", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 259, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 614, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"enabled\":true,\"name\":\"Test-Get_a_mute_rule_returns_Successfully_retrieved_the_mute_rule_response-1781624469\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"mute_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules" + }, + "response": { + "bodySize": 545, + "content": { + "mimeType": "application/vnd.api+json", + "size": 545, + "text": "{\"data\":{\"id\":\"66330741-04f8-43cc-8cd0-a4840a593658\",\"type\":\"mute_rules\",\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"created_at\":1781624469277,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624469277,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_a_mute_rule_returns_Successfully_retrieved_the_mute_rule_response-1781624469\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:09.042Z", + "time": 420 + }, + { + "_id": "1eb1a16508d6e8887c250f71a309acca", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 594, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules/66330741-04f8-43cc-8cd0-a4840a593658" + }, + "response": { + "bodySize": 545, + "content": { + "mimeType": "application/vnd.api+json", + "size": 545, + "text": "{\"data\":{\"id\":\"66330741-04f8-43cc-8cd0-a4840a593658\",\"type\":\"mute_rules\",\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"created_at\":1781624469277,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624469277,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_a_mute_rule_returns_Successfully_retrieved_the_mute_rule_response-1781624469\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-06-16T15:41:09.466Z", + "time": 288 + }, + { + "_id": "d8b2e8f6e1080fcd1833dbdff2907826", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 587, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules/66330741-04f8-43cc-8cd0-a4840a593658" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:09.759Z", + "time": 392 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Get-a-ticket-creation-rule-returns-Successfully-retrieved-the-ticket-creation-rule-respons_164569762/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Get-a-ticket-creation-rule-returns-Successfully-retrieved-the-ticket-creation-rule-respons_164569762/frozen.json new file mode 100644 index 000000000000..7f922119cc38 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Get-a-ticket-creation-rule-returns-Successfully-retrieved-the-ticket-creation-rule-respons_164569762/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:10.163Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Get-a-ticket-creation-rule-returns-Successfully-retrieved-the-ticket-creation-rule-respons_164569762/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Get-a-ticket-creation-rule-returns-Successfully-retrieved-the-ticket-creation-rule-respons_164569762/recording.har new file mode 100644 index 000000000000..d8dd2b3cd32b --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Get-a-ticket-creation-rule-returns-Successfully-retrieved-the-ticket-creation-rule-respons_164569762/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Get a ticket creation rule returns \"Successfully retrieved the ticket creation rule\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "cd0cf842f364b06cb97ec58cffd226df", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 360, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 635, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"max_tickets_per_day\":10,\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\"},\"enabled\":true,\"name\":\"Test-Get_a_ticket_creation_rule_returns_Successfully_retrieved_the_ticket_creation_rule_response-1781624470\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"ticket_creation_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules" + }, + "response": { + "bodySize": 646, + "content": { + "mimeType": "application/vnd.api+json", + "size": 646, + "text": "{\"data\":{\"id\":\"065f00af-171c-4ecc-853d-ddb4c8e30c7b\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":10},\"created_at\":1781624470412,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624470412,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_a_ticket_creation_rule_returns_Successfully_retrieved_the_ticket_creation_rule_response-1781624470\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:10.165Z", + "time": 431 + }, + { + "_id": "8984d9009504ee3d93f4024f7cbc0be5", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 615, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules/065f00af-171c-4ecc-853d-ddb4c8e30c7b" + }, + "response": { + "bodySize": 646, + "content": { + "mimeType": "application/vnd.api+json", + "size": 646, + "text": "{\"data\":{\"id\":\"065f00af-171c-4ecc-853d-ddb4c8e30c7b\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":10},\"created_at\":1781624470412,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624470412,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_a_ticket_creation_rule_returns_Successfully_retrieved_the_ticket_creation_rule_response-1781624470\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-06-16T15:41:10.660Z", + "time": 390 + }, + { + "_id": "0edbd19bb16b47d450e3f3ff1978feeb", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 608, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules/065f00af-171c-4ecc-853d-ddb4c8e30c7b" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:11.056Z", + "time": 403 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Get-all-due-date-rules-returns-Successfully-retrieved-the-list-of-due-date-rules-response_3040507969/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Get-all-due-date-rules-returns-Successfully-retrieved-the-list-of-due-date-rules-response_3040507969/frozen.json new file mode 100644 index 000000000000..53092fb754fe --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Get-all-due-date-rules-returns-Successfully-retrieved-the-list-of-due-date-rules-response_3040507969/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:11.482Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Get-all-due-date-rules-returns-Successfully-retrieved-the-list-of-due-date-rules-response_3040507969/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Get-all-due-date-rules-returns-Successfully-retrieved-the-list-of-due-date-rules-response_3040507969/recording.har new file mode 100644 index 000000000000..668793353417 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Get-all-due-date-rules-returns-Successfully-retrieved-the-list-of-due-date-rules-response_3040507969/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Get all due date rules returns \"Successfully retrieved the list of due date rules\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "cec423f011b1338af9799ce52aa80ab6", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 348, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 621, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"due_in_days\":7,\"severity\":\"critical\"}],\"due_from\":\"first_seen\"},\"enabled\":true,\"name\":\"Test-Get_all_due_date_rules_returns_Successfully_retrieved_the_list_of_due_date_rules_response-1781624471\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"due_date_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules" + }, + "response": { + "bodySize": 634, + "content": { + "mimeType": "application/vnd.api+json", + "size": 634, + "text": "{\"data\":{\"id\":\"1c8622b9-591f-472c-97ff-cac4c5a7cfe5\",\"type\":\"due_date_rules\",\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"severity\":\"critical\",\"due_in_days\":7}],\"due_from\":\"first_seen\"},\"created_at\":1781624471720,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624471720,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_all_due_date_rules_returns_Successfully_retrieved_the_list_of_due_date_rules_response-1781624471\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:11.486Z", + "time": 410 + }, + { + "_id": "06b71f27f81502351df94a80a902a8a7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 566, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules" + }, + "response": { + "bodySize": 884, + "content": { + "mimeType": "application/vnd.api+json", + "size": 884, + "text": "{\"data\":[{\"id\":\"1c8622b9-591f-472c-97ff-cac4c5a7cfe5\",\"type\":\"due_date_rules\",\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"severity\":\"critical\",\"due_in_days\":7}],\"due_from\":\"first_seen\"},\"created_at\":1781624471720,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624471720,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_all_due_date_rules_returns_Successfully_retrieved_the_list_of_due_date_rules_response-1781624471\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}],\"meta\":{\"page\":{\"total_filtered_count\":1}},\"links\":{\"first\":\"/api/v2/security/findings/automation/due_date_rules?page[size]=1000\\u0026page[number]=0\",\"last\":\"/api/v2/security/findings/automation/due_date_rules?page[size]=1000\\u0026page[number]=0\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-06-16T15:41:11.903Z", + "time": 309 + }, + { + "_id": "d60331a4d2ac01f755567b95dd54ac16", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 593, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules/1c8622b9-591f-472c-97ff-cac4c5a7cfe5" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:12.218Z", + "time": 369 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Get-all-mute-rules-returns-Successfully-retrieved-the-list-of-mute-rules-response_3416960775/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Get-all-mute-rules-returns-Successfully-retrieved-the-list-of-mute-rules-response_3416960775/frozen.json new file mode 100644 index 000000000000..c42a2f63947f --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Get-all-mute-rules-returns-Successfully-retrieved-the-list-of-mute-rules-response_3416960775/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:12.599Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Get-all-mute-rules-returns-Successfully-retrieved-the-list-of-mute-rules-response_3416960775/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Get-all-mute-rules-returns-Successfully-retrieved-the-list-of-mute-rules-response_3416960775/recording.har new file mode 100644 index 000000000000..cca8d73532fd --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Get-all-mute-rules-returns-Successfully-retrieved-the-list-of-mute-rules-response_3416960775/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Get all mute rules returns \"Successfully retrieved the list of mute rules\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "55c2d89a6d2ab2840fc5695caf470eb3", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 271, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 613, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"enabled\":true,\"name\":\"Test-Get_all_mute_rules_returns_Successfully_retrieved_the_list_of_mute_rules_response-1781624472\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"mute_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules" + }, + "response": { + "bodySize": 557, + "content": { + "mimeType": "application/vnd.api+json", + "size": 557, + "text": "{\"data\":{\"id\":\"4c72a302-c7c8-42bc-986a-f196580240c3\",\"type\":\"mute_rules\",\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"created_at\":1781624472865,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624472865,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_all_mute_rules_returns_Successfully_retrieved_the_list_of_mute_rules_response-1781624472\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:12.609Z", + "time": 444 + }, + { + "_id": "2161f5be0318dfeaec024de78a1c8dc3", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 559, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules" + }, + "response": { + "bodySize": 799, + "content": { + "mimeType": "application/vnd.api+json", + "size": 799, + "text": "{\"data\":[{\"id\":\"4c72a302-c7c8-42bc-986a-f196580240c3\",\"type\":\"mute_rules\",\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"created_at\":1781624472865,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624472865,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_all_mute_rules_returns_Successfully_retrieved_the_list_of_mute_rules_response-1781624472\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}],\"meta\":{\"page\":{\"total_filtered_count\":1}},\"links\":{\"first\":\"/api/v2/security/findings/automation/mute_rules?page[size]=1000\\u0026page[number]=0\",\"last\":\"/api/v2/security/findings/automation/mute_rules?page[size]=1000\\u0026page[number]=0\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-06-16T15:41:13.058Z", + "time": 281 + }, + { + "_id": "79402cb10e7d678022998f844dc87613", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 586, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules/4c72a302-c7c8-42bc-986a-f196580240c3" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:13.343Z", + "time": 364 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Get-all-ticket-creation-rules-returns-Successfully-retrieved-the-list-of-ticket-creation-r_707905647/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Get-all-ticket-creation-rules-returns-Successfully-retrieved-the-list-of-ticket-creation-r_707905647/frozen.json new file mode 100644 index 000000000000..3538b596d1e1 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Get-all-ticket-creation-rules-returns-Successfully-retrieved-the-list-of-ticket-creation-r_707905647/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:13.714Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Get-all-ticket-creation-rules-returns-Successfully-retrieved-the-list-of-ticket-creation-r_707905647/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Get-all-ticket-creation-rules-returns-Successfully-retrieved-the-list-of-ticket-creation-r_707905647/recording.har new file mode 100644 index 000000000000..8a3a452ddbc6 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Get-all-ticket-creation-rules-returns-Successfully-retrieved-the-list-of-ticket-creation-r_707905647/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Get all ticket creation rules returns \"Successfully retrieved the list of ticket creation rules\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "1053fa7c4d2867a10e0c68f15463818a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 369, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 635, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"max_tickets_per_day\":10,\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\"},\"enabled\":true,\"name\":\"Test-Get_all_ticket_creation_rules_returns_Successfully_retrieved_the_list_of_ticket_creation_rules_respo-1781624473\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"ticket_creation_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules" + }, + "response": { + "bodySize": 655, + "content": { + "mimeType": "application/vnd.api+json", + "size": 655, + "text": "{\"data\":{\"id\":\"399d69c3-6fcd-4538-b0cc-05e6db5aac38\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":10},\"created_at\":1781624473944,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624473944,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_all_ticket_creation_rules_returns_Successfully_retrieved_the_list_of_ticket_creation_rules_respo-1781624473\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:13.717Z", + "time": 410 + }, + { + "_id": "cc24b62dd37433ce171b753a3644799e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 580, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules" + }, + "response": { + "bodySize": 919, + "content": { + "mimeType": "application/vnd.api+json", + "size": 919, + "text": "{\"data\":[{\"id\":\"399d69c3-6fcd-4538-b0cc-05e6db5aac38\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":10},\"created_at\":1781624473944,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624473944,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_all_ticket_creation_rules_returns_Successfully_retrieved_the_list_of_ticket_creation_rules_respo-1781624473\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}],\"meta\":{\"page\":{\"total_filtered_count\":1}},\"links\":{\"first\":\"/api/v2/security/findings/automation/ticket_creation_rules?page[size]=1000\\u0026page[number]=0\",\"last\":\"/api/v2/security/findings/automation/ticket_creation_rules?page[size]=1000\\u0026page[number]=0\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-06-16T15:41:14.132Z", + "time": 256 + }, + { + "_id": "b40b5bd749844e68a26db3867a45f8e5", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 607, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules/399d69c3-6fcd-4538-b0cc-05e6db5aac38" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:14.392Z", + "time": 362 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Reorder-due-date-rules-returns-Successfully-reordered-the-due-date-rules-response_904295028/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Reorder-due-date-rules-returns-Successfully-reordered-the-due-date-rules-response_904295028/frozen.json new file mode 100644 index 000000000000..9693395d5b46 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Reorder-due-date-rules-returns-Successfully-reordered-the-due-date-rules-response_904295028/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:14.824Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Reorder-due-date-rules-returns-Successfully-reordered-the-due-date-rules-response_904295028/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Reorder-due-date-rules-returns-Successfully-reordered-the-due-date-rules-response_904295028/recording.har new file mode 100644 index 000000000000..5c6b0206e32f --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Reorder-due-date-rules-returns-Successfully-reordered-the-due-date-rules-response_904295028/recording.har @@ -0,0 +1,157 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Reorder due date rules returns \"Successfully reordered the due date rules\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "3e64cb840b5430a131a49c062251d292", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 340, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 621, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"due_in_days\":7,\"severity\":\"critical\"}],\"due_from\":\"first_seen\"},\"enabled\":true,\"name\":\"Test-Reorder_due_date_rules_returns_Successfully_reordered_the_due_date_rules_response-1781624474\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"due_date_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules" + }, + "response": { + "bodySize": 626, + "content": { + "mimeType": "application/vnd.api+json", + "size": 626, + "text": "{\"data\":{\"id\":\"64e53941-8eba-42f9-946b-6422bead1eea\",\"type\":\"due_date_rules\",\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"severity\":\"critical\",\"due_in_days\":7}],\"due_from\":\"first_seen\"},\"created_at\":1781624475039,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624475039,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Reorder_due_date_rules_returns_Successfully_reordered_the_due_date_rules_response-1781624474\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:14.827Z", + "time": 389 + }, + { + "_id": "9b83e75f76aef2e15da99fe884e2db45", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 80, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 630, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":[{\"id\":\"64e53941-8eba-42f9-946b-6422bead1eea\",\"type\":\"due_date_rules\"}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules/reorder" + }, + "response": { + "bodySize": 80, + "content": { + "mimeType": "application/vnd.api+json", + "size": 80, + "text": "{\"data\":[{\"type\":\"due_date_rules\",\"id\":\"64e53941-8eba-42f9-946b-6422bead1eea\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 664, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-06-16T15:41:15.219Z", + "time": 412 + }, + { + "_id": "9cc84bff536c80a009819a53e20942bb", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 594, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules/64e53941-8eba-42f9-946b-6422bead1eea" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:15.635Z", + "time": 386 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Reorder-mute-rules-returns-Successfully-reordered-the-mute-rules-response_1652783442/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Reorder-mute-rules-returns-Successfully-reordered-the-mute-rules-response_1652783442/frozen.json new file mode 100644 index 000000000000..c453add90a29 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Reorder-mute-rules-returns-Successfully-reordered-the-mute-rules-response_1652783442/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:16.028Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Reorder-mute-rules-returns-Successfully-reordered-the-mute-rules-response_1652783442/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Reorder-mute-rules-returns-Successfully-reordered-the-mute-rules-response_1652783442/recording.har new file mode 100644 index 000000000000..f82480419ab9 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Reorder-mute-rules-returns-Successfully-reordered-the-mute-rules-response_1652783442/recording.har @@ -0,0 +1,157 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Reorder mute rules returns \"Successfully reordered the mute rules\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "dbd863970c15a94fecb22e4cb78e9bdd", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 263, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 614, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"enabled\":true,\"name\":\"Test-Reorder_mute_rules_returns_Successfully_reordered_the_mute_rules_response-1781624476\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"mute_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules" + }, + "response": { + "bodySize": 549, + "content": { + "mimeType": "application/vnd.api+json", + "size": 549, + "text": "{\"data\":{\"id\":\"707a25e7-57ae-4d8f-9ce8-4840b52c7349\",\"type\":\"mute_rules\",\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"created_at\":1781624476249,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624476249,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Reorder_mute_rules_returns_Successfully_reordered_the_mute_rules_response-1781624476\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:16.030Z", + "time": 401 + }, + { + "_id": "a9de8cc12f2c2cc9893717522642132e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 76, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":[{\"id\":\"707a25e7-57ae-4d8f-9ce8-4840b52c7349\",\"type\":\"mute_rules\"}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules/reorder" + }, + "response": { + "bodySize": 76, + "content": { + "mimeType": "application/vnd.api+json", + "size": 76, + "text": "{\"data\":[{\"type\":\"mute_rules\",\"id\":\"707a25e7-57ae-4d8f-9ce8-4840b52c7349\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 664, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-06-16T15:41:16.436Z", + "time": 375 + }, + { + "_id": "f0bc78b8787d8c936135bd543c1cb2e5", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 587, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules/707a25e7-57ae-4d8f-9ce8-4840b52c7349" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:16.816Z", + "time": 361 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Reorder-ticket-creation-rules-returns-Successfully-reordered-the-ticket-creation-rules-re_1153776696/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Reorder-ticket-creation-rules-returns-Successfully-reordered-the-ticket-creation-rules-re_1153776696/frozen.json new file mode 100644 index 000000000000..5ab5aa8e4673 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Reorder-ticket-creation-rules-returns-Successfully-reordered-the-ticket-creation-rules-re_1153776696/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:17.183Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Reorder-ticket-creation-rules-returns-Successfully-reordered-the-ticket-creation-rules-re_1153776696/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Reorder-ticket-creation-rules-returns-Successfully-reordered-the-ticket-creation-rules-re_1153776696/recording.har new file mode 100644 index 000000000000..cb07e3a4c22c --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Reorder-ticket-creation-rules-returns-Successfully-reordered-the-ticket-creation-rules-re_1153776696/recording.har @@ -0,0 +1,157 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Reorder ticket creation rules returns \"Successfully reordered the ticket creation rules\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "1fb27fff527261660257d2f9bc94c283", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 364, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 635, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"max_tickets_per_day\":10,\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\"},\"enabled\":true,\"name\":\"Test-Reorder_ticket_creation_rules_returns_Successfully_reordered_the_ticket_creation_rules_response-1781624477\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"ticket_creation_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules" + }, + "response": { + "bodySize": 650, + "content": { + "mimeType": "application/vnd.api+json", + "size": 650, + "text": "{\"data\":{\"id\":\"b34dcd68-976a-49af-915b-83488a3d9f74\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":10},\"created_at\":1781624477424,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624477424,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Reorder_ticket_creation_rules_returns_Successfully_reordered_the_ticket_creation_rules_response-1781624477\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:17.186Z", + "time": 417 + }, + { + "_id": "6b5f2508023d9a8e3a18ad487611736a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 87, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 644, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":[{\"id\":\"b34dcd68-976a-49af-915b-83488a3d9f74\",\"type\":\"ticket_creation_rules\"}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules/reorder" + }, + "response": { + "bodySize": 87, + "content": { + "mimeType": "application/vnd.api+json", + "size": 87, + "text": "{\"data\":[{\"type\":\"ticket_creation_rules\",\"id\":\"b34dcd68-976a-49af-915b-83488a3d9f74\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 664, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-06-16T15:41:17.608Z", + "time": 411 + }, + { + "_id": "0ae2c5c18613d50c1e50b1bf20aa32dd", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 607, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules/b34dcd68-976a-49af-915b-83488a3d9f74" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:18.026Z", + "time": 359 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Update-a-due-date-rule-returns-Successfully-updated-the-due-date-rule-response_1683256162/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Update-a-due-date-rule-returns-Successfully-updated-the-due-date-rule-response_1683256162/frozen.json new file mode 100644 index 000000000000..6a31d4e343af --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Update-a-due-date-rule-returns-Successfully-updated-the-due-date-rule-response_1683256162/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:18.417Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Update-a-due-date-rule-returns-Successfully-updated-the-due-date-rule-response_1683256162/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Update-a-due-date-rule-returns-Successfully-updated-the-due-date-rule-response_1683256162/recording.har new file mode 100644 index 000000000000..9a50783e5976 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Update-a-due-date-rule-returns-Successfully-updated-the-due-date-rule-response_1683256162/recording.har @@ -0,0 +1,157 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Update a due date rule returns \"Successfully updated the due date rule\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "239060fcab649c7376419aa4f0a43c41", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 337, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 621, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"due_in_days\":7,\"severity\":\"critical\"}],\"due_from\":\"first_seen\"},\"enabled\":true,\"name\":\"Test-Update_a_due_date_rule_returns_Successfully_updated_the_due_date_rule_response-1781624478\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"due_date_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules" + }, + "response": { + "bodySize": 623, + "content": { + "mimeType": "application/vnd.api+json", + "size": 623, + "text": "{\"data\":{\"id\":\"22df6980-9710-496d-bf46-85e0ac181dc0\",\"type\":\"due_date_rules\",\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"severity\":\"critical\",\"due_in_days\":7}],\"due_from\":\"first_seen\"},\"created_at\":1781624478629,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624478629,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_due_date_rule_returns_Successfully_updated_the_due_date_rule_response-1781624478\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:18.420Z", + "time": 379 + }, + { + "_id": "3bc2d6f13bc2ffd7893a9c83692176ca", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 339, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 657, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"due_in_days\":14,\"severity\":\"critical\"}],\"due_from\":\"first_seen\"},\"enabled\":false,\"name\":\"Test-Update_a_due_date_rule_returns_Successfully_updated_the_due_date_rule_response-1781624478\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"due_date_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules/22df6980-9710-496d-bf46-85e0ac181dc0" + }, + "response": { + "bodySize": 625, + "content": { + "mimeType": "application/vnd.api+json", + "size": 625, + "text": "{\"data\":{\"id\":\"22df6980-9710-496d-bf46-85e0ac181dc0\",\"type\":\"due_date_rules\",\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"severity\":\"critical\",\"due_in_days\":14}],\"due_from\":\"first_seen\"},\"created_at\":1781624478629,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":false,\"modified_at\":1781624479036,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_due_date_rule_returns_Successfully_updated_the_due_date_rule_response-1781624478\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-06-16T15:41:18.804Z", + "time": 413 + }, + { + "_id": "b9d56867a8f1e9d51d86cb7cb5199ce0", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 594, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/due_date_rules/22df6980-9710-496d-bf46-85e0ac181dc0" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:19.222Z", + "time": 382 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Update-a-mute-rule-returns-Successfully-updated-the-mute-rule-response_3602174014/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Update-a-mute-rule-returns-Successfully-updated-the-mute-rule-response_3602174014/frozen.json new file mode 100644 index 000000000000..956ce63c15cf --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Update-a-mute-rule-returns-Successfully-updated-the-mute-rule-response_3602174014/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:19.612Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Update-a-mute-rule-returns-Successfully-updated-the-mute-rule-response_3602174014/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Update-a-mute-rule-returns-Successfully-updated-the-mute-rule-response_3602174014/recording.har new file mode 100644 index 000000000000..a16088fa5319 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Update-a-mute-rule-returns-Successfully-updated-the-mute-rule-response_3602174014/recording.har @@ -0,0 +1,157 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Update a mute rule returns \"Successfully updated the mute rule\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "2accd935f7c9bdbb3b0de22d792bf4b0", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 260, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 614, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"enabled\":true,\"name\":\"Test-Update_a_mute_rule_returns_Successfully_updated_the_mute_rule_response-1781624479\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"mute_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules" + }, + "response": { + "bodySize": 546, + "content": { + "mimeType": "application/vnd.api+json", + "size": 546, + "text": "{\"data\":{\"id\":\"9a1d22ad-558c-4c4e-bdf5-72cd264cf7a9\",\"type\":\"mute_rules\",\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"created_at\":1781624479894,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624479894,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_mute_rule_returns_Successfully_updated_the_mute_rule_response-1781624479\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:19.614Z", + "time": 457 + }, + { + "_id": "91a47cb5f80d82e44778d06b8748cf54", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 262, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 650, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"reason\":\"false_positive\"},\"enabled\":false,\"name\":\"Test-Update_a_mute_rule_returns_Successfully_updated_the_mute_rule_response-1781624479\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"mute_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules/9a1d22ad-558c-4c4e-bdf5-72cd264cf7a9" + }, + "response": { + "bodySize": 548, + "content": { + "mimeType": "application/vnd.api+json", + "size": 548, + "text": "{\"data\":{\"id\":\"9a1d22ad-558c-4c4e-bdf5-72cd264cf7a9\",\"type\":\"mute_rules\",\"attributes\":{\"action\":{\"reason\":\"false_positive\"},\"created_at\":1781624479894,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":false,\"modified_at\":1781624480318,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_mute_rule_returns_Successfully_updated_the_mute_rule_response-1781624479\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-06-16T15:41:20.076Z", + "time": 425 + }, + { + "_id": "904dc5cc94dc6984d25e5610f07bad19", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 586, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/mute_rules/9a1d22ad-558c-4c4e-bdf5-72cd264cf7a9" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 604, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:20.506Z", + "time": 363 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Security-Monitoring_1187227211/Update-a-ticket-creation-rule-returns-Successfully-updated-the-ticket-creation-rule-respon_186428364/frozen.json b/cassettes/v2/Security-Monitoring_1187227211/Update-a-ticket-creation-rule-returns-Successfully-updated-the-ticket-creation-rule-respon_186428364/frozen.json new file mode 100644 index 000000000000..783e0290caf2 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Update-a-ticket-creation-rule-returns-Successfully-updated-the-ticket-creation-rule-respon_186428364/frozen.json @@ -0,0 +1 @@ +"2026-06-16T15:41:20.880Z" diff --git a/cassettes/v2/Security-Monitoring_1187227211/Update-a-ticket-creation-rule-returns-Successfully-updated-the-ticket-creation-rule-respon_186428364/recording.har b/cassettes/v2/Security-Monitoring_1187227211/Update-a-ticket-creation-rule-returns-Successfully-updated-the-ticket-creation-rule-respon_186428364/recording.har new file mode 100644 index 000000000000..ca0eeb8d5887 --- /dev/null +++ b/cassettes/v2/Security-Monitoring_1187227211/Update-a-ticket-creation-rule-returns-Successfully-updated-the-ticket-creation-rule-respon_186428364/recording.har @@ -0,0 +1,157 @@ +{ + "log": { + "_recordingName": "Security Monitoring/Update a ticket creation rule returns \"Successfully updated the ticket creation rule\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "813c3df07b77de4c9a244264ff91ea05", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 361, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 635, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"max_tickets_per_day\":10,\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\"},\"enabled\":true,\"name\":\"Test-Update_a_ticket_creation_rule_returns_Successfully_updated_the_ticket_creation_rule_response-1781624480\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"ticket_creation_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules" + }, + "response": { + "bodySize": 647, + "content": { + "mimeType": "application/vnd.api+json", + "size": 647, + "text": "{\"data\":{\"id\":\"d3fcec39-567f-4450-967e-ca83bb29dbe4\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":10},\"created_at\":1781624481109,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624481109,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_ticket_creation_rule_returns_Successfully_updated_the_ticket_creation_rule_response-1781624480\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 664, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-06-16T15:41:20.883Z", + "time": 410 + }, + { + "_id": "42dcaffb72a568e58b9aa21b478dba46", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 361, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 671, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"action\":{\"max_tickets_per_day\":5,\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\"},\"enabled\":false,\"name\":\"Test-Update_a_ticket_creation_rule_returns_Successfully_updated_the_ticket_creation_rule_response-1781624480\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}},\"type\":\"ticket_creation_rules\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules/d3fcec39-567f-4450-967e-ca83bb29dbe4" + }, + "response": { + "bodySize": 647, + "content": { + "mimeType": "application/vnd.api+json", + "size": 647, + "text": "{\"data\":{\"id\":\"d3fcec39-567f-4450-967e-ca83bb29dbe4\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":5},\"created_at\":1781624481109,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":false,\"modified_at\":1781624481511,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_ticket_creation_rule_returns_Successfully_updated_the_ticket_creation_rule_response-1781624480\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 664, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-06-16T15:41:21.298Z", + "time": 381 + }, + { + "_id": "d27a2ecd6c1c94565e7687977b055ee4", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 608, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/security/findings/automation/ticket_creation_rules/d3fcec39-567f-4450-967e-ca83bb29dbe4" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 603, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-06-16T15:41:21.684Z", + "time": 372 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/security-monitoring/CreateSecurityFindingsAutomationDueDateRule.ts b/examples/v2/security-monitoring/CreateSecurityFindingsAutomationDueDateRule.ts new file mode 100644 index 000000000000..a73cbd3b6c94 --- /dev/null +++ b/examples/v2/security-monitoring/CreateSecurityFindingsAutomationDueDateRule.ts @@ -0,0 +1,46 @@ +/** + * Create a due date rule returns "Successfully created the due date rule" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.createSecurityFindingsAutomationDueDateRule" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +const params: v2.SecurityMonitoringApiCreateSecurityFindingsAutomationDueDateRuleRequest = + { + body: { + data: { + attributes: { + action: { + dueDaysPerSeverity: [ + { + dueInDays: 7, + severity: "critical", + }, + ], + dueFrom: "first_seen", + }, + enabled: true, + name: "Example-Security-Monitoring", + rule: { + findingTypes: ["misconfiguration"], + query: "env:staging", + }, + }, + type: "due_date_rules", + }, + }, + }; + +apiInstance + .createSecurityFindingsAutomationDueDateRule(params) + .then((data: v2.DueDateRuleResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/CreateSecurityFindingsAutomationMuteRule.ts b/examples/v2/security-monitoring/CreateSecurityFindingsAutomationMuteRule.ts new file mode 100644 index 000000000000..9d7125575d99 --- /dev/null +++ b/examples/v2/security-monitoring/CreateSecurityFindingsAutomationMuteRule.ts @@ -0,0 +1,40 @@ +/** + * Create a mute rule returns "Successfully created the mute rule" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.createSecurityFindingsAutomationMuteRule" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +const params: v2.SecurityMonitoringApiCreateSecurityFindingsAutomationMuteRuleRequest = + { + body: { + data: { + attributes: { + action: { + reason: "risk_accepted", + }, + enabled: true, + name: "Example-Security-Monitoring", + rule: { + findingTypes: ["misconfiguration"], + query: "env:staging", + }, + }, + type: "mute_rules", + }, + }, + }; + +apiInstance + .createSecurityFindingsAutomationMuteRule(params) + .then((data: v2.MuteRuleResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/CreateSecurityFindingsAutomationTicketCreationRule.ts b/examples/v2/security-monitoring/CreateSecurityFindingsAutomationTicketCreationRule.ts new file mode 100644 index 000000000000..8efb94469e6a --- /dev/null +++ b/examples/v2/security-monitoring/CreateSecurityFindingsAutomationTicketCreationRule.ts @@ -0,0 +1,42 @@ +/** + * Create a ticket creation rule returns "Successfully created the ticket creation rule" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.createSecurityFindingsAutomationTicketCreationRule" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +const params: v2.SecurityMonitoringApiCreateSecurityFindingsAutomationTicketCreationRuleRequest = + { + body: { + data: { + attributes: { + action: { + maxTicketsPerDay: 10, + projectId: "11111111-1111-1111-1111-111111111111", + target: "jira", + }, + enabled: true, + name: "Example-Security-Monitoring", + rule: { + findingTypes: ["misconfiguration"], + query: "env:staging", + }, + }, + type: "ticket_creation_rules", + }, + }, + }; + +apiInstance + .createSecurityFindingsAutomationTicketCreationRule(params) + .then((data: v2.TicketCreationRuleResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/DeleteSecurityFindingsAutomationDueDateRule.ts b/examples/v2/security-monitoring/DeleteSecurityFindingsAutomationDueDateRule.ts new file mode 100644 index 000000000000..6a56013b1d93 --- /dev/null +++ b/examples/v2/security-monitoring/DeleteSecurityFindingsAutomationDueDateRule.ts @@ -0,0 +1,29 @@ +/** + * Delete a due date rule returns "Rule successfully deleted." response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.deleteSecurityFindingsAutomationDueDateRule" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +// there is a valid "valid_due_date_rule" in the system +const VALID_DUE_DATE_RULE_DATA_ID = process.env + .VALID_DUE_DATE_RULE_DATA_ID as string; + +const params: v2.SecurityMonitoringApiDeleteSecurityFindingsAutomationDueDateRuleRequest = + { + ruleId: VALID_DUE_DATE_RULE_DATA_ID, + }; + +apiInstance + .deleteSecurityFindingsAutomationDueDateRule(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/DeleteSecurityFindingsAutomationMuteRule.ts b/examples/v2/security-monitoring/DeleteSecurityFindingsAutomationMuteRule.ts new file mode 100644 index 000000000000..da568b7e1654 --- /dev/null +++ b/examples/v2/security-monitoring/DeleteSecurityFindingsAutomationMuteRule.ts @@ -0,0 +1,28 @@ +/** + * Delete a mute rule returns "Rule successfully deleted." response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.deleteSecurityFindingsAutomationMuteRule" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +// there is a valid "valid_mute_rule" in the system +const VALID_MUTE_RULE_DATA_ID = process.env.VALID_MUTE_RULE_DATA_ID as string; + +const params: v2.SecurityMonitoringApiDeleteSecurityFindingsAutomationMuteRuleRequest = + { + ruleId: VALID_MUTE_RULE_DATA_ID, + }; + +apiInstance + .deleteSecurityFindingsAutomationMuteRule(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/DeleteSecurityFindingsAutomationTicketCreationRule.ts b/examples/v2/security-monitoring/DeleteSecurityFindingsAutomationTicketCreationRule.ts new file mode 100644 index 000000000000..0e7e0f2ac2cb --- /dev/null +++ b/examples/v2/security-monitoring/DeleteSecurityFindingsAutomationTicketCreationRule.ts @@ -0,0 +1,29 @@ +/** + * Delete a ticket creation rule returns "Rule successfully deleted." response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.deleteSecurityFindingsAutomationTicketCreationRule" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +// there is a valid "valid_ticket_creation_rule" in the system +const VALID_TICKET_CREATION_RULE_DATA_ID = process.env + .VALID_TICKET_CREATION_RULE_DATA_ID as string; + +const params: v2.SecurityMonitoringApiDeleteSecurityFindingsAutomationTicketCreationRuleRequest = + { + ruleId: VALID_TICKET_CREATION_RULE_DATA_ID, + }; + +apiInstance + .deleteSecurityFindingsAutomationTicketCreationRule(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/GetSecurityFindingsAutomationDueDateRule.ts b/examples/v2/security-monitoring/GetSecurityFindingsAutomationDueDateRule.ts new file mode 100644 index 000000000000..b8113f6a04f9 --- /dev/null +++ b/examples/v2/security-monitoring/GetSecurityFindingsAutomationDueDateRule.ts @@ -0,0 +1,29 @@ +/** + * Get a due date rule returns "Successfully retrieved the due date rule" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.getSecurityFindingsAutomationDueDateRule" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +// there is a valid "valid_due_date_rule" in the system +const VALID_DUE_DATE_RULE_DATA_ID = process.env + .VALID_DUE_DATE_RULE_DATA_ID as string; + +const params: v2.SecurityMonitoringApiGetSecurityFindingsAutomationDueDateRuleRequest = + { + ruleId: VALID_DUE_DATE_RULE_DATA_ID, + }; + +apiInstance + .getSecurityFindingsAutomationDueDateRule(params) + .then((data: v2.DueDateRuleResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/GetSecurityFindingsAutomationMuteRule.ts b/examples/v2/security-monitoring/GetSecurityFindingsAutomationMuteRule.ts new file mode 100644 index 000000000000..fbef5165f9de --- /dev/null +++ b/examples/v2/security-monitoring/GetSecurityFindingsAutomationMuteRule.ts @@ -0,0 +1,27 @@ +/** + * Get a mute rule returns "Successfully retrieved the mute rule" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getSecurityFindingsAutomationMuteRule"] = + true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +// there is a valid "valid_mute_rule" in the system +const VALID_MUTE_RULE_DATA_ID = process.env.VALID_MUTE_RULE_DATA_ID as string; + +const params: v2.SecurityMonitoringApiGetSecurityFindingsAutomationMuteRuleRequest = + { + ruleId: VALID_MUTE_RULE_DATA_ID, + }; + +apiInstance + .getSecurityFindingsAutomationMuteRule(params) + .then((data: v2.MuteRuleResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/GetSecurityFindingsAutomationTicketCreationRule.ts b/examples/v2/security-monitoring/GetSecurityFindingsAutomationTicketCreationRule.ts new file mode 100644 index 000000000000..91955b05218c --- /dev/null +++ b/examples/v2/security-monitoring/GetSecurityFindingsAutomationTicketCreationRule.ts @@ -0,0 +1,29 @@ +/** + * Get a ticket creation rule returns "Successfully retrieved the ticket creation rule" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.getSecurityFindingsAutomationTicketCreationRule" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +// there is a valid "valid_ticket_creation_rule" in the system +const VALID_TICKET_CREATION_RULE_DATA_ID = process.env + .VALID_TICKET_CREATION_RULE_DATA_ID as string; + +const params: v2.SecurityMonitoringApiGetSecurityFindingsAutomationTicketCreationRuleRequest = + { + ruleId: VALID_TICKET_CREATION_RULE_DATA_ID, + }; + +apiInstance + .getSecurityFindingsAutomationTicketCreationRule(params) + .then((data: v2.TicketCreationRuleResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/ListSecurityFindingsAutomationDueDateRules.ts b/examples/v2/security-monitoring/ListSecurityFindingsAutomationDueDateRules.ts new file mode 100644 index 000000000000..58784279567b --- /dev/null +++ b/examples/v2/security-monitoring/ListSecurityFindingsAutomationDueDateRules.ts @@ -0,0 +1,20 @@ +/** + * Get all due date rules returns "Successfully retrieved the list of due date rules" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.listSecurityFindingsAutomationDueDateRules" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +apiInstance + .listSecurityFindingsAutomationDueDateRules() + .then((data: v2.DueDateRulesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/ListSecurityFindingsAutomationMuteRules.ts b/examples/v2/security-monitoring/ListSecurityFindingsAutomationMuteRules.ts new file mode 100644 index 000000000000..a68824958512 --- /dev/null +++ b/examples/v2/security-monitoring/ListSecurityFindingsAutomationMuteRules.ts @@ -0,0 +1,19 @@ +/** + * Get all mute rules returns "Successfully retrieved the list of mute rules" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listSecurityFindingsAutomationMuteRules"] = + true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +apiInstance + .listSecurityFindingsAutomationMuteRules() + .then((data: v2.MuteRulesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/ListSecurityFindingsAutomationTicketCreationRules.ts b/examples/v2/security-monitoring/ListSecurityFindingsAutomationTicketCreationRules.ts new file mode 100644 index 000000000000..1d27d670dcfe --- /dev/null +++ b/examples/v2/security-monitoring/ListSecurityFindingsAutomationTicketCreationRules.ts @@ -0,0 +1,20 @@ +/** + * Get all ticket creation rules returns "Successfully retrieved the list of ticket creation rules" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.listSecurityFindingsAutomationTicketCreationRules" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +apiInstance + .listSecurityFindingsAutomationTicketCreationRules() + .then((data: v2.TicketCreationRulesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationDueDateRules.ts b/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationDueDateRules.ts new file mode 100644 index 000000000000..8b39310f47a2 --- /dev/null +++ b/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationDueDateRules.ts @@ -0,0 +1,36 @@ +/** + * Reorder due date rules returns "Successfully reordered the due date rules" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.reorderSecurityFindingsAutomationDueDateRules" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +// there is a valid "valid_due_date_rule" in the system +const VALID_DUE_DATE_RULE_DATA_ID = process.env + .VALID_DUE_DATE_RULE_DATA_ID as string; + +const params: v2.SecurityMonitoringApiReorderSecurityFindingsAutomationDueDateRulesRequest = + { + body: { + data: [ + { + id: VALID_DUE_DATE_RULE_DATA_ID, + type: "due_date_rules", + }, + ], + }, + }; + +apiInstance + .reorderSecurityFindingsAutomationDueDateRules(params) + .then((data: v2.SecurityAutomationRuleReorderRequest) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationMuteRules.ts b/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationMuteRules.ts new file mode 100644 index 000000000000..add48bfb7dce --- /dev/null +++ b/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationMuteRules.ts @@ -0,0 +1,35 @@ +/** + * Reorder mute rules returns "Successfully reordered the mute rules" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.reorderSecurityFindingsAutomationMuteRules" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +// there is a valid "valid_mute_rule" in the system +const VALID_MUTE_RULE_DATA_ID = process.env.VALID_MUTE_RULE_DATA_ID as string; + +const params: v2.SecurityMonitoringApiReorderSecurityFindingsAutomationMuteRulesRequest = + { + body: { + data: [ + { + id: VALID_MUTE_RULE_DATA_ID, + type: "mute_rules", + }, + ], + }, + }; + +apiInstance + .reorderSecurityFindingsAutomationMuteRules(params) + .then((data: v2.SecurityAutomationRuleReorderRequest) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationTicketCreationRules.ts b/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationTicketCreationRules.ts new file mode 100644 index 000000000000..1c4281831900 --- /dev/null +++ b/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationTicketCreationRules.ts @@ -0,0 +1,36 @@ +/** + * Reorder ticket creation rules returns "Successfully reordered the ticket creation rules" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.reorderSecurityFindingsAutomationTicketCreationRules" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +// there is a valid "valid_ticket_creation_rule" in the system +const VALID_TICKET_CREATION_RULE_DATA_ID = process.env + .VALID_TICKET_CREATION_RULE_DATA_ID as string; + +const params: v2.SecurityMonitoringApiReorderSecurityFindingsAutomationTicketCreationRulesRequest = + { + body: { + data: [ + { + id: VALID_TICKET_CREATION_RULE_DATA_ID, + type: "ticket_creation_rules", + }, + ], + }, + }; + +apiInstance + .reorderSecurityFindingsAutomationTicketCreationRules(params) + .then((data: v2.SecurityAutomationRuleReorderRequest) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationDueDateRule.ts b/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationDueDateRule.ts new file mode 100644 index 000000000000..1cbca98661e6 --- /dev/null +++ b/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationDueDateRule.ts @@ -0,0 +1,51 @@ +/** + * Update a due date rule returns "Successfully updated the due date rule" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.updateSecurityFindingsAutomationDueDateRule" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +// there is a valid "valid_due_date_rule" in the system +const VALID_DUE_DATE_RULE_DATA_ID = process.env + .VALID_DUE_DATE_RULE_DATA_ID as string; + +const params: v2.SecurityMonitoringApiUpdateSecurityFindingsAutomationDueDateRuleRequest = + { + body: { + data: { + attributes: { + action: { + dueDaysPerSeverity: [ + { + dueInDays: 14, + severity: "critical", + }, + ], + dueFrom: "first_seen", + }, + enabled: false, + name: "Example-Security-Monitoring", + rule: { + findingTypes: ["misconfiguration"], + query: "env:staging", + }, + }, + type: "due_date_rules", + }, + }, + ruleId: VALID_DUE_DATE_RULE_DATA_ID, + }; + +apiInstance + .updateSecurityFindingsAutomationDueDateRule(params) + .then((data: v2.DueDateRuleResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationMuteRule.ts b/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationMuteRule.ts new file mode 100644 index 000000000000..07e7349f4e40 --- /dev/null +++ b/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationMuteRule.ts @@ -0,0 +1,44 @@ +/** + * Update a mute rule returns "Successfully updated the mute rule" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.updateSecurityFindingsAutomationMuteRule" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +// there is a valid "valid_mute_rule" in the system +const VALID_MUTE_RULE_DATA_ID = process.env.VALID_MUTE_RULE_DATA_ID as string; + +const params: v2.SecurityMonitoringApiUpdateSecurityFindingsAutomationMuteRuleRequest = + { + body: { + data: { + attributes: { + action: { + reason: "false_positive", + }, + enabled: false, + name: "Example-Security-Monitoring", + rule: { + findingTypes: ["misconfiguration"], + query: "env:staging", + }, + }, + type: "mute_rules", + }, + }, + ruleId: VALID_MUTE_RULE_DATA_ID, + }; + +apiInstance + .updateSecurityFindingsAutomationMuteRule(params) + .then((data: v2.MuteRuleResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationTicketCreationRule.ts b/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationTicketCreationRule.ts new file mode 100644 index 000000000000..066bc01f1eb5 --- /dev/null +++ b/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationTicketCreationRule.ts @@ -0,0 +1,47 @@ +/** + * Update a ticket creation rule returns "Successfully updated the ticket creation rule" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.updateSecurityFindingsAutomationTicketCreationRule" +] = true; +const apiInstance = new v2.SecurityMonitoringApi(configuration); + +// there is a valid "valid_ticket_creation_rule" in the system +const VALID_TICKET_CREATION_RULE_DATA_ID = process.env + .VALID_TICKET_CREATION_RULE_DATA_ID as string; + +const params: v2.SecurityMonitoringApiUpdateSecurityFindingsAutomationTicketCreationRuleRequest = + { + body: { + data: { + attributes: { + action: { + maxTicketsPerDay: 5, + projectId: "11111111-1111-1111-1111-111111111111", + target: "jira", + }, + enabled: false, + name: "Example-Security-Monitoring", + rule: { + findingTypes: ["misconfiguration"], + query: "env:staging", + }, + }, + type: "ticket_creation_rules", + }, + }, + ruleId: VALID_TICKET_CREATION_RULE_DATA_ID, + }; + +apiInstance + .updateSecurityFindingsAutomationTicketCreationRule(params) + .then((data: v2.TicketCreationRuleResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index 3698770ba71d..87844b21a879 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -5761,6 +5761,156 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "AssigneeResponse", }, + "v2.ListSecurityFindingsAutomationDueDateRules": { + "pageSize": { + "type": "number", + "format": "int64", + }, + "pageNumber": { + "type": "number", + "format": "int64", + }, + "operationResponseType": "DueDateRulesResponse", + }, + "v2.CreateSecurityFindingsAutomationDueDateRule": { + "body": { + "type": "DueDateRuleCreateRequest", + "format": "", + }, + "operationResponseType": "DueDateRuleResponse", + }, + "v2.ReorderSecurityFindingsAutomationDueDateRules": { + "body": { + "type": "SecurityAutomationRuleReorderRequest", + "format": "", + }, + "operationResponseType": "SecurityAutomationRuleReorderRequest", + }, + "v2.GetSecurityFindingsAutomationDueDateRule": { + "ruleId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "DueDateRuleResponse", + }, + "v2.UpdateSecurityFindingsAutomationDueDateRule": { + "ruleId": { + "type": "string", + "format": "uuid", + }, + "body": { + "type": "DueDateRuleUpdateRequest", + "format": "", + }, + "operationResponseType": "DueDateRuleResponse", + }, + "v2.DeleteSecurityFindingsAutomationDueDateRule": { + "ruleId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "{}", + }, + "v2.ListSecurityFindingsAutomationMuteRules": { + "pageSize": { + "type": "number", + "format": "int64", + }, + "pageNumber": { + "type": "number", + "format": "int64", + }, + "operationResponseType": "MuteRulesResponse", + }, + "v2.CreateSecurityFindingsAutomationMuteRule": { + "body": { + "type": "MuteRuleCreateRequest", + "format": "", + }, + "operationResponseType": "MuteRuleResponse", + }, + "v2.ReorderSecurityFindingsAutomationMuteRules": { + "body": { + "type": "SecurityAutomationRuleReorderRequest", + "format": "", + }, + "operationResponseType": "SecurityAutomationRuleReorderRequest", + }, + "v2.GetSecurityFindingsAutomationMuteRule": { + "ruleId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "MuteRuleResponse", + }, + "v2.UpdateSecurityFindingsAutomationMuteRule": { + "ruleId": { + "type": "string", + "format": "uuid", + }, + "body": { + "type": "MuteRuleUpdateRequest", + "format": "", + }, + "operationResponseType": "MuteRuleResponse", + }, + "v2.DeleteSecurityFindingsAutomationMuteRule": { + "ruleId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "{}", + }, + "v2.ListSecurityFindingsAutomationTicketCreationRules": { + "pageSize": { + "type": "number", + "format": "int64", + }, + "pageNumber": { + "type": "number", + "format": "int64", + }, + "operationResponseType": "TicketCreationRulesResponse", + }, + "v2.CreateSecurityFindingsAutomationTicketCreationRule": { + "body": { + "type": "TicketCreationRuleCreateRequest", + "format": "", + }, + "operationResponseType": "TicketCreationRuleResponse", + }, + "v2.ReorderSecurityFindingsAutomationTicketCreationRules": { + "body": { + "type": "SecurityAutomationRuleReorderRequest", + "format": "", + }, + "operationResponseType": "SecurityAutomationRuleReorderRequest", + }, + "v2.GetSecurityFindingsAutomationTicketCreationRule": { + "ruleId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "TicketCreationRuleResponse", + }, + "v2.UpdateSecurityFindingsAutomationTicketCreationRule": { + "ruleId": { + "type": "string", + "format": "uuid", + }, + "body": { + "type": "TicketCreationRuleUpdateRequest", + "format": "", + }, + "operationResponseType": "TicketCreationRuleResponse", + }, + "v2.DeleteSecurityFindingsAutomationTicketCreationRule": { + "ruleId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "{}", + }, "v2.CreateCases": { "body": { "type": "CreateCaseRequestArray", diff --git a/features/v2/given.json b/features/v2/given.json index f5ce3365dabd..0f9de6d48a2f 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -1290,6 +1290,42 @@ "tag": "Scorecards", "operationId": "CreateScorecardRule" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"due_date_rules\",\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"enabled\": true,\n \"rule\": {\n \"finding_types\": [\"misconfiguration\"],\n \"query\": \"env:staging\"\n },\n \"action\": {\n \"due_days_per_severity\": [\n {\"severity\": \"critical\", \"due_in_days\": 7}\n ],\n \"due_from\": \"first_seen\"\n }\n }\n }\n}" + } + ], + "step": "there is a valid \"valid_due_date_rule\" in the system", + "key": "valid_due_date_rule", + "tag": "Security Monitoring", + "operationId": "CreateSecurityFindingsAutomationDueDateRule" + }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"mute_rules\",\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"enabled\": true,\n \"rule\": {\n \"finding_types\": [\"misconfiguration\"],\n \"query\": \"env:staging\"\n },\n \"action\": {\n \"reason\": \"risk_accepted\"\n }\n }\n }\n}" + } + ], + "step": "there is a valid \"valid_mute_rule\" in the system", + "key": "valid_mute_rule", + "tag": "Security Monitoring", + "operationId": "CreateSecurityFindingsAutomationMuteRule" + }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"ticket_creation_rules\",\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"enabled\": true,\n \"rule\": {\n \"finding_types\": [\"misconfiguration\"],\n \"query\": \"env:staging\"\n },\n \"action\": {\n \"project_id\": \"11111111-1111-1111-1111-111111111111\",\n \"target\": \"jira\",\n \"max_tickets_per_day\": 10\n }\n }\n }\n}" + } + ], + "step": "there is a valid \"valid_ticket_creation_rule\" in the system", + "key": "valid_ticket_creation_rule", + "tag": "Security Monitoring", + "operationId": "CreateSecurityFindingsAutomationTicketCreationRule" + }, { "parameters": [ { diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index 40957727ee74..b1d9a8d0c730 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/security_monitoring.feature @@ -750,6 +750,60 @@ Feature: Security Monitoring And the response "message" is equal to "Test rule" And the response "isEnabled" is equal to true + @generated @skip @team:DataDog/k9-automation + Scenario: Create a due date rule returns "Bad Request" response + Given operation "CreateSecurityFindingsAutomationDueDateRule" enabled + And new "CreateSecurityFindingsAutomationDueDateRule" request + And body with value {"data": {"attributes": {"action": {"due_days_per_severity": [{"due_in_days": 7, "severity": "critical"}], "due_from": "first_seen", "reason_description": "Applied for production findings only"}, "enabled": true, "name": "Critical findings due in 7 days", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "due_date_rules"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/k9-automation + Scenario: Create a due date rule returns "Successfully created the due date rule" response + Given operation "CreateSecurityFindingsAutomationDueDateRule" enabled + And new "CreateSecurityFindingsAutomationDueDateRule" request + And body with value {"data": {"attributes": {"action": {"due_days_per_severity": [{"due_in_days": 7, "severity": "critical"}], "due_from": "first_seen"}, "enabled": true, "name": "{{ unique }}", "rule": {"finding_types": ["misconfiguration"], "query": "env:staging"}}, "type": "due_date_rules"}} + When the request is sent + Then the response status is 201 Successfully created the due date rule + And the response "data.type" is equal to "due_date_rules" + And the response "data.attributes.name" is equal to "{{ unique }}" + And the response "data.attributes.enabled" is equal to true + + @generated @skip @team:DataDog/k9-automation + Scenario: Create a due date rule returns "Unprocessable Entity" response + Given operation "CreateSecurityFindingsAutomationDueDateRule" enabled + And new "CreateSecurityFindingsAutomationDueDateRule" request + And body with value {"data": {"attributes": {"action": {"due_days_per_severity": [{"due_in_days": 7, "severity": "critical"}], "due_from": "first_seen", "reason_description": "Applied for production findings only"}, "enabled": true, "name": "Critical findings due in 7 days", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "due_date_rules"}} + When the request is sent + Then the response status is 422 Unprocessable Entity + + @generated @skip @team:DataDog/k9-automation + Scenario: Create a mute rule returns "Bad Request" response + Given operation "CreateSecurityFindingsAutomationMuteRule" enabled + And new "CreateSecurityFindingsAutomationMuteRule" request + And body with value {"data": {"attributes": {"action": {"expire_at": 4070908800000, "reason": "risk_accepted", "reason_description": "Accepted for dev environments only"}, "enabled": true, "name": "Mute accepted risks in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "mute_rules"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/k9-automation + Scenario: Create a mute rule returns "Successfully created the mute rule" response + Given operation "CreateSecurityFindingsAutomationMuteRule" enabled + And new "CreateSecurityFindingsAutomationMuteRule" request + And body with value {"data": {"attributes": {"action": {"reason": "risk_accepted"}, "enabled": true, "name": "{{ unique }}", "rule": {"finding_types": ["misconfiguration"], "query": "env:staging"}}, "type": "mute_rules"}} + When the request is sent + Then the response status is 201 Successfully created the mute rule + And the response "data.type" is equal to "mute_rules" + And the response "data.attributes.name" is equal to "{{ unique }}" + And the response "data.attributes.enabled" is equal to true + + @generated @skip @team:DataDog/k9-automation + Scenario: Create a mute rule returns "Unprocessable Entity" response + Given operation "CreateSecurityFindingsAutomationMuteRule" enabled + And new "CreateSecurityFindingsAutomationMuteRule" request + And body with value {"data": {"attributes": {"action": {"expire_at": 4070908800000, "reason": "risk_accepted", "reason_description": "Accepted for dev environments only"}, "enabled": true, "name": "Mute accepted risks in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "mute_rules"}} + When the request is sent + Then the response status is 422 Unprocessable Entity + @generated @skip @team:DataDog/cloud-security-posture-management Scenario: Create a new signal-based notification rule returns "Bad Request" response Given new "CreateSignalNotificationRule" request @@ -864,6 +918,33 @@ Feature: Security Monitoring And the response "data.attributes.rule_query" is equal to "type:log_detection source:cloudtrail" And the response "data.attributes.data_exclusion_query" is equal to "account_id:12345" + @generated @skip @team:DataDog/k9-automation + Scenario: Create a ticket creation rule returns "Bad Request" response + Given operation "CreateSecurityFindingsAutomationTicketCreationRule" enabled + And new "CreateSecurityFindingsAutomationTicketCreationRule" request + And body with value {"data": {"attributes": {"action": {"assignee_id": "22222222-2222-2222-2222-222222222222", "auto_disabled_reason": "Daily ticket creation limit exceeded", "fields": {"labels": ["security"]}, "max_tickets_per_day": 100, "project_id": "11111111-1111-1111-1111-111111111111", "target": "jira"}, "enabled": true, "name": "Auto-create Jira tickets for critical findings", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "ticket_creation_rules"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/k9-automation + Scenario: Create a ticket creation rule returns "Successfully created the ticket creation rule" response + Given operation "CreateSecurityFindingsAutomationTicketCreationRule" enabled + And new "CreateSecurityFindingsAutomationTicketCreationRule" request + And body with value {"data": {"attributes": {"action": {"max_tickets_per_day": 10, "project_id": "11111111-1111-1111-1111-111111111111", "target": "jira"}, "enabled": true, "name": "{{ unique }}", "rule": {"finding_types": ["misconfiguration"], "query": "env:staging"}}, "type": "ticket_creation_rules"}} + When the request is sent + Then the response status is 201 Successfully created the ticket creation rule + And the response "data.type" is equal to "ticket_creation_rules" + And the response "data.attributes.name" is equal to "{{ unique }}" + And the response "data.attributes.enabled" is equal to true + + @generated @skip @team:DataDog/k9-automation + Scenario: Create a ticket creation rule returns "Unprocessable Entity" response + Given operation "CreateSecurityFindingsAutomationTicketCreationRule" enabled + And new "CreateSecurityFindingsAutomationTicketCreationRule" request + And body with value {"data": {"attributes": {"action": {"assignee_id": "22222222-2222-2222-2222-222222222222", "auto_disabled_reason": "Daily ticket creation limit exceeded", "fields": {"labels": ["security"]}, "max_tickets_per_day": 100, "project_id": "11111111-1111-1111-1111-111111111111", "target": "jira"}, "enabled": true, "name": "Auto-create Jira tickets for critical findings", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "ticket_creation_rules"}} + When the request is sent + Then the response status is 422 Unprocessable Entity + @generated @skip @team:DataDog/k9-cloud-siem Scenario: Create an entity context sync configuration returns "Bad Request" response Given operation "CreateSecurityMonitoringIntegrationConfig" enabled @@ -1020,6 +1101,40 @@ Feature: Security Monitoring When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/k9-automation + Scenario: Delete a due date rule returns "Not Found" response + Given operation "DeleteSecurityFindingsAutomationDueDateRule" enabled + And new "DeleteSecurityFindingsAutomationDueDateRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/k9-automation + Scenario: Delete a due date rule returns "Rule successfully deleted." response + Given operation "DeleteSecurityFindingsAutomationDueDateRule" enabled + And there is a valid "valid_due_date_rule" in the system + And new "DeleteSecurityFindingsAutomationDueDateRule" request + And request contains "rule_id" parameter from "valid_due_date_rule.data.id" + When the request is sent + Then the response status is 204 Rule successfully deleted. + + @generated @skip @team:DataDog/k9-automation + Scenario: Delete a mute rule returns "Not Found" response + Given operation "DeleteSecurityFindingsAutomationMuteRule" enabled + And new "DeleteSecurityFindingsAutomationMuteRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/k9-automation + Scenario: Delete a mute rule returns "Rule successfully deleted." response + Given operation "DeleteSecurityFindingsAutomationMuteRule" enabled + And there is a valid "valid_mute_rule" in the system + And new "DeleteSecurityFindingsAutomationMuteRule" request + And request contains "rule_id" parameter from "valid_mute_rule.data.id" + When the request is sent + Then the response status is 204 Rule successfully deleted. + @skip @team:DataDog/k9-cloud-siem Scenario: Delete a non existing rule returns "Not Found" response Given new "DeleteSecurityMonitoringRule" request @@ -1079,6 +1194,23 @@ Feature: Security Monitoring When the request is sent Then the response status is 204 OK + @generated @skip @team:DataDog/k9-automation + Scenario: Delete a ticket creation rule returns "Not Found" response + Given operation "DeleteSecurityFindingsAutomationTicketCreationRule" enabled + And new "DeleteSecurityFindingsAutomationTicketCreationRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/k9-automation + Scenario: Delete a ticket creation rule returns "Rule successfully deleted." response + Given operation "DeleteSecurityFindingsAutomationTicketCreationRule" enabled + And there is a valid "valid_ticket_creation_rule" in the system + And new "DeleteSecurityFindingsAutomationTicketCreationRule" request + And request contains "rule_id" parameter from "valid_ticket_creation_rule.data.id" + When the request is sent + Then the response status is 204 Rule successfully deleted. + @team:DataDog/cloud-security-posture-management Scenario: Delete a vulnerability-based notification rule returns "Not Found" response Given new "DeleteVulnerabilityNotificationRule" request @@ -1386,6 +1518,25 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/k9-automation + Scenario: Get a due date rule returns "Not Found" response + Given operation "GetSecurityFindingsAutomationDueDateRule" enabled + And new "GetSecurityFindingsAutomationDueDateRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/k9-automation + Scenario: Get a due date rule returns "Successfully retrieved the due date rule" response + Given operation "GetSecurityFindingsAutomationDueDateRule" enabled + And there is a valid "valid_due_date_rule" in the system + And new "GetSecurityFindingsAutomationDueDateRule" request + And request contains "rule_id" parameter from "valid_due_date_rule.data.id" + When the request is sent + Then the response status is 200 Successfully retrieved the due date rule + And the response "data.id" is equal to "{{ valid_due_date_rule.data.id }}" + And the response "data.type" is equal to "due_date_rules" + @generated @skip @team:DataDog/cloud-security-posture-management Scenario: Get a finding returns "Bad Request: The server cannot process the request due to invalid syntax in the request." response Given operation "GetFinding" enabled @@ -1507,6 +1658,25 @@ Feature: Security Monitoring Then the response status is 200 OK And the response has 3 items + @generated @skip @team:DataDog/k9-automation + Scenario: Get a mute rule returns "Not Found" response + Given operation "GetSecurityFindingsAutomationMuteRule" enabled + And new "GetSecurityFindingsAutomationMuteRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/k9-automation + Scenario: Get a mute rule returns "Successfully retrieved the mute rule" response + Given operation "GetSecurityFindingsAutomationMuteRule" enabled + And there is a valid "valid_mute_rule" in the system + And new "GetSecurityFindingsAutomationMuteRule" request + And request contains "rule_id" parameter from "valid_mute_rule.data.id" + When the request is sent + Then the response status is 200 Successfully retrieved the mute rule + And the response "data.id" is equal to "{{ valid_mute_rule.data.id }}" + And the response "data.type" is equal to "mute_rules" + @generated @skip @team:DataDog/k9-cloud-siem Scenario: Get a quick list of security signals returns "Bad Request" response Given new "ListSecurityMonitoringSignals" request @@ -1658,12 +1828,49 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/k9-automation + Scenario: Get a ticket creation rule returns "Not Found" response + Given operation "GetSecurityFindingsAutomationTicketCreationRule" enabled + And new "GetSecurityFindingsAutomationTicketCreationRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/k9-automation + Scenario: Get a ticket creation rule returns "Successfully retrieved the ticket creation rule" response + Given operation "GetSecurityFindingsAutomationTicketCreationRule" enabled + And there is a valid "valid_ticket_creation_rule" in the system + And new "GetSecurityFindingsAutomationTicketCreationRule" request + And request contains "rule_id" parameter from "valid_ticket_creation_rule.data.id" + When the request is sent + Then the response status is 200 Successfully retrieved the ticket creation rule + And the response "data.id" is equal to "{{ valid_ticket_creation_rule.data.id }}" + And the response "data.type" is equal to "ticket_creation_rules" + @team:DataDog/k9-cloud-siem Scenario: Get all critical assets returns "OK" response Given new "ListSecurityMonitoringCriticalAssets" request When the request is sent Then the response status is 200 OK + @team:DataDog/k9-automation + Scenario: Get all due date rules returns "Successfully retrieved the list of due date rules" response + Given operation "ListSecurityFindingsAutomationDueDateRules" enabled + And there is a valid "valid_due_date_rule" in the system + And new "ListSecurityFindingsAutomationDueDateRules" request + When the request is sent + Then the response status is 200 Successfully retrieved the list of due date rules + And the response "data" has item with field "id" with value "{{ valid_due_date_rule.data.id }}" + + @team:DataDog/k9-automation + Scenario: Get all mute rules returns "Successfully retrieved the list of mute rules" response + Given operation "ListSecurityFindingsAutomationMuteRules" enabled + And there is a valid "valid_mute_rule" in the system + And new "ListSecurityFindingsAutomationMuteRules" request + When the request is sent + Then the response status is 200 Successfully retrieved the list of mute rules + And the response "data" has item with field "id" with value "{{ valid_mute_rule.data.id }}" + @team:DataDog/k9-cloud-siem Scenario: Get all security filters returns "OK" response Given new "ListSecurityFilters" request @@ -1712,6 +1919,15 @@ Feature: Security Monitoring Then the response status is 200 OK And the response "data[0].attributes.name" is equal to "suppression2 {{ unique_hash }}" + @team:DataDog/k9-automation + Scenario: Get all ticket creation rules returns "Successfully retrieved the list of ticket creation rules" response + Given operation "ListSecurityFindingsAutomationTicketCreationRules" enabled + And there is a valid "valid_ticket_creation_rule" in the system + And new "ListSecurityFindingsAutomationTicketCreationRules" request + When the request is sent + Then the response status is 200 Successfully retrieved the list of ticket creation rules + And the response "data" has item with field "id" with value "{{ valid_ticket_creation_rule.data.id }}" + @generated @skip @team:DataDog/k9-cloud-siem Scenario: Get an entity context sync configuration returns "Not Found" response Given operation "GetSecurityMonitoringIntegrationConfig" enabled @@ -2494,6 +2710,81 @@ 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:DataDog/k9-automation + Scenario: Reorder due date rules returns "Bad Request" response + Given operation "ReorderSecurityFindingsAutomationDueDateRules" enabled + And new "ReorderSecurityFindingsAutomationDueDateRules" request + And body with value {"data": [{"id": "00000000-0000-0000-0000-000000000000", "type": "mute_rules"}]} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/k9-automation + Scenario: Reorder due date rules returns "Successfully reordered the due date rules" response + Given operation "ReorderSecurityFindingsAutomationDueDateRules" enabled + And there is a valid "valid_due_date_rule" in the system + And new "ReorderSecurityFindingsAutomationDueDateRules" request + And body with value {"data": [{"id": "{{ valid_due_date_rule.data.id }}", "type": "due_date_rules"}]} + When the request is sent + Then the response status is 200 Successfully reordered the due date rules + + @generated @skip @team:DataDog/k9-automation + Scenario: Reorder due date rules returns "Unprocessable Entity" response + Given operation "ReorderSecurityFindingsAutomationDueDateRules" enabled + And new "ReorderSecurityFindingsAutomationDueDateRules" request + And body with value {"data": [{"id": "00000000-0000-0000-0000-000000000000", "type": "mute_rules"}]} + When the request is sent + Then the response status is 422 Unprocessable Entity + + @generated @skip @team:DataDog/k9-automation + Scenario: Reorder mute rules returns "Bad Request" response + Given operation "ReorderSecurityFindingsAutomationMuteRules" enabled + And new "ReorderSecurityFindingsAutomationMuteRules" request + And body with value {"data": [{"id": "00000000-0000-0000-0000-000000000000", "type": "mute_rules"}]} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/k9-automation + Scenario: Reorder mute rules returns "Successfully reordered the mute rules" response + Given operation "ReorderSecurityFindingsAutomationMuteRules" enabled + And there is a valid "valid_mute_rule" in the system + And new "ReorderSecurityFindingsAutomationMuteRules" request + And body with value {"data": [{"id": "{{ valid_mute_rule.data.id }}", "type": "mute_rules"}]} + When the request is sent + Then the response status is 200 Successfully reordered the mute rules + + @generated @skip @team:DataDog/k9-automation + Scenario: Reorder mute rules returns "Unprocessable Entity" response + Given operation "ReorderSecurityFindingsAutomationMuteRules" enabled + And new "ReorderSecurityFindingsAutomationMuteRules" request + And body with value {"data": [{"id": "00000000-0000-0000-0000-000000000000", "type": "mute_rules"}]} + When the request is sent + Then the response status is 422 Unprocessable Entity + + @generated @skip @team:DataDog/k9-automation + Scenario: Reorder ticket creation rules returns "Bad Request" response + Given operation "ReorderSecurityFindingsAutomationTicketCreationRules" enabled + And new "ReorderSecurityFindingsAutomationTicketCreationRules" request + And body with value {"data": [{"id": "00000000-0000-0000-0000-000000000000", "type": "mute_rules"}]} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/k9-automation + Scenario: Reorder ticket creation rules returns "Successfully reordered the ticket creation rules" response + Given operation "ReorderSecurityFindingsAutomationTicketCreationRules" enabled + And there is a valid "valid_ticket_creation_rule" in the system + And new "ReorderSecurityFindingsAutomationTicketCreationRules" request + And body with value {"data": [{"id": "{{ valid_ticket_creation_rule.data.id }}", "type": "ticket_creation_rules"}]} + When the request is sent + Then the response status is 200 Successfully reordered the ticket creation rules + + @generated @skip @team:DataDog/k9-automation + Scenario: Reorder ticket creation rules returns "Unprocessable Entity" response + Given operation "ReorderSecurityFindingsAutomationTicketCreationRules" enabled + And new "ReorderSecurityFindingsAutomationTicketCreationRules" request + And body with value {"data": [{"id": "00000000-0000-0000-0000-000000000000", "type": "mute_rules"}]} + When the request is sent + Then the response status is 422 Unprocessable Entity + @generated @skip @team:DataDog/k9-cloud-siem Scenario: Restore a rule to a historical version returns "Bad Request" response Given operation "RestoreSecurityMonitoringRule" enabled @@ -2839,6 +3130,84 @@ Feature: Security Monitoring When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/k9-automation + Scenario: Update a due date rule returns "Bad Request" response + Given operation "UpdateSecurityFindingsAutomationDueDateRule" enabled + And new "UpdateSecurityFindingsAutomationDueDateRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"action": {"due_days_per_severity": [{"due_in_days": 7, "severity": "critical"}], "due_from": "first_seen", "reason_description": "Applied for production findings only"}, "enabled": true, "name": "Critical findings due in 7 days", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "due_date_rules"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-automation + Scenario: Update a due date rule returns "Not Found" response + Given operation "UpdateSecurityFindingsAutomationDueDateRule" enabled + And new "UpdateSecurityFindingsAutomationDueDateRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"action": {"due_days_per_severity": [{"due_in_days": 7, "severity": "critical"}], "due_from": "first_seen", "reason_description": "Applied for production findings only"}, "enabled": true, "name": "Critical findings due in 7 days", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "due_date_rules"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/k9-automation + Scenario: Update a due date rule returns "Successfully updated the due date rule" response + Given operation "UpdateSecurityFindingsAutomationDueDateRule" enabled + And there is a valid "valid_due_date_rule" in the system + And new "UpdateSecurityFindingsAutomationDueDateRule" request + And request contains "rule_id" parameter from "valid_due_date_rule.data.id" + And body with value {"data": {"attributes": {"action": {"due_days_per_severity": [{"due_in_days": 14, "severity": "critical"}], "due_from": "first_seen"}, "enabled": false, "name": "{{ unique }}", "rule": {"finding_types": ["misconfiguration"], "query": "env:staging"}}, "type": "due_date_rules"}} + When the request is sent + Then the response status is 200 Successfully updated the due date rule + And the response "data.id" is equal to "{{ valid_due_date_rule.data.id }}" + And the response "data.attributes.name" is equal to "{{ unique }}" + + @generated @skip @team:DataDog/k9-automation + Scenario: Update a due date rule returns "Unprocessable Entity" response + Given operation "UpdateSecurityFindingsAutomationDueDateRule" enabled + And new "UpdateSecurityFindingsAutomationDueDateRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"action": {"due_days_per_severity": [{"due_in_days": 7, "severity": "critical"}], "due_from": "first_seen", "reason_description": "Applied for production findings only"}, "enabled": true, "name": "Critical findings due in 7 days", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "due_date_rules"}} + When the request is sent + Then the response status is 422 Unprocessable Entity + + @generated @skip @team:DataDog/k9-automation + Scenario: Update a mute rule returns "Bad Request" response + Given operation "UpdateSecurityFindingsAutomationMuteRule" enabled + And new "UpdateSecurityFindingsAutomationMuteRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"action": {"expire_at": 4070908800000, "reason": "risk_accepted", "reason_description": "Accepted for dev environments only"}, "enabled": true, "name": "Mute accepted risks in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "mute_rules"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-automation + Scenario: Update a mute rule returns "Not Found" response + Given operation "UpdateSecurityFindingsAutomationMuteRule" enabled + And new "UpdateSecurityFindingsAutomationMuteRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"action": {"expire_at": 4070908800000, "reason": "risk_accepted", "reason_description": "Accepted for dev environments only"}, "enabled": true, "name": "Mute accepted risks in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "mute_rules"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/k9-automation + Scenario: Update a mute rule returns "Successfully updated the mute rule" response + Given operation "UpdateSecurityFindingsAutomationMuteRule" enabled + And there is a valid "valid_mute_rule" in the system + And new "UpdateSecurityFindingsAutomationMuteRule" request + And request contains "rule_id" parameter from "valid_mute_rule.data.id" + And body with value {"data": {"attributes": {"action": {"reason": "false_positive"}, "enabled": false, "name": "{{ unique }}", "rule": {"finding_types": ["misconfiguration"], "query": "env:staging"}}, "type": "mute_rules"}} + When the request is sent + Then the response status is 200 Successfully updated the mute rule + And the response "data.id" is equal to "{{ valid_mute_rule.data.id }}" + And the response "data.attributes.name" is equal to "{{ unique }}" + + @generated @skip @team:DataDog/k9-automation + Scenario: Update a mute rule returns "Unprocessable Entity" response + Given operation "UpdateSecurityFindingsAutomationMuteRule" enabled + And new "UpdateSecurityFindingsAutomationMuteRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"action": {"expire_at": 4070908800000, "reason": "risk_accepted", "reason_description": "Accepted for dev environments only"}, "enabled": true, "name": "Mute accepted risks in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "mute_rules"}} + When the request is sent + Then the response status is 422 Unprocessable Entity + @generated @skip @team:DataDog/k9-cloud-siem Scenario: Update a security filter returns "Bad Request" response Given new "UpdateSecurityFilter" request @@ -2911,6 +3280,45 @@ Feature: Security Monitoring And the response "data.attributes.suppression_query" is equal to "env:staging status:low" And the response "data.attributes.version" is equal to 2 + @generated @skip @team:DataDog/k9-automation + Scenario: Update a ticket creation rule returns "Bad Request" response + Given operation "UpdateSecurityFindingsAutomationTicketCreationRule" enabled + And new "UpdateSecurityFindingsAutomationTicketCreationRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"action": {"assignee_id": "22222222-2222-2222-2222-222222222222", "auto_disabled_reason": "Daily ticket creation limit exceeded", "fields": {"labels": ["security"]}, "max_tickets_per_day": 100, "project_id": "11111111-1111-1111-1111-111111111111", "target": "jira"}, "enabled": true, "name": "Auto-create Jira tickets for critical findings", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "ticket_creation_rules"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-automation + Scenario: Update a ticket creation rule returns "Not Found" response + Given operation "UpdateSecurityFindingsAutomationTicketCreationRule" enabled + And new "UpdateSecurityFindingsAutomationTicketCreationRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"action": {"assignee_id": "22222222-2222-2222-2222-222222222222", "auto_disabled_reason": "Daily ticket creation limit exceeded", "fields": {"labels": ["security"]}, "max_tickets_per_day": 100, "project_id": "11111111-1111-1111-1111-111111111111", "target": "jira"}, "enabled": true, "name": "Auto-create Jira tickets for critical findings", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "ticket_creation_rules"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/k9-automation + Scenario: Update a ticket creation rule returns "Successfully updated the ticket creation rule" response + Given operation "UpdateSecurityFindingsAutomationTicketCreationRule" enabled + And there is a valid "valid_ticket_creation_rule" in the system + And new "UpdateSecurityFindingsAutomationTicketCreationRule" request + And request contains "rule_id" parameter from "valid_ticket_creation_rule.data.id" + And body with value {"data": {"attributes": {"action": {"max_tickets_per_day": 5, "project_id": "11111111-1111-1111-1111-111111111111", "target": "jira"}, "enabled": false, "name": "{{ unique }}", "rule": {"finding_types": ["misconfiguration"], "query": "env:staging"}}, "type": "ticket_creation_rules"}} + When the request is sent + Then the response status is 200 Successfully updated the ticket creation rule + And the response "data.id" is equal to "{{ valid_ticket_creation_rule.data.id }}" + And the response "data.attributes.name" is equal to "{{ unique }}" + + @generated @skip @team:DataDog/k9-automation + Scenario: Update a ticket creation rule returns "Unprocessable Entity" response + Given operation "UpdateSecurityFindingsAutomationTicketCreationRule" enabled + And new "UpdateSecurityFindingsAutomationTicketCreationRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"action": {"assignee_id": "22222222-2222-2222-2222-222222222222", "auto_disabled_reason": "Daily ticket creation limit exceeded", "fields": {"labels": ["security"]}, "max_tickets_per_day": 100, "project_id": "11111111-1111-1111-1111-111111111111", "target": "jira"}, "enabled": true, "name": "Auto-create Jira tickets for critical findings", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "ticket_creation_rules"}} + When the request is sent + Then the response status is 422 Unprocessable Entity + @generated @skip @team:DataDog/k9-cloud-siem Scenario: Update an entity context sync configuration returns "Bad Request" response Given operation "UpdateSecurityMonitoringIntegrationConfig" enabled diff --git a/features/v2/undo.json b/features/v2/undo.json index b7bddb161788..cc56dba80988 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -6901,6 +6901,135 @@ "type": "idempotent" } }, + "ListSecurityFindingsAutomationDueDateRules": { + "tag": "Security Monitoring", + "undo": { + "type": "safe" + } + }, + "CreateSecurityFindingsAutomationDueDateRule": { + "tag": "Security Monitoring", + "undo": { + "operationId": "DeleteSecurityFindingsAutomationDueDateRule", + "parameters": [ + { + "name": "rule_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "ReorderSecurityFindingsAutomationDueDateRules": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "DeleteSecurityFindingsAutomationDueDateRule": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "GetSecurityFindingsAutomationDueDateRule": { + "tag": "Security Monitoring", + "undo": { + "type": "safe" + } + }, + "UpdateSecurityFindingsAutomationDueDateRule": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "ListSecurityFindingsAutomationMuteRules": { + "tag": "Security Monitoring", + "undo": { + "type": "safe" + } + }, + "CreateSecurityFindingsAutomationMuteRule": { + "tag": "Security Monitoring", + "undo": { + "operationId": "DeleteSecurityFindingsAutomationMuteRule", + "parameters": [ + { + "name": "rule_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "ReorderSecurityFindingsAutomationMuteRules": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "DeleteSecurityFindingsAutomationMuteRule": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "GetSecurityFindingsAutomationMuteRule": { + "tag": "Security Monitoring", + "undo": { + "type": "safe" + } + }, + "UpdateSecurityFindingsAutomationMuteRule": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "ListSecurityFindingsAutomationTicketCreationRules": { + "tag": "Security Monitoring", + "undo": { + "type": "safe" + } + }, + "CreateSecurityFindingsAutomationTicketCreationRule": { + "tag": "Security Monitoring", + "undo": { + "operationId": "DeleteSecurityFindingsAutomationTicketCreationRule", + "parameters": [ + { + "name": "rule_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "ReorderSecurityFindingsAutomationTicketCreationRules": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "DeleteSecurityFindingsAutomationTicketCreationRule": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "GetSecurityFindingsAutomationTicketCreationRule": { + "tag": "Security Monitoring", + "undo": { + "type": "safe" + } + }, + "UpdateSecurityFindingsAutomationTicketCreationRule": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, "DetachCase": { "tag": "Security Monitoring", "undo": { diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts index 1cc082795f95..40eaa71762ee 100644 --- a/packages/datadog-api-client-common/configuration.ts +++ b/packages/datadog-api-client-common/configuration.ts @@ -377,6 +377,9 @@ export function createConfiguration( "v2.convertJobResultToSignal": false, "v2.convertSecurityMonitoringTerraformResource": false, "v2.createSampleLogGenerationSubscription": false, + "v2.createSecurityFindingsAutomationDueDateRule": false, + "v2.createSecurityFindingsAutomationMuteRule": false, + "v2.createSecurityFindingsAutomationTicketCreationRule": false, "v2.createSecurityMonitoringDataset": false, "v2.createSecurityMonitoringIntegrationConfig": false, "v2.createStaticAnalysisAst": false, @@ -384,6 +387,9 @@ export function createConfiguration( "v2.deactivateContentPack": false, "v2.deleteHistoricalJob": false, "v2.deleteSampleLogGenerationSubscription": false, + "v2.deleteSecurityFindingsAutomationDueDateRule": false, + "v2.deleteSecurityFindingsAutomationMuteRule": false, + "v2.deleteSecurityFindingsAutomationTicketCreationRule": false, "v2.deleteSecurityMonitoringDataset": false, "v2.deleteSecurityMonitoringIntegrationConfig": false, "v2.exportSecurityMonitoringTerraformResource": false, @@ -394,6 +400,9 @@ export function createConfiguration( "v2.getIndicatorOfCompromise": false, "v2.getRuleVersionHistory": false, "v2.getSecretsRules": false, + "v2.getSecurityFindingsAutomationDueDateRule": false, + "v2.getSecurityFindingsAutomationMuteRule": false, + "v2.getSecurityFindingsAutomationTicketCreationRule": false, "v2.getSecurityMonitoringDataset": false, "v2.getSecurityMonitoringDatasetByVersion": false, "v2.getSecurityMonitoringDatasetVersionHistory": false, @@ -412,16 +421,25 @@ export function createConfiguration( "v2.listMultipleRulesets": false, "v2.listSampleLogGenerationSubscriptions": false, "v2.listScannedAssetsMetadata": false, + "v2.listSecurityFindingsAutomationDueDateRules": false, + "v2.listSecurityFindingsAutomationMuteRules": false, + "v2.listSecurityFindingsAutomationTicketCreationRules": false, "v2.listSecurityMonitoringDatasets": false, "v2.listSecurityMonitoringHistsignals": false, "v2.listSecurityMonitoringIntegrationConfigs": false, "v2.listStaticAnalysisCodegenRulesets": false, "v2.listVulnerabilities": false, "v2.listVulnerableAssets": false, + "v2.reorderSecurityFindingsAutomationDueDateRules": false, + "v2.reorderSecurityFindingsAutomationMuteRules": false, + "v2.reorderSecurityFindingsAutomationTicketCreationRules": false, "v2.restoreSecurityMonitoringRule": false, "v2.runHistoricalJob": false, "v2.searchSecurityMonitoringHistsignals": false, "v2.updateFindingsAssignee": false, + "v2.updateSecurityFindingsAutomationDueDateRule": false, + "v2.updateSecurityFindingsAutomationMuteRule": false, + "v2.updateSecurityFindingsAutomationTicketCreationRule": false, "v2.updateSecurityMonitoringDataset": false, "v2.updateSecurityMonitoringIntegrationConfig": false, "v2.validateSecurityMonitoringIntegrationConfig": false, diff --git a/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.ts b/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.ts index 06d3d81965fd..6e9d677f0d84 100644 --- a/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.ts +++ b/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.ts @@ -37,6 +37,10 @@ import { CreateServiceNowTicketRequestArray } from "../models/CreateServiceNowTi import { DefaultRulesetsPerLanguageResponse } from "../models/DefaultRulesetsPerLanguageResponse"; import { DeleteCustomFrameworkResponse } from "../models/DeleteCustomFrameworkResponse"; import { DetachCaseRequest } from "../models/DetachCaseRequest"; +import { DueDateRuleCreateRequest } from "../models/DueDateRuleCreateRequest"; +import { DueDateRuleResponse } from "../models/DueDateRuleResponse"; +import { DueDateRulesResponse } from "../models/DueDateRulesResponse"; +import { DueDateRuleUpdateRequest } from "../models/DueDateRuleUpdateRequest"; import { EntityContextResponse } from "../models/EntityContextResponse"; import { Finding } from "../models/Finding"; import { FindingCaseResponse } from "../models/FindingCaseResponse"; @@ -67,6 +71,10 @@ import { ListVulnerabilitiesResponse } from "../models/ListVulnerabilitiesRespon import { ListVulnerableAssetsResponse } from "../models/ListVulnerableAssetsResponse"; import { MuteFindingsRequest } from "../models/MuteFindingsRequest"; import { MuteFindingsResponse } from "../models/MuteFindingsResponse"; +import { MuteRuleCreateRequest } from "../models/MuteRuleCreateRequest"; +import { MuteRuleResponse } from "../models/MuteRuleResponse"; +import { MuteRulesResponse } from "../models/MuteRulesResponse"; +import { MuteRuleUpdateRequest } from "../models/MuteRuleUpdateRequest"; import { NodeTypesResponse } from "../models/NodeTypesResponse"; import { NotificationRulePreviewResponse } from "../models/NotificationRulePreviewResponse"; import { NotificationRuleResponse } from "../models/NotificationRuleResponse"; @@ -85,6 +93,7 @@ import { SBOMComponentLicenseType } from "../models/SBOMComponentLicenseType"; import { SBOMFormat } from "../models/SBOMFormat"; import { ScannedAssetsMetadata } from "../models/ScannedAssetsMetadata"; import { SecretRuleArray } from "../models/SecretRuleArray"; +import { SecurityAutomationRuleReorderRequest } from "../models/SecurityAutomationRuleReorderRequest"; import { SecurityFilterCreateRequest } from "../models/SecurityFilterCreateRequest"; import { SecurityFilterResponse } from "../models/SecurityFilterResponse"; import { SecurityFiltersResponse } from "../models/SecurityFiltersResponse"; @@ -157,6 +166,10 @@ import { SecurityMonitoringTerraformExportResponse } from "../models/SecurityMon import { SecurityMonitoringTerraformResourceType } from "../models/SecurityMonitoringTerraformResourceType"; import { SignalEntitiesResponse } from "../models/SignalEntitiesResponse"; import { SingleEntityContextResponse } from "../models/SingleEntityContextResponse"; +import { TicketCreationRuleCreateRequest } from "../models/TicketCreationRuleCreateRequest"; +import { TicketCreationRuleResponse } from "../models/TicketCreationRuleResponse"; +import { TicketCreationRulesResponse } from "../models/TicketCreationRulesResponse"; +import { TicketCreationRuleUpdateRequest } from "../models/TicketCreationRuleUpdateRequest"; import { UpdateCustomFrameworkRequest } from "../models/UpdateCustomFrameworkRequest"; import { UpdateCustomFrameworkResponse } from "../models/UpdateCustomFrameworkResponse"; import { UpdateResourceEvaluationFiltersRequest } from "../models/UpdateResourceEvaluationFiltersRequest"; @@ -1330,6 +1343,182 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async createSecurityFindingsAutomationDueDateRule( + body: DueDateRuleCreateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( + "Using unstable operation 'createSecurityFindingsAutomationDueDateRule'" + ); + if ( + !_config.unstableOperations[ + "v2.createSecurityFindingsAutomationDueDateRule" + ] + ) { + throw new Error( + "Unstable operation 'createSecurityFindingsAutomationDueDateRule' is disabled" + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError( + "body", + "createSecurityFindingsAutomationDueDateRule" + ); + } + + // Path Params + const localVarPath = "/api/v2/security/findings/automation/due_date_rules"; + + // Make Request Context + const requestContext = _config + .getServer( + "v2.SecurityMonitoringApi.createSecurityFindingsAutomationDueDateRule" + ) + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "DueDateRuleCreateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async createSecurityFindingsAutomationMuteRule( + body: MuteRuleCreateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( + "Using unstable operation 'createSecurityFindingsAutomationMuteRule'" + ); + if ( + !_config.unstableOperations["v2.createSecurityFindingsAutomationMuteRule"] + ) { + throw new Error( + "Unstable operation 'createSecurityFindingsAutomationMuteRule' is disabled" + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError( + "body", + "createSecurityFindingsAutomationMuteRule" + ); + } + + // Path Params + const localVarPath = "/api/v2/security/findings/automation/mute_rules"; + + // Make Request Context + const requestContext = _config + .getServer( + "v2.SecurityMonitoringApi.createSecurityFindingsAutomationMuteRule" + ) + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "MuteRuleCreateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async createSecurityFindingsAutomationTicketCreationRule( + body: TicketCreationRuleCreateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( + "Using unstable operation 'createSecurityFindingsAutomationTicketCreationRule'" + ); + if ( + !_config.unstableOperations[ + "v2.createSecurityFindingsAutomationTicketCreationRule" + ] + ) { + throw new Error( + "Unstable operation 'createSecurityFindingsAutomationTicketCreationRule' is disabled" + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError( + "body", + "createSecurityFindingsAutomationTicketCreationRule" + ); + } + + // Path Params + const localVarPath = + "/api/v2/security/findings/automation/ticket_creation_rules"; + + // Make Request Context + const requestContext = _config + .getServer( + "v2.SecurityMonitoringApi.createSecurityFindingsAutomationTicketCreationRule" + ) + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "TicketCreationRuleCreateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + public async createSecurityMonitoringCriticalAsset( body: SecurityMonitoringCriticalAssetCreateRequest, _options?: Configuration @@ -2026,31 +2215,44 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async deleteSecurityMonitoringCriticalAsset( - criticalAssetId: string, + public async deleteSecurityFindingsAutomationDueDateRule( + ruleId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - // verify required parameter 'criticalAssetId' is not null or undefined - if (criticalAssetId === null || criticalAssetId === undefined) { + logger.warn( + "Using unstable operation 'deleteSecurityFindingsAutomationDueDateRule'" + ); + if ( + !_config.unstableOperations[ + "v2.deleteSecurityFindingsAutomationDueDateRule" + ] + ) { + throw new Error( + "Unstable operation 'deleteSecurityFindingsAutomationDueDateRule' is disabled" + ); + } + + // verify required parameter 'ruleId' is not null or undefined + if (ruleId === null || ruleId === undefined) { throw new RequiredError( - "criticalAssetId", - "deleteSecurityMonitoringCriticalAsset" + "ruleId", + "deleteSecurityFindingsAutomationDueDateRule" ); } // Path Params const localVarPath = - "/api/v2/security_monitoring/configuration/critical_assets/{critical_asset_id}".replace( - "{critical_asset_id}", - encodeURIComponent(String(criticalAssetId)) + "/api/v2/security/findings/automation/due_date_rules/{rule_id}".replace( + "{rule_id}", + encodeURIComponent(String(ruleId)) ); // Make Request Context const requestContext = _config .getServer( - "v2.SecurityMonitoringApi.deleteSecurityMonitoringCriticalAsset" + "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationDueDateRule" ) .makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); @@ -2060,40 +2262,48 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async deleteSecurityMonitoringDataset( - datasetId: string, + public async deleteSecurityFindingsAutomationMuteRule( + ruleId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'deleteSecurityMonitoringDataset'"); - if (!_config.unstableOperations["v2.deleteSecurityMonitoringDataset"]) { + logger.warn( + "Using unstable operation 'deleteSecurityFindingsAutomationMuteRule'" + ); + if ( + !_config.unstableOperations["v2.deleteSecurityFindingsAutomationMuteRule"] + ) { throw new Error( - "Unstable operation 'deleteSecurityMonitoringDataset' is disabled" + "Unstable operation 'deleteSecurityFindingsAutomationMuteRule' is disabled" ); } - // verify required parameter 'datasetId' is not null or undefined - if (datasetId === null || datasetId === undefined) { - throw new RequiredError("datasetId", "deleteSecurityMonitoringDataset"); + // verify required parameter 'ruleId' is not null or undefined + if (ruleId === null || ruleId === undefined) { + throw new RequiredError( + "ruleId", + "deleteSecurityFindingsAutomationMuteRule" + ); } // Path Params const localVarPath = - "/api/v2/security_monitoring/datasets/{dataset_id}".replace( - "{dataset_id}", - encodeURIComponent(String(datasetId)) + "/api/v2/security/findings/automation/mute_rules/{rule_id}".replace( + "{rule_id}", + encodeURIComponent(String(ruleId)) ); // Make Request Context const requestContext = _config - .getServer("v2.SecurityMonitoringApi.deleteSecurityMonitoringDataset") + .getServer( + "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationMuteRule" + ) .makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); @@ -2102,50 +2312,49 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async deleteSecurityMonitoringIntegrationConfig( - integrationConfigId: string, + public async deleteSecurityFindingsAutomationTicketCreationRule( + ruleId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; logger.warn( - "Using unstable operation 'deleteSecurityMonitoringIntegrationConfig'" + "Using unstable operation 'deleteSecurityFindingsAutomationTicketCreationRule'" ); if ( !_config.unstableOperations[ - "v2.deleteSecurityMonitoringIntegrationConfig" + "v2.deleteSecurityFindingsAutomationTicketCreationRule" ] ) { throw new Error( - "Unstable operation 'deleteSecurityMonitoringIntegrationConfig' is disabled" + "Unstable operation 'deleteSecurityFindingsAutomationTicketCreationRule' is disabled" ); } - // verify required parameter 'integrationConfigId' is not null or undefined - if (integrationConfigId === null || integrationConfigId === undefined) { + // verify required parameter 'ruleId' is not null or undefined + if (ruleId === null || ruleId === undefined) { throw new RequiredError( - "integrationConfigId", - "deleteSecurityMonitoringIntegrationConfig" + "ruleId", + "deleteSecurityFindingsAutomationTicketCreationRule" ); } // Path Params const localVarPath = - "/api/v2/security_monitoring/configuration/integration_config/{integration_config_id}".replace( - "{integration_config_id}", - encodeURIComponent(String(integrationConfigId)) + "/api/v2/security/findings/automation/ticket_creation_rules/{rule_id}".replace( + "{rule_id}", + encodeURIComponent(String(ruleId)) ); // Make Request Context const requestContext = _config .getServer( - "v2.SecurityMonitoringApi.deleteSecurityMonitoringIntegrationConfig" + "v2.SecurityMonitoringApi.deleteSecurityFindingsAutomationTicketCreationRule" ) .makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); @@ -2155,32 +2364,37 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async deleteSecurityMonitoringRule( - ruleId: string, + public async deleteSecurityMonitoringCriticalAsset( + criticalAssetId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - // verify required parameter 'ruleId' is not null or undefined - if (ruleId === null || ruleId === undefined) { - throw new RequiredError("ruleId", "deleteSecurityMonitoringRule"); + // verify required parameter 'criticalAssetId' is not null or undefined + if (criticalAssetId === null || criticalAssetId === undefined) { + throw new RequiredError( + "criticalAssetId", + "deleteSecurityMonitoringCriticalAsset" + ); } // Path Params - const localVarPath = "/api/v2/security_monitoring/rules/{rule_id}".replace( - "{rule_id}", - encodeURIComponent(String(ruleId)) - ); + const localVarPath = + "/api/v2/security_monitoring/configuration/critical_assets/{critical_asset_id}".replace( + "{critical_asset_id}", + encodeURIComponent(String(criticalAssetId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.SecurityMonitoringApi.deleteSecurityMonitoringRule") + .getServer( + "v2.SecurityMonitoringApi.deleteSecurityMonitoringCriticalAsset" + ) .makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); @@ -2195,15 +2409,144 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async deleteSecurityMonitoringSuppression( - suppressionId: string, + public async deleteSecurityMonitoringDataset( + datasetId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - // verify required parameter 'suppressionId' is not null or undefined - if (suppressionId === null || suppressionId === undefined) { - throw new RequiredError( + logger.warn("Using unstable operation 'deleteSecurityMonitoringDataset'"); + if (!_config.unstableOperations["v2.deleteSecurityMonitoringDataset"]) { + throw new Error( + "Unstable operation 'deleteSecurityMonitoringDataset' is disabled" + ); + } + + // verify required parameter 'datasetId' is not null or undefined + if (datasetId === null || datasetId === undefined) { + throw new RequiredError("datasetId", "deleteSecurityMonitoringDataset"); + } + + // Path Params + const localVarPath = + "/api/v2/security_monitoring/datasets/{dataset_id}".replace( + "{dataset_id}", + encodeURIComponent(String(datasetId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.SecurityMonitoringApi.deleteSecurityMonitoringDataset") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async deleteSecurityMonitoringIntegrationConfig( + integrationConfigId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( + "Using unstable operation 'deleteSecurityMonitoringIntegrationConfig'" + ); + if ( + !_config.unstableOperations[ + "v2.deleteSecurityMonitoringIntegrationConfig" + ] + ) { + throw new Error( + "Unstable operation 'deleteSecurityMonitoringIntegrationConfig' is disabled" + ); + } + + // verify required parameter 'integrationConfigId' is not null or undefined + if (integrationConfigId === null || integrationConfigId === undefined) { + throw new RequiredError( + "integrationConfigId", + "deleteSecurityMonitoringIntegrationConfig" + ); + } + + // Path Params + const localVarPath = + "/api/v2/security_monitoring/configuration/integration_config/{integration_config_id}".replace( + "{integration_config_id}", + encodeURIComponent(String(integrationConfigId)) + ); + + // Make Request Context + const requestContext = _config + .getServer( + "v2.SecurityMonitoringApi.deleteSecurityMonitoringIntegrationConfig" + ) + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async deleteSecurityMonitoringRule( + ruleId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'ruleId' is not null or undefined + if (ruleId === null || ruleId === undefined) { + throw new RequiredError("ruleId", "deleteSecurityMonitoringRule"); + } + + // Path Params + const localVarPath = "/api/v2/security_monitoring/rules/{rule_id}".replace( + "{rule_id}", + encodeURIComponent(String(ruleId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.SecurityMonitoringApi.deleteSecurityMonitoringRule") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async deleteSecurityMonitoringSuppression( + suppressionId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'suppressionId' is not null or undefined + if (suppressionId === null || suppressionId === undefined) { + throw new RequiredError( "suppressionId", "deleteSecurityMonitoringSuppression" ); @@ -3237,30 +3580,43 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async getSecurityMonitoringCriticalAsset( - criticalAssetId: string, + public async getSecurityFindingsAutomationDueDateRule( + ruleId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - // verify required parameter 'criticalAssetId' is not null or undefined - if (criticalAssetId === null || criticalAssetId === undefined) { + logger.warn( + "Using unstable operation 'getSecurityFindingsAutomationDueDateRule'" + ); + if ( + !_config.unstableOperations["v2.getSecurityFindingsAutomationDueDateRule"] + ) { + throw new Error( + "Unstable operation 'getSecurityFindingsAutomationDueDateRule' is disabled" + ); + } + + // verify required parameter 'ruleId' is not null or undefined + if (ruleId === null || ruleId === undefined) { throw new RequiredError( - "criticalAssetId", - "getSecurityMonitoringCriticalAsset" + "ruleId", + "getSecurityFindingsAutomationDueDateRule" ); } // Path Params const localVarPath = - "/api/v2/security_monitoring/configuration/critical_assets/{critical_asset_id}".replace( - "{critical_asset_id}", - encodeURIComponent(String(criticalAssetId)) + "/api/v2/security/findings/automation/due_date_rules/{rule_id}".replace( + "{rule_id}", + encodeURIComponent(String(ruleId)) ); // Make Request Context const requestContext = _config - .getServer("v2.SecurityMonitoringApi.getSecurityMonitoringCriticalAsset") + .getServer( + "v2.SecurityMonitoringApi.getSecurityFindingsAutomationDueDateRule" + ) .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -3269,40 +3625,48 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async getSecurityMonitoringDataset( - datasetId: string, + public async getSecurityFindingsAutomationMuteRule( + ruleId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'getSecurityMonitoringDataset'"); - if (!_config.unstableOperations["v2.getSecurityMonitoringDataset"]) { + logger.warn( + "Using unstable operation 'getSecurityFindingsAutomationMuteRule'" + ); + if ( + !_config.unstableOperations["v2.getSecurityFindingsAutomationMuteRule"] + ) { throw new Error( - "Unstable operation 'getSecurityMonitoringDataset' is disabled" + "Unstable operation 'getSecurityFindingsAutomationMuteRule' is disabled" ); } - // verify required parameter 'datasetId' is not null or undefined - if (datasetId === null || datasetId === undefined) { - throw new RequiredError("datasetId", "getSecurityMonitoringDataset"); + // verify required parameter 'ruleId' is not null or undefined + if (ruleId === null || ruleId === undefined) { + throw new RequiredError( + "ruleId", + "getSecurityFindingsAutomationMuteRule" + ); } // Path Params const localVarPath = - "/api/v2/security_monitoring/datasets/{dataset_id}".replace( - "{dataset_id}", - encodeURIComponent(String(datasetId)) + "/api/v2/security/findings/automation/mute_rules/{rule_id}".replace( + "{rule_id}", + encodeURIComponent(String(ruleId)) ); // Make Request Context const requestContext = _config - .getServer("v2.SecurityMonitoringApi.getSecurityMonitoringDataset") + .getServer( + "v2.SecurityMonitoringApi.getSecurityFindingsAutomationMuteRule" + ) .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -3311,56 +3675,49 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async getSecurityMonitoringDatasetByVersion( - datasetId: string, - version: number, + public async getSecurityFindingsAutomationTicketCreationRule( + ruleId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; logger.warn( - "Using unstable operation 'getSecurityMonitoringDatasetByVersion'" + "Using unstable operation 'getSecurityFindingsAutomationTicketCreationRule'" ); if ( - !_config.unstableOperations["v2.getSecurityMonitoringDatasetByVersion"] + !_config.unstableOperations[ + "v2.getSecurityFindingsAutomationTicketCreationRule" + ] ) { throw new Error( - "Unstable operation 'getSecurityMonitoringDatasetByVersion' is disabled" - ); - } - - // verify required parameter 'datasetId' is not null or undefined - if (datasetId === null || datasetId === undefined) { - throw new RequiredError( - "datasetId", - "getSecurityMonitoringDatasetByVersion" + "Unstable operation 'getSecurityFindingsAutomationTicketCreationRule' is disabled" ); } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { + // verify required parameter 'ruleId' is not null or undefined + if (ruleId === null || ruleId === undefined) { throw new RequiredError( - "version", - "getSecurityMonitoringDatasetByVersion" + "ruleId", + "getSecurityFindingsAutomationTicketCreationRule" ); } // Path Params const localVarPath = - "/api/v2/security_monitoring/datasets/{dataset_id}/version/{version}" - .replace("{dataset_id}", encodeURIComponent(String(datasetId))) - .replace("{version}", encodeURIComponent(String(version))); + "/api/v2/security/findings/automation/ticket_creation_rules/{rule_id}".replace( + "{rule_id}", + encodeURIComponent(String(ruleId)) + ); // Make Request Context const requestContext = _config .getServer( - "v2.SecurityMonitoringApi.getSecurityMonitoringDatasetByVersion" + "v2.SecurityMonitoringApi.getSecurityFindingsAutomationTicketCreationRule" ) .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); @@ -3370,58 +3727,196 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async getSecurityMonitoringDatasetVersionHistory( - datasetId: string, - pageSize?: number, - pageNumber?: number, + public async getSecurityMonitoringCriticalAsset( + criticalAssetId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn( - "Using unstable operation 'getSecurityMonitoringDatasetVersionHistory'" - ); - if ( - !_config.unstableOperations[ - "v2.getSecurityMonitoringDatasetVersionHistory" - ] - ) { - throw new Error( - "Unstable operation 'getSecurityMonitoringDatasetVersionHistory' is disabled" - ); - } - - // verify required parameter 'datasetId' is not null or undefined - if (datasetId === null || datasetId === undefined) { + // verify required parameter 'criticalAssetId' is not null or undefined + if (criticalAssetId === null || criticalAssetId === undefined) { throw new RequiredError( - "datasetId", - "getSecurityMonitoringDatasetVersionHistory" + "criticalAssetId", + "getSecurityMonitoringCriticalAsset" ); } // Path Params const localVarPath = - "/api/v2/security_monitoring/datasets/{dataset_id}/version_history".replace( - "{dataset_id}", - encodeURIComponent(String(datasetId)) + "/api/v2/security_monitoring/configuration/critical_assets/{critical_asset_id}".replace( + "{critical_asset_id}", + encodeURIComponent(String(criticalAssetId)) ); // Make Request Context const requestContext = _config - .getServer( - "v2.SecurityMonitoringApi.getSecurityMonitoringDatasetVersionHistory" - ) + .getServer("v2.SecurityMonitoringApi.getSecurityMonitoringCriticalAsset") .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async getSecurityMonitoringDataset( + datasetId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'getSecurityMonitoringDataset'"); + if (!_config.unstableOperations["v2.getSecurityMonitoringDataset"]) { + throw new Error( + "Unstable operation 'getSecurityMonitoringDataset' is disabled" + ); + } + + // verify required parameter 'datasetId' is not null or undefined + if (datasetId === null || datasetId === undefined) { + throw new RequiredError("datasetId", "getSecurityMonitoringDataset"); + } + + // Path Params + const localVarPath = + "/api/v2/security_monitoring/datasets/{dataset_id}".replace( + "{dataset_id}", + encodeURIComponent(String(datasetId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.SecurityMonitoringApi.getSecurityMonitoringDataset") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async getSecurityMonitoringDatasetByVersion( + datasetId: string, + version: number, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( + "Using unstable operation 'getSecurityMonitoringDatasetByVersion'" + ); + if ( + !_config.unstableOperations["v2.getSecurityMonitoringDatasetByVersion"] + ) { + throw new Error( + "Unstable operation 'getSecurityMonitoringDatasetByVersion' is disabled" + ); + } + + // verify required parameter 'datasetId' is not null or undefined + if (datasetId === null || datasetId === undefined) { + throw new RequiredError( + "datasetId", + "getSecurityMonitoringDatasetByVersion" + ); + } + + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new RequiredError( + "version", + "getSecurityMonitoringDatasetByVersion" + ); + } + + // Path Params + const localVarPath = + "/api/v2/security_monitoring/datasets/{dataset_id}/version/{version}" + .replace("{dataset_id}", encodeURIComponent(String(datasetId))) + .replace("{version}", encodeURIComponent(String(version))); + + // Make Request Context + const requestContext = _config + .getServer( + "v2.SecurityMonitoringApi.getSecurityMonitoringDatasetByVersion" + ) + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async getSecurityMonitoringDatasetVersionHistory( + datasetId: string, + pageSize?: number, + pageNumber?: number, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( + "Using unstable operation 'getSecurityMonitoringDatasetVersionHistory'" + ); + if ( + !_config.unstableOperations[ + "v2.getSecurityMonitoringDatasetVersionHistory" + ] + ) { + throw new Error( + "Unstable operation 'getSecurityMonitoringDatasetVersionHistory' is disabled" + ); + } + + // verify required parameter 'datasetId' is not null or undefined + if (datasetId === null || datasetId === undefined) { + throw new RequiredError( + "datasetId", + "getSecurityMonitoringDatasetVersionHistory" + ); + } + + // Path Params + const localVarPath = + "/api/v2/security_monitoring/datasets/{dataset_id}/version_history".replace( + "{dataset_id}", + encodeURIComponent(String(datasetId)) + ); + + // Make Request Context + const requestContext = _config + .getServer( + "v2.SecurityMonitoringApi.getSecurityMonitoringDatasetVersionHistory" + ) + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params if (pageSize !== undefined) { requestContext.setQueryParam( "page[size]", @@ -5040,56 +5535,89 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async listSecurityMonitoringCriticalAssets( + public async listSecurityFindingsAutomationDueDateRules( + pageSize?: number, + pageNumber?: number, _options?: Configuration ): Promise { const _config = _options || this.configuration; + logger.warn( + "Using unstable operation 'listSecurityFindingsAutomationDueDateRules'" + ); + if ( + !_config.unstableOperations[ + "v2.listSecurityFindingsAutomationDueDateRules" + ] + ) { + throw new Error( + "Unstable operation 'listSecurityFindingsAutomationDueDateRules' is disabled" + ); + } + // Path Params - const localVarPath = - "/api/v2/security_monitoring/configuration/critical_assets"; + const localVarPath = "/api/v2/security/findings/automation/due_date_rules"; // Make Request Context const requestContext = _config .getServer( - "v2.SecurityMonitoringApi.listSecurityMonitoringCriticalAssets" + "v2.SecurityMonitoringApi.listSecurityFindingsAutomationDueDateRules" ) .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); + // Query Params + if (pageSize !== undefined) { + requestContext.setQueryParam( + "page[size]", + ObjectSerializer.serialize(pageSize, "number", "int64"), + "" + ); + } + if (pageNumber !== undefined) { + requestContext.setQueryParam( + "page[number]", + ObjectSerializer.serialize(pageNumber, "number", "int64"), + "" + ); + } + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async listSecurityMonitoringDatasets( + public async listSecurityFindingsAutomationMuteRules( pageSize?: number, pageNumber?: number, - sort?: string, - filterQuery?: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'listSecurityMonitoringDatasets'"); - if (!_config.unstableOperations["v2.listSecurityMonitoringDatasets"]) { + logger.warn( + "Using unstable operation 'listSecurityFindingsAutomationMuteRules'" + ); + if ( + !_config.unstableOperations["v2.listSecurityFindingsAutomationMuteRules"] + ) { throw new Error( - "Unstable operation 'listSecurityMonitoringDatasets' is disabled" + "Unstable operation 'listSecurityFindingsAutomationMuteRules' is disabled" ); } // Path Params - const localVarPath = "/api/v2/security_monitoring/datasets"; + const localVarPath = "/api/v2/security/findings/automation/mute_rules"; // Make Request Context const requestContext = _config - .getServer("v2.SecurityMonitoringApi.listSecurityMonitoringDatasets") + .getServer( + "v2.SecurityMonitoringApi.listSecurityFindingsAutomationMuteRules" + ) .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -5109,76 +5637,213 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { "" ); } - if (sort !== undefined) { - requestContext.setQueryParam( - "sort", - ObjectSerializer.serialize(sort, "string", ""), - "" - ); - } - if (filterQuery !== undefined) { - requestContext.setQueryParam( - "filter[query]", - ObjectSerializer.serialize(filterQuery, "string", ""), - "" - ); - } // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async listSecurityMonitoringHistsignals( - filterQuery?: string, - filterFrom?: Date, - filterTo?: Date, - sort?: SecurityMonitoringSignalsSort, - pageCursor?: string, - pageLimit?: number, + public async listSecurityFindingsAutomationTicketCreationRules( + pageSize?: number, + pageNumber?: number, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'listSecurityMonitoringHistsignals'"); - if (!_config.unstableOperations["v2.listSecurityMonitoringHistsignals"]) { + logger.warn( + "Using unstable operation 'listSecurityFindingsAutomationTicketCreationRules'" + ); + if ( + !_config.unstableOperations[ + "v2.listSecurityFindingsAutomationTicketCreationRules" + ] + ) { throw new Error( - "Unstable operation 'listSecurityMonitoringHistsignals' is disabled" + "Unstable operation 'listSecurityFindingsAutomationTicketCreationRules' is disabled" ); } // Path Params - const localVarPath = "/api/v2/siem-historical-detections/histsignals"; + const localVarPath = + "/api/v2/security/findings/automation/ticket_creation_rules"; // Make Request Context const requestContext = _config - .getServer("v2.SecurityMonitoringApi.listSecurityMonitoringHistsignals") + .getServer( + "v2.SecurityMonitoringApi.listSecurityFindingsAutomationTicketCreationRules" + ) .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Query Params - if (filterQuery !== undefined) { + if (pageSize !== undefined) { requestContext.setQueryParam( - "filter[query]", - ObjectSerializer.serialize(filterQuery, "string", ""), + "page[size]", + ObjectSerializer.serialize(pageSize, "number", "int64"), "" ); } - if (filterFrom !== undefined) { + if (pageNumber !== undefined) { requestContext.setQueryParam( - "filter[from]", - ObjectSerializer.serialize(filterFrom, "Date", "date-time"), + "page[number]", + ObjectSerializer.serialize(pageNumber, "number", "int64"), "" ); } - if (filterTo !== undefined) { - requestContext.setQueryParam( + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listSecurityMonitoringCriticalAssets( + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // Path Params + const localVarPath = + "/api/v2/security_monitoring/configuration/critical_assets"; + + // Make Request Context + const requestContext = _config + .getServer( + "v2.SecurityMonitoringApi.listSecurityMonitoringCriticalAssets" + ) + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async listSecurityMonitoringDatasets( + pageSize?: number, + pageNumber?: number, + sort?: string, + filterQuery?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listSecurityMonitoringDatasets'"); + if (!_config.unstableOperations["v2.listSecurityMonitoringDatasets"]) { + throw new Error( + "Unstable operation 'listSecurityMonitoringDatasets' is disabled" + ); + } + + // Path Params + const localVarPath = "/api/v2/security_monitoring/datasets"; + + // Make Request Context + const requestContext = _config + .getServer("v2.SecurityMonitoringApi.listSecurityMonitoringDatasets") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (pageSize !== undefined) { + requestContext.setQueryParam( + "page[size]", + ObjectSerializer.serialize(pageSize, "number", "int64"), + "" + ); + } + if (pageNumber !== undefined) { + requestContext.setQueryParam( + "page[number]", + ObjectSerializer.serialize(pageNumber, "number", "int64"), + "" + ); + } + if (sort !== undefined) { + requestContext.setQueryParam( + "sort", + ObjectSerializer.serialize(sort, "string", ""), + "" + ); + } + if (filterQuery !== undefined) { + requestContext.setQueryParam( + "filter[query]", + ObjectSerializer.serialize(filterQuery, "string", ""), + "" + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async listSecurityMonitoringHistsignals( + filterQuery?: string, + filterFrom?: Date, + filterTo?: Date, + sort?: SecurityMonitoringSignalsSort, + pageCursor?: string, + pageLimit?: number, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listSecurityMonitoringHistsignals'"); + if (!_config.unstableOperations["v2.listSecurityMonitoringHistsignals"]) { + throw new Error( + "Unstable operation 'listSecurityMonitoringHistsignals' is disabled" + ); + } + + // Path Params + const localVarPath = "/api/v2/siem-historical-detections/histsignals"; + + // Make Request Context + const requestContext = _config + .getServer("v2.SecurityMonitoringApi.listSecurityMonitoringHistsignals") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (filterQuery !== undefined) { + requestContext.setQueryParam( + "filter[query]", + ObjectSerializer.serialize(filterQuery, "string", ""), + "" + ); + } + if (filterFrom !== undefined) { + requestContext.setQueryParam( + "filter[from]", + ObjectSerializer.serialize(filterFrom, "Date", "date-time"), + "" + ); + } + if (filterTo !== undefined) { + requestContext.setQueryParam( "filter[to]", ObjectSerializer.serialize(filterTo, "Date", "date-time"), "" @@ -6245,75 +6910,106 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async restoreSecurityMonitoringRule( - ruleId: string, - version: number, + public async reorderSecurityFindingsAutomationDueDateRules( + body: SecurityAutomationRuleReorderRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'restoreSecurityMonitoringRule'"); - if (!_config.unstableOperations["v2.restoreSecurityMonitoringRule"]) { + logger.warn( + "Using unstable operation 'reorderSecurityFindingsAutomationDueDateRules'" + ); + if ( + !_config.unstableOperations[ + "v2.reorderSecurityFindingsAutomationDueDateRules" + ] + ) { throw new Error( - "Unstable operation 'restoreSecurityMonitoringRule' is disabled" + "Unstable operation 'reorderSecurityFindingsAutomationDueDateRules' is disabled" ); } - // verify required parameter 'ruleId' is not null or undefined - if (ruleId === null || ruleId === undefined) { - throw new RequiredError("ruleId", "restoreSecurityMonitoringRule"); - } - - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new RequiredError("version", "restoreSecurityMonitoringRule"); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError( + "body", + "reorderSecurityFindingsAutomationDueDateRules" + ); } // Path Params const localVarPath = - "/api/v2/security_monitoring/rules/{rule_id}/restore/{version}" - .replace("{rule_id}", encodeURIComponent(String(ruleId))) - .replace("{version}", encodeURIComponent(String(version))); + "/api/v2/security/findings/automation/due_date_rules/reorder"; // Make Request Context const requestContext = _config - .getServer("v2.SecurityMonitoringApi.restoreSecurityMonitoringRule") + .getServer( + "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationDueDateRules" + ) .makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "SecurityAutomationRuleReorderRequest", + "" + ), + contentType + ); + requestContext.setBody(serializedBody); + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async runHistoricalJob( - body: RunHistoricalJobRequest, + public async reorderSecurityFindingsAutomationMuteRules( + body: SecurityAutomationRuleReorderRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'runHistoricalJob'"); - if (!_config.unstableOperations["v2.runHistoricalJob"]) { - throw new Error("Unstable operation 'runHistoricalJob' is disabled"); + logger.warn( + "Using unstable operation 'reorderSecurityFindingsAutomationMuteRules'" + ); + if ( + !_config.unstableOperations[ + "v2.reorderSecurityFindingsAutomationMuteRules" + ] + ) { + throw new Error( + "Unstable operation 'reorderSecurityFindingsAutomationMuteRules' is disabled" + ); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { - throw new RequiredError("body", "runHistoricalJob"); + throw new RequiredError( + "body", + "reorderSecurityFindingsAutomationMuteRules" + ); } // Path Params - const localVarPath = "/api/v2/siem-historical-detections/jobs"; + const localVarPath = + "/api/v2/security/findings/automation/mute_rules/reorder"; // Make Request Context const requestContext = _config - .getServer("v2.SecurityMonitoringApi.runHistoricalJob") + .getServer( + "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationMuteRules" + ) .makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -6324,7 +7020,11 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(body, "RunHistoricalJobRequest", ""), + ObjectSerializer.serialize( + body, + "SecurityAutomationRuleReorderRequest", + "" + ), contentType ); requestContext.setBody(serializedBody); @@ -6333,29 +7033,47 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async searchSecurityFindings( - body: SecurityFindingsSearchRequest, + public async reorderSecurityFindingsAutomationTicketCreationRules( + body: SecurityAutomationRuleReorderRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; + logger.warn( + "Using unstable operation 'reorderSecurityFindingsAutomationTicketCreationRules'" + ); + if ( + !_config.unstableOperations[ + "v2.reorderSecurityFindingsAutomationTicketCreationRules" + ] + ) { + throw new Error( + "Unstable operation 'reorderSecurityFindingsAutomationTicketCreationRules' is disabled" + ); + } + // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { - throw new RequiredError("body", "searchSecurityFindings"); + throw new RequiredError( + "body", + "reorderSecurityFindingsAutomationTicketCreationRules" + ); } // Path Params - const localVarPath = "/api/v2/security/findings/search"; + const localVarPath = + "/api/v2/security/findings/automation/ticket_creation_rules/reorder"; // Make Request Context const requestContext = _config - .getServer("v2.SecurityMonitoringApi.searchSecurityFindings") + .getServer( + "v2.SecurityMonitoringApi.reorderSecurityFindingsAutomationTicketCreationRules" + ) .makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -6366,7 +7084,11 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(body, "SecurityFindingsSearchRequest", ""), + ObjectSerializer.serialize( + body, + "SecurityAutomationRuleReorderRequest", + "" + ), contentType ); requestContext.setBody(serializedBody); @@ -6375,19 +7097,154 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async searchSecurityMonitoringHistsignals( - body?: SecurityMonitoringSignalListRequest, + public async restoreSecurityMonitoringRule( + ruleId: string, + version: number, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn( + logger.warn("Using unstable operation 'restoreSecurityMonitoringRule'"); + if (!_config.unstableOperations["v2.restoreSecurityMonitoringRule"]) { + throw new Error( + "Unstable operation 'restoreSecurityMonitoringRule' is disabled" + ); + } + + // verify required parameter 'ruleId' is not null or undefined + if (ruleId === null || ruleId === undefined) { + throw new RequiredError("ruleId", "restoreSecurityMonitoringRule"); + } + + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new RequiredError("version", "restoreSecurityMonitoringRule"); + } + + // Path Params + const localVarPath = + "/api/v2/security_monitoring/rules/{rule_id}/restore/{version}" + .replace("{rule_id}", encodeURIComponent(String(ruleId))) + .replace("{version}", encodeURIComponent(String(version))); + + // Make Request Context + const requestContext = _config + .getServer("v2.SecurityMonitoringApi.restoreSecurityMonitoringRule") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async runHistoricalJob( + body: RunHistoricalJobRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'runHistoricalJob'"); + if (!_config.unstableOperations["v2.runHistoricalJob"]) { + throw new Error("Unstable operation 'runHistoricalJob' is disabled"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "runHistoricalJob"); + } + + // Path Params + const localVarPath = "/api/v2/siem-historical-detections/jobs"; + + // Make Request Context + const requestContext = _config + .getServer("v2.SecurityMonitoringApi.runHistoricalJob") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "RunHistoricalJobRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async searchSecurityFindings( + body: SecurityFindingsSearchRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "searchSecurityFindings"); + } + + // Path Params + const localVarPath = "/api/v2/security/findings/search"; + + // Make Request Context + const requestContext = _config + .getServer("v2.SecurityMonitoringApi.searchSecurityFindings") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "SecurityFindingsSearchRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async searchSecurityMonitoringHistsignals( + body?: SecurityMonitoringSignalListRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( "Using unstable operation 'searchSecurityMonitoringHistsignals'" ); if (!_config.unstableOperations["v2.searchSecurityMonitoringHistsignals"]) { @@ -6729,15 +7586,214 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { - throw new RequiredError("body", "updateResourceEvaluationFilters"); + throw new RequiredError("body", "updateResourceEvaluationFilters"); + } + + // Path Params + const localVarPath = "/api/v2/cloud_security_management/resource_filters"; + + // Make Request Context + const requestContext = _config + .getServer("v2.SecurityMonitoringApi.updateResourceEvaluationFilters") + .makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "UpdateResourceEvaluationFiltersRequest", + "" + ), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async updateSecurityFilter( + securityFilterId: string, + body: SecurityFilterUpdateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'securityFilterId' is not null or undefined + if (securityFilterId === null || securityFilterId === undefined) { + throw new RequiredError("securityFilterId", "updateSecurityFilter"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateSecurityFilter"); + } + + // Path Params + const localVarPath = + "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}".replace( + "{security_filter_id}", + encodeURIComponent(String(securityFilterId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.SecurityMonitoringApi.updateSecurityFilter") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "SecurityFilterUpdateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async updateSecurityFindingsAutomationDueDateRule( + ruleId: string, + body: DueDateRuleUpdateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( + "Using unstable operation 'updateSecurityFindingsAutomationDueDateRule'" + ); + if ( + !_config.unstableOperations[ + "v2.updateSecurityFindingsAutomationDueDateRule" + ] + ) { + throw new Error( + "Unstable operation 'updateSecurityFindingsAutomationDueDateRule' is disabled" + ); + } + + // verify required parameter 'ruleId' is not null or undefined + if (ruleId === null || ruleId === undefined) { + throw new RequiredError( + "ruleId", + "updateSecurityFindingsAutomationDueDateRule" + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError( + "body", + "updateSecurityFindingsAutomationDueDateRule" + ); + } + + // Path Params + const localVarPath = + "/api/v2/security/findings/automation/due_date_rules/{rule_id}".replace( + "{rule_id}", + encodeURIComponent(String(ruleId)) + ); + + // Make Request Context + const requestContext = _config + .getServer( + "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationDueDateRule" + ) + .makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "DueDateRuleUpdateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateSecurityFindingsAutomationMuteRule( + ruleId: string, + body: MuteRuleUpdateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( + "Using unstable operation 'updateSecurityFindingsAutomationMuteRule'" + ); + if ( + !_config.unstableOperations["v2.updateSecurityFindingsAutomationMuteRule"] + ) { + throw new Error( + "Unstable operation 'updateSecurityFindingsAutomationMuteRule' is disabled" + ); + } + + // verify required parameter 'ruleId' is not null or undefined + if (ruleId === null || ruleId === undefined) { + throw new RequiredError( + "ruleId", + "updateSecurityFindingsAutomationMuteRule" + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError( + "body", + "updateSecurityFindingsAutomationMuteRule" + ); } // Path Params - const localVarPath = "/api/v2/cloud_security_management/resource_filters"; + const localVarPath = + "/api/v2/security/findings/automation/mute_rules/{rule_id}".replace( + "{rule_id}", + encodeURIComponent(String(ruleId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.SecurityMonitoringApi.updateResourceEvaluationFilters") + .getServer( + "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationMuteRule" + ) .makeRequestContext(localVarPath, HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -6748,11 +7804,7 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize( - body, - "UpdateResourceEvaluationFiltersRequest", - "" - ), + ObjectSerializer.serialize(body, "MuteRuleUpdateRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -6761,40 +7813,60 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async updateSecurityFilter( - securityFilterId: string, - body: SecurityFilterUpdateRequest, + public async updateSecurityFindingsAutomationTicketCreationRule( + ruleId: string, + body: TicketCreationRuleUpdateRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - // verify required parameter 'securityFilterId' is not null or undefined - if (securityFilterId === null || securityFilterId === undefined) { - throw new RequiredError("securityFilterId", "updateSecurityFilter"); + logger.warn( + "Using unstable operation 'updateSecurityFindingsAutomationTicketCreationRule'" + ); + if ( + !_config.unstableOperations[ + "v2.updateSecurityFindingsAutomationTicketCreationRule" + ] + ) { + throw new Error( + "Unstable operation 'updateSecurityFindingsAutomationTicketCreationRule' is disabled" + ); + } + + // verify required parameter 'ruleId' is not null or undefined + if (ruleId === null || ruleId === undefined) { + throw new RequiredError( + "ruleId", + "updateSecurityFindingsAutomationTicketCreationRule" + ); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { - throw new RequiredError("body", "updateSecurityFilter"); + throw new RequiredError( + "body", + "updateSecurityFindingsAutomationTicketCreationRule" + ); } // Path Params const localVarPath = - "/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}".replace( - "{security_filter_id}", - encodeURIComponent(String(securityFilterId)) + "/api/v2/security/findings/automation/ticket_creation_rules/{rule_id}".replace( + "{rule_id}", + encodeURIComponent(String(ruleId)) ); // Make Request Context const requestContext = _config - .getServer("v2.SecurityMonitoringApi.updateSecurityFilter") - .makeRequestContext(localVarPath, HttpMethod.PATCH); + .getServer( + "v2.SecurityMonitoringApi.updateSecurityFindingsAutomationTicketCreationRule" + ) + .makeRequestContext(localVarPath, HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -6804,7 +7876,7 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(body, "SecurityFilterUpdateRequest", ""), + ObjectSerializer.serialize(body, "TicketCreationRuleUpdateRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -6813,7 +7885,6 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; @@ -8717,7 +9788,215 @@ export class SecurityMonitoringApiResponseProcessor { ObjectSerializer.parse(await response.body.text(), contentType), "FindingCaseResponseArray", "" - ) as FindingCaseResponseArray; + ) as FindingCaseResponseArray; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createSampleLogGenerationSubscription + * @throws ApiException if the response code was not in [200, 299] + */ + public async createSampleLogGenerationSubscription( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: SampleLogGenerationSubscriptionResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SampleLogGenerationSubscriptionResponse" + ) as SampleLogGenerationSubscriptionResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SampleLogGenerationSubscriptionResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SampleLogGenerationSubscriptionResponse", + "" + ) as SampleLogGenerationSubscriptionResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createSecurityFilter + * @throws ApiException if the response code was not in [200, 299] + */ + public async createSecurityFilter( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: SecurityFilterResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecurityFilterResponse" + ) as SecurityFilterResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 409 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SecurityFilterResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecurityFilterResponse", + "" + ) as SecurityFilterResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createSecurityFindingsAutomationDueDateRule + * @throws ApiException if the response code was not in [200, 299] + */ + public async createSecurityFindingsAutomationDueDateRule( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: DueDateRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DueDateRuleResponse" + ) as DueDateRuleResponse; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 422) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: DueDateRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DueDateRuleResponse", + "" + ) as DueDateRuleResponse; return body; } @@ -8732,28 +10011,46 @@ export class SecurityMonitoringApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createSampleLogGenerationSubscription + * @params response Response returned by the server for a request to createSecurityFindingsAutomationMuteRule * @throws ApiException if the response code was not in [200, 299] */ - public async createSampleLogGenerationSubscription( + public async createSecurityFindingsAutomationMuteRule( response: ResponseContext - ): Promise { + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); - if (response.httpStatusCode === 200) { - const body: SampleLogGenerationSubscriptionResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SampleLogGenerationSubscriptionResponse" - ) as SampleLogGenerationSubscriptionResponse; + if (response.httpStatusCode === 201) { + const body: MuteRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MuteRuleResponse" + ) as MuteRuleResponse; return body; } - if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 403 || - response.httpStatusCode === 429 - ) { + if (response.httpStatusCode === 400 || response.httpStatusCode === 422) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { const bodyText = ObjectSerializer.parse( await response.body.text(), contentType @@ -8776,12 +10073,11 @@ export class SecurityMonitoringApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SampleLogGenerationSubscriptionResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SampleLogGenerationSubscriptionResponse", - "" - ) as SampleLogGenerationSubscriptionResponse; + const body: MuteRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MuteRuleResponse", + "" + ) as MuteRuleResponse; return body; } @@ -8796,28 +10092,46 @@ export class SecurityMonitoringApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to createSecurityFilter + * @params response Response returned by the server for a request to createSecurityFindingsAutomationTicketCreationRule * @throws ApiException if the response code was not in [200, 299] */ - public async createSecurityFilter( + public async createSecurityFindingsAutomationTicketCreationRule( response: ResponseContext - ): Promise { + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); - if (response.httpStatusCode === 200) { - const body: SecurityFilterResponse = ObjectSerializer.deserialize( + if (response.httpStatusCode === 201) { + const body: TicketCreationRuleResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "SecurityFilterResponse" - ) as SecurityFilterResponse; + "TicketCreationRuleResponse" + ) as TicketCreationRuleResponse; return body; } - if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 403 || - response.httpStatusCode === 409 || - response.httpStatusCode === 429 - ) { + if (response.httpStatusCode === 400 || response.httpStatusCode === 422) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { const bodyText = ObjectSerializer.parse( await response.body.text(), contentType @@ -8840,11 +10154,11 @@ export class SecurityMonitoringApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SecurityFilterResponse = ObjectSerializer.deserialize( + const body: TicketCreationRuleResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "SecurityFilterResponse", + "TicketCreationRuleResponse", "" - ) as SecurityFilterResponse; + ) as TicketCreationRuleResponse; return body; } @@ -9637,9 +10951,183 @@ export class SecurityMonitoringApiResponseProcessor { return body; } if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 429 || - response.httpStatusCode === 500 + response.httpStatusCode === 400 || + response.httpStatusCode === 429 || + response.httpStatusCode === 500 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: DeleteCustomFrameworkResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeleteCustomFrameworkResponse", + "" + ) as DeleteCustomFrameworkResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteHistoricalJob + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteHistoricalJob(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 409 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteSampleLogGenerationSubscription + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteSampleLogGenerationSubscription( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: SampleLogGenerationSubscriptionResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SampleLogGenerationSubscriptionResponse" + ) as SampleLogGenerationSubscriptionResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SampleLogGenerationSubscriptionResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SampleLogGenerationSubscriptionResponse", + "" + ) as SampleLogGenerationSubscriptionResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteSecurityFilter + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteSecurityFilter(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 ) { const bodyText = ObjectSerializer.parse( await response.body.text(), @@ -9663,12 +11151,7 @@ export class SecurityMonitoringApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: DeleteCustomFrameworkResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "DeleteCustomFrameworkResponse", - "" - ) as DeleteCustomFrameworkResponse; - return body; + return; } const body = (await response.body.text()) || ""; @@ -9682,10 +11165,12 @@ export class SecurityMonitoringApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteHistoricalJob + * @params response Response returned by the server for a request to deleteSecurityFindingsAutomationDueDateRule * @throws ApiException if the response code was not in [200, 299] */ - public async deleteHistoricalJob(response: ResponseContext): Promise { + public async deleteSecurityFindingsAutomationDueDateRule( + response: ResponseContext + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); @@ -9693,11 +11178,8 @@ export class SecurityMonitoringApiResponseProcessor { return; } if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 401 || response.httpStatusCode === 403 || response.httpStatusCode === 404 || - response.httpStatusCode === 409 || response.httpStatusCode === 429 ) { const bodyText = ObjectSerializer.parse( @@ -9736,26 +11218,21 @@ export class SecurityMonitoringApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteSampleLogGenerationSubscription + * @params response Response returned by the server for a request to deleteSecurityFindingsAutomationMuteRule * @throws ApiException if the response code was not in [200, 299] */ - public async deleteSampleLogGenerationSubscription( + public async deleteSecurityFindingsAutomationMuteRule( response: ResponseContext - ): Promise { + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); - if (response.httpStatusCode === 200) { - const body: SampleLogGenerationSubscriptionResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SampleLogGenerationSubscriptionResponse" - ) as SampleLogGenerationSubscriptionResponse; - return body; + if (response.httpStatusCode === 204) { + return; } if ( - response.httpStatusCode === 400 || response.httpStatusCode === 403 || + response.httpStatusCode === 404 || response.httpStatusCode === 429 ) { const bodyText = ObjectSerializer.parse( @@ -9780,13 +11257,7 @@ export class SecurityMonitoringApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SampleLogGenerationSubscriptionResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "SampleLogGenerationSubscriptionResponse", - "" - ) as SampleLogGenerationSubscriptionResponse; - return body; + return; } const body = (await response.body.text()) || ""; @@ -9800,10 +11271,12 @@ export class SecurityMonitoringApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteSecurityFilter + * @params response Response returned by the server for a request to deleteSecurityFindingsAutomationTicketCreationRule * @throws ApiException if the response code was not in [200, 299] */ - public async deleteSecurityFilter(response: ResponseContext): Promise { + public async deleteSecurityFindingsAutomationTicketCreationRule( + response: ResponseContext + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); @@ -11233,24 +12706,227 @@ export class SecurityMonitoringApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getRuleVersionHistory + * @params response Response returned by the server for a request to getRuleVersionHistory + * @throws ApiException if the response code was not in [200, 299] + */ + public async getRuleVersionHistory( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: GetRuleVersionHistoryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetRuleVersionHistoryResponse" + ) as GetRuleVersionHistoryResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GetRuleVersionHistoryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetRuleVersionHistoryResponse", + "" + ) as GetRuleVersionHistoryResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSBOM + * @throws ApiException if the response code was not in [200, 299] + */ + public async getSBOM(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: GetSBOMResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetSBOMResponse" + ) as GetSBOMResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GetSBOMResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetSBOMResponse", + "" + ) as GetSBOMResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSecretsRules + * @throws ApiException if the response code was not in [200, 299] + */ + public async getSecretsRules( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: SecretRuleArray = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecretRuleArray" + ) as SecretRuleArray; + return body; + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SecretRuleArray = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecretRuleArray", + "" + ) as SecretRuleArray; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getSecurityFilter * @throws ApiException if the response code was not in [200, 299] */ - public async getRuleVersionHistory( + public async getSecurityFilter( response: ResponseContext - ): Promise { + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); if (response.httpStatusCode === 200) { - const body: GetRuleVersionHistoryResponse = ObjectSerializer.deserialize( + const body: SecurityFilterResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "GetRuleVersionHistoryResponse" - ) as GetRuleVersionHistoryResponse; + "SecurityFilterResponse" + ) as SecurityFilterResponse; return body; } if ( - response.httpStatusCode === 400 || response.httpStatusCode === 403 || response.httpStatusCode === 404 || response.httpStatusCode === 429 @@ -11277,11 +12953,11 @@ export class SecurityMonitoringApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: GetRuleVersionHistoryResponse = ObjectSerializer.deserialize( + const body: SecurityFilterResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "GetRuleVersionHistoryResponse", + "SecurityFilterResponse", "" - ) as GetRuleVersionHistoryResponse; + ) as SecurityFilterResponse; return body; } @@ -11296,48 +12972,27 @@ export class SecurityMonitoringApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getSBOM + * @params response Response returned by the server for a request to getSecurityFindingsAutomationDueDateRule * @throws ApiException if the response code was not in [200, 299] */ - public async getSBOM(response: ResponseContext): Promise { + public async getSecurityFindingsAutomationDueDateRule( + response: ResponseContext + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); if (response.httpStatusCode === 200) { - const body: GetSBOMResponse = ObjectSerializer.deserialize( + const body: DueDateRuleResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "GetSBOMResponse" - ) as GetSBOMResponse; + "DueDateRuleResponse" + ) as DueDateRuleResponse; return body; } if ( - response.httpStatusCode === 400 || response.httpStatusCode === 403 || - response.httpStatusCode === 404 + response.httpStatusCode === 404 || + response.httpStatusCode === 429 ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body - ); - } - if (response.httpStatusCode === 429) { const bodyText = ObjectSerializer.parse( await response.body.text(), contentType @@ -11360,11 +13015,11 @@ export class SecurityMonitoringApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: GetSBOMResponse = ObjectSerializer.deserialize( + const body: DueDateRuleResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "GetSBOMResponse", + "DueDateRuleResponse", "" - ) as GetSBOMResponse; + ) as DueDateRuleResponse; return body; } @@ -11379,23 +13034,27 @@ export class SecurityMonitoringApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getSecretsRules + * @params response Response returned by the server for a request to getSecurityFindingsAutomationMuteRule * @throws ApiException if the response code was not in [200, 299] */ - public async getSecretsRules( + public async getSecurityFindingsAutomationMuteRule( response: ResponseContext - ): Promise { + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); if (response.httpStatusCode === 200) { - const body: SecretRuleArray = ObjectSerializer.deserialize( + const body: MuteRuleResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "SecretRuleArray" - ) as SecretRuleArray; + "MuteRuleResponse" + ) as MuteRuleResponse; return body; } - if (response.httpStatusCode === 429) { + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { const bodyText = ObjectSerializer.parse( await response.body.text(), contentType @@ -11418,11 +13077,11 @@ export class SecurityMonitoringApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SecretRuleArray = ObjectSerializer.deserialize( + const body: MuteRuleResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "SecretRuleArray", + "MuteRuleResponse", "" - ) as SecretRuleArray; + ) as MuteRuleResponse; return body; } @@ -11437,20 +13096,20 @@ export class SecurityMonitoringApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getSecurityFilter + * @params response Response returned by the server for a request to getSecurityFindingsAutomationTicketCreationRule * @throws ApiException if the response code was not in [200, 299] */ - public async getSecurityFilter( + public async getSecurityFindingsAutomationTicketCreationRule( response: ResponseContext - ): Promise { + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); if (response.httpStatusCode === 200) { - const body: SecurityFilterResponse = ObjectSerializer.deserialize( + const body: TicketCreationRuleResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "SecurityFilterResponse" - ) as SecurityFilterResponse; + "TicketCreationRuleResponse" + ) as TicketCreationRuleResponse; return body; } if ( @@ -11480,11 +13139,11 @@ export class SecurityMonitoringApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SecurityFilterResponse = ObjectSerializer.deserialize( + const body: TicketCreationRuleResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "SecurityFilterResponse", + "TicketCreationRuleResponse", "" - ) as SecurityFilterResponse; + ) as TicketCreationRuleResponse; return body; } @@ -13635,15 +15294,193 @@ export class SecurityMonitoringApiResponseProcessor { */ public async listSecurityFilters( response: ResponseContext - ): Promise { + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: SecurityFiltersResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecurityFiltersResponse" + ) as SecurityFiltersResponse; + return body; + } + if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SecurityFiltersResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecurityFiltersResponse", + "" + ) as SecurityFiltersResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listSecurityFilterVersions + * @throws ApiException if the response code was not in [200, 299] + */ + public async listSecurityFilterVersions( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: SecurityFilterVersionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecurityFilterVersionsResponse" + ) as SecurityFilterVersionsResponse; + return body; + } + if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SecurityFilterVersionsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecurityFilterVersionsResponse", + "" + ) as SecurityFilterVersionsResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listSecurityFindings + * @throws ApiException if the response code was not in [200, 299] + */ + public async listSecurityFindings( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: ListSecurityFindingsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListSecurityFindingsResponse" + ) as ListSecurityFindingsResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ListSecurityFindingsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListSecurityFindingsResponse", + "" + ) as ListSecurityFindingsResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listSecurityFindingsAutomationDueDateRules + * @throws ApiException if the response code was not in [200, 299] + */ + public async listSecurityFindingsAutomationDueDateRules( + response: ResponseContext + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); if (response.httpStatusCode === 200) { - const body: SecurityFiltersResponse = ObjectSerializer.deserialize( + const body: DueDateRulesResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "SecurityFiltersResponse" - ) as SecurityFiltersResponse; + "DueDateRulesResponse" + ) as DueDateRulesResponse; return body; } if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { @@ -13669,11 +15506,11 @@ export class SecurityMonitoringApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SecurityFiltersResponse = ObjectSerializer.deserialize( + const body: DueDateRulesResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "SecurityFiltersResponse", + "DueDateRulesResponse", "" - ) as SecurityFiltersResponse; + ) as DueDateRulesResponse; return body; } @@ -13688,20 +15525,20 @@ export class SecurityMonitoringApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to listSecurityFilterVersions + * @params response Response returned by the server for a request to listSecurityFindingsAutomationMuteRules * @throws ApiException if the response code was not in [200, 299] */ - public async listSecurityFilterVersions( + public async listSecurityFindingsAutomationMuteRules( response: ResponseContext - ): Promise { + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); if (response.httpStatusCode === 200) { - const body: SecurityFilterVersionsResponse = ObjectSerializer.deserialize( + const body: MuteRulesResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "SecurityFilterVersionsResponse" - ) as SecurityFilterVersionsResponse; + "MuteRulesResponse" + ) as MuteRulesResponse; return body; } if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { @@ -13727,11 +15564,11 @@ export class SecurityMonitoringApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SecurityFilterVersionsResponse = ObjectSerializer.deserialize( + const body: MuteRulesResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "SecurityFilterVersionsResponse", + "MuteRulesResponse", "" - ) as SecurityFilterVersionsResponse; + ) as MuteRulesResponse; return body; } @@ -13746,27 +15583,23 @@ export class SecurityMonitoringApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to listSecurityFindings + * @params response Response returned by the server for a request to listSecurityFindingsAutomationTicketCreationRules * @throws ApiException if the response code was not in [200, 299] */ - public async listSecurityFindings( + public async listSecurityFindingsAutomationTicketCreationRules( response: ResponseContext - ): Promise { + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); if (response.httpStatusCode === 200) { - const body: ListSecurityFindingsResponse = ObjectSerializer.deserialize( + const body: TicketCreationRulesResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ListSecurityFindingsResponse" - ) as ListSecurityFindingsResponse; + "TicketCreationRulesResponse" + ) as TicketCreationRulesResponse; return body; } - if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 403 || - response.httpStatusCode === 429 - ) { + if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { const bodyText = ObjectSerializer.parse( await response.body.text(), contentType @@ -13789,11 +15622,11 @@ export class SecurityMonitoringApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: ListSecurityFindingsResponse = ObjectSerializer.deserialize( + const body: TicketCreationRulesResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ListSecurityFindingsResponse", + "TicketCreationRulesResponse", "" - ) as ListSecurityFindingsResponse; + ) as TicketCreationRulesResponse; return body; } @@ -14699,62 +16532,311 @@ export class SecurityMonitoringApiResponseProcessor { ) as NotificationRuleResponse; return body; } - if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 403 || - response.httpStatusCode === 404 || - response.httpStatusCode === 429 - ) { + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 422) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: NotificationRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "NotificationRuleResponse", + "" + ) as NotificationRuleResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to reorderSecurityFindingsAutomationDueDateRules + * @throws ApiException if the response code was not in [200, 299] + */ + public async reorderSecurityFindingsAutomationDueDateRules( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: SecurityAutomationRuleReorderRequest = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecurityAutomationRuleReorderRequest" + ) as SecurityAutomationRuleReorderRequest; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 422) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SecurityAutomationRuleReorderRequest = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecurityAutomationRuleReorderRequest", + "" + ) as SecurityAutomationRuleReorderRequest; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to reorderSecurityFindingsAutomationMuteRules + * @throws ApiException if the response code was not in [200, 299] + */ + public async reorderSecurityFindingsAutomationMuteRules( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: SecurityAutomationRuleReorderRequest = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecurityAutomationRuleReorderRequest" + ) as SecurityAutomationRuleReorderRequest; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 422) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SecurityAutomationRuleReorderRequest = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecurityAutomationRuleReorderRequest", + "" + ) as SecurityAutomationRuleReorderRequest; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to reorderSecurityFindingsAutomationTicketCreationRules + * @throws ApiException if the response code was not in [200, 299] + */ + public async reorderSecurityFindingsAutomationTicketCreationRules( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: SecurityAutomationRuleReorderRequest = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecurityAutomationRuleReorderRequest" + ) as SecurityAutomationRuleReorderRequest; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 422) { const bodyText = ObjectSerializer.parse( await response.body.text(), contentType ); - let body: APIErrorResponse; + let body: JSONAPIErrorResponse; try { body = ObjectSerializer.deserialize( bodyText, - "APIErrorResponse" - ) as APIErrorResponse; + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; } catch (error) { logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( + throw new ApiException( response.httpStatusCode, bodyText ); } - throw new ApiException(response.httpStatusCode, body); + throw new ApiException( + response.httpStatusCode, + body + ); } - if (response.httpStatusCode === 422) { + if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { const bodyText = ObjectSerializer.parse( await response.body.text(), contentType ); - let body: JSONAPIErrorResponse; + let body: APIErrorResponse; try { body = ObjectSerializer.deserialize( bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; + "APIErrorResponse" + ) as APIErrorResponse; } catch (error) { logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( + throw new ApiException( response.httpStatusCode, bodyText ); } - throw new ApiException( - response.httpStatusCode, - body - ); + throw new ApiException(response.httpStatusCode, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: NotificationRuleResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "NotificationRuleResponse", - "" - ) as NotificationRuleResponse; + const body: SecurityAutomationRuleReorderRequest = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecurityAutomationRuleReorderRequest", + "" + ) as SecurityAutomationRuleReorderRequest; return body; } @@ -15508,10 +17590,265 @@ export class SecurityMonitoringApiResponseProcessor { return body; } if ( - response.httpStatusCode === 400 || + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 409 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SecurityFilterResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SecurityFilterResponse", + "" + ) as SecurityFilterResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSecurityFindingsAutomationDueDateRule + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateSecurityFindingsAutomationDueDateRule( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: DueDateRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DueDateRuleResponse" + ) as DueDateRuleResponse; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 422) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: DueDateRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DueDateRuleResponse", + "" + ) as DueDateRuleResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSecurityFindingsAutomationMuteRule + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateSecurityFindingsAutomationMuteRule( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: MuteRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MuteRuleResponse" + ) as MuteRuleResponse; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 422) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: MuteRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MuteRuleResponse", + "" + ) as MuteRuleResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateSecurityFindingsAutomationTicketCreationRule + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateSecurityFindingsAutomationTicketCreationRule( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: TicketCreationRuleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TicketCreationRuleResponse" + ) as TicketCreationRuleResponse; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 422) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if ( response.httpStatusCode === 403 || response.httpStatusCode === 404 || - response.httpStatusCode === 409 || response.httpStatusCode === 429 ) { const bodyText = ObjectSerializer.parse( @@ -15536,11 +17873,11 @@ export class SecurityMonitoringApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: SecurityFilterResponse = ObjectSerializer.deserialize( + const body: TicketCreationRuleResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "SecurityFilterResponse", + "TicketCreationRuleResponse", "" - ) as SecurityFilterResponse; + ) as TicketCreationRuleResponse; return body; } @@ -16290,6 +18627,27 @@ export interface SecurityMonitoringApiCreateSecurityFilterRequest { body: SecurityFilterCreateRequest; } +export interface SecurityMonitoringApiCreateSecurityFindingsAutomationDueDateRuleRequest { + /** + * @type DueDateRuleCreateRequest + */ + body: DueDateRuleCreateRequest; +} + +export interface SecurityMonitoringApiCreateSecurityFindingsAutomationMuteRuleRequest { + /** + * @type MuteRuleCreateRequest + */ + body: MuteRuleCreateRequest; +} + +export interface SecurityMonitoringApiCreateSecurityFindingsAutomationTicketCreationRuleRequest { + /** + * @type TicketCreationRuleCreateRequest + */ + body: TicketCreationRuleCreateRequest; +} + export interface SecurityMonitoringApiCreateSecurityMonitoringCriticalAssetRequest { /** * The definition of the new critical asset. @@ -16412,6 +18770,30 @@ export interface SecurityMonitoringApiDeleteSecurityFilterRequest { securityFilterId: string; } +export interface SecurityMonitoringApiDeleteSecurityFindingsAutomationDueDateRuleRequest { + /** + * The ID of the due date rule. + * @type string + */ + ruleId: string; +} + +export interface SecurityMonitoringApiDeleteSecurityFindingsAutomationMuteRuleRequest { + /** + * The ID of the mute rule. + * @type string + */ + ruleId: string; +} + +export interface SecurityMonitoringApiDeleteSecurityFindingsAutomationTicketCreationRuleRequest { + /** + * The ID of the ticket creation rule. + * @type string + */ + ruleId: string; +} + export interface SecurityMonitoringApiDeleteSecurityMonitoringCriticalAssetRequest { /** * The ID of the critical asset. @@ -16702,6 +19084,30 @@ export interface SecurityMonitoringApiGetSecurityFilterRequest { securityFilterId: string; } +export interface SecurityMonitoringApiGetSecurityFindingsAutomationDueDateRuleRequest { + /** + * The ID of the due date rule. + * @type string + */ + ruleId: string; +} + +export interface SecurityMonitoringApiGetSecurityFindingsAutomationMuteRuleRequest { + /** + * The ID of the mute rule. + * @type string + */ + ruleId: string; +} + +export interface SecurityMonitoringApiGetSecurityFindingsAutomationTicketCreationRuleRequest { + /** + * The ID of the ticket creation rule. + * @type string + */ + ruleId: string; +} + export interface SecurityMonitoringApiGetSecurityMonitoringCriticalAssetRequest { /** * The ID of the critical asset. @@ -17224,6 +19630,45 @@ export interface SecurityMonitoringApiListSecurityFindingsRequest { sort?: SecurityFindingsSort; } +export interface SecurityMonitoringApiListSecurityFindingsAutomationDueDateRulesRequest { + /** + * The number of rules per page. Maximum is 1000. + * @type number + */ + pageSize?: number; + /** + * The page number to return. + * @type number + */ + pageNumber?: number; +} + +export interface SecurityMonitoringApiListSecurityFindingsAutomationMuteRulesRequest { + /** + * The number of rules per page. Maximum is 1000. + * @type number + */ + pageSize?: number; + /** + * The page number to return. + * @type number + */ + pageNumber?: number; +} + +export interface SecurityMonitoringApiListSecurityFindingsAutomationTicketCreationRulesRequest { + /** + * The number of rules per page. Maximum is 1000. + * @type number + */ + pageSize?: number; + /** + * The page number to return. + * @type number + */ + pageNumber?: number; +} + export interface SecurityMonitoringApiListSecurityMonitoringDatasetsRequest { /** * Size for a given page. The maximum allowed value is 100. @@ -17704,6 +20149,27 @@ export interface SecurityMonitoringApiPatchVulnerabilityNotificationRuleRequest body: PatchNotificationRuleParameters; } +export interface SecurityMonitoringApiReorderSecurityFindingsAutomationDueDateRulesRequest { + /** + * @type SecurityAutomationRuleReorderRequest + */ + body: SecurityAutomationRuleReorderRequest; +} + +export interface SecurityMonitoringApiReorderSecurityFindingsAutomationMuteRulesRequest { + /** + * @type SecurityAutomationRuleReorderRequest + */ + body: SecurityAutomationRuleReorderRequest; +} + +export interface SecurityMonitoringApiReorderSecurityFindingsAutomationTicketCreationRulesRequest { + /** + * @type SecurityAutomationRuleReorderRequest + */ + body: SecurityAutomationRuleReorderRequest; +} + export interface SecurityMonitoringApiRestoreSecurityMonitoringRuleRequest { /** * The ID of the rule. @@ -17815,6 +20281,42 @@ export interface SecurityMonitoringApiUpdateSecurityFilterRequest { body: SecurityFilterUpdateRequest; } +export interface SecurityMonitoringApiUpdateSecurityFindingsAutomationDueDateRuleRequest { + /** + * The ID of the due date rule. + * @type string + */ + ruleId: string; + /** + * @type DueDateRuleUpdateRequest + */ + body: DueDateRuleUpdateRequest; +} + +export interface SecurityMonitoringApiUpdateSecurityFindingsAutomationMuteRuleRequest { + /** + * The ID of the mute rule. + * @type string + */ + ruleId: string; + /** + * @type MuteRuleUpdateRequest + */ + body: MuteRuleUpdateRequest; +} + +export interface SecurityMonitoringApiUpdateSecurityFindingsAutomationTicketCreationRuleRequest { + /** + * The ID of the ticket creation rule. + * @type string + */ + ruleId: string; + /** + * @type TicketCreationRuleUpdateRequest + */ + body: TicketCreationRuleUpdateRequest; +} + export interface SecurityMonitoringApiUpdateSecurityMonitoringCriticalAssetRequest { /** * The ID of the critical asset. @@ -18502,6 +21004,78 @@ export class SecurityMonitoringApi { }); } + /** + * Create a new due date rule for the current organization. + * @param param The request object + */ + public createSecurityFindingsAutomationDueDateRule( + param: SecurityMonitoringApiCreateSecurityFindingsAutomationDueDateRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createSecurityFindingsAutomationDueDateRule( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createSecurityFindingsAutomationDueDateRule( + responseContext + ); + }); + }); + } + + /** + * Create a new mute rule for the current organization. + * @param param The request object + */ + public createSecurityFindingsAutomationMuteRule( + param: SecurityMonitoringApiCreateSecurityFindingsAutomationMuteRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createSecurityFindingsAutomationMuteRule( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createSecurityFindingsAutomationMuteRule( + responseContext + ); + }); + }); + } + + /** + * Create a new ticket creation rule for the current organization. + * @param param The request object + */ + public createSecurityFindingsAutomationTicketCreationRule( + param: SecurityMonitoringApiCreateSecurityFindingsAutomationTicketCreationRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createSecurityFindingsAutomationTicketCreationRule( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createSecurityFindingsAutomationTicketCreationRule( + responseContext + ); + }); + }); + } + /** * Create a new critical asset. * @param param The request object @@ -18795,34 +21369,103 @@ export class SecurityMonitoringApi { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.deleteHistoricalJob(responseContext); + return this.responseProcessor.deleteHistoricalJob(responseContext); + }); + }); + } + + /** + * 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`. + * @param param The request object + */ + public deleteSampleLogGenerationSubscription( + param: SecurityMonitoringApiDeleteSampleLogGenerationSubscriptionRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.deleteSampleLogGenerationSubscription( + param.contentPackId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteSampleLogGenerationSubscription( + responseContext + ); + }); + }); + } + + /** + * Delete a specific security filter. + * @param param The request object + */ + public deleteSecurityFilter( + param: SecurityMonitoringApiDeleteSecurityFilterRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteSecurityFilter( + param.securityFilterId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteSecurityFilter(responseContext); + }); + }); + } + + /** + * Delete an existing due date rule by ID. + * @param param The request object + */ + public deleteSecurityFindingsAutomationDueDateRule( + param: SecurityMonitoringApiDeleteSecurityFindingsAutomationDueDateRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.deleteSecurityFindingsAutomationDueDateRule( + param.ruleId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteSecurityFindingsAutomationDueDateRule( + responseContext + ); }); }); } /** - * 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 an existing mute rule by ID. * @param param The request object */ - public deleteSampleLogGenerationSubscription( - param: SecurityMonitoringApiDeleteSampleLogGenerationSubscriptionRequest, + public deleteSecurityFindingsAutomationMuteRule( + param: SecurityMonitoringApiDeleteSecurityFindingsAutomationMuteRuleRequest, options?: Configuration - ): Promise { + ): Promise { const requestContextPromise = - this.requestFactory.deleteSampleLogGenerationSubscription( - param.contentPackId, + this.requestFactory.deleteSecurityFindingsAutomationMuteRule( + param.ruleId, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.deleteSampleLogGenerationSubscription( + return this.responseProcessor.deleteSecurityFindingsAutomationMuteRule( responseContext ); }); @@ -18830,22 +21473,25 @@ export class SecurityMonitoringApi { } /** - * Delete a specific security filter. + * Delete an existing ticket creation rule by ID. * @param param The request object */ - public deleteSecurityFilter( - param: SecurityMonitoringApiDeleteSecurityFilterRequest, + public deleteSecurityFindingsAutomationTicketCreationRule( + param: SecurityMonitoringApiDeleteSecurityFindingsAutomationTicketCreationRuleRequest, options?: Configuration ): Promise { - const requestContextPromise = this.requestFactory.deleteSecurityFilter( - param.securityFilterId, - options - ); + const requestContextPromise = + this.requestFactory.deleteSecurityFindingsAutomationTicketCreationRule( + param.ruleId, + options + ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.deleteSecurityFilter(responseContext); + return this.responseProcessor.deleteSecurityFindingsAutomationTicketCreationRule( + responseContext + ); }); }); } @@ -19456,6 +22102,78 @@ export class SecurityMonitoringApi { }); } + /** + * Get the details of a due date rule by ID. + * @param param The request object + */ + public getSecurityFindingsAutomationDueDateRule( + param: SecurityMonitoringApiGetSecurityFindingsAutomationDueDateRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.getSecurityFindingsAutomationDueDateRule( + param.ruleId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getSecurityFindingsAutomationDueDateRule( + responseContext + ); + }); + }); + } + + /** + * Get the details of a mute rule by ID. + * @param param The request object + */ + public getSecurityFindingsAutomationMuteRule( + param: SecurityMonitoringApiGetSecurityFindingsAutomationMuteRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.getSecurityFindingsAutomationMuteRule( + param.ruleId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getSecurityFindingsAutomationMuteRule( + responseContext + ); + }); + }); + } + + /** + * Get the details of a ticket creation rule by ID. + * @param param The request object + */ + public getSecurityFindingsAutomationTicketCreationRule( + param: SecurityMonitoringApiGetSecurityFindingsAutomationTicketCreationRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.getSecurityFindingsAutomationTicketCreationRule( + param.ruleId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getSecurityFindingsAutomationTicketCreationRule( + responseContext + ); + }); + }); + } + /** * Get the details of a specific critical asset. * @param param The request object @@ -20505,6 +23223,81 @@ export class SecurityMonitoringApi { } } + /** + * Get all due date rules for the current organization. + * @param param The request object + */ + public listSecurityFindingsAutomationDueDateRules( + param: SecurityMonitoringApiListSecurityFindingsAutomationDueDateRulesRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.listSecurityFindingsAutomationDueDateRules( + param.pageSize, + param.pageNumber, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listSecurityFindingsAutomationDueDateRules( + responseContext + ); + }); + }); + } + + /** + * Get all mute rules for the current organization. + * @param param The request object + */ + public listSecurityFindingsAutomationMuteRules( + param: SecurityMonitoringApiListSecurityFindingsAutomationMuteRulesRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.listSecurityFindingsAutomationMuteRules( + param.pageSize, + param.pageNumber, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listSecurityFindingsAutomationMuteRules( + responseContext + ); + }); + }); + } + + /** + * Get all ticket creation rules for the current organization. + * @param param The request object + */ + public listSecurityFindingsAutomationTicketCreationRules( + param: SecurityMonitoringApiListSecurityFindingsAutomationTicketCreationRulesRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.listSecurityFindingsAutomationTicketCreationRules( + param.pageSize, + param.pageNumber, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listSecurityFindingsAutomationTicketCreationRules( + responseContext + ); + }); + }); + } + /** * Get the list of all critical assets. * @param param The request object @@ -21046,6 +23839,78 @@ export class SecurityMonitoringApi { }); } + /** + * Reorder the list of due date rules for the current organization. + * @param param The request object + */ + public reorderSecurityFindingsAutomationDueDateRules( + param: SecurityMonitoringApiReorderSecurityFindingsAutomationDueDateRulesRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.reorderSecurityFindingsAutomationDueDateRules( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.reorderSecurityFindingsAutomationDueDateRules( + responseContext + ); + }); + }); + } + + /** + * Reorder the list of mute rules for the current organization. + * @param param The request object + */ + public reorderSecurityFindingsAutomationMuteRules( + param: SecurityMonitoringApiReorderSecurityFindingsAutomationMuteRulesRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.reorderSecurityFindingsAutomationMuteRules( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.reorderSecurityFindingsAutomationMuteRules( + responseContext + ); + }); + }); + } + + /** + * Reorder the list of ticket creation rules for the current organization. + * @param param The request object + */ + public reorderSecurityFindingsAutomationTicketCreationRules( + param: SecurityMonitoringApiReorderSecurityFindingsAutomationTicketCreationRulesRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.reorderSecurityFindingsAutomationTicketCreationRules( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.reorderSecurityFindingsAutomationTicketCreationRules( + responseContext + ); + }); + }); + } + /** * Restores a custom detection rule to a previously saved historical version. * Only custom rules can be restored. Default and partner rules return 400. @@ -21450,6 +24315,81 @@ export class SecurityMonitoringApi { }); } + /** + * Update an existing due date rule by ID. + * @param param The request object + */ + public updateSecurityFindingsAutomationDueDateRule( + param: SecurityMonitoringApiUpdateSecurityFindingsAutomationDueDateRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.updateSecurityFindingsAutomationDueDateRule( + param.ruleId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateSecurityFindingsAutomationDueDateRule( + responseContext + ); + }); + }); + } + + /** + * Update an existing mute rule by ID. + * @param param The request object + */ + public updateSecurityFindingsAutomationMuteRule( + param: SecurityMonitoringApiUpdateSecurityFindingsAutomationMuteRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.updateSecurityFindingsAutomationMuteRule( + param.ruleId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateSecurityFindingsAutomationMuteRule( + responseContext + ); + }); + }); + } + + /** + * Update an existing ticket creation rule by ID. + * @param param The request object + */ + public updateSecurityFindingsAutomationTicketCreationRule( + param: SecurityMonitoringApiUpdateSecurityFindingsAutomationTicketCreationRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.updateSecurityFindingsAutomationTicketCreationRule( + param.ruleId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateSecurityFindingsAutomationTicketCreationRule( + responseContext + ); + }); + }); + } + /** * Update a specific critical asset. * @param param The request object diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index ececb65cf3d0..4410e38c0499 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -1304,6 +1304,9 @@ export { SecurityMonitoringApiCreateJiraIssuesRequest, SecurityMonitoringApiCreateSampleLogGenerationSubscriptionRequest, SecurityMonitoringApiCreateSecurityFilterRequest, + SecurityMonitoringApiCreateSecurityFindingsAutomationDueDateRuleRequest, + SecurityMonitoringApiCreateSecurityFindingsAutomationMuteRuleRequest, + SecurityMonitoringApiCreateSecurityFindingsAutomationTicketCreationRuleRequest, SecurityMonitoringApiCreateSecurityMonitoringCriticalAssetRequest, SecurityMonitoringApiCreateSecurityMonitoringDatasetRequest, SecurityMonitoringApiCreateSecurityMonitoringIntegrationConfigRequest, @@ -1319,6 +1322,9 @@ export { SecurityMonitoringApiDeleteHistoricalJobRequest, SecurityMonitoringApiDeleteSampleLogGenerationSubscriptionRequest, SecurityMonitoringApiDeleteSecurityFilterRequest, + SecurityMonitoringApiDeleteSecurityFindingsAutomationDueDateRuleRequest, + SecurityMonitoringApiDeleteSecurityFindingsAutomationMuteRuleRequest, + SecurityMonitoringApiDeleteSecurityFindingsAutomationTicketCreationRuleRequest, SecurityMonitoringApiDeleteSecurityMonitoringCriticalAssetRequest, SecurityMonitoringApiDeleteSecurityMonitoringDatasetRequest, SecurityMonitoringApiDeleteSecurityMonitoringIntegrationConfigRequest, @@ -1343,6 +1349,9 @@ export { SecurityMonitoringApiGetRuleVersionHistoryRequest, SecurityMonitoringApiGetSBOMRequest, SecurityMonitoringApiGetSecurityFilterRequest, + SecurityMonitoringApiGetSecurityFindingsAutomationDueDateRuleRequest, + SecurityMonitoringApiGetSecurityFindingsAutomationMuteRuleRequest, + SecurityMonitoringApiGetSecurityFindingsAutomationTicketCreationRuleRequest, SecurityMonitoringApiGetSecurityMonitoringCriticalAssetRequest, SecurityMonitoringApiGetSecurityMonitoringDatasetRequest, SecurityMonitoringApiGetSecurityMonitoringDatasetByVersionRequest, @@ -1373,6 +1382,9 @@ export { SecurityMonitoringApiListSampleLogGenerationSubscriptionsRequest, SecurityMonitoringApiListScannedAssetsMetadataRequest, SecurityMonitoringApiListSecurityFindingsRequest, + SecurityMonitoringApiListSecurityFindingsAutomationDueDateRulesRequest, + SecurityMonitoringApiListSecurityFindingsAutomationMuteRulesRequest, + SecurityMonitoringApiListSecurityFindingsAutomationTicketCreationRulesRequest, SecurityMonitoringApiListSecurityMonitoringDatasetsRequest, SecurityMonitoringApiListSecurityMonitoringHistsignalsRequest, SecurityMonitoringApiListSecurityMonitoringIntegrationConfigsRequest, @@ -1384,6 +1396,9 @@ export { SecurityMonitoringApiMuteSecurityFindingsRequest, SecurityMonitoringApiPatchSignalNotificationRuleRequest, SecurityMonitoringApiPatchVulnerabilityNotificationRuleRequest, + SecurityMonitoringApiReorderSecurityFindingsAutomationDueDateRulesRequest, + SecurityMonitoringApiReorderSecurityFindingsAutomationMuteRulesRequest, + SecurityMonitoringApiReorderSecurityFindingsAutomationTicketCreationRulesRequest, SecurityMonitoringApiRestoreSecurityMonitoringRuleRequest, SecurityMonitoringApiRunHistoricalJobRequest, SecurityMonitoringApiSearchSecurityFindingsRequest, @@ -1396,6 +1411,9 @@ export { SecurityMonitoringApiUpdateFindingsAssigneeRequest, SecurityMonitoringApiUpdateResourceEvaluationFiltersRequest, SecurityMonitoringApiUpdateSecurityFilterRequest, + SecurityMonitoringApiUpdateSecurityFindingsAutomationDueDateRuleRequest, + SecurityMonitoringApiUpdateSecurityFindingsAutomationMuteRuleRequest, + SecurityMonitoringApiUpdateSecurityFindingsAutomationTicketCreationRuleRequest, SecurityMonitoringApiUpdateSecurityMonitoringCriticalAssetRequest, SecurityMonitoringApiUpdateSecurityMonitoringDatasetRequest, SecurityMonitoringApiUpdateSecurityMonitoringIntegrationConfigRequest, @@ -2164,8 +2182,10 @@ export { AutomationRuleAttributes } from "./models/AutomationRuleAttributes"; export { AutomationRuleCreate } from "./models/AutomationRuleCreate"; export { AutomationRuleCreateAttributes } from "./models/AutomationRuleCreateAttributes"; export { AutomationRuleCreateRequest } from "./models/AutomationRuleCreateRequest"; +export { AutomationRuleCreator } from "./models/AutomationRuleCreator"; export { AutomationRuleRelationships } from "./models/AutomationRuleRelationships"; export { AutomationRuleResponse } from "./models/AutomationRuleResponse"; +export { AutomationRuleScope } from "./models/AutomationRuleScope"; export { AutomationRulesResponse } from "./models/AutomationRulesResponse"; export { AutomationRuleTrigger } from "./models/AutomationRuleTrigger"; export { AutomationRuleTriggerData } from "./models/AutomationRuleTriggerData"; @@ -3518,6 +3538,19 @@ export { DowntimeStatus } from "./models/DowntimeStatus"; export { DowntimeUpdateRequest } from "./models/DowntimeUpdateRequest"; export { DowntimeUpdateRequestAttributes } from "./models/DowntimeUpdateRequestAttributes"; export { DowntimeUpdateRequestData } from "./models/DowntimeUpdateRequestData"; +export { DueDateFrom } from "./models/DueDateFrom"; +export { DueDatePerSeverityItem } from "./models/DueDatePerSeverityItem"; +export { DueDateRuleAction } from "./models/DueDateRuleAction"; +export { DueDateRuleAttributesCreate } from "./models/DueDateRuleAttributesCreate"; +export { DueDateRuleAttributesResponse } from "./models/DueDateRuleAttributesResponse"; +export { DueDateRuleCreateRequest } from "./models/DueDateRuleCreateRequest"; +export { DueDateRuleDataCreate } from "./models/DueDateRuleDataCreate"; +export { DueDateRuleDataResponse } from "./models/DueDateRuleDataResponse"; +export { DueDateRuleResponse } from "./models/DueDateRuleResponse"; +export { DueDateRulesResponse } from "./models/DueDateRulesResponse"; +export { DueDateRuleType } from "./models/DueDateRuleType"; +export { DueDateRuleUpdateRequest } from "./models/DueDateRuleUpdateRequest"; +export { DueDateSeverity } from "./models/DueDateSeverity"; export { ELFSourcemapAttributes } from "./models/ELFSourcemapAttributes"; export { ELFSourcemapData } from "./models/ELFSourcemapData"; export { EntityAttributes } from "./models/EntityAttributes"; @@ -5323,6 +5356,17 @@ export { MuteFindingsRequestDataAttributes } from "./models/MuteFindingsRequestD export { MuteFindingsRequestDataRelationships } from "./models/MuteFindingsRequestDataRelationships"; export { MuteFindingsResponse } from "./models/MuteFindingsResponse"; export { MuteFindingsResponseData } from "./models/MuteFindingsResponseData"; +export { MuteReason } from "./models/MuteReason"; +export { MuteRuleAction } from "./models/MuteRuleAction"; +export { MuteRuleAttributesCreate } from "./models/MuteRuleAttributesCreate"; +export { MuteRuleAttributesResponse } from "./models/MuteRuleAttributesResponse"; +export { MuteRuleCreateRequest } from "./models/MuteRuleCreateRequest"; +export { MuteRuleDataCreate } from "./models/MuteRuleDataCreate"; +export { MuteRuleDataResponse } from "./models/MuteRuleDataResponse"; +export { MuteRuleResponse } from "./models/MuteRuleResponse"; +export { MuteRulesResponse } from "./models/MuteRulesResponse"; +export { MuteRuleType } from "./models/MuteRuleType"; +export { MuteRuleUpdateRequest } from "./models/MuteRuleUpdateRequest"; export { NDKSourcemapAttributes } from "./models/NDKSourcemapAttributes"; export { NDKSourcemapData } from "./models/NDKSourcemapData"; export { NetworkHealthInsight } from "./models/NetworkHealthInsight"; @@ -6737,6 +6781,11 @@ export { SecureEmbedUpdateResponseData } from "./models/SecureEmbedUpdateRespons export { SecureEmbedUpdateResponseType } from "./models/SecureEmbedUpdateResponseType"; export { SecureEmbedViewingPreferences } from "./models/SecureEmbedViewingPreferences"; export { SecureEmbedViewingPreferencesTheme } from "./models/SecureEmbedViewingPreferencesTheme"; +export { SecurityAutomationRuleReorderItem } from "./models/SecurityAutomationRuleReorderItem"; +export { SecurityAutomationRuleReorderRequest } from "./models/SecurityAutomationRuleReorderRequest"; +export { SecurityAutomationRulesLinks } from "./models/SecurityAutomationRulesLinks"; +export { SecurityAutomationRulesMeta } from "./models/SecurityAutomationRulesMeta"; +export { SecurityAutomationRulesPageInfo } from "./models/SecurityAutomationRulesPageInfo"; export { SecurityEntityConfigRisks } from "./models/SecurityEntityConfigRisks"; export { SecurityEntityMetadata } from "./models/SecurityEntityMetadata"; export { SecurityEntityRiskScore } from "./models/SecurityEntityRiskScore"; @@ -6778,6 +6827,7 @@ export { SecurityFindingsSearchRequestDataAttributes } from "./models/SecurityFi export { SecurityFindingsSearchRequestPage } from "./models/SecurityFindingsSearchRequestPage"; export { SecurityFindingsSort } from "./models/SecurityFindingsSort"; export { SecurityFindingsStatus } from "./models/SecurityFindingsStatus"; +export { SecurityFindingType } from "./models/SecurityFindingType"; export { SecurityMonitoringContentPackActivation } from "./models/SecurityMonitoringContentPackActivation"; export { SecurityMonitoringContentPackIntegrationStatus } from "./models/SecurityMonitoringContentPackIntegrationStatus"; export { SecurityMonitoringContentPackStateAttributes } from "./models/SecurityMonitoringContentPackStateAttributes"; @@ -7892,6 +7942,17 @@ export { TestOptimizationUpdateServiceSettingsRequest } from "./models/TestOptim export { TestOptimizationUpdateServiceSettingsRequestAttributes } from "./models/TestOptimizationUpdateServiceSettingsRequestAttributes"; export { TestOptimizationUpdateServiceSettingsRequestData } from "./models/TestOptimizationUpdateServiceSettingsRequestData"; export { TestOptimizationUpdateServiceSettingsRequestDataType } from "./models/TestOptimizationUpdateServiceSettingsRequestDataType"; +export { TicketCreationRuleAction } from "./models/TicketCreationRuleAction"; +export { TicketCreationRuleAttributesCreate } from "./models/TicketCreationRuleAttributesCreate"; +export { TicketCreationRuleAttributesResponse } from "./models/TicketCreationRuleAttributesResponse"; +export { TicketCreationRuleCreateRequest } from "./models/TicketCreationRuleCreateRequest"; +export { TicketCreationRuleDataCreate } from "./models/TicketCreationRuleDataCreate"; +export { TicketCreationRuleDataResponse } from "./models/TicketCreationRuleDataResponse"; +export { TicketCreationRuleResponse } from "./models/TicketCreationRuleResponse"; +export { TicketCreationRulesResponse } from "./models/TicketCreationRulesResponse"; +export { TicketCreationRuleType } from "./models/TicketCreationRuleType"; +export { TicketCreationRuleUpdateRequest } from "./models/TicketCreationRuleUpdateRequest"; +export { TicketCreationTarget } from "./models/TicketCreationTarget"; export { TimelineCell } from "./models/TimelineCell"; export { TimelineCellAuthor } from "./models/TimelineCellAuthor"; export { TimelineCellAuthorUser } from "./models/TimelineCellAuthorUser"; diff --git a/packages/datadog-api-client-v2/models/AutomationRuleCreator.ts b/packages/datadog-api-client-v2/models/AutomationRuleCreator.ts new file mode 100644 index 000000000000..48d3d614b8af --- /dev/null +++ b/packages/datadog-api-client-v2/models/AutomationRuleCreator.ts @@ -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 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The user who created or last modified the rule. + */ +export class AutomationRuleCreator { + /** + * The ID of the user who created or modified the rule. + */ + "id": string; + /** + * The name of the user who created or modified the rule. + */ + "name": string; + /** + * The type of actor who created or modified the rule. + */ + "type": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AutomationRuleCreator.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AutomationRuleScope.ts b/packages/datadog-api-client-v2/models/AutomationRuleScope.ts new file mode 100644 index 000000000000..728529d9e53a --- /dev/null +++ b/packages/datadog-api-client-v2/models/AutomationRuleScope.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { SecurityFindingType } from "./SecurityFindingType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Defines the scope of findings to which the automation rule applies. + */ +export class AutomationRuleScope { + /** + * The list of security finding types that the automation rule applies to. + */ + "findingTypes": Array; + /** + * A search query to further filter the findings matched by this rule. The `@workflow.*` namespace, and the `@is_in_security_inbox` and `@status` fields, are not permitted. + */ + "query"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + findingTypes: { + baseName: "finding_types", + type: "Array", + required: true, + }, + query: { + baseName: "query", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AutomationRuleScope.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DueDateFrom.ts b/packages/datadog-api-client-v2/models/DueDateFrom.ts new file mode 100644 index 000000000000..77f63a9046a6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DueDateFrom.ts @@ -0,0 +1,18 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The reference point from which the due date is calculated. + */ + +export type DueDateFrom = + | typeof FIRST_SEEN + | typeof FIX_AVAILABLE + | UnparsedObject; +export const FIRST_SEEN = "first_seen"; +export const FIX_AVAILABLE = "fix_available"; diff --git a/packages/datadog-api-client-v2/models/DueDatePerSeverityItem.ts b/packages/datadog-api-client-v2/models/DueDatePerSeverityItem.ts new file mode 100644 index 000000000000..f2c571f06500 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DueDatePerSeverityItem.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DueDateSeverity } from "./DueDateSeverity"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A mapping of a severity level to the number of days until a finding is due. + */ +export class DueDatePerSeverityItem { + /** + * The number of days from the reference point until the finding is due. + */ + "dueInDays": number; + /** + * A severity level used to configure due date thresholds. + */ + "severity": DueDateSeverity; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + dueInDays: { + baseName: "due_in_days", + type: "number", + required: true, + format: "int64", + }, + severity: { + baseName: "severity", + type: "DueDateSeverity", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DueDatePerSeverityItem.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DueDateRuleAction.ts b/packages/datadog-api-client-v2/models/DueDateRuleAction.ts new file mode 100644 index 000000000000..29e6d5cfa678 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DueDateRuleAction.ts @@ -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 2020-Present Datadog, Inc. + */ +import { DueDateFrom } from "./DueDateFrom"; +import { DueDatePerSeverityItem } from "./DueDatePerSeverityItem"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The action to take when the due date rule matches a finding. + */ +export class DueDateRuleAction { + /** + * A list of severity-to-due-date mappings. + */ + "dueDaysPerSeverity": Array; + /** + * The reference point from which the due date is calculated. + */ + "dueFrom": DueDateFrom; + /** + * An optional description providing more context for the due date assignment. + */ + "reasonDescription"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + dueDaysPerSeverity: { + baseName: "due_days_per_severity", + type: "Array", + required: true, + }, + dueFrom: { + baseName: "due_from", + type: "DueDateFrom", + required: true, + }, + reasonDescription: { + baseName: "reason_description", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DueDateRuleAction.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DueDateRuleAttributesCreate.ts b/packages/datadog-api-client-v2/models/DueDateRuleAttributesCreate.ts new file mode 100644 index 000000000000..4d72a7f915c3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DueDateRuleAttributesCreate.ts @@ -0,0 +1,82 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AutomationRuleScope } from "./AutomationRuleScope"; +import { DueDateRuleAction } from "./DueDateRuleAction"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating or updating a due date rule. + */ +export class DueDateRuleAttributesCreate { + /** + * The action to take when the due date rule matches a finding. + */ + "action": DueDateRuleAction; + /** + * Whether the due date rule is enabled. + */ + "enabled": boolean; + /** + * The name of the due date rule. + */ + "name": string; + /** + * Defines the scope of findings to which the automation rule applies. + */ + "rule": AutomationRuleScope; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + action: { + baseName: "action", + type: "DueDateRuleAction", + required: true, + }, + enabled: { + baseName: "enabled", + type: "boolean", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + rule: { + baseName: "rule", + type: "AutomationRuleScope", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DueDateRuleAttributesCreate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DueDateRuleAttributesResponse.ts b/packages/datadog-api-client-v2/models/DueDateRuleAttributesResponse.ts new file mode 100644 index 000000000000..bc6575269816 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DueDateRuleAttributesResponse.ts @@ -0,0 +1,121 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AutomationRuleCreator } from "./AutomationRuleCreator"; +import { AutomationRuleScope } from "./AutomationRuleScope"; +import { DueDateRuleAction } from "./DueDateRuleAction"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a due date rule returned by the API. + */ +export class DueDateRuleAttributesResponse { + /** + * The action to take when the due date rule matches a finding. + */ + "action": DueDateRuleAction; + /** + * The Unix timestamp in milliseconds when the rule was created. + */ + "createdAt": number; + /** + * The user who created or last modified the rule. + */ + "createdBy": AutomationRuleCreator; + /** + * Whether the due date rule is enabled. + */ + "enabled": boolean; + /** + * The Unix timestamp in milliseconds when the rule was last modified. + */ + "modifiedAt": number; + /** + * The user who created or last modified the rule. + */ + "modifiedBy": AutomationRuleCreator; + /** + * The name of the due date rule. + */ + "name": string; + /** + * Defines the scope of findings to which the automation rule applies. + */ + "rule": AutomationRuleScope; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + action: { + baseName: "action", + type: "DueDateRuleAction", + required: true, + }, + createdAt: { + baseName: "created_at", + type: "number", + required: true, + format: "int64", + }, + createdBy: { + baseName: "created_by", + type: "AutomationRuleCreator", + required: true, + }, + enabled: { + baseName: "enabled", + type: "boolean", + required: true, + }, + modifiedAt: { + baseName: "modified_at", + type: "number", + required: true, + format: "int64", + }, + modifiedBy: { + baseName: "modified_by", + type: "AutomationRuleCreator", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + rule: { + baseName: "rule", + type: "AutomationRuleScope", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DueDateRuleAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DueDateRuleCreateRequest.ts b/packages/datadog-api-client-v2/models/DueDateRuleCreateRequest.ts new file mode 100644 index 000000000000..9e8f0b97f001 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DueDateRuleCreateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DueDateRuleDataCreate } from "./DueDateRuleDataCreate"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The body of a due date rule create request. + */ +export class DueDateRuleCreateRequest { + /** + * The data object for a due date rule create or update request. + */ + "data": DueDateRuleDataCreate; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "DueDateRuleDataCreate", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DueDateRuleCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DueDateRuleDataCreate.ts b/packages/datadog-api-client-v2/models/DueDateRuleDataCreate.ts new file mode 100644 index 000000000000..ea1c570eaca4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DueDateRuleDataCreate.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DueDateRuleAttributesCreate } from "./DueDateRuleAttributesCreate"; +import { DueDateRuleType } from "./DueDateRuleType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The data object for a due date rule create or update request. + */ +export class DueDateRuleDataCreate { + /** + * Attributes for creating or updating a due date rule. + */ + "attributes": DueDateRuleAttributesCreate; + /** + * The JSON:API type for due date rules. + */ + "type": DueDateRuleType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "DueDateRuleAttributesCreate", + required: true, + }, + type: { + baseName: "type", + type: "DueDateRuleType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DueDateRuleDataCreate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DueDateRuleDataResponse.ts b/packages/datadog-api-client-v2/models/DueDateRuleDataResponse.ts new file mode 100644 index 000000000000..53aa0b7a83b2 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DueDateRuleDataResponse.ts @@ -0,0 +1,74 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DueDateRuleAttributesResponse } from "./DueDateRuleAttributesResponse"; +import { DueDateRuleType } from "./DueDateRuleType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The data object for a due date rule returned by the API. + */ +export class DueDateRuleDataResponse { + /** + * Attributes of a due date rule returned by the API. + */ + "attributes": DueDateRuleAttributesResponse; + /** + * The ID of the due date rule. + */ + "id": string; + /** + * The JSON:API type for due date rules. + */ + "type": DueDateRuleType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "DueDateRuleAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "DueDateRuleType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DueDateRuleDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DueDateRuleResponse.ts b/packages/datadog-api-client-v2/models/DueDateRuleResponse.ts new file mode 100644 index 000000000000..4fa228a2464a --- /dev/null +++ b/packages/datadog-api-client-v2/models/DueDateRuleResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DueDateRuleDataResponse } from "./DueDateRuleDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A single due date rule response. + */ +export class DueDateRuleResponse { + /** + * The data object for a due date rule returned by the API. + */ + "data": DueDateRuleDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "DueDateRuleDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DueDateRuleResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DueDateRuleType.ts b/packages/datadog-api-client-v2/models/DueDateRuleType.ts new file mode 100644 index 000000000000..2ddeee3cc3ab --- /dev/null +++ b/packages/datadog-api-client-v2/models/DueDateRuleType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The JSON:API type for due date rules. + */ + +export type DueDateRuleType = typeof DUE_DATE_RULES | UnparsedObject; +export const DUE_DATE_RULES = "due_date_rules"; diff --git a/packages/datadog-api-client-v2/models/DueDateRuleUpdateRequest.ts b/packages/datadog-api-client-v2/models/DueDateRuleUpdateRequest.ts new file mode 100644 index 000000000000..d7c49e6bfb58 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DueDateRuleUpdateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DueDateRuleDataCreate } from "./DueDateRuleDataCreate"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The body of a due date rule update request. + */ +export class DueDateRuleUpdateRequest { + /** + * The data object for a due date rule create or update request. + */ + "data": DueDateRuleDataCreate; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "DueDateRuleDataCreate", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DueDateRuleUpdateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DueDateRulesResponse.ts b/packages/datadog-api-client-v2/models/DueDateRulesResponse.ts new file mode 100644 index 000000000000..4e5cb801dde9 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DueDateRulesResponse.ts @@ -0,0 +1,74 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { DueDateRuleDataResponse } from "./DueDateRuleDataResponse"; +import { SecurityAutomationRulesLinks } from "./SecurityAutomationRulesLinks"; +import { SecurityAutomationRulesMeta } from "./SecurityAutomationRulesMeta"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A list of due date rules with pagination metadata. + */ +export class DueDateRulesResponse { + /** + * A list of due date rule data objects. + */ + "data": Array; + /** + * Pagination links for the list of automation rules. + */ + "links": SecurityAutomationRulesLinks; + /** + * Metadata for the list of automation rules. + */ + "meta": SecurityAutomationRulesMeta; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + links: { + baseName: "links", + type: "SecurityAutomationRulesLinks", + required: true, + }, + meta: { + baseName: "meta", + type: "SecurityAutomationRulesMeta", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DueDateRulesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/DueDateSeverity.ts b/packages/datadog-api-client-v2/models/DueDateSeverity.ts new file mode 100644 index 000000000000..d15f4eff49b2 --- /dev/null +++ b/packages/datadog-api-client-v2/models/DueDateSeverity.ts @@ -0,0 +1,28 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * A severity level used to configure due date thresholds. + */ + +export type DueDateSeverity = + | typeof CRITICAL + | typeof HIGH + | typeof MEDIUM + | typeof LOW + | typeof UNKNOWN + | typeof INFO + | typeof NONE + | UnparsedObject; +export const CRITICAL = "critical"; +export const HIGH = "high"; +export const MEDIUM = "medium"; +export const LOW = "low"; +export const UNKNOWN = "unknown"; +export const INFO = "info"; +export const NONE = "none"; diff --git a/packages/datadog-api-client-v2/models/MuteReason.ts b/packages/datadog-api-client-v2/models/MuteReason.ts new file mode 100644 index 000000000000..2960ae987a3e --- /dev/null +++ b/packages/datadog-api-client-v2/models/MuteReason.ts @@ -0,0 +1,26 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The reason for muting a security finding. + */ + +export type MuteReason = + | typeof DUPLICATE + | typeof FALSE_POSITIVE + | typeof NO_FIX + | typeof OTHER + | typeof PENDING_FIX + | typeof RISK_ACCEPTED + | UnparsedObject; +export const DUPLICATE = "duplicate"; +export const FALSE_POSITIVE = "false_positive"; +export const NO_FIX = "no_fix"; +export const OTHER = "other"; +export const PENDING_FIX = "pending_fix"; +export const RISK_ACCEPTED = "risk_accepted"; diff --git a/packages/datadog-api-client-v2/models/MuteRuleAction.ts b/packages/datadog-api-client-v2/models/MuteRuleAction.ts new file mode 100644 index 000000000000..490b1a23bc23 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MuteRuleAction.ts @@ -0,0 +1,71 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MuteReason } from "./MuteReason"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The action to take when the mute rule matches a finding. + */ +export class MuteRuleAction { + /** + * The Unix timestamp in milliseconds at which the mute expires. If omitted, the mute does not expire. + */ + "expireAt"?: number; + /** + * The reason for muting a security finding. + */ + "reason": MuteReason; + /** + * An optional description providing more context for the mute reason. + */ + "reasonDescription"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + expireAt: { + baseName: "expire_at", + type: "number", + format: "int64", + }, + reason: { + baseName: "reason", + type: "MuteReason", + required: true, + }, + reasonDescription: { + baseName: "reason_description", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MuteRuleAction.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MuteRuleAttributesCreate.ts b/packages/datadog-api-client-v2/models/MuteRuleAttributesCreate.ts new file mode 100644 index 000000000000..eba284aa9e26 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MuteRuleAttributesCreate.ts @@ -0,0 +1,82 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AutomationRuleScope } from "./AutomationRuleScope"; +import { MuteRuleAction } from "./MuteRuleAction"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating or updating a mute rule. + */ +export class MuteRuleAttributesCreate { + /** + * The action to take when the mute rule matches a finding. + */ + "action": MuteRuleAction; + /** + * Whether the mute rule is enabled. + */ + "enabled": boolean; + /** + * The name of the mute rule. + */ + "name": string; + /** + * Defines the scope of findings to which the automation rule applies. + */ + "rule": AutomationRuleScope; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + action: { + baseName: "action", + type: "MuteRuleAction", + required: true, + }, + enabled: { + baseName: "enabled", + type: "boolean", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + rule: { + baseName: "rule", + type: "AutomationRuleScope", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MuteRuleAttributesCreate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MuteRuleAttributesResponse.ts b/packages/datadog-api-client-v2/models/MuteRuleAttributesResponse.ts new file mode 100644 index 000000000000..45eca33ab813 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MuteRuleAttributesResponse.ts @@ -0,0 +1,121 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AutomationRuleCreator } from "./AutomationRuleCreator"; +import { AutomationRuleScope } from "./AutomationRuleScope"; +import { MuteRuleAction } from "./MuteRuleAction"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a mute rule returned by the API. + */ +export class MuteRuleAttributesResponse { + /** + * The action to take when the mute rule matches a finding. + */ + "action": MuteRuleAction; + /** + * The Unix timestamp in milliseconds when the rule was created. + */ + "createdAt": number; + /** + * The user who created or last modified the rule. + */ + "createdBy": AutomationRuleCreator; + /** + * Whether the mute rule is enabled. + */ + "enabled": boolean; + /** + * The Unix timestamp in milliseconds when the rule was last modified. + */ + "modifiedAt": number; + /** + * The user who created or last modified the rule. + */ + "modifiedBy": AutomationRuleCreator; + /** + * The name of the mute rule. + */ + "name": string; + /** + * Defines the scope of findings to which the automation rule applies. + */ + "rule": AutomationRuleScope; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + action: { + baseName: "action", + type: "MuteRuleAction", + required: true, + }, + createdAt: { + baseName: "created_at", + type: "number", + required: true, + format: "int64", + }, + createdBy: { + baseName: "created_by", + type: "AutomationRuleCreator", + required: true, + }, + enabled: { + baseName: "enabled", + type: "boolean", + required: true, + }, + modifiedAt: { + baseName: "modified_at", + type: "number", + required: true, + format: "int64", + }, + modifiedBy: { + baseName: "modified_by", + type: "AutomationRuleCreator", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + rule: { + baseName: "rule", + type: "AutomationRuleScope", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MuteRuleAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MuteRuleCreateRequest.ts b/packages/datadog-api-client-v2/models/MuteRuleCreateRequest.ts new file mode 100644 index 000000000000..e941de754a13 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MuteRuleCreateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MuteRuleDataCreate } from "./MuteRuleDataCreate"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The body of a mute rule create request. + */ +export class MuteRuleCreateRequest { + /** + * The data object for a mute rule create or update request. + */ + "data": MuteRuleDataCreate; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "MuteRuleDataCreate", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MuteRuleCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MuteRuleDataCreate.ts b/packages/datadog-api-client-v2/models/MuteRuleDataCreate.ts new file mode 100644 index 000000000000..59116166ebc6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MuteRuleDataCreate.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MuteRuleAttributesCreate } from "./MuteRuleAttributesCreate"; +import { MuteRuleType } from "./MuteRuleType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The data object for a mute rule create or update request. + */ +export class MuteRuleDataCreate { + /** + * Attributes for creating or updating a mute rule. + */ + "attributes": MuteRuleAttributesCreate; + /** + * The JSON:API type for mute rules. + */ + "type": MuteRuleType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "MuteRuleAttributesCreate", + required: true, + }, + type: { + baseName: "type", + type: "MuteRuleType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MuteRuleDataCreate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MuteRuleDataResponse.ts b/packages/datadog-api-client-v2/models/MuteRuleDataResponse.ts new file mode 100644 index 000000000000..2f850c3d199b --- /dev/null +++ b/packages/datadog-api-client-v2/models/MuteRuleDataResponse.ts @@ -0,0 +1,74 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MuteRuleAttributesResponse } from "./MuteRuleAttributesResponse"; +import { MuteRuleType } from "./MuteRuleType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The data object for a mute rule returned by the API. + */ +export class MuteRuleDataResponse { + /** + * Attributes of a mute rule returned by the API. + */ + "attributes": MuteRuleAttributesResponse; + /** + * The ID of the mute rule. + */ + "id": string; + /** + * The JSON:API type for mute rules. + */ + "type": MuteRuleType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "MuteRuleAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "MuteRuleType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MuteRuleDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MuteRuleResponse.ts b/packages/datadog-api-client-v2/models/MuteRuleResponse.ts new file mode 100644 index 000000000000..2026fbc0c824 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MuteRuleResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MuteRuleDataResponse } from "./MuteRuleDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A single mute rule response. + */ +export class MuteRuleResponse { + /** + * The data object for a mute rule returned by the API. + */ + "data": MuteRuleDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "MuteRuleDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MuteRuleResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MuteRuleType.ts b/packages/datadog-api-client-v2/models/MuteRuleType.ts new file mode 100644 index 000000000000..8464bf9d6935 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MuteRuleType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The JSON:API type for mute rules. + */ + +export type MuteRuleType = typeof MUTE_RULES | UnparsedObject; +export const MUTE_RULES = "mute_rules"; diff --git a/packages/datadog-api-client-v2/models/MuteRuleUpdateRequest.ts b/packages/datadog-api-client-v2/models/MuteRuleUpdateRequest.ts new file mode 100644 index 000000000000..90d1ee0feb3c --- /dev/null +++ b/packages/datadog-api-client-v2/models/MuteRuleUpdateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MuteRuleDataCreate } from "./MuteRuleDataCreate"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The body of a mute rule update request. + */ +export class MuteRuleUpdateRequest { + /** + * The data object for a mute rule create or update request. + */ + "data": MuteRuleDataCreate; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "MuteRuleDataCreate", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MuteRuleUpdateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MuteRulesResponse.ts b/packages/datadog-api-client-v2/models/MuteRulesResponse.ts new file mode 100644 index 000000000000..993252507aa0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MuteRulesResponse.ts @@ -0,0 +1,74 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MuteRuleDataResponse } from "./MuteRuleDataResponse"; +import { SecurityAutomationRulesLinks } from "./SecurityAutomationRulesLinks"; +import { SecurityAutomationRulesMeta } from "./SecurityAutomationRulesMeta"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A list of mute rules with pagination metadata. + */ +export class MuteRulesResponse { + /** + * A list of mute rule data objects. + */ + "data": Array; + /** + * Pagination links for the list of automation rules. + */ + "links": SecurityAutomationRulesLinks; + /** + * Metadata for the list of automation rules. + */ + "meta": SecurityAutomationRulesMeta; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + links: { + baseName: "links", + type: "SecurityAutomationRulesLinks", + required: true, + }, + meta: { + baseName: "meta", + type: "SecurityAutomationRulesMeta", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MuteRulesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 283b41c21aa2..a41771a33e1b 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -388,8 +388,10 @@ import { AutomationRuleAttributes } from "./AutomationRuleAttributes"; import { AutomationRuleCreate } from "./AutomationRuleCreate"; import { AutomationRuleCreateAttributes } from "./AutomationRuleCreateAttributes"; import { AutomationRuleCreateRequest } from "./AutomationRuleCreateRequest"; +import { AutomationRuleCreator } from "./AutomationRuleCreator"; import { AutomationRuleRelationships } from "./AutomationRuleRelationships"; import { AutomationRuleResponse } from "./AutomationRuleResponse"; +import { AutomationRuleScope } from "./AutomationRuleScope"; import { AutomationRuleTrigger } from "./AutomationRuleTrigger"; import { AutomationRuleTriggerData } from "./AutomationRuleTriggerData"; import { AutomationRuleUpdate } from "./AutomationRuleUpdate"; @@ -1376,6 +1378,16 @@ import { DowntimeScheduleRecurrencesUpdateRequest } from "./DowntimeScheduleRecu import { DowntimeUpdateRequest } from "./DowntimeUpdateRequest"; import { DowntimeUpdateRequestAttributes } from "./DowntimeUpdateRequestAttributes"; import { DowntimeUpdateRequestData } from "./DowntimeUpdateRequestData"; +import { DueDatePerSeverityItem } from "./DueDatePerSeverityItem"; +import { DueDateRuleAction } from "./DueDateRuleAction"; +import { DueDateRuleAttributesCreate } from "./DueDateRuleAttributesCreate"; +import { DueDateRuleAttributesResponse } from "./DueDateRuleAttributesResponse"; +import { DueDateRuleCreateRequest } from "./DueDateRuleCreateRequest"; +import { DueDateRuleDataCreate } from "./DueDateRuleDataCreate"; +import { DueDateRuleDataResponse } from "./DueDateRuleDataResponse"; +import { DueDateRuleResponse } from "./DueDateRuleResponse"; +import { DueDateRuleUpdateRequest } from "./DueDateRuleUpdateRequest"; +import { DueDateRulesResponse } from "./DueDateRulesResponse"; import { ELFSourcemapAttributes } from "./ELFSourcemapAttributes"; import { ELFSourcemapData } from "./ELFSourcemapData"; import { EPSS } from "./EPSS"; @@ -2821,6 +2833,15 @@ import { MuteFindingsRequestDataAttributes } from "./MuteFindingsRequestDataAttr import { MuteFindingsRequestDataRelationships } from "./MuteFindingsRequestDataRelationships"; import { MuteFindingsResponse } from "./MuteFindingsResponse"; import { MuteFindingsResponseData } from "./MuteFindingsResponseData"; +import { MuteRuleAction } from "./MuteRuleAction"; +import { MuteRuleAttributesCreate } from "./MuteRuleAttributesCreate"; +import { MuteRuleAttributesResponse } from "./MuteRuleAttributesResponse"; +import { MuteRuleCreateRequest } from "./MuteRuleCreateRequest"; +import { MuteRuleDataCreate } from "./MuteRuleDataCreate"; +import { MuteRuleDataResponse } from "./MuteRuleDataResponse"; +import { MuteRuleResponse } from "./MuteRuleResponse"; +import { MuteRuleUpdateRequest } from "./MuteRuleUpdateRequest"; +import { MuteRulesResponse } from "./MuteRulesResponse"; import { NDKSourcemapAttributes } from "./NDKSourcemapAttributes"; import { NDKSourcemapData } from "./NDKSourcemapData"; import { NetworkHealthInsight } from "./NetworkHealthInsight"; @@ -3842,6 +3863,11 @@ import { SecureEmbedUpdateResponse } from "./SecureEmbedUpdateResponse"; import { SecureEmbedUpdateResponseAttributes } from "./SecureEmbedUpdateResponseAttributes"; import { SecureEmbedUpdateResponseData } from "./SecureEmbedUpdateResponseData"; import { SecureEmbedViewingPreferences } from "./SecureEmbedViewingPreferences"; +import { SecurityAutomationRuleReorderItem } from "./SecurityAutomationRuleReorderItem"; +import { SecurityAutomationRuleReorderRequest } from "./SecurityAutomationRuleReorderRequest"; +import { SecurityAutomationRulesLinks } from "./SecurityAutomationRulesLinks"; +import { SecurityAutomationRulesMeta } from "./SecurityAutomationRulesMeta"; +import { SecurityAutomationRulesPageInfo } from "./SecurityAutomationRulesPageInfo"; import { SecurityEntityConfigRisks } from "./SecurityEntityConfigRisks"; import { SecurityEntityMetadata } from "./SecurityEntityMetadata"; import { SecurityEntityRiskScore } from "./SecurityEntityRiskScore"; @@ -4732,6 +4758,15 @@ import { TestOptimizationServiceSettingsResponse } from "./TestOptimizationServi import { TestOptimizationUpdateServiceSettingsRequest } from "./TestOptimizationUpdateServiceSettingsRequest"; import { TestOptimizationUpdateServiceSettingsRequestAttributes } from "./TestOptimizationUpdateServiceSettingsRequestAttributes"; import { TestOptimizationUpdateServiceSettingsRequestData } from "./TestOptimizationUpdateServiceSettingsRequestData"; +import { TicketCreationRuleAction } from "./TicketCreationRuleAction"; +import { TicketCreationRuleAttributesCreate } from "./TicketCreationRuleAttributesCreate"; +import { TicketCreationRuleAttributesResponse } from "./TicketCreationRuleAttributesResponse"; +import { TicketCreationRuleCreateRequest } from "./TicketCreationRuleCreateRequest"; +import { TicketCreationRuleDataCreate } from "./TicketCreationRuleDataCreate"; +import { TicketCreationRuleDataResponse } from "./TicketCreationRuleDataResponse"; +import { TicketCreationRuleResponse } from "./TicketCreationRuleResponse"; +import { TicketCreationRuleUpdateRequest } from "./TicketCreationRuleUpdateRequest"; +import { TicketCreationRulesResponse } from "./TicketCreationRulesResponse"; import { TimeRestriction } from "./TimeRestriction"; import { TimeRestrictions } from "./TimeRestrictions"; import { TimelineCell } from "./TimelineCell"; @@ -5761,6 +5796,17 @@ const enumsMap: { [key: string]: any[] } = { DowntimeNotifyEndStateTypes: ["alert", "no data", "warn"], DowntimeResourceType: ["downtime"], DowntimeStatus: ["active", "canceled", "ended", "scheduled"], + DueDateFrom: ["first_seen", "fix_available"], + DueDateRuleType: ["due_date_rules"], + DueDateSeverity: [ + "critical", + "high", + "medium", + "low", + "unknown", + "info", + "none", + ], EntityIntegrationConfigRequestType: ["entity_integration_config_requests"], EntityIntegrationConfigType: ["entity_integration_configs"], EntityResponseDataRelationshipsIncidentsDataItemsType: ["incident"], @@ -6357,6 +6403,15 @@ const enumsMap: { [key: string]: any[] } = { "HUMAN_ERROR", "NO_LONGER_ACCEPTED_RISK", ], + MuteReason: [ + "duplicate", + "false_positive", + "no_fix", + "other", + "pending_fix", + "risk_accepted", + ], + MuteRuleType: ["mute_rules"], NetworkHealthInsightCategory: ["dns", "tcp", "tls-cert", "security-group"], NetworkHealthInsightFailureType: [ "timeout", @@ -7116,6 +7171,19 @@ const enumsMap: { [key: string]: any[] } = { SecurityFilterFilteredDataType: ["logs"], SecurityFilterType: ["security_filters"], SecurityFilterVersionType: ["security_filters_configuration"], + SecurityFindingType: [ + "api_security", + "attack_path", + "host_and_container_vulnerability", + "iac_misconfiguration", + "identity_risk", + "library_vulnerability", + "misconfiguration", + "runtime_code_vulnerability", + "secret", + "static_code_vulnerability", + "workload_activity", + ], SecurityFindingsDataType: ["finding"], SecurityFindingsSort: ["@detection_changed_at", "-@detection_changed_at"], SecurityFindingsStatus: ["done", "timeout"], @@ -7668,6 +7736,8 @@ const enumsMap: { [key: string]: any[] } = { TestOptimizationUpdateServiceSettingsRequestDataType: [ "test_optimization_update_service_settings_request", ], + TicketCreationRuleType: ["ticket_creation_rules"], + TicketCreationTarget: ["jira", "case_management"], TimelineCellAuthorUserType: ["USER"], TimelineCellResourceType: ["timeline_cell"], TimelineCellType: ["COMMENT"], @@ -8320,8 +8390,10 @@ const typeMap: { [index: string]: any } = { AutomationRuleCreate: AutomationRuleCreate, AutomationRuleCreateAttributes: AutomationRuleCreateAttributes, AutomationRuleCreateRequest: AutomationRuleCreateRequest, + AutomationRuleCreator: AutomationRuleCreator, AutomationRuleRelationships: AutomationRuleRelationships, AutomationRuleResponse: AutomationRuleResponse, + AutomationRuleScope: AutomationRuleScope, AutomationRuleTrigger: AutomationRuleTrigger, AutomationRuleTriggerData: AutomationRuleTriggerData, AutomationRuleUpdate: AutomationRuleUpdate, @@ -9472,6 +9544,16 @@ const typeMap: { [index: string]: any } = { DowntimeUpdateRequest: DowntimeUpdateRequest, DowntimeUpdateRequestAttributes: DowntimeUpdateRequestAttributes, DowntimeUpdateRequestData: DowntimeUpdateRequestData, + DueDatePerSeverityItem: DueDatePerSeverityItem, + DueDateRuleAction: DueDateRuleAction, + DueDateRuleAttributesCreate: DueDateRuleAttributesCreate, + DueDateRuleAttributesResponse: DueDateRuleAttributesResponse, + DueDateRuleCreateRequest: DueDateRuleCreateRequest, + DueDateRuleDataCreate: DueDateRuleDataCreate, + DueDateRuleDataResponse: DueDateRuleDataResponse, + DueDateRuleResponse: DueDateRuleResponse, + DueDateRuleUpdateRequest: DueDateRuleUpdateRequest, + DueDateRulesResponse: DueDateRulesResponse, ELFSourcemapAttributes: ELFSourcemapAttributes, ELFSourcemapData: ELFSourcemapData, EPSS: EPSS, @@ -11154,6 +11236,15 @@ const typeMap: { [index: string]: any } = { MuteFindingsRequestDataRelationships: MuteFindingsRequestDataRelationships, MuteFindingsResponse: MuteFindingsResponse, MuteFindingsResponseData: MuteFindingsResponseData, + MuteRuleAction: MuteRuleAction, + MuteRuleAttributesCreate: MuteRuleAttributesCreate, + MuteRuleAttributesResponse: MuteRuleAttributesResponse, + MuteRuleCreateRequest: MuteRuleCreateRequest, + MuteRuleDataCreate: MuteRuleDataCreate, + MuteRuleDataResponse: MuteRuleDataResponse, + MuteRuleResponse: MuteRuleResponse, + MuteRuleUpdateRequest: MuteRuleUpdateRequest, + MuteRulesResponse: MuteRulesResponse, NDKSourcemapAttributes: NDKSourcemapAttributes, NDKSourcemapData: NDKSourcemapData, NetworkHealthInsight: NetworkHealthInsight, @@ -12407,6 +12498,11 @@ const typeMap: { [index: string]: any } = { SecureEmbedUpdateResponseAttributes: SecureEmbedUpdateResponseAttributes, SecureEmbedUpdateResponseData: SecureEmbedUpdateResponseData, SecureEmbedViewingPreferences: SecureEmbedViewingPreferences, + SecurityAutomationRuleReorderItem: SecurityAutomationRuleReorderItem, + SecurityAutomationRuleReorderRequest: SecurityAutomationRuleReorderRequest, + SecurityAutomationRulesLinks: SecurityAutomationRulesLinks, + SecurityAutomationRulesMeta: SecurityAutomationRulesMeta, + SecurityAutomationRulesPageInfo: SecurityAutomationRulesPageInfo, SecurityEntityConfigRisks: SecurityEntityConfigRisks, SecurityEntityMetadata: SecurityEntityMetadata, SecurityEntityRiskScore: SecurityEntityRiskScore, @@ -13554,6 +13650,15 @@ const typeMap: { [index: string]: any } = { TestOptimizationUpdateServiceSettingsRequestAttributes, TestOptimizationUpdateServiceSettingsRequestData: TestOptimizationUpdateServiceSettingsRequestData, + TicketCreationRuleAction: TicketCreationRuleAction, + TicketCreationRuleAttributesCreate: TicketCreationRuleAttributesCreate, + TicketCreationRuleAttributesResponse: TicketCreationRuleAttributesResponse, + TicketCreationRuleCreateRequest: TicketCreationRuleCreateRequest, + TicketCreationRuleDataCreate: TicketCreationRuleDataCreate, + TicketCreationRuleDataResponse: TicketCreationRuleDataResponse, + TicketCreationRuleResponse: TicketCreationRuleResponse, + TicketCreationRuleUpdateRequest: TicketCreationRuleUpdateRequest, + TicketCreationRulesResponse: TicketCreationRulesResponse, TimeRestriction: TimeRestriction, TimeRestrictions: TimeRestrictions, TimelineCell: TimelineCell, diff --git a/packages/datadog-api-client-v2/models/SecurityAutomationRuleReorderItem.ts b/packages/datadog-api-client-v2/models/SecurityAutomationRuleReorderItem.ts new file mode 100644 index 000000000000..2fbc6a38c90b --- /dev/null +++ b/packages/datadog-api-client-v2/models/SecurityAutomationRuleReorderItem.ts @@ -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 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A reference to an automation rule used for reordering. + */ +export class SecurityAutomationRuleReorderItem { + /** + * The ID of the automation rule. + */ + "id": string; + /** + * The type of the automation rule. + */ + "type": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return SecurityAutomationRuleReorderItem.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/SecurityAutomationRuleReorderRequest.ts b/packages/datadog-api-client-v2/models/SecurityAutomationRuleReorderRequest.ts new file mode 100644 index 000000000000..e02b05f5d63e --- /dev/null +++ b/packages/datadog-api-client-v2/models/SecurityAutomationRuleReorderRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { SecurityAutomationRuleReorderItem } from "./SecurityAutomationRuleReorderItem"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The body of the reorder request. + */ +export class SecurityAutomationRuleReorderRequest { + /** + * An ordered list of rule references representing the desired rule order. + */ + "data": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return SecurityAutomationRuleReorderRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/SecurityAutomationRulesLinks.ts b/packages/datadog-api-client-v2/models/SecurityAutomationRulesLinks.ts new file mode 100644 index 000000000000..319fe0018da5 --- /dev/null +++ b/packages/datadog-api-client-v2/models/SecurityAutomationRulesLinks.ts @@ -0,0 +1,78 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Pagination links for the list of automation rules. + */ +export class SecurityAutomationRulesLinks { + /** + * Link to the first page of results. + */ + "first": string; + /** + * Link to the last page of results. + */ + "last": string; + /** + * Link to the next page of results. + */ + "next"?: string; + /** + * Link to the previous page of results. + */ + "prev"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + first: { + baseName: "first", + type: "string", + required: true, + }, + last: { + baseName: "last", + type: "string", + required: true, + }, + next: { + baseName: "next", + type: "string", + }, + prev: { + baseName: "prev", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return SecurityAutomationRulesLinks.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/SecurityAutomationRulesMeta.ts b/packages/datadog-api-client-v2/models/SecurityAutomationRulesMeta.ts new file mode 100644 index 000000000000..f5cb371daaf8 --- /dev/null +++ b/packages/datadog-api-client-v2/models/SecurityAutomationRulesMeta.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { SecurityAutomationRulesPageInfo } from "./SecurityAutomationRulesPageInfo"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Metadata for the list of automation rules. + */ +export class SecurityAutomationRulesMeta { + /** + * Pagination information for the list of automation rules. + */ + "page": SecurityAutomationRulesPageInfo; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + page: { + baseName: "page", + type: "SecurityAutomationRulesPageInfo", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return SecurityAutomationRulesMeta.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/SecurityAutomationRulesPageInfo.ts b/packages/datadog-api-client-v2/models/SecurityAutomationRulesPageInfo.ts new file mode 100644 index 000000000000..504c0579a7d7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/SecurityAutomationRulesPageInfo.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Pagination information for the list of automation rules. + */ +export class SecurityAutomationRulesPageInfo { + /** + * The total number of rules matching the current filter. + */ + "totalFilteredCount": number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + totalFilteredCount: { + baseName: "total_filtered_count", + type: "number", + required: true, + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return SecurityAutomationRulesPageInfo.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/SecurityFindingType.ts b/packages/datadog-api-client-v2/models/SecurityFindingType.ts new file mode 100644 index 000000000000..1a71a0bb4e43 --- /dev/null +++ b/packages/datadog-api-client-v2/models/SecurityFindingType.ts @@ -0,0 +1,37 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The type of security finding that the automation rule applies to. + */ + +export type SecurityFindingType = + | typeof API_SECURITY + | typeof ATTACK_PATH + | typeof HOST_AND_CONTAINER_VULNERABILITY + | typeof IAC_MISCONFIGURATION + | typeof IDENTITY_RISK + | typeof LIBRARY_VULNERABILITY + | typeof MISCONFIGURATION + | typeof RUNTIME_CODE_VULNERABILITY + | typeof SECRET + | typeof STATIC_CODE_VULNERABILITY + | typeof WORKLOAD_ACTIVITY + | UnparsedObject; +export const API_SECURITY = "api_security"; +export const ATTACK_PATH = "attack_path"; +export const HOST_AND_CONTAINER_VULNERABILITY = + "host_and_container_vulnerability"; +export const IAC_MISCONFIGURATION = "iac_misconfiguration"; +export const IDENTITY_RISK = "identity_risk"; +export const LIBRARY_VULNERABILITY = "library_vulnerability"; +export const MISCONFIGURATION = "misconfiguration"; +export const RUNTIME_CODE_VULNERABILITY = "runtime_code_vulnerability"; +export const SECRET = "secret"; +export const STATIC_CODE_VULNERABILITY = "static_code_vulnerability"; +export const WORKLOAD_ACTIVITY = "workload_activity"; diff --git a/packages/datadog-api-client-v2/models/TicketCreationRuleAction.ts b/packages/datadog-api-client-v2/models/TicketCreationRuleAction.ts new file mode 100644 index 000000000000..eeba14ebc1fe --- /dev/null +++ b/packages/datadog-api-client-v2/models/TicketCreationRuleAction.ts @@ -0,0 +1,99 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TicketCreationTarget } from "./TicketCreationTarget"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The action to take when the ticket creation rule matches a finding. + */ +export class TicketCreationRuleAction { + /** + * The UUID of the default assignee for created tickets. + */ + "assigneeId"?: string; + /** + * The reason the rule was automatically disabled by the system due to a ticketing integration error. + */ + "autoDisabledReason"?: string; + /** + * Custom fields of the Jira issue to create. For the list of available fields, see [Jira documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-createmeta-projectidorkey-issuetypes-issuetypeid-get). + */ + "fields"?: any; + /** + * The maximum number of tickets the rule may create per day. If exceeded, one final ticket will be created, explaining the limit was hit and link back to the responsible rule. + */ + "maxTicketsPerDay": number; + /** + * The UUID of the case management project. + */ + "projectId": string; + /** + * The ticketing system to create tickets in. + */ + "target": TicketCreationTarget; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + assigneeId: { + baseName: "assignee_id", + type: "string", + format: "uuid", + }, + autoDisabledReason: { + baseName: "auto_disabled_reason", + type: "string", + }, + fields: { + baseName: "fields", + type: "any", + }, + maxTicketsPerDay: { + baseName: "max_tickets_per_day", + type: "number", + required: true, + format: "int64", + }, + projectId: { + baseName: "project_id", + type: "string", + required: true, + format: "uuid", + }, + target: { + baseName: "target", + type: "TicketCreationTarget", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TicketCreationRuleAction.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TicketCreationRuleAttributesCreate.ts b/packages/datadog-api-client-v2/models/TicketCreationRuleAttributesCreate.ts new file mode 100644 index 000000000000..47cf40b5f332 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TicketCreationRuleAttributesCreate.ts @@ -0,0 +1,82 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AutomationRuleScope } from "./AutomationRuleScope"; +import { TicketCreationRuleAction } from "./TicketCreationRuleAction"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating or updating a ticket creation rule. + */ +export class TicketCreationRuleAttributesCreate { + /** + * The action to take when the ticket creation rule matches a finding. + */ + "action": TicketCreationRuleAction; + /** + * Whether the ticket creation rule is enabled. + */ + "enabled": boolean; + /** + * The name of the ticket creation rule. + */ + "name": string; + /** + * Defines the scope of findings to which the automation rule applies. + */ + "rule": AutomationRuleScope; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + action: { + baseName: "action", + type: "TicketCreationRuleAction", + required: true, + }, + enabled: { + baseName: "enabled", + type: "boolean", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + rule: { + baseName: "rule", + type: "AutomationRuleScope", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TicketCreationRuleAttributesCreate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TicketCreationRuleAttributesResponse.ts b/packages/datadog-api-client-v2/models/TicketCreationRuleAttributesResponse.ts new file mode 100644 index 000000000000..e4d53bdacbd1 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TicketCreationRuleAttributesResponse.ts @@ -0,0 +1,121 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AutomationRuleCreator } from "./AutomationRuleCreator"; +import { AutomationRuleScope } from "./AutomationRuleScope"; +import { TicketCreationRuleAction } from "./TicketCreationRuleAction"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a ticket creation rule returned by the API. + */ +export class TicketCreationRuleAttributesResponse { + /** + * The action to take when the ticket creation rule matches a finding. + */ + "action": TicketCreationRuleAction; + /** + * The Unix timestamp in milliseconds when the rule was created. + */ + "createdAt": number; + /** + * The user who created or last modified the rule. + */ + "createdBy": AutomationRuleCreator; + /** + * Whether the ticket creation rule is enabled. + */ + "enabled": boolean; + /** + * The Unix timestamp in milliseconds when the rule was last modified. + */ + "modifiedAt": number; + /** + * The user who created or last modified the rule. + */ + "modifiedBy": AutomationRuleCreator; + /** + * The name of the ticket creation rule. + */ + "name": string; + /** + * Defines the scope of findings to which the automation rule applies. + */ + "rule": AutomationRuleScope; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + action: { + baseName: "action", + type: "TicketCreationRuleAction", + required: true, + }, + createdAt: { + baseName: "created_at", + type: "number", + required: true, + format: "int64", + }, + createdBy: { + baseName: "created_by", + type: "AutomationRuleCreator", + required: true, + }, + enabled: { + baseName: "enabled", + type: "boolean", + required: true, + }, + modifiedAt: { + baseName: "modified_at", + type: "number", + required: true, + format: "int64", + }, + modifiedBy: { + baseName: "modified_by", + type: "AutomationRuleCreator", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + rule: { + baseName: "rule", + type: "AutomationRuleScope", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TicketCreationRuleAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TicketCreationRuleCreateRequest.ts b/packages/datadog-api-client-v2/models/TicketCreationRuleCreateRequest.ts new file mode 100644 index 000000000000..6ac5db8fee30 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TicketCreationRuleCreateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TicketCreationRuleDataCreate } from "./TicketCreationRuleDataCreate"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The body of a ticket creation rule create request. + */ +export class TicketCreationRuleCreateRequest { + /** + * The data object for a ticket creation rule create or update request. + */ + "data": TicketCreationRuleDataCreate; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "TicketCreationRuleDataCreate", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TicketCreationRuleCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TicketCreationRuleDataCreate.ts b/packages/datadog-api-client-v2/models/TicketCreationRuleDataCreate.ts new file mode 100644 index 000000000000..2f5a14f42f5b --- /dev/null +++ b/packages/datadog-api-client-v2/models/TicketCreationRuleDataCreate.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TicketCreationRuleAttributesCreate } from "./TicketCreationRuleAttributesCreate"; +import { TicketCreationRuleType } from "./TicketCreationRuleType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The data object for a ticket creation rule create or update request. + */ +export class TicketCreationRuleDataCreate { + /** + * Attributes for creating or updating a ticket creation rule. + */ + "attributes": TicketCreationRuleAttributesCreate; + /** + * The JSON:API type for ticket creation rules. + */ + "type": TicketCreationRuleType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "TicketCreationRuleAttributesCreate", + required: true, + }, + type: { + baseName: "type", + type: "TicketCreationRuleType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TicketCreationRuleDataCreate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TicketCreationRuleDataResponse.ts b/packages/datadog-api-client-v2/models/TicketCreationRuleDataResponse.ts new file mode 100644 index 000000000000..e7a9e1dea404 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TicketCreationRuleDataResponse.ts @@ -0,0 +1,74 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TicketCreationRuleAttributesResponse } from "./TicketCreationRuleAttributesResponse"; +import { TicketCreationRuleType } from "./TicketCreationRuleType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The data object for a ticket creation rule returned by the API. + */ +export class TicketCreationRuleDataResponse { + /** + * Attributes of a ticket creation rule returned by the API. + */ + "attributes": TicketCreationRuleAttributesResponse; + /** + * The ID of the ticket creation rule. + */ + "id": string; + /** + * The JSON:API type for ticket creation rules. + */ + "type": TicketCreationRuleType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "TicketCreationRuleAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "TicketCreationRuleType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TicketCreationRuleDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TicketCreationRuleResponse.ts b/packages/datadog-api-client-v2/models/TicketCreationRuleResponse.ts new file mode 100644 index 000000000000..d569856ff05b --- /dev/null +++ b/packages/datadog-api-client-v2/models/TicketCreationRuleResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TicketCreationRuleDataResponse } from "./TicketCreationRuleDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A single ticket creation rule response. + */ +export class TicketCreationRuleResponse { + /** + * The data object for a ticket creation rule returned by the API. + */ + "data": TicketCreationRuleDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "TicketCreationRuleDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TicketCreationRuleResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TicketCreationRuleType.ts b/packages/datadog-api-client-v2/models/TicketCreationRuleType.ts new file mode 100644 index 000000000000..59da2c332a2e --- /dev/null +++ b/packages/datadog-api-client-v2/models/TicketCreationRuleType.ts @@ -0,0 +1,16 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The JSON:API type for ticket creation rules. + */ + +export type TicketCreationRuleType = + | typeof TICKET_CREATION_RULES + | UnparsedObject; +export const TICKET_CREATION_RULES = "ticket_creation_rules"; diff --git a/packages/datadog-api-client-v2/models/TicketCreationRuleUpdateRequest.ts b/packages/datadog-api-client-v2/models/TicketCreationRuleUpdateRequest.ts new file mode 100644 index 000000000000..c17ef6e2ac5b --- /dev/null +++ b/packages/datadog-api-client-v2/models/TicketCreationRuleUpdateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TicketCreationRuleDataCreate } from "./TicketCreationRuleDataCreate"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The body of a ticket creation rule update request. + */ +export class TicketCreationRuleUpdateRequest { + /** + * The data object for a ticket creation rule create or update request. + */ + "data": TicketCreationRuleDataCreate; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "TicketCreationRuleDataCreate", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TicketCreationRuleUpdateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TicketCreationRulesResponse.ts b/packages/datadog-api-client-v2/models/TicketCreationRulesResponse.ts new file mode 100644 index 000000000000..352552383545 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TicketCreationRulesResponse.ts @@ -0,0 +1,74 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { SecurityAutomationRulesLinks } from "./SecurityAutomationRulesLinks"; +import { SecurityAutomationRulesMeta } from "./SecurityAutomationRulesMeta"; +import { TicketCreationRuleDataResponse } from "./TicketCreationRuleDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A list of ticket creation rules with pagination metadata. + */ +export class TicketCreationRulesResponse { + /** + * A list of ticket creation rule data objects. + */ + "data": Array; + /** + * Pagination links for the list of automation rules. + */ + "links": SecurityAutomationRulesLinks; + /** + * Metadata for the list of automation rules. + */ + "meta": SecurityAutomationRulesMeta; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + links: { + baseName: "links", + type: "SecurityAutomationRulesLinks", + required: true, + }, + meta: { + baseName: "meta", + type: "SecurityAutomationRulesMeta", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TicketCreationRulesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TicketCreationTarget.ts b/packages/datadog-api-client-v2/models/TicketCreationTarget.ts new file mode 100644 index 000000000000..3056df241f2f --- /dev/null +++ b/packages/datadog-api-client-v2/models/TicketCreationTarget.ts @@ -0,0 +1,18 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The ticketing system to create tickets in. + */ + +export type TicketCreationTarget = + | typeof JIRA + | typeof CASE_MANAGEMENT + | UnparsedObject; +export const JIRA = "jira"; +export const CASE_MANAGEMENT = "case_management";