datadog_api_client 2.29.1 → 2.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/schemas/v1/openapi.yaml +929 -486
- data/.generator/schemas/v2/openapi.yaml +7791 -786
- data/.github/CODEOWNERS +5 -5
- data/.github/workflows/docs.yml +2 -2
- data/.github/workflows/prepare_release.yml +1 -1
- data/.github/workflows/test.yml +4 -1
- data/CHANGELOG.md +79 -0
- data/Gemfile +1 -1
- data/LICENSE-3rdparty.csv +1 -1
- data/RELEASING.md +1 -1
- data/examples/v1/azure-integration/UpdateAzureHostFilters.rb +9 -6
- data/examples/v1/azure-integration/UpdateAzureIntegration.rb +0 -6
- data/examples/v1/dashboards/CreateDashboard_1490099434.rb +65 -0
- data/examples/v1/dashboards/CreateDashboard_3520534424.rb +61 -0
- data/examples/v1/logs-indexes/DeleteLogsIndex.rb +5 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline.rb +1 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_2707101123.rb +23 -0
- data/examples/v1/logs-pipelines/UpdateLogsPipeline.rb +1 -0
- data/examples/v1/monitors/CreateMonitor_1303514967.rb +32 -0
- data/examples/v1/monitors/ListMonitors.rb +1 -1
- data/examples/v1/monitors/{ListMonitors_3448441939.rb → ListMonitors_2154432960.rb} +1 -1
- data/examples/v1/monitors/{ListMonitors_2966492814.rb → ListMonitors_463213563.rb} +1 -1
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +1 -0
- data/examples/v2/action-connection/CreateActionConnection.rb +22 -0
- data/examples/v2/action-connection/DeleteActionConnection.rb +5 -0
- data/examples/v2/action-connection/DeleteActionConnection_2142905164.rb +8 -0
- data/examples/v2/action-connection/GetActionConnection.rb +5 -0
- data/examples/v2/action-connection/UpdateActionConnection.rb +22 -0
- data/examples/v2/agentless-scanning/CreateAwsOnDemandTask.rb +14 -0
- data/examples/v2/agentless-scanning/CreateAwsScanOptions.rb +18 -0
- data/examples/v2/agentless-scanning/DeleteAwsScanOptions.rb +5 -0
- data/examples/v2/agentless-scanning/GetAwsOnDemandTask.rb +5 -0
- data/examples/v2/agentless-scanning/ListAwsOnDemandTasks.rb +5 -0
- data/examples/v2/agentless-scanning/ListAwsScanOptions.rb +5 -0
- data/examples/v2/agentless-scanning/UpdateAwsScanOptions.rb +17 -0
- data/examples/v2/app-builder/CreateApp.rb +157 -0
- data/examples/v2/{apps → app-builder}/DeleteApp.rb +1 -4
- data/examples/v2/{apps → app-builder}/DeleteApps.rb +2 -5
- data/examples/v2/{apps → app-builder}/GetApp.rb +1 -4
- data/examples/v2/app-builder/ListApps.rb +5 -0
- data/examples/v2/app-builder/PublishApp.rb +8 -0
- data/examples/v2/app-builder/UnpublishApp.rb +8 -0
- data/examples/v2/{apps → app-builder}/UpdateApp.rb +2 -5
- data/examples/v2/application-security/CreateApplicationSecurityWafCustomRule.rb +55 -0
- data/examples/v2/application-security/CreateApplicationSecurityWafExclusionFilter.rb +33 -0
- data/examples/v2/application-security/DeleteApplicationSecurityWafCustomRule.rb +5 -0
- data/examples/v2/application-security/DeleteApplicationSecurityWafExclusionFilter.rb +8 -0
- data/examples/v2/application-security/GetApplicationSecurityWafCustomRule.rb +5 -0
- data/examples/v2/application-security/GetApplicationSecurityWafExclusionFilter.rb +8 -0
- data/examples/v2/application-security/ListApplicationSecurityWAFCustomRules.rb +5 -0
- data/examples/v2/application-security/ListApplicationSecurityWafExclusionFilters.rb +5 -0
- data/examples/v2/application-security/UpdateApplicationSecurityWafCustomRule.rb +46 -0
- data/examples/v2/application-security/UpdateApplicationSecurityWafExclusionFilter.rb +22 -0
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_819339921.rb +29 -0
- data/examples/v2/csm-coverage-analysis/GetCSMCloudAccountsCoverageAnalysis.rb +5 -0
- data/examples/v2/csm-coverage-analysis/GetCSMHostsAndContainersCoverageAnalysis.rb +5 -0
- data/examples/v2/csm-coverage-analysis/GetCSMServerlessCoverageAnalysis.rb +5 -0
- data/examples/v2/data-deletion/CreateDataDeletionRequest.rb +1 -0
- data/examples/v2/events/CreateEvent.rb +1 -1
- data/examples/v2/logs/ListLogs.rb +12 -6
- data/examples/v2/logs/ListLogsGet.rb +1 -1
- data/examples/v2/logs/ListLogsGet_175182691.rb +5 -0
- data/examples/v2/logs/ListLogs_3400928236.rb +23 -0
- data/examples/v2/logs/ListLogs_534975433.rb +29 -0
- data/examples/v2/microsoft-teams-integration/CreateWorkflowsWebhookHandle.rb +15 -0
- data/examples/v2/microsoft-teams-integration/CreateWorkflowsWebhookHandle_1716851881.rb +15 -0
- data/examples/v2/microsoft-teams-integration/DeleteWorkflowsWebhookHandle.rb +5 -0
- data/examples/v2/microsoft-teams-integration/DeleteWorkflowsWebhookHandle_107549514.rb +8 -0
- data/examples/v2/microsoft-teams-integration/GetWorkflowsWebhookHandle.rb +5 -0
- data/examples/v2/microsoft-teams-integration/GetWorkflowsWebhookHandle_3421443805.rb +8 -0
- data/examples/v2/microsoft-teams-integration/ListWorkflowsWebhookHandles.rb +5 -0
- data/examples/v2/microsoft-teams-integration/ListWorkflowsWebhookHandles_620762083.rb +5 -0
- data/examples/v2/microsoft-teams-integration/UpdateWorkflowsWebhookHandle.rb +15 -0
- data/examples/v2/microsoft-teams-integration/UpdateWorkflowsWebhookHandle_163189594.rb +18 -0
- data/examples/v2/rum-retention-filters/CreateRetentionFilter.rb +21 -0
- data/examples/v2/rum-retention-filters/DeleteRetentionFilter.rb +5 -0
- data/examples/v2/rum-retention-filters/GetRetentionFilter.rb +5 -0
- data/examples/v2/rum-retention-filters/ListRetentionFilters.rb +5 -0
- data/examples/v2/rum-retention-filters/OrderRetentionFilters.rb +22 -0
- data/examples/v2/rum-retention-filters/UpdateRetentionFilter.rb +19 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1965169892.rb +50 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.rb +1 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.rb +1 -0
- data/examples/v2/security-monitoring/CreateSignalNotificationRule.rb +30 -0
- data/examples/v2/security-monitoring/CreateVulnerabilityNotificationRule.rb +30 -0
- data/examples/v2/security-monitoring/DeleteSignalNotificationRule.rb +8 -0
- data/examples/v2/security-monitoring/DeleteVulnerabilityNotificationRule.rb +8 -0
- data/examples/v2/security-monitoring/GetRuleVersionHistory.rb +8 -0
- data/examples/v2/security-monitoring/GetRuleVersionHistory_2467565841.rb +11 -0
- data/examples/v2/security-monitoring/GetSBOM.rb +8 -0
- data/examples/v2/security-monitoring/GetSignalNotificationRule.rb +8 -0
- data/examples/v2/security-monitoring/GetSignalNotificationRules.rb +5 -0
- data/examples/v2/security-monitoring/GetVulnerabilityNotificationRule.rb +8 -0
- data/examples/v2/security-monitoring/GetVulnerabilityNotificationRules.rb +5 -0
- data/examples/v2/security-monitoring/ListVulnerabilities.rb +13 -0
- data/examples/v2/security-monitoring/ListVulnerableAssets.rb +13 -0
- data/examples/v2/security-monitoring/PatchSignalNotificationRule.rb +35 -0
- data/examples/v2/security-monitoring/PatchVulnerabilityNotificationRule.rb +35 -0
- data/examples/v2/security-monitoring/RunHistoricalJob.rb +2 -2
- data/examples/v2/software-catalog/UpsertCatalogEntity.rb +5 -1
- data/examples/v2/usage-metering/GetActiveBillingDimensions.rb +0 -3
- data/examples/v2/usage-metering/GetBillingDimensionMapping.rb +0 -3
- data/examples/v2/usage-metering/GetMonthlyCostAttribution.rb +0 -3
- data/examples/v2/workflow-automation/CreateWorkflow.rb +95 -0
- data/examples/v2/workflow-automation/DeleteWorkflow.rb +8 -0
- data/examples/v2/workflow-automation/GetWorkflow.rb +8 -0
- data/examples/v2/workflow-automation/UpdateWorkflow.rb +99 -0
- data/lib/datadog_api_client/configuration.rb +4 -11
- data/lib/datadog_api_client/inflector.rb +332 -44
- data/lib/datadog_api_client/v1/api/logs_indexes_api.rb +66 -0
- data/lib/datadog_api_client/v1/api/monitors_api.rb +29 -5
- data/lib/datadog_api_client/v1/models/azure_account.rb +42 -13
- data/lib/datadog_api_client/v1/models/check_can_delete_monitor_response_data.rb +1 -1
- data/lib/datadog_api_client/v1/models/check_can_delete_slo_response_data.rb +1 -1
- data/lib/datadog_api_client/v1/models/dashboard.rb +0 -2
- data/lib/datadog_api_client/v1/models/dashboard_share_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/logs_pipeline.rb +23 -1
- data/lib/datadog_api_client/v1/models/logs_processor.rb +2 -1
- data/lib/datadog_api_client/v1/models/logs_span_remapper.rb +160 -0
- data/lib/datadog_api_client/v1/models/logs_span_remapper_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/monitor_formula_and_function_cost_aggregator.rb +34 -0
- data/lib/datadog_api_client/v1/models/monitor_formula_and_function_cost_data_source.rb +28 -0
- data/lib/datadog_api_client/v1/models/monitor_formula_and_function_cost_query_definition.rb +175 -0
- data/lib/datadog_api_client/v1/models/monitor_formula_and_function_query_definition.rb +2 -1
- data/lib/datadog_api_client/v1/models/monitor_options_scheduling_options_evaluation_window.rb +14 -4
- data/lib/datadog_api_client/v1/models/monitor_search_result.rb +13 -1
- data/lib/datadog_api_client/v1/models/monitor_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/monitor_update_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/number_format_unit.rb +63 -0
- data/lib/datadog_api_client/v1/models/{azure_account_metrics_config.rb → number_format_unit_canonical.rb} +31 -16
- data/lib/datadog_api_client/v1/models/number_format_unit_custom.rb +137 -0
- data/lib/datadog_api_client/v1/models/number_format_unit_custom_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/number_format_unit_scale.rb +115 -0
- data/lib/datadog_api_client/v1/models/number_format_unit_scale_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/resource_provider_config.rb +115 -0
- data/lib/datadog_api_client/v1/models/shared_dashboard.rb +85 -9
- data/lib/datadog_api_client/v1/models/shared_dashboard_invitees_items.rb +151 -0
- data/lib/datadog_api_client/v1/models/shared_dashboard_status.rb +27 -0
- data/lib/datadog_api_client/v1/models/shared_dashboard_update_request.rb +68 -3
- data/lib/datadog_api_client/v1/models/slo_correction_list_response.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_api_test_step.rb +11 -1
- data/lib/datadog_api_client/v1/models/synthetics_browser_variable_type.rb +0 -1
- data/lib/datadog_api_client/v1/models/synthetics_ci_test_body.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_element_user_locator.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_step.rb +11 -1
- data/lib/datadog_api_client/v1/models/synthetics_trigger_body.rb +1 -1
- data/lib/datadog_api_client/v1/models/table_widget_cell_display_mode.rb +1 -0
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +184 -4
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +183 -3
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +186 -6
- data/lib/datadog_api_client/v1/models/viewing_preferences.rb +115 -0
- data/lib/datadog_api_client/v1/models/viewing_preferences_theme.rb +28 -0
- data/lib/datadog_api_client/v1/models/widget_formula.rb +21 -1
- data/lib/datadog_api_client/v1/models/widget_formula_cell_display_mode_options.rb +115 -0
- data/lib/datadog_api_client/v1/models/widget_formula_cell_display_mode_options_trend_type.rb +28 -0
- data/lib/datadog_api_client/v1/models/widget_formula_cell_display_mode_options_y_scale.rb +27 -0
- data/lib/datadog_api_client/v1/models/widget_number_format.rb +123 -0
- data/lib/datadog_api_client/v2/api/action_connection_api.rb +295 -0
- data/lib/datadog_api_client/v2/api/agentless_scanning_api.rb +482 -0
- data/lib/datadog_api_client/v2/api/api_management_api.rb +15 -0
- data/lib/datadog_api_client/v2/api/{apps_api.rb → app_builder_api.rb} +172 -74
- data/lib/datadog_api_client/v2/api/application_security_api.rb +689 -0
- data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/confluent_cloud_api.rb +8 -8
- data/lib/datadog_api_client/v2/api/csm_coverage_analysis_api.rb +212 -0
- data/lib/datadog_api_client/v2/api/logs_api.rb +8 -8
- data/lib/datadog_api_client/v2/api/metrics_api.rb +4 -2
- data/lib/datadog_api_client/v2/api/microsoft_teams_integration_api.rb +331 -0
- data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +13 -3
- data/lib/datadog_api_client/v2/api/rum_retention_filters_api.rb +455 -0
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +1516 -301
- data/lib/datadog_api_client/v2/api/software_catalog_api.rb +1 -2
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -19
- data/lib/datadog_api_client/v2/api/workflow_automation_api.rb +269 -0
- data/lib/datadog_api_client/v2/models/account_filtering_config.rb +129 -0
- data/lib/datadog_api_client/v2/models/action_connection_attributes.rb +144 -0
- data/lib/datadog_api_client/v2/models/action_connection_attributes_update.rb +115 -0
- data/lib/datadog_api_client/v2/models/action_connection_data.rb +154 -0
- data/lib/datadog_api_client/v2/models/{create_app_response_data_type.rb → action_connection_data_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/action_connection_data_update.rb +144 -0
- data/lib/datadog_api_client/v2/models/action_connection_integration.rb +63 -0
- data/lib/datadog_api_client/v2/models/action_connection_integration_update.rb +63 -0
- data/lib/datadog_api_client/v2/models/action_query.rb +198 -0
- data/lib/datadog_api_client/v2/models/action_query_condition.rb +63 -0
- data/lib/datadog_api_client/v2/models/action_query_debounce_in_ms.rb +63 -0
- data/lib/datadog_api_client/v2/models/action_query_mocked_outputs.rb +63 -0
- data/lib/datadog_api_client/v2/models/action_query_mocked_outputs_enabled.rb +63 -0
- data/lib/datadog_api_client/v2/models/{deployment_included_meta.rb → action_query_mocked_outputs_object.rb} +33 -35
- data/lib/datadog_api_client/v2/models/action_query_only_trigger_manually.rb +63 -0
- data/lib/datadog_api_client/v2/models/action_query_polling_interval_in_ms.rb +63 -0
- data/lib/datadog_api_client/v2/models/action_query_properties.rb +203 -0
- data/lib/datadog_api_client/v2/models/action_query_requires_confirmation.rb +63 -0
- data/lib/datadog_api_client/v2/models/action_query_show_toast_on_error.rb +63 -0
- data/lib/datadog_api_client/v2/models/action_query_spec.rb +63 -0
- data/lib/datadog_api_client/v2/models/action_query_spec_connection_group.rb +117 -0
- data/lib/datadog_api_client/v2/models/action_query_spec_inputs.rb +63 -0
- data/lib/datadog_api_client/v2/models/action_query_spec_object.rb +153 -0
- data/lib/datadog_api_client/v2/models/{script_data_type.rb → action_query_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/advisory.rb +154 -0
- data/lib/datadog_api_client/v2/models/annotation.rb +165 -0
- data/lib/datadog_api_client/v2/models/{app_builder_error.rb → annotation_display.rb} +11 -13
- data/lib/datadog_api_client/v2/models/annotation_display_bounds.rb +135 -0
- data/lib/datadog_api_client/v2/models/annotation_markdown_text_annotation.rb +105 -0
- data/lib/datadog_api_client/v2/models/api_trigger.rb +105 -0
- data/lib/datadog_api_client/v2/models/api_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/app_builder_event.rb +1 -1
- data/lib/datadog_api_client/v2/models/{get_app_response_data_type.rb → app_definition_type.rb} +2 -2
- data/lib/datadog_api_client/v2/models/{deployment_included_type.rb → app_deployment_type.rb} +2 -2
- data/lib/datadog_api_client/v2/models/app_meta.rb +15 -25
- data/lib/datadog_api_client/v2/models/{get_app_response_relationship.rb → app_relationship.rb} +5 -5
- data/lib/datadog_api_client/v2/models/app_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_action.rb +115 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_action_action.rb +27 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_action_parameters.rb +115 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_attributes.rb +253 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_condition.rb +144 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_condition_input.rb +135 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_condition_input_address.rb +46 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_condition_operator.rb +36 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_condition_options.rb +115 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_condition_parameters.rb +178 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_create_attributes.rb +243 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_create_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_list_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_metadata.rb +155 -0
- data/lib/datadog_api_client/v2/models/{input_schema_data_attributes_parameters_items.rb → application_security_waf_custom_rule_response.rb} +5 -5
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_scope.rb +144 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_tags.rb +145 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_tags_category.rb +28 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_update_attributes.rb +243 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_update_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_update_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_exclusion_filter_attributes.rb +213 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_exclusion_filter_create_attributes.rb +212 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_exclusion_filter_create_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_exclusion_filter_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_exclusion_filter_metadata.rb +155 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_exclusion_filter_on_match.rb +26 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_exclusion_filter_resource.rb +125 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_exclusion_filter_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_exclusion_filter_rules_target.rb +115 -0
- data/lib/datadog_api_client/v2/models/{app_builder_error_errors_items.rb → application_security_waf_exclusion_filter_rules_target_tags.rb} +18 -18
- data/lib/datadog_api_client/v2/models/application_security_waf_exclusion_filter_scope.rb +115 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_exclusion_filter_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_exclusion_filter_update_attributes.rb +212 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_exclusion_filter_update_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_exclusion_filter_update_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/application_security_waf_exclusion_filters_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/asset.rb +165 -0
- data/lib/datadog_api_client/v2/models/asset_attributes.rb +218 -0
- data/lib/datadog_api_client/v2/models/{input_schema_data_type.rb → asset_entity_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/asset_operating_system.rb +133 -0
- data/lib/datadog_api_client/v2/models/asset_risks.rb +163 -0
- data/lib/datadog_api_client/v2/models/asset_type.rb +30 -0
- data/lib/datadog_api_client/v2/models/asset_version.rb +115 -0
- data/lib/datadog_api_client/v2/models/aws_assume_role.rb +191 -0
- data/lib/datadog_api_client/v2/models/{deploy_app_response_data_type.rb → aws_assume_role_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/aws_assume_role_update.rb +166 -0
- data/lib/datadog_api_client/v2/models/aws_credentials.rb +62 -0
- data/lib/datadog_api_client/v2/models/aws_credentials_update.rb +62 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_attributes.rb +12 -20
- data/lib/datadog_api_client/v2/models/aws_cur_config_post_request_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/aws_integration.rb +144 -0
- data/lib/datadog_api_client/v2/models/aws_integration_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_integration_update.rb +133 -0
- data/lib/datadog_api_client/v2/models/{deployment_meta.rb → aws_on_demand_attributes.rb} +32 -29
- data/lib/datadog_api_client/v2/models/aws_on_demand_create_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/aws_on_demand_create_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/aws_on_demand_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/{input_schema_data.rb → aws_on_demand_data.rb} +8 -8
- data/lib/datadog_api_client/v2/models/aws_on_demand_list_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/{deploy_app_response.rb → aws_on_demand_response.rb} +5 -5
- data/lib/datadog_api_client/v2/models/aws_on_demand_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_scan_options_attributes.rb +135 -0
- data/lib/datadog_api_client/v2/models/aws_scan_options_create_attributes.rb +186 -0
- data/lib/datadog_api_client/v2/models/aws_scan_options_create_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/aws_scan_options_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/{deployment_included.rb → aws_scan_options_data.rb} +9 -19
- data/lib/datadog_api_client/v2/models/aws_scan_options_list_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/aws_scan_options_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/{delete_apps_request_data_items_type.rb → aws_scan_options_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/aws_scan_options_update_attributes.rb +135 -0
- data/lib/datadog_api_client/v2/models/aws_scan_options_update_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/aws_scan_options_update_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/case_trigger.rb +105 -0
- data/lib/datadog_api_client/v2/models/case_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource.rb +1 -1
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource_type.rb +1 -0
- data/lib/datadog_api_client/v2/models/change_event_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/code_location.rb +143 -0
- data/lib/datadog_api_client/v2/models/completion_condition.rb +154 -0
- data/lib/datadog_api_client/v2/models/completion_condition_operator.rb +37 -0
- data/lib/datadog_api_client/v2/models/completion_gate.rb +144 -0
- data/lib/datadog_api_client/v2/models/component.rb +6 -6
- data/lib/datadog_api_client/v2/models/component_grid.rb +6 -6
- data/lib/datadog_api_client/v2/models/component_grid_properties.rb +4 -4
- data/lib/datadog_api_client/v2/models/component_grid_properties_is_visible.rb +1 -1
- data/lib/datadog_api_client/v2/models/component_grid_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/component_properties.rb +3 -3
- data/lib/datadog_api_client/v2/models/component_properties_is_visible.rb +1 -1
- data/lib/datadog_api_client/v2/models/component_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/connection.rb +144 -0
- data/lib/datadog_api_client/v2/models/{update_app_response_relationship.rb → connection_env.rb} +43 -13
- data/lib/datadog_api_client/v2/models/connection_env_env.rb +26 -0
- data/lib/datadog_api_client/v2/models/connection_group.rb +167 -0
- data/lib/datadog_api_client/v2/models/create_action_connection_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/create_action_connection_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/create_app_request.rb +2 -2
- data/lib/datadog_api_client/v2/models/create_app_request_data.rb +4 -4
- data/lib/datadog_api_client/v2/models/create_app_request_data_attributes.rb +19 -41
- data/lib/datadog_api_client/v2/models/create_app_response.rb +2 -2
- data/lib/datadog_api_client/v2/models/create_app_response_data.rb +5 -5
- data/lib/datadog_api_client/v2/models/create_data_deletion_request_body_data.rb +24 -3
- data/lib/datadog_api_client/v2/models/create_data_deletion_request_body_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/create_notification_rule_parameters.rb +105 -0
- data/lib/datadog_api_client/v2/models/create_notification_rule_parameters_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/create_notification_rule_parameters_data_attributes.rb +195 -0
- data/lib/datadog_api_client/v2/models/create_workflow_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/create_workflow_response.rb +123 -0
- data/lib/datadog_api_client/v2/models/csm_cloud_accounts_coverage_analysis_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/csm_cloud_accounts_coverage_analysis_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/csm_cloud_accounts_coverage_analysis_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/csm_coverage_analysis.rb +135 -0
- data/lib/datadog_api_client/v2/models/csm_hosts_and_containers_coverage_analysis_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/csm_hosts_and_containers_coverage_analysis_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/csm_hosts_and_containers_coverage_analysis_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/csm_serverless_coverage_analysis_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/csm_serverless_coverage_analysis_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/csm_serverless_coverage_analysis_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/custom_connection.rb +5 -5
- data/lib/datadog_api_client/v2/models/custom_connection_attributes.rb +3 -3
- data/lib/datadog_api_client/v2/models/custom_connection_attributes_on_prem_runner.rb +3 -3
- data/lib/datadog_api_client/v2/models/custom_connection_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/cvss.rb +165 -0
- data/lib/datadog_api_client/v2/models/dashboard_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/data_transform.rb +186 -0
- data/lib/datadog_api_client/v2/models/data_transform_properties.rb +105 -0
- data/lib/datadog_api_client/v2/models/{query_type.rb → data_transform_type.rb} +2 -4
- data/lib/datadog_api_client/v2/models/delete_app_response.rb +1 -1
- data/lib/datadog_api_client/v2/models/delete_app_response_data.rb +4 -4
- data/lib/datadog_api_client/v2/models/delete_apps_request.rb +2 -2
- data/lib/datadog_api_client/v2/models/delete_apps_request_data_items.rb +5 -5
- data/lib/datadog_api_client/v2/models/delete_apps_response.rb +2 -2
- data/lib/datadog_api_client/v2/models/delete_apps_response_data_items.rb +5 -5
- data/lib/datadog_api_client/v2/models/dependency_location.rb +207 -0
- data/lib/datadog_api_client/v2/models/{deploy_app_response_data.rb → deployment.rb} +11 -11
- data/lib/datadog_api_client/v2/models/{deploy_app_response_data_attributes.rb → deployment_attributes.rb} +5 -5
- data/lib/datadog_api_client/v2/models/{deployment_relationship_meta.rb → deployment_metadata.rb} +9 -9
- data/lib/datadog_api_client/v2/models/deployment_relationship.rb +4 -4
- data/lib/datadog_api_client/v2/models/deployment_relationship_data.rb +5 -5
- data/lib/datadog_api_client/v2/models/entity_v3.rb +2 -1
- data/lib/datadog_api_client/v2/models/entity_v3_api.rb +180 -0
- data/lib/datadog_api_client/v2/models/entity_v3_api_datadog.rb +126 -0
- data/lib/datadog_api_client/v2/models/entity_v3_api_kind.rb +26 -0
- data/lib/datadog_api_client/v2/models/entity_v3_api_spec.rb +151 -0
- data/lib/datadog_api_client/v2/models/entity_v3_api_spec_interface_definition.rb +80 -0
- data/lib/datadog_api_client/v2/models/{entity_v3_metadata_owner.rb → entity_v3_api_spec_interface_file_ref.rb} +12 -12
- data/lib/datadog_api_client/v2/models/entity_v3_metadata.rb +1 -1
- data/lib/datadog_api_client/v2/models/epss.rb +144 -0
- data/lib/datadog_api_client/v2/models/error_handler.rb +144 -0
- data/lib/datadog_api_client/v2/models/fastly_service.rb +1 -1
- data/lib/datadog_api_client/v2/models/get_action_connection_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/get_app_response.rb +7 -7
- data/lib/datadog_api_client/v2/models/get_app_response_data.rb +6 -6
- data/lib/datadog_api_client/v2/models/get_app_response_data_attributes.rb +20 -42
- data/lib/datadog_api_client/v2/models/get_rule_version_history_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/{disable_app_response_data_type.rb → get_rule_version_history_data_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/get_rule_version_history_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/get_sbom_response.rb +123 -0
- data/lib/datadog_api_client/v2/models/{script.rb → get_workflow_response.rb} +5 -5
- data/lib/datadog_api_client/v2/models/github_webhook_trigger.rb +105 -0
- data/lib/datadog_api_client/v2/models/github_webhook_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/historical_job_options.rb +168 -0
- data/lib/datadog_api_client/v2/models/historical_job_query.rb +171 -0
- data/lib/datadog_api_client/v2/models/http_body.rb +115 -0
- data/lib/datadog_api_client/v2/models/http_credentials.rb +62 -0
- data/lib/datadog_api_client/v2/models/http_credentials_update.rb +62 -0
- data/lib/datadog_api_client/v2/models/http_header.rb +150 -0
- data/lib/datadog_api_client/v2/models/http_header_update.rb +149 -0
- data/lib/datadog_api_client/v2/models/http_integration.rb +171 -0
- data/lib/datadog_api_client/v2/models/http_integration_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/http_integration_update.rb +156 -0
- data/lib/datadog_api_client/v2/models/http_token.rb +171 -0
- data/lib/datadog_api_client/v2/models/http_token_auth.rb +169 -0
- data/lib/datadog_api_client/v2/models/http_token_auth_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/http_token_auth_update.rb +169 -0
- data/lib/datadog_api_client/v2/models/http_token_update.rb +181 -0
- data/lib/datadog_api_client/v2/models/{disable_app_response_data_attributes.rb → incident_trigger.rb} +11 -11
- data/lib/datadog_api_client/v2/models/incident_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/input_schema.rb +11 -9
- data/lib/datadog_api_client/v2/models/{input_schema_data_attributes_parameters_items_data_attributes.rb → input_schema_parameters.rb} +41 -24
- data/lib/datadog_api_client/v2/models/input_schema_parameters_type.rb +33 -0
- data/lib/datadog_api_client/v2/models/job_definition.rb +18 -18
- data/lib/datadog_api_client/v2/models/jsonapi_error_item.rb +21 -1
- data/lib/datadog_api_client/v2/models/{app_builder_error_errors_items_source.rb → jsonapi_error_item_source.rb} +16 -6
- data/lib/datadog_api_client/v2/models/library.rb +133 -0
- data/lib/datadog_api_client/v2/models/links.rb +185 -0
- data/lib/datadog_api_client/v2/models/list_apps_response.rb +5 -5
- data/lib/datadog_api_client/v2/models/list_apps_response_data_items.rb +8 -8
- data/lib/datadog_api_client/v2/models/list_apps_response_data_items_attributes.rb +6 -6
- data/lib/datadog_api_client/v2/models/list_apps_response_data_items_relationships.rb +2 -2
- data/lib/datadog_api_client/v2/models/list_apps_response_meta.rb +2 -2
- data/lib/datadog_api_client/v2/models/list_apps_response_meta_page.rb +3 -3
- data/lib/datadog_api_client/v2/models/list_vulnerabilities_response.rb +145 -0
- data/lib/datadog_api_client/v2/models/list_vulnerable_assets_response.rb +145 -0
- data/lib/datadog_api_client/v2/models/logs_archive_destination_s3.rb +21 -1
- data/lib/datadog_api_client/v2/models/logs_archive_encryption_s3.rb +133 -0
- data/lib/datadog_api_client/v2/models/logs_archive_encryption_s3_type.rb +28 -0
- data/lib/datadog_api_client/v2/models/logs_archive_storage_class_s3_type.rb +30 -0
- data/lib/datadog_api_client/v2/models/metadata.rb +165 -0
- data/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_attributes.rb +50 -1
- data/lib/datadog_api_client/v2/models/microsoft_teams_create_workflows_webhook_handle_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_update_workflows_webhook_handle_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_update_workflows_webhook_handle_request_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_workflows_webhook_handle_attributes.rb +144 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_workflows_webhook_handle_request_attributes.rb +152 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_workflows_webhook_handle_request_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_workflows_webhook_handle_response.rb +123 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_workflows_webhook_handle_response_data.rb +147 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_workflows_webhook_handle_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_workflows_webhook_handles_response.rb +125 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_workflows_webhook_response_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/{deployment_included_attributes.rb → monitor_trigger.rb} +11 -11
- data/lib/datadog_api_client/v2/models/monitor_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/notification_rule.rb +168 -0
- data/lib/datadog_api_client/v2/models/notification_rule_attributes.rb +311 -0
- data/lib/datadog_api_client/v2/models/notification_rule_response.rb +109 -0
- data/lib/datadog_api_client/v2/models/{create_app_request_data_type.rb → notification_rules_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/outbound_edge.rb +144 -0
- data/lib/datadog_api_client/v2/models/{input_schema_data_attributes.rb → output_schema.rb} +5 -5
- data/lib/datadog_api_client/v2/models/output_schema_parameters.rb +184 -0
- data/lib/datadog_api_client/v2/models/output_schema_parameters_type.rb +33 -0
- data/lib/datadog_api_client/v2/models/parameter.rb +144 -0
- data/lib/datadog_api_client/v2/models/patch_notification_rule_parameters.rb +105 -0
- data/lib/datadog_api_client/v2/models/patch_notification_rule_parameters_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/patch_notification_rule_parameters_data_attributes.rb +165 -0
- data/lib/datadog_api_client/v2/models/{disable_app_response.rb → publish_app_response.rb} +5 -5
- data/lib/datadog_api_client/v2/models/query.rb +37 -160
- data/lib/datadog_api_client/v2/models/readiness_gate.rb +123 -0
- data/lib/datadog_api_client/v2/models/{delete_app_response_data_type.rb → readiness_gate_threshold_type.rb} +4 -3
- data/lib/datadog_api_client/v2/models/remediation.rb +278 -0
- data/lib/datadog_api_client/v2/models/retry_strategy.rb +133 -0
- data/lib/datadog_api_client/v2/models/retry_strategy_kind.rb +26 -0
- data/lib/datadog_api_client/v2/models/retry_strategy_linear.rb +144 -0
- data/lib/datadog_api_client/v2/models/rule_severity.rb +31 -0
- data/lib/datadog_api_client/v2/models/rule_types_items.rb +42 -0
- data/lib/datadog_api_client/v2/models/rule_user.rb +115 -0
- data/lib/datadog_api_client/v2/models/rule_version_history.rb +133 -0
- data/lib/datadog_api_client/v2/models/rule_version_update.rb +125 -0
- data/lib/datadog_api_client/v2/models/rule_version_update_type.rb +28 -0
- data/lib/datadog_api_client/v2/models/rule_versions.rb +117 -0
- data/lib/datadog_api_client/v2/models/rum_retention_filter_attributes.rb +167 -0
- data/lib/datadog_api_client/v2/models/rum_retention_filter_create_attributes.rb +193 -0
- data/lib/datadog_api_client/v2/models/rum_retention_filter_create_data.rb +154 -0
- data/lib/datadog_api_client/v2/models/rum_retention_filter_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/{disable_app_response_data.rb → rum_retention_filter_data.rb} +10 -10
- data/lib/datadog_api_client/v2/models/rum_retention_filter_event_type.rb +32 -0
- data/lib/datadog_api_client/v2/models/rum_retention_filter_meta.rb +105 -0
- data/lib/datadog_api_client/v2/models/rum_retention_filter_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/rum_retention_filter_source.rb +29 -0
- data/lib/datadog_api_client/v2/models/rum_retention_filter_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rum_retention_filter_update_attributes.rb +167 -0
- data/lib/datadog_api_client/v2/models/rum_retention_filter_update_data.rb +175 -0
- data/lib/datadog_api_client/v2/models/rum_retention_filter_update_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/rum_retention_filters_order_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/rum_retention_filters_order_request.rb +108 -0
- data/lib/datadog_api_client/v2/models/rum_retention_filters_order_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/rum_retention_filters_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/{script_data.rb → sbom.rb} +8 -8
- data/lib/datadog_api_client/v2/models/sbom_attributes.rb +230 -0
- data/lib/datadog_api_client/v2/models/sbom_component.rb +185 -0
- data/lib/datadog_api_client/v2/models/sbom_component_type.rb +37 -0
- data/lib/datadog_api_client/v2/models/sbom_metadata.rb +105 -0
- data/lib/datadog_api_client/v2/models/{script_data_attributes.rb → sbom_metadata_component.rb} +6 -16
- data/lib/datadog_api_client/v2/models/sbom_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_trigger.rb +123 -0
- data/lib/datadog_api_client/v2/models/schedule_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_reference_table.rb +2 -2
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_case_action.rb +115 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_case_action_options.rb +123 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_case_action_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_case_create.rb +15 -3
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_evaluation_window.rb +5 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_impossible_travel_options.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_keep_alive.rb +3 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +6 -6
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_third_party_options.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +14 -2
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +14 -2
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb +14 -2
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +14 -2
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_test_payload.rb +14 -2
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +12 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case_create.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_trigger.rb +105 -0
- data/lib/datadog_api_client/v2/models/security_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/selectors.rb +160 -0
- data/lib/datadog_api_client/v2/models/slack_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/spec.rb +173 -0
- data/lib/datadog_api_client/v2/models/spec_version.rb +31 -0
- data/lib/datadog_api_client/v2/models/state_variable.rb +186 -0
- data/lib/datadog_api_client/v2/models/state_variable_properties.rb +105 -0
- data/lib/datadog_api_client/v2/models/state_variable_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/step.rb +220 -0
- data/lib/datadog_api_client/v2/models/step_display.rb +105 -0
- data/lib/datadog_api_client/v2/models/step_display_bounds.rb +115 -0
- data/lib/datadog_api_client/v2/models/token_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/trigger.rb +73 -0
- data/lib/datadog_api_client/v2/models/trigger_rate_limit.rb +115 -0
- data/lib/datadog_api_client/v2/models/trigger_source.rb +28 -0
- data/lib/datadog_api_client/v2/models/unpublish_app_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/update_action_connection_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/update_action_connection_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/update_app_request.rb +2 -2
- data/lib/datadog_api_client/v2/models/update_app_request_data.rb +6 -6
- data/lib/datadog_api_client/v2/models/update_app_request_data_attributes.rb +19 -41
- data/lib/datadog_api_client/v2/models/update_app_response.rb +7 -7
- data/lib/datadog_api_client/v2/models/update_app_response_data.rb +6 -6
- data/lib/datadog_api_client/v2/models/update_app_response_data_attributes.rb +20 -42
- data/lib/datadog_api_client/v2/models/update_workflow_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/update_workflow_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/url_param.rb +150 -0
- data/lib/datadog_api_client/v2/models/url_param_update.rb +149 -0
- data/lib/datadog_api_client/v2/models/vulnerabilities_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/vulnerability.rb +186 -0
- data/lib/datadog_api_client/v2/models/vulnerability_attributes.rb +462 -0
- data/lib/datadog_api_client/v2/models/vulnerability_cvss.rb +144 -0
- data/lib/datadog_api_client/v2/models/vulnerability_dependency_locations.rb +143 -0
- data/lib/datadog_api_client/v2/models/vulnerability_ecosystem.rb +36 -0
- data/lib/datadog_api_client/v2/models/vulnerability_relationships.rb +123 -0
- data/lib/datadog_api_client/v2/models/vulnerability_relationships_affects.rb +123 -0
- data/lib/datadog_api_client/v2/models/vulnerability_relationships_affects_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/vulnerability_risks.rb +198 -0
- data/lib/datadog_api_client/v2/models/vulnerability_severity.rb +31 -0
- data/lib/datadog_api_client/v2/models/vulnerability_status.rb +30 -0
- data/lib/datadog_api_client/v2/models/vulnerability_tool.rb +28 -0
- data/lib/datadog_api_client/v2/models/vulnerability_type.rb +67 -0
- data/lib/datadog_api_client/v2/models/workflow_data.rb +164 -0
- data/lib/datadog_api_client/v2/models/workflow_data_attributes.rb +206 -0
- data/lib/datadog_api_client/v2/models/workflow_data_relationships.rb +115 -0
- data/lib/datadog_api_client/v2/models/workflow_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/workflow_data_update.rb +164 -0
- data/lib/datadog_api_client/v2/models/workflow_data_update_attributes.rb +177 -0
- data/lib/datadog_api_client/v2/models/workflow_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/workflow_user_relationship.rb +105 -0
- data/lib/datadog_api_client/v2/models/workflow_user_relationship_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/workflow_user_relationship_type.rb +26 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +414 -56
- data/examples/v2/app-deployment/DeployApp.rb +0 -11
- data/examples/v2/app-deployment/DisableApp.rb +0 -11
- data/examples/v2/apps/CreateApp.rb +0 -49
- data/examples/v2/apps/ListApps.rb +0 -8
- data/lib/datadog_api_client/v2/api/app_deployment_api.rb +0 -168
- data/lib/datadog_api_client/v2/models/delete_apps_response_data_items_type.rb +0 -26
- data/lib/datadog_api_client/v2/models/deployment_relationship_data_type.rb +0 -26
- data/lib/datadog_api_client/v2/models/input_schema_data_attributes_parameters_items_data.rb +0 -105
- data/lib/datadog_api_client/v2/models/list_apps_response_data_items_type.rb +0 -26
- data/lib/datadog_api_client/v2/models/update_app_request_data_type.rb +0 -26
- data/lib/datadog_api_client/v2/models/update_app_response_data_type.rb +0 -26
@@ -505,6 +505,140 @@ module DatadogAPIClient::V2
|
|
505
505
|
return data, status_code, headers
|
506
506
|
end
|
507
507
|
|
508
|
+
# Create a new signal-based notification rule.
|
509
|
+
#
|
510
|
+
# @see #create_signal_notification_rule_with_http_info
|
511
|
+
def create_signal_notification_rule(body, opts = {})
|
512
|
+
data, _status_code, _headers = create_signal_notification_rule_with_http_info(body, opts)
|
513
|
+
data
|
514
|
+
end
|
515
|
+
|
516
|
+
# Create a new signal-based notification rule.
|
517
|
+
#
|
518
|
+
# Create a new notification rule for security signals and return the created rule.
|
519
|
+
#
|
520
|
+
# @param body [CreateNotificationRuleParameters] The body of the create notification rule request is composed of the rule type and the rule attributes: the rule name, the selectors, the notification targets, and the rule enabled status.
|
521
|
+
# @param opts [Hash] the optional parameters
|
522
|
+
# @return [Array<(NotificationRuleResponse, Integer, Hash)>] NotificationRuleResponse data, response status code and response headers
|
523
|
+
def create_signal_notification_rule_with_http_info(body, opts = {})
|
524
|
+
|
525
|
+
if @api_client.config.debugging
|
526
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.create_signal_notification_rule ...'
|
527
|
+
end
|
528
|
+
# verify the required parameter 'body' is set
|
529
|
+
if @api_client.config.client_side_validation && body.nil?
|
530
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.create_signal_notification_rule"
|
531
|
+
end
|
532
|
+
# resource path
|
533
|
+
local_var_path = '/api/v2/security/signals/notification_rules'
|
534
|
+
|
535
|
+
# query parameters
|
536
|
+
query_params = opts[:query_params] || {}
|
537
|
+
|
538
|
+
# header parameters
|
539
|
+
header_params = opts[:header_params] || {}
|
540
|
+
# HTTP header 'Accept' (if needed)
|
541
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
542
|
+
# HTTP header 'Content-Type'
|
543
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
544
|
+
|
545
|
+
# form parameters
|
546
|
+
form_params = opts[:form_params] || {}
|
547
|
+
|
548
|
+
# http body (model)
|
549
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
550
|
+
|
551
|
+
# return_type
|
552
|
+
return_type = opts[:debug_return_type] || 'NotificationRuleResponse'
|
553
|
+
|
554
|
+
# auth_names
|
555
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
556
|
+
|
557
|
+
new_options = opts.merge(
|
558
|
+
:operation => :create_signal_notification_rule,
|
559
|
+
:header_params => header_params,
|
560
|
+
:query_params => query_params,
|
561
|
+
:form_params => form_params,
|
562
|
+
:body => post_body,
|
563
|
+
:auth_names => auth_names,
|
564
|
+
:return_type => return_type,
|
565
|
+
:api_version => "V2"
|
566
|
+
)
|
567
|
+
|
568
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
569
|
+
if @api_client.config.debugging
|
570
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#create_signal_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
571
|
+
end
|
572
|
+
return data, status_code, headers
|
573
|
+
end
|
574
|
+
|
575
|
+
# Create a new vulnerability-based notification rule.
|
576
|
+
#
|
577
|
+
# @see #create_vulnerability_notification_rule_with_http_info
|
578
|
+
def create_vulnerability_notification_rule(body, opts = {})
|
579
|
+
data, _status_code, _headers = create_vulnerability_notification_rule_with_http_info(body, opts)
|
580
|
+
data
|
581
|
+
end
|
582
|
+
|
583
|
+
# Create a new vulnerability-based notification rule.
|
584
|
+
#
|
585
|
+
# Create a new notification rule for security vulnerabilities and return the created rule.
|
586
|
+
#
|
587
|
+
# @param body [CreateNotificationRuleParameters] The body of the create notification rule request is composed of the rule type and the rule attributes: the rule name, the selectors, the notification targets, and the rule enabled status.
|
588
|
+
# @param opts [Hash] the optional parameters
|
589
|
+
# @return [Array<(NotificationRuleResponse, Integer, Hash)>] NotificationRuleResponse data, response status code and response headers
|
590
|
+
def create_vulnerability_notification_rule_with_http_info(body, opts = {})
|
591
|
+
|
592
|
+
if @api_client.config.debugging
|
593
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.create_vulnerability_notification_rule ...'
|
594
|
+
end
|
595
|
+
# verify the required parameter 'body' is set
|
596
|
+
if @api_client.config.client_side_validation && body.nil?
|
597
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.create_vulnerability_notification_rule"
|
598
|
+
end
|
599
|
+
# resource path
|
600
|
+
local_var_path = '/api/v2/security/vulnerabilities/notification_rules'
|
601
|
+
|
602
|
+
# query parameters
|
603
|
+
query_params = opts[:query_params] || {}
|
604
|
+
|
605
|
+
# header parameters
|
606
|
+
header_params = opts[:header_params] || {}
|
607
|
+
# HTTP header 'Accept' (if needed)
|
608
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
609
|
+
# HTTP header 'Content-Type'
|
610
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
611
|
+
|
612
|
+
# form parameters
|
613
|
+
form_params = opts[:form_params] || {}
|
614
|
+
|
615
|
+
# http body (model)
|
616
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
617
|
+
|
618
|
+
# return_type
|
619
|
+
return_type = opts[:debug_return_type] || 'NotificationRuleResponse'
|
620
|
+
|
621
|
+
# auth_names
|
622
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
623
|
+
|
624
|
+
new_options = opts.merge(
|
625
|
+
:operation => :create_vulnerability_notification_rule,
|
626
|
+
:header_params => header_params,
|
627
|
+
:query_params => query_params,
|
628
|
+
:form_params => form_params,
|
629
|
+
:body => post_body,
|
630
|
+
:auth_names => auth_names,
|
631
|
+
:return_type => return_type,
|
632
|
+
:api_version => "V2"
|
633
|
+
)
|
634
|
+
|
635
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
636
|
+
if @api_client.config.debugging
|
637
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#create_vulnerability_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
638
|
+
end
|
639
|
+
return data, status_code, headers
|
640
|
+
end
|
641
|
+
|
508
642
|
# Delete an existing job.
|
509
643
|
#
|
510
644
|
# @see #delete_historical_job_with_http_info
|
@@ -771,6 +905,136 @@ module DatadogAPIClient::V2
|
|
771
905
|
return data, status_code, headers
|
772
906
|
end
|
773
907
|
|
908
|
+
# Delete a signal-based notification rule.
|
909
|
+
#
|
910
|
+
# @see #delete_signal_notification_rule_with_http_info
|
911
|
+
def delete_signal_notification_rule(id, opts = {})
|
912
|
+
delete_signal_notification_rule_with_http_info(id, opts)
|
913
|
+
nil
|
914
|
+
end
|
915
|
+
|
916
|
+
# Delete a signal-based notification rule.
|
917
|
+
#
|
918
|
+
# Delete a notification rule for security signals.
|
919
|
+
#
|
920
|
+
# @param id [String] ID of the notification rule.
|
921
|
+
# @param opts [Hash] the optional parameters
|
922
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
923
|
+
def delete_signal_notification_rule_with_http_info(id, opts = {})
|
924
|
+
|
925
|
+
if @api_client.config.debugging
|
926
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.delete_signal_notification_rule ...'
|
927
|
+
end
|
928
|
+
# verify the required parameter 'id' is set
|
929
|
+
if @api_client.config.client_side_validation && id.nil?
|
930
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SecurityMonitoringAPI.delete_signal_notification_rule"
|
931
|
+
end
|
932
|
+
# resource path
|
933
|
+
local_var_path = '/api/v2/security/signals/notification_rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
|
934
|
+
|
935
|
+
# query parameters
|
936
|
+
query_params = opts[:query_params] || {}
|
937
|
+
|
938
|
+
# header parameters
|
939
|
+
header_params = opts[:header_params] || {}
|
940
|
+
# HTTP header 'Accept' (if needed)
|
941
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
942
|
+
|
943
|
+
# form parameters
|
944
|
+
form_params = opts[:form_params] || {}
|
945
|
+
|
946
|
+
# http body (model)
|
947
|
+
post_body = opts[:debug_body]
|
948
|
+
|
949
|
+
# return_type
|
950
|
+
return_type = opts[:debug_return_type]
|
951
|
+
|
952
|
+
# auth_names
|
953
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
954
|
+
|
955
|
+
new_options = opts.merge(
|
956
|
+
:operation => :delete_signal_notification_rule,
|
957
|
+
:header_params => header_params,
|
958
|
+
:query_params => query_params,
|
959
|
+
:form_params => form_params,
|
960
|
+
:body => post_body,
|
961
|
+
:auth_names => auth_names,
|
962
|
+
:return_type => return_type,
|
963
|
+
:api_version => "V2"
|
964
|
+
)
|
965
|
+
|
966
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
967
|
+
if @api_client.config.debugging
|
968
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#delete_signal_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
969
|
+
end
|
970
|
+
return data, status_code, headers
|
971
|
+
end
|
972
|
+
|
973
|
+
# Delete a vulnerability-based notification rule.
|
974
|
+
#
|
975
|
+
# @see #delete_vulnerability_notification_rule_with_http_info
|
976
|
+
def delete_vulnerability_notification_rule(id, opts = {})
|
977
|
+
delete_vulnerability_notification_rule_with_http_info(id, opts)
|
978
|
+
nil
|
979
|
+
end
|
980
|
+
|
981
|
+
# Delete a vulnerability-based notification rule.
|
982
|
+
#
|
983
|
+
# Delete a notification rule for security vulnerabilities.
|
984
|
+
#
|
985
|
+
# @param id [String] ID of the notification rule.
|
986
|
+
# @param opts [Hash] the optional parameters
|
987
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
988
|
+
def delete_vulnerability_notification_rule_with_http_info(id, opts = {})
|
989
|
+
|
990
|
+
if @api_client.config.debugging
|
991
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.delete_vulnerability_notification_rule ...'
|
992
|
+
end
|
993
|
+
# verify the required parameter 'id' is set
|
994
|
+
if @api_client.config.client_side_validation && id.nil?
|
995
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SecurityMonitoringAPI.delete_vulnerability_notification_rule"
|
996
|
+
end
|
997
|
+
# resource path
|
998
|
+
local_var_path = '/api/v2/security/vulnerabilities/notification_rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
|
999
|
+
|
1000
|
+
# query parameters
|
1001
|
+
query_params = opts[:query_params] || {}
|
1002
|
+
|
1003
|
+
# header parameters
|
1004
|
+
header_params = opts[:header_params] || {}
|
1005
|
+
# HTTP header 'Accept' (if needed)
|
1006
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
1007
|
+
|
1008
|
+
# form parameters
|
1009
|
+
form_params = opts[:form_params] || {}
|
1010
|
+
|
1011
|
+
# http body (model)
|
1012
|
+
post_body = opts[:debug_body]
|
1013
|
+
|
1014
|
+
# return_type
|
1015
|
+
return_type = opts[:debug_return_type]
|
1016
|
+
|
1017
|
+
# auth_names
|
1018
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1019
|
+
|
1020
|
+
new_options = opts.merge(
|
1021
|
+
:operation => :delete_vulnerability_notification_rule,
|
1022
|
+
:header_params => header_params,
|
1023
|
+
:query_params => query_params,
|
1024
|
+
:form_params => form_params,
|
1025
|
+
:body => post_body,
|
1026
|
+
:auth_names => auth_names,
|
1027
|
+
:return_type => return_type,
|
1028
|
+
:api_version => "V2"
|
1029
|
+
)
|
1030
|
+
|
1031
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
1032
|
+
if @api_client.config.debugging
|
1033
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#delete_vulnerability_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1034
|
+
end
|
1035
|
+
return data, status_code, headers
|
1036
|
+
end
|
1037
|
+
|
774
1038
|
# Modify the triage assignee of a security signal.
|
775
1039
|
#
|
776
1040
|
# @see #edit_security_monitoring_signal_assignee_with_http_info
|
@@ -1134,38 +1398,45 @@ module DatadogAPIClient::V2
|
|
1134
1398
|
return data, status_code, headers
|
1135
1399
|
end
|
1136
1400
|
|
1137
|
-
# Get a
|
1401
|
+
# Get a rule's version history.
|
1138
1402
|
#
|
1139
|
-
# @see #
|
1140
|
-
def
|
1141
|
-
data, _status_code, _headers =
|
1403
|
+
# @see #get_rule_version_history_with_http_info
|
1404
|
+
def get_rule_version_history(rule_id, opts = {})
|
1405
|
+
data, _status_code, _headers = get_rule_version_history_with_http_info(rule_id, opts)
|
1142
1406
|
data
|
1143
1407
|
end
|
1144
1408
|
|
1145
|
-
# Get a
|
1146
|
-
#
|
1147
|
-
# Get the details of a specific security filter.
|
1409
|
+
# Get a rule's version history.
|
1148
1410
|
#
|
1149
|
-
#
|
1150
|
-
# for more examples.
|
1411
|
+
# Get a rule's version history.
|
1151
1412
|
#
|
1152
|
-
# @param
|
1413
|
+
# @param rule_id [String] The ID of the rule.
|
1153
1414
|
# @param opts [Hash] the optional parameters
|
1154
|
-
# @
|
1155
|
-
|
1415
|
+
# @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100.
|
1416
|
+
# @option opts [Integer] :page_number Specific page number to return.
|
1417
|
+
# @return [Array<(GetRuleVersionHistoryResponse, Integer, Hash)>] GetRuleVersionHistoryResponse data, response status code and response headers
|
1418
|
+
def get_rule_version_history_with_http_info(rule_id, opts = {})
|
1419
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.get_rule_version_history".to_sym]
|
1420
|
+
if unstable_enabled
|
1421
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_rule_version_history")
|
1422
|
+
else
|
1423
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_rule_version_history"))
|
1424
|
+
end
|
1156
1425
|
|
1157
1426
|
if @api_client.config.debugging
|
1158
|
-
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.
|
1427
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.get_rule_version_history ...'
|
1159
1428
|
end
|
1160
|
-
# verify the required parameter '
|
1161
|
-
if @api_client.config.client_side_validation &&
|
1162
|
-
fail ArgumentError, "Missing the required parameter '
|
1429
|
+
# verify the required parameter 'rule_id' is set
|
1430
|
+
if @api_client.config.client_side_validation && rule_id.nil?
|
1431
|
+
fail ArgumentError, "Missing the required parameter 'rule_id' when calling SecurityMonitoringAPI.get_rule_version_history"
|
1163
1432
|
end
|
1164
1433
|
# resource path
|
1165
|
-
local_var_path = '/api/v2/security_monitoring/
|
1434
|
+
local_var_path = '/api/v2/security_monitoring/rules/{rule_id}/version_history'.sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/'))
|
1166
1435
|
|
1167
1436
|
# query parameters
|
1168
1437
|
query_params = opts[:query_params] || {}
|
1438
|
+
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
1439
|
+
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
1169
1440
|
|
1170
1441
|
# header parameters
|
1171
1442
|
header_params = opts[:header_params] || {}
|
@@ -1179,13 +1450,13 @@ module DatadogAPIClient::V2
|
|
1179
1450
|
post_body = opts[:debug_body]
|
1180
1451
|
|
1181
1452
|
# return_type
|
1182
|
-
return_type = opts[:debug_return_type] || '
|
1453
|
+
return_type = opts[:debug_return_type] || 'GetRuleVersionHistoryResponse'
|
1183
1454
|
|
1184
1455
|
# auth_names
|
1185
1456
|
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1186
1457
|
|
1187
1458
|
new_options = opts.merge(
|
1188
|
-
:operation => :
|
1459
|
+
:operation => :get_rule_version_history,
|
1189
1460
|
:header_params => header_params,
|
1190
1461
|
:query_params => query_params,
|
1191
1462
|
:form_params => form_params,
|
@@ -1197,40 +1468,60 @@ module DatadogAPIClient::V2
|
|
1197
1468
|
|
1198
1469
|
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
1199
1470
|
if @api_client.config.debugging
|
1200
|
-
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#
|
1471
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#get_rule_version_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1201
1472
|
end
|
1202
1473
|
return data, status_code, headers
|
1203
1474
|
end
|
1204
1475
|
|
1205
|
-
# Get
|
1476
|
+
# Get SBOM.
|
1206
1477
|
#
|
1207
|
-
# @see #
|
1208
|
-
def
|
1209
|
-
data, _status_code, _headers =
|
1478
|
+
# @see #get_sbom_with_http_info
|
1479
|
+
def get_sbom(asset_type, filter_asset_name, opts = {})
|
1480
|
+
data, _status_code, _headers = get_sbom_with_http_info(asset_type, filter_asset_name, opts)
|
1210
1481
|
data
|
1211
1482
|
end
|
1212
1483
|
|
1213
|
-
# Get
|
1484
|
+
# Get SBOM.
|
1214
1485
|
#
|
1215
|
-
# Get a
|
1486
|
+
# Get a single SBOM related to an asset by its type and name.
|
1216
1487
|
#
|
1217
|
-
#
|
1488
|
+
#
|
1489
|
+
# @param asset_type [AssetType] The type of the asset for the SBOM request.
|
1490
|
+
# @param filter_asset_name [String] The name of the asset for the SBOM request.
|
1218
1491
|
# @param opts [Hash] the optional parameters
|
1219
|
-
# @
|
1220
|
-
|
1492
|
+
# @option opts [String] :filter_repo_digest The container image `repo_digest` for the SBOM request. When the requested asset type is 'Image', this filter is mandatory.
|
1493
|
+
# @return [Array<(GetSBOMResponse, Integer, Hash)>] GetSBOMResponse data, response status code and response headers
|
1494
|
+
def get_sbom_with_http_info(asset_type, filter_asset_name, opts = {})
|
1495
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.get_sbom".to_sym]
|
1496
|
+
if unstable_enabled
|
1497
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_sbom")
|
1498
|
+
else
|
1499
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_sbom"))
|
1500
|
+
end
|
1221
1501
|
|
1222
1502
|
if @api_client.config.debugging
|
1223
|
-
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.
|
1503
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.get_sbom ...'
|
1224
1504
|
end
|
1225
|
-
# verify the required parameter '
|
1226
|
-
if @api_client.config.client_side_validation &&
|
1227
|
-
fail ArgumentError, "Missing the required parameter '
|
1505
|
+
# verify the required parameter 'asset_type' is set
|
1506
|
+
if @api_client.config.client_side_validation && asset_type.nil?
|
1507
|
+
fail ArgumentError, "Missing the required parameter 'asset_type' when calling SecurityMonitoringAPI.get_sbom"
|
1508
|
+
end
|
1509
|
+
# verify enum value
|
1510
|
+
allowable_values = ['Repository', 'Service', 'Host', 'HostImage', 'Image']
|
1511
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(asset_type)
|
1512
|
+
fail ArgumentError, "invalid value for \"asset_type\", must be one of #{allowable_values}"
|
1513
|
+
end
|
1514
|
+
# verify the required parameter 'filter_asset_name' is set
|
1515
|
+
if @api_client.config.client_side_validation && filter_asset_name.nil?
|
1516
|
+
fail ArgumentError, "Missing the required parameter 'filter_asset_name' when calling SecurityMonitoringAPI.get_sbom"
|
1228
1517
|
end
|
1229
1518
|
# resource path
|
1230
|
-
local_var_path = '/api/v2/
|
1519
|
+
local_var_path = '/api/v2/security/sboms/{asset_type}'.sub('{asset_type}', CGI.escape(asset_type.to_s).gsub('%2F', '/'))
|
1231
1520
|
|
1232
1521
|
# query parameters
|
1233
1522
|
query_params = opts[:query_params] || {}
|
1523
|
+
query_params[:'filter[asset_name]'] = filter_asset_name
|
1524
|
+
query_params[:'filter[repo_digest]'] = opts[:'filter_repo_digest'] if !opts[:'filter_repo_digest'].nil?
|
1234
1525
|
|
1235
1526
|
# header parameters
|
1236
1527
|
header_params = opts[:header_params] || {}
|
@@ -1244,13 +1535,146 @@ module DatadogAPIClient::V2
|
|
1244
1535
|
post_body = opts[:debug_body]
|
1245
1536
|
|
1246
1537
|
# return_type
|
1247
|
-
return_type = opts[:debug_return_type] || '
|
1538
|
+
return_type = opts[:debug_return_type] || 'GetSBOMResponse'
|
1248
1539
|
|
1249
1540
|
# auth_names
|
1250
1541
|
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1251
1542
|
|
1252
1543
|
new_options = opts.merge(
|
1253
|
-
:operation => :
|
1544
|
+
:operation => :get_sbom,
|
1545
|
+
:header_params => header_params,
|
1546
|
+
:query_params => query_params,
|
1547
|
+
:form_params => form_params,
|
1548
|
+
:body => post_body,
|
1549
|
+
:auth_names => auth_names,
|
1550
|
+
:return_type => return_type,
|
1551
|
+
:api_version => "V2"
|
1552
|
+
)
|
1553
|
+
|
1554
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
1555
|
+
if @api_client.config.debugging
|
1556
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#get_sbom\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1557
|
+
end
|
1558
|
+
return data, status_code, headers
|
1559
|
+
end
|
1560
|
+
|
1561
|
+
# Get a security filter.
|
1562
|
+
#
|
1563
|
+
# @see #get_security_filter_with_http_info
|
1564
|
+
def get_security_filter(security_filter_id, opts = {})
|
1565
|
+
data, _status_code, _headers = get_security_filter_with_http_info(security_filter_id, opts)
|
1566
|
+
data
|
1567
|
+
end
|
1568
|
+
|
1569
|
+
# Get a security filter.
|
1570
|
+
#
|
1571
|
+
# Get the details of a specific security filter.
|
1572
|
+
#
|
1573
|
+
# See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/)
|
1574
|
+
# for more examples.
|
1575
|
+
#
|
1576
|
+
# @param security_filter_id [String] The ID of the security filter.
|
1577
|
+
# @param opts [Hash] the optional parameters
|
1578
|
+
# @return [Array<(SecurityFilterResponse, Integer, Hash)>] SecurityFilterResponse data, response status code and response headers
|
1579
|
+
def get_security_filter_with_http_info(security_filter_id, opts = {})
|
1580
|
+
|
1581
|
+
if @api_client.config.debugging
|
1582
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.get_security_filter ...'
|
1583
|
+
end
|
1584
|
+
# verify the required parameter 'security_filter_id' is set
|
1585
|
+
if @api_client.config.client_side_validation && security_filter_id.nil?
|
1586
|
+
fail ArgumentError, "Missing the required parameter 'security_filter_id' when calling SecurityMonitoringAPI.get_security_filter"
|
1587
|
+
end
|
1588
|
+
# resource path
|
1589
|
+
local_var_path = '/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}'.sub('{security_filter_id}', CGI.escape(security_filter_id.to_s).gsub('%2F', '/'))
|
1590
|
+
|
1591
|
+
# query parameters
|
1592
|
+
query_params = opts[:query_params] || {}
|
1593
|
+
|
1594
|
+
# header parameters
|
1595
|
+
header_params = opts[:header_params] || {}
|
1596
|
+
# HTTP header 'Accept' (if needed)
|
1597
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1598
|
+
|
1599
|
+
# form parameters
|
1600
|
+
form_params = opts[:form_params] || {}
|
1601
|
+
|
1602
|
+
# http body (model)
|
1603
|
+
post_body = opts[:debug_body]
|
1604
|
+
|
1605
|
+
# return_type
|
1606
|
+
return_type = opts[:debug_return_type] || 'SecurityFilterResponse'
|
1607
|
+
|
1608
|
+
# auth_names
|
1609
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1610
|
+
|
1611
|
+
new_options = opts.merge(
|
1612
|
+
:operation => :get_security_filter,
|
1613
|
+
:header_params => header_params,
|
1614
|
+
:query_params => query_params,
|
1615
|
+
:form_params => form_params,
|
1616
|
+
:body => post_body,
|
1617
|
+
:auth_names => auth_names,
|
1618
|
+
:return_type => return_type,
|
1619
|
+
:api_version => "V2"
|
1620
|
+
)
|
1621
|
+
|
1622
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
1623
|
+
if @api_client.config.debugging
|
1624
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#get_security_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1625
|
+
end
|
1626
|
+
return data, status_code, headers
|
1627
|
+
end
|
1628
|
+
|
1629
|
+
# Get a rule's details.
|
1630
|
+
#
|
1631
|
+
# @see #get_security_monitoring_rule_with_http_info
|
1632
|
+
def get_security_monitoring_rule(rule_id, opts = {})
|
1633
|
+
data, _status_code, _headers = get_security_monitoring_rule_with_http_info(rule_id, opts)
|
1634
|
+
data
|
1635
|
+
end
|
1636
|
+
|
1637
|
+
# Get a rule's details.
|
1638
|
+
#
|
1639
|
+
# Get a rule's details.
|
1640
|
+
#
|
1641
|
+
# @param rule_id [String] The ID of the rule.
|
1642
|
+
# @param opts [Hash] the optional parameters
|
1643
|
+
# @return [Array<(SecurityMonitoringRuleResponse, Integer, Hash)>] SecurityMonitoringRuleResponse data, response status code and response headers
|
1644
|
+
def get_security_monitoring_rule_with_http_info(rule_id, opts = {})
|
1645
|
+
|
1646
|
+
if @api_client.config.debugging
|
1647
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.get_security_monitoring_rule ...'
|
1648
|
+
end
|
1649
|
+
# verify the required parameter 'rule_id' is set
|
1650
|
+
if @api_client.config.client_side_validation && rule_id.nil?
|
1651
|
+
fail ArgumentError, "Missing the required parameter 'rule_id' when calling SecurityMonitoringAPI.get_security_monitoring_rule"
|
1652
|
+
end
|
1653
|
+
# resource path
|
1654
|
+
local_var_path = '/api/v2/security_monitoring/rules/{rule_id}'.sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/'))
|
1655
|
+
|
1656
|
+
# query parameters
|
1657
|
+
query_params = opts[:query_params] || {}
|
1658
|
+
|
1659
|
+
# header parameters
|
1660
|
+
header_params = opts[:header_params] || {}
|
1661
|
+
# HTTP header 'Accept' (if needed)
|
1662
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1663
|
+
|
1664
|
+
# form parameters
|
1665
|
+
form_params = opts[:form_params] || {}
|
1666
|
+
|
1667
|
+
# http body (model)
|
1668
|
+
post_body = opts[:debug_body]
|
1669
|
+
|
1670
|
+
# return_type
|
1671
|
+
return_type = opts[:debug_return_type] || 'SecurityMonitoringRuleResponse'
|
1672
|
+
|
1673
|
+
# auth_names
|
1674
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1675
|
+
|
1676
|
+
new_options = opts.merge(
|
1677
|
+
:operation => :get_security_monitoring_rule,
|
1254
1678
|
:header_params => header_params,
|
1255
1679
|
:query_params => query_params,
|
1256
1680
|
:form_params => form_params,
|
@@ -1397,111 +1821,35 @@ module DatadogAPIClient::V2
|
|
1397
1821
|
return data, status_code, headers
|
1398
1822
|
end
|
1399
1823
|
|
1400
|
-
#
|
1824
|
+
# Get details of a signal-based notification rule.
|
1401
1825
|
#
|
1402
|
-
# @see #
|
1403
|
-
def
|
1404
|
-
data, _status_code, _headers =
|
1826
|
+
# @see #get_signal_notification_rule_with_http_info
|
1827
|
+
def get_signal_notification_rule(id, opts = {})
|
1828
|
+
data, _status_code, _headers = get_signal_notification_rule_with_http_info(id, opts)
|
1405
1829
|
data
|
1406
1830
|
end
|
1407
1831
|
|
1408
|
-
#
|
1409
|
-
#
|
1410
|
-
# Get a list of findings. These include both misconfigurations and identity risks.
|
1411
|
-
#
|
1412
|
-
# **Note**: To filter and return only identity risks, add the following query parameter: `?filter[tags]=dd_rule_type:ciem`
|
1413
|
-
#
|
1414
|
-
# ### Filtering
|
1415
|
-
#
|
1416
|
-
# Filters can be applied by appending query parameters to the URL.
|
1417
|
-
#
|
1418
|
-
# - Using a single filter: `?filter[attribute_key]=attribute_value`
|
1419
|
-
# - Chaining filters: `?filter[attribute_key]=attribute_value&filter[attribute_key]=attribute_value...`
|
1420
|
-
# - Filtering on tags: `?filter[tags]=tag_key:tag_value&filter[tags]=tag_key_2:tag_value_2`
|
1421
|
-
#
|
1422
|
-
# Here, `attribute_key` can be any of the filter keys described further below.
|
1423
|
-
#
|
1424
|
-
# Query parameters of type `integer` support comparison operators (`>`, `>=`, `<`, `<=`). This is particularly useful when filtering by `evaluation_changed_at` or `resource_discovery_timestamp`. For example: `?filter[evaluation_changed_at]=>20123123121`.
|
1425
|
-
#
|
1426
|
-
# You can also use the negation operator on strings. For example, use `filter[resource_type]=-aws*` to filter for any non-AWS resources.
|
1427
|
-
#
|
1428
|
-
# The operator must come after the equal sign. For example, to filter with the `>=` operator, add the operator after the equal sign: `filter[evaluation_changed_at]=>=1678809373257`.
|
1429
|
-
#
|
1430
|
-
# Query parameters must be only among the documented ones and with values of correct types. Duplicated query parameters (e.g. `filter[status]=low&filter[status]=info`) are not allowed.
|
1431
|
-
#
|
1432
|
-
# ### Response
|
1433
|
-
#
|
1434
|
-
# The response includes an array of finding objects, pagination metadata, and a count of items that match the query.
|
1435
|
-
#
|
1436
|
-
# Each finding object contains the following:
|
1437
|
-
#
|
1438
|
-
# - The finding ID that can be used in a `GetFinding` request to retrieve the full finding details.
|
1439
|
-
# - Core attributes, including status, evaluation, high-level resource details, muted state, and rule details.
|
1440
|
-
# - `evaluation_changed_at` and `resource_discovery_date` time stamps.
|
1441
|
-
# - An array of associated tags.
|
1832
|
+
# Get details of a signal-based notification rule.
|
1442
1833
|
#
|
1834
|
+
# Get the details of a notification rule for security signals.
|
1443
1835
|
#
|
1836
|
+
# @param id [String] ID of the notification rule.
|
1444
1837
|
# @param opts [Hash] the optional parameters
|
1445
|
-
# @
|
1446
|
-
|
1447
|
-
# @option opts [String] :page_cursor Return the next page of findings pointed to by the cursor.
|
1448
|
-
# @option opts [String] :filter_tags Return findings that have these associated tags (repeatable).
|
1449
|
-
# @option opts [String] :filter_evaluation_changed_at Return findings that have changed from pass to fail or vice versa on a specified date (Unix ms) or date range (using comparison operators).
|
1450
|
-
# @option opts [Boolean] :filter_muted Set to `true` to return findings that are muted. Set to `false` to return unmuted findings.
|
1451
|
-
# @option opts [String] :filter_rule_id Return findings for the specified rule ID.
|
1452
|
-
# @option opts [String] :filter_rule_name Return findings for the specified rule.
|
1453
|
-
# @option opts [String] :filter_resource_type Return only findings for the specified resource type.
|
1454
|
-
# @option opts [String] :filter_discovery_timestamp Return findings that were found on a specified date (Unix ms) or date range (using comparison operators).
|
1455
|
-
# @option opts [FindingEvaluation] :filter_evaluation Return only `pass` or `fail` findings.
|
1456
|
-
# @option opts [FindingStatus] :filter_status Return only findings with the specified status.
|
1457
|
-
# @option opts [Array<FindingVulnerabilityType>] :filter_vulnerability_type Return findings that match the selected vulnerability types (repeatable).
|
1458
|
-
# @return [Array<(ListFindingsResponse, Integer, Hash)>] ListFindingsResponse data, response status code and response headers
|
1459
|
-
def list_findings_with_http_info(opts = {})
|
1460
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.list_findings".to_sym]
|
1461
|
-
if unstable_enabled
|
1462
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_findings")
|
1463
|
-
else
|
1464
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_findings"))
|
1465
|
-
end
|
1838
|
+
# @return [Array<(NotificationRuleResponse, Integer, Hash)>] NotificationRuleResponse data, response status code and response headers
|
1839
|
+
def get_signal_notification_rule_with_http_info(id, opts = {})
|
1466
1840
|
|
1467
1841
|
if @api_client.config.debugging
|
1468
|
-
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.
|
1842
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.get_signal_notification_rule ...'
|
1469
1843
|
end
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] < 1
|
1474
|
-
fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling SecurityMonitoringAPI.list_findings, must be greater than or equal to 1.'
|
1475
|
-
end
|
1476
|
-
if @api_client.config.client_side_validation && !opts[:'snapshot_timestamp'].nil? && opts[:'snapshot_timestamp'] < 1
|
1477
|
-
fail ArgumentError, 'invalid value for "opts[:"snapshot_timestamp"]" when calling SecurityMonitoringAPI.list_findings, must be greater than or equal to 1.'
|
1478
|
-
end
|
1479
|
-
allowable_values = ['pass', 'fail']
|
1480
|
-
if @api_client.config.client_side_validation && opts[:'filter_evaluation'] && !allowable_values.include?(opts[:'filter_evaluation'])
|
1481
|
-
fail ArgumentError, "invalid value for \"filter_evaluation\", must be one of #{allowable_values}"
|
1482
|
-
end
|
1483
|
-
allowable_values = ['critical', 'high', 'medium', 'low', 'info']
|
1484
|
-
if @api_client.config.client_side_validation && opts[:'filter_status'] && !allowable_values.include?(opts[:'filter_status'])
|
1485
|
-
fail ArgumentError, "invalid value for \"filter_status\", must be one of #{allowable_values}"
|
1844
|
+
# verify the required parameter 'id' is set
|
1845
|
+
if @api_client.config.client_side_validation && id.nil?
|
1846
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SecurityMonitoringAPI.get_signal_notification_rule"
|
1486
1847
|
end
|
1487
1848
|
# resource path
|
1488
|
-
local_var_path = '/api/v2/
|
1849
|
+
local_var_path = '/api/v2/security/signals/notification_rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
|
1489
1850
|
|
1490
1851
|
# query parameters
|
1491
1852
|
query_params = opts[:query_params] || {}
|
1492
|
-
query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
|
1493
|
-
query_params[:'snapshot_timestamp'] = opts[:'snapshot_timestamp'] if !opts[:'snapshot_timestamp'].nil?
|
1494
|
-
query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
|
1495
|
-
query_params[:'filter[tags]'] = opts[:'filter_tags'] if !opts[:'filter_tags'].nil?
|
1496
|
-
query_params[:'filter[evaluation_changed_at]'] = opts[:'filter_evaluation_changed_at'] if !opts[:'filter_evaluation_changed_at'].nil?
|
1497
|
-
query_params[:'filter[muted]'] = opts[:'filter_muted'] if !opts[:'filter_muted'].nil?
|
1498
|
-
query_params[:'filter[rule_id]'] = opts[:'filter_rule_id'] if !opts[:'filter_rule_id'].nil?
|
1499
|
-
query_params[:'filter[rule_name]'] = opts[:'filter_rule_name'] if !opts[:'filter_rule_name'].nil?
|
1500
|
-
query_params[:'filter[resource_type]'] = opts[:'filter_resource_type'] if !opts[:'filter_resource_type'].nil?
|
1501
|
-
query_params[:'filter[discovery_timestamp]'] = opts[:'filter_discovery_timestamp'] if !opts[:'filter_discovery_timestamp'].nil?
|
1502
|
-
query_params[:'filter[evaluation]'] = opts[:'filter_evaluation'] if !opts[:'filter_evaluation'].nil?
|
1503
|
-
query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil?
|
1504
|
-
query_params[:'filter[vulnerability_type]'] = @api_client.build_collection_param(opts[:'filter_vulnerability_type'], :multi) if !opts[:'filter_vulnerability_type'].nil?
|
1505
1853
|
|
1506
1854
|
# header parameters
|
1507
1855
|
header_params = opts[:header_params] || {}
|
@@ -1515,13 +1863,13 @@ module DatadogAPIClient::V2
|
|
1515
1863
|
post_body = opts[:debug_body]
|
1516
1864
|
|
1517
1865
|
# return_type
|
1518
|
-
return_type = opts[:debug_return_type] || '
|
1866
|
+
return_type = opts[:debug_return_type] || 'NotificationRuleResponse'
|
1519
1867
|
|
1520
1868
|
# auth_names
|
1521
1869
|
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1522
1870
|
|
1523
1871
|
new_options = opts.merge(
|
1524
|
-
:operation => :
|
1872
|
+
:operation => :get_signal_notification_rule,
|
1525
1873
|
:header_params => header_params,
|
1526
1874
|
:query_params => query_params,
|
1527
1875
|
:form_params => form_params,
|
@@ -1530,74 +1878,686 @@ module DatadogAPIClient::V2
|
|
1530
1878
|
:return_type => return_type,
|
1531
1879
|
:api_version => "V2"
|
1532
1880
|
)
|
1533
|
-
new_options[:query_string_normalizer] = HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER
|
1534
1881
|
|
1535
1882
|
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
1536
1883
|
if @api_client.config.debugging
|
1537
|
-
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#
|
1884
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#get_signal_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1538
1885
|
end
|
1539
1886
|
return data, status_code, headers
|
1540
1887
|
end
|
1541
1888
|
|
1542
|
-
#
|
1543
|
-
#
|
1544
|
-
# Provide a paginated version of {#list_findings}, returning all items.
|
1545
|
-
#
|
1546
|
-
# To use it you need to use a block: list_findings_with_pagination { |item| p item }
|
1547
|
-
#
|
1548
|
-
# @yield [Finding] Paginated items
|
1549
|
-
def list_findings_with_pagination(opts = {})
|
1550
|
-
api_version = "V2"
|
1551
|
-
page_size = @api_client.get_attribute_from_path(opts, "page_limit", 100)
|
1552
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
|
1553
|
-
while true do
|
1554
|
-
response = list_findings(opts)
|
1555
|
-
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
1556
|
-
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
1557
|
-
break
|
1558
|
-
end
|
1559
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.cursor"))
|
1560
|
-
end
|
1561
|
-
end
|
1562
|
-
|
1563
|
-
# List historical jobs.
|
1889
|
+
# Get the list of signal-based notification rules.
|
1564
1890
|
#
|
1565
|
-
# @see #
|
1566
|
-
def
|
1567
|
-
data, _status_code, _headers =
|
1891
|
+
# @see #get_signal_notification_rules_with_http_info
|
1892
|
+
def get_signal_notification_rules(opts = {})
|
1893
|
+
data, _status_code, _headers = get_signal_notification_rules_with_http_info(opts)
|
1568
1894
|
data
|
1569
1895
|
end
|
1570
1896
|
|
1571
|
-
#
|
1897
|
+
# Get the list of signal-based notification rules.
|
1572
1898
|
#
|
1573
|
-
#
|
1899
|
+
# Returns the list of notification rules for security signals.
|
1900
|
+
#
|
1901
|
+
# @param opts [Hash] the optional parameters
|
1902
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
1903
|
+
def get_signal_notification_rules_with_http_info(opts = {})
|
1904
|
+
|
1905
|
+
if @api_client.config.debugging
|
1906
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.get_signal_notification_rules ...'
|
1907
|
+
end
|
1908
|
+
# resource path
|
1909
|
+
local_var_path = '/api/v2/security/signals/notification_rules'
|
1910
|
+
|
1911
|
+
# query parameters
|
1912
|
+
query_params = opts[:query_params] || {}
|
1913
|
+
|
1914
|
+
# header parameters
|
1915
|
+
header_params = opts[:header_params] || {}
|
1916
|
+
# HTTP header 'Accept' (if needed)
|
1917
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1918
|
+
|
1919
|
+
# form parameters
|
1920
|
+
form_params = opts[:form_params] || {}
|
1921
|
+
|
1922
|
+
# http body (model)
|
1923
|
+
post_body = opts[:debug_body]
|
1924
|
+
|
1925
|
+
# return_type
|
1926
|
+
return_type = opts[:debug_return_type] || 'Object'
|
1927
|
+
|
1928
|
+
# auth_names
|
1929
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1930
|
+
|
1931
|
+
new_options = opts.merge(
|
1932
|
+
:operation => :get_signal_notification_rules,
|
1933
|
+
:header_params => header_params,
|
1934
|
+
:query_params => query_params,
|
1935
|
+
:form_params => form_params,
|
1936
|
+
:body => post_body,
|
1937
|
+
:auth_names => auth_names,
|
1938
|
+
:return_type => return_type,
|
1939
|
+
:api_version => "V2"
|
1940
|
+
)
|
1941
|
+
|
1942
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
1943
|
+
if @api_client.config.debugging
|
1944
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#get_signal_notification_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1945
|
+
end
|
1946
|
+
return data, status_code, headers
|
1947
|
+
end
|
1948
|
+
|
1949
|
+
# Get details of a vulnerability notification rule.
|
1950
|
+
#
|
1951
|
+
# @see #get_vulnerability_notification_rule_with_http_info
|
1952
|
+
def get_vulnerability_notification_rule(id, opts = {})
|
1953
|
+
data, _status_code, _headers = get_vulnerability_notification_rule_with_http_info(id, opts)
|
1954
|
+
data
|
1955
|
+
end
|
1956
|
+
|
1957
|
+
# Get details of a vulnerability notification rule.
|
1958
|
+
#
|
1959
|
+
# Get the details of a notification rule for security vulnerabilities.
|
1960
|
+
#
|
1961
|
+
# @param id [String] ID of the notification rule.
|
1962
|
+
# @param opts [Hash] the optional parameters
|
1963
|
+
# @return [Array<(NotificationRuleResponse, Integer, Hash)>] NotificationRuleResponse data, response status code and response headers
|
1964
|
+
def get_vulnerability_notification_rule_with_http_info(id, opts = {})
|
1965
|
+
|
1966
|
+
if @api_client.config.debugging
|
1967
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.get_vulnerability_notification_rule ...'
|
1968
|
+
end
|
1969
|
+
# verify the required parameter 'id' is set
|
1970
|
+
if @api_client.config.client_side_validation && id.nil?
|
1971
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SecurityMonitoringAPI.get_vulnerability_notification_rule"
|
1972
|
+
end
|
1973
|
+
# resource path
|
1974
|
+
local_var_path = '/api/v2/security/vulnerabilities/notification_rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
|
1975
|
+
|
1976
|
+
# query parameters
|
1977
|
+
query_params = opts[:query_params] || {}
|
1978
|
+
|
1979
|
+
# header parameters
|
1980
|
+
header_params = opts[:header_params] || {}
|
1981
|
+
# HTTP header 'Accept' (if needed)
|
1982
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1983
|
+
|
1984
|
+
# form parameters
|
1985
|
+
form_params = opts[:form_params] || {}
|
1986
|
+
|
1987
|
+
# http body (model)
|
1988
|
+
post_body = opts[:debug_body]
|
1989
|
+
|
1990
|
+
# return_type
|
1991
|
+
return_type = opts[:debug_return_type] || 'NotificationRuleResponse'
|
1992
|
+
|
1993
|
+
# auth_names
|
1994
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1995
|
+
|
1996
|
+
new_options = opts.merge(
|
1997
|
+
:operation => :get_vulnerability_notification_rule,
|
1998
|
+
:header_params => header_params,
|
1999
|
+
:query_params => query_params,
|
2000
|
+
:form_params => form_params,
|
2001
|
+
:body => post_body,
|
2002
|
+
:auth_names => auth_names,
|
2003
|
+
:return_type => return_type,
|
2004
|
+
:api_version => "V2"
|
2005
|
+
)
|
2006
|
+
|
2007
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
2008
|
+
if @api_client.config.debugging
|
2009
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#get_vulnerability_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2010
|
+
end
|
2011
|
+
return data, status_code, headers
|
2012
|
+
end
|
2013
|
+
|
2014
|
+
# Get the list of vulnerability notification rules.
|
2015
|
+
#
|
2016
|
+
# @see #get_vulnerability_notification_rules_with_http_info
|
2017
|
+
def get_vulnerability_notification_rules(opts = {})
|
2018
|
+
data, _status_code, _headers = get_vulnerability_notification_rules_with_http_info(opts)
|
2019
|
+
data
|
2020
|
+
end
|
2021
|
+
|
2022
|
+
# Get the list of vulnerability notification rules.
|
2023
|
+
#
|
2024
|
+
# Returns the list of notification rules for security vulnerabilities.
|
2025
|
+
#
|
2026
|
+
# @param opts [Hash] the optional parameters
|
2027
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
2028
|
+
def get_vulnerability_notification_rules_with_http_info(opts = {})
|
2029
|
+
|
2030
|
+
if @api_client.config.debugging
|
2031
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.get_vulnerability_notification_rules ...'
|
2032
|
+
end
|
2033
|
+
# resource path
|
2034
|
+
local_var_path = '/api/v2/security/vulnerabilities/notification_rules'
|
2035
|
+
|
2036
|
+
# query parameters
|
2037
|
+
query_params = opts[:query_params] || {}
|
2038
|
+
|
2039
|
+
# header parameters
|
2040
|
+
header_params = opts[:header_params] || {}
|
2041
|
+
# HTTP header 'Accept' (if needed)
|
2042
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2043
|
+
|
2044
|
+
# form parameters
|
2045
|
+
form_params = opts[:form_params] || {}
|
2046
|
+
|
2047
|
+
# http body (model)
|
2048
|
+
post_body = opts[:debug_body]
|
2049
|
+
|
2050
|
+
# return_type
|
2051
|
+
return_type = opts[:debug_return_type] || 'Object'
|
2052
|
+
|
2053
|
+
# auth_names
|
2054
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
2055
|
+
|
2056
|
+
new_options = opts.merge(
|
2057
|
+
:operation => :get_vulnerability_notification_rules,
|
2058
|
+
:header_params => header_params,
|
2059
|
+
:query_params => query_params,
|
2060
|
+
:form_params => form_params,
|
2061
|
+
:body => post_body,
|
2062
|
+
:auth_names => auth_names,
|
2063
|
+
:return_type => return_type,
|
2064
|
+
:api_version => "V2"
|
2065
|
+
)
|
2066
|
+
|
2067
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
2068
|
+
if @api_client.config.debugging
|
2069
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#get_vulnerability_notification_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2070
|
+
end
|
2071
|
+
return data, status_code, headers
|
2072
|
+
end
|
2073
|
+
|
2074
|
+
# List findings.
|
2075
|
+
#
|
2076
|
+
# @see #list_findings_with_http_info
|
2077
|
+
def list_findings(opts = {})
|
2078
|
+
data, _status_code, _headers = list_findings_with_http_info(opts)
|
2079
|
+
data
|
2080
|
+
end
|
2081
|
+
|
2082
|
+
# List findings.
|
2083
|
+
#
|
2084
|
+
# Get a list of findings. These include both misconfigurations and identity risks.
|
2085
|
+
#
|
2086
|
+
# **Note**: To filter and return only identity risks, add the following query parameter: `?filter[tags]=dd_rule_type:ciem`
|
2087
|
+
#
|
2088
|
+
# ### Filtering
|
2089
|
+
#
|
2090
|
+
# Filters can be applied by appending query parameters to the URL.
|
2091
|
+
#
|
2092
|
+
# - Using a single filter: `?filter[attribute_key]=attribute_value`
|
2093
|
+
# - Chaining filters: `?filter[attribute_key]=attribute_value&filter[attribute_key]=attribute_value...`
|
2094
|
+
# - Filtering on tags: `?filter[tags]=tag_key:tag_value&filter[tags]=tag_key_2:tag_value_2`
|
2095
|
+
#
|
2096
|
+
# Here, `attribute_key` can be any of the filter keys described further below.
|
2097
|
+
#
|
2098
|
+
# Query parameters of type `integer` support comparison operators (`>`, `>=`, `<`, `<=`). This is particularly useful when filtering by `evaluation_changed_at` or `resource_discovery_timestamp`. For example: `?filter[evaluation_changed_at]=>20123123121`.
|
2099
|
+
#
|
2100
|
+
# You can also use the negation operator on strings. For example, use `filter[resource_type]=-aws*` to filter for any non-AWS resources.
|
2101
|
+
#
|
2102
|
+
# The operator must come after the equal sign. For example, to filter with the `>=` operator, add the operator after the equal sign: `filter[evaluation_changed_at]=>=1678809373257`.
|
2103
|
+
#
|
2104
|
+
# Query parameters must be only among the documented ones and with values of correct types. Duplicated query parameters (e.g. `filter[status]=low&filter[status]=info`) are not allowed.
|
2105
|
+
#
|
2106
|
+
# ### Response
|
2107
|
+
#
|
2108
|
+
# The response includes an array of finding objects, pagination metadata, and a count of items that match the query.
|
2109
|
+
#
|
2110
|
+
# Each finding object contains the following:
|
2111
|
+
#
|
2112
|
+
# - The finding ID that can be used in a `GetFinding` request to retrieve the full finding details.
|
2113
|
+
# - Core attributes, including status, evaluation, high-level resource details, muted state, and rule details.
|
2114
|
+
# - `evaluation_changed_at` and `resource_discovery_date` time stamps.
|
2115
|
+
# - An array of associated tags.
|
2116
|
+
#
|
2117
|
+
#
|
2118
|
+
# @param opts [Hash] the optional parameters
|
2119
|
+
# @option opts [Integer] :page_limit Limit the number of findings returned. Must be <= 1000.
|
2120
|
+
# @option opts [Integer] :snapshot_timestamp Return findings for a given snapshot of time (Unix ms).
|
2121
|
+
# @option opts [String] :page_cursor Return the next page of findings pointed to by the cursor.
|
2122
|
+
# @option opts [String] :filter_tags Return findings that have these associated tags (repeatable).
|
2123
|
+
# @option opts [String] :filter_evaluation_changed_at Return findings that have changed from pass to fail or vice versa on a specified date (Unix ms) or date range (using comparison operators).
|
2124
|
+
# @option opts [Boolean] :filter_muted Set to `true` to return findings that are muted. Set to `false` to return unmuted findings.
|
2125
|
+
# @option opts [String] :filter_rule_id Return findings for the specified rule ID.
|
2126
|
+
# @option opts [String] :filter_rule_name Return findings for the specified rule.
|
2127
|
+
# @option opts [String] :filter_resource_type Return only findings for the specified resource type.
|
2128
|
+
# @option opts [String] :filter_discovery_timestamp Return findings that were found on a specified date (Unix ms) or date range (using comparison operators).
|
2129
|
+
# @option opts [FindingEvaluation] :filter_evaluation Return only `pass` or `fail` findings.
|
2130
|
+
# @option opts [FindingStatus] :filter_status Return only findings with the specified status.
|
2131
|
+
# @option opts [Array<FindingVulnerabilityType>] :filter_vulnerability_type Return findings that match the selected vulnerability types (repeatable).
|
2132
|
+
# @return [Array<(ListFindingsResponse, Integer, Hash)>] ListFindingsResponse data, response status code and response headers
|
2133
|
+
def list_findings_with_http_info(opts = {})
|
2134
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.list_findings".to_sym]
|
2135
|
+
if unstable_enabled
|
2136
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_findings")
|
2137
|
+
else
|
2138
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_findings"))
|
2139
|
+
end
|
2140
|
+
|
2141
|
+
if @api_client.config.debugging
|
2142
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_findings ...'
|
2143
|
+
end
|
2144
|
+
if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] > 1000
|
2145
|
+
fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling SecurityMonitoringAPI.list_findings, must be smaller than or equal to 1000.'
|
2146
|
+
end
|
2147
|
+
if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] < 1
|
2148
|
+
fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling SecurityMonitoringAPI.list_findings, must be greater than or equal to 1.'
|
2149
|
+
end
|
2150
|
+
if @api_client.config.client_side_validation && !opts[:'snapshot_timestamp'].nil? && opts[:'snapshot_timestamp'] < 1
|
2151
|
+
fail ArgumentError, 'invalid value for "opts[:"snapshot_timestamp"]" when calling SecurityMonitoringAPI.list_findings, must be greater than or equal to 1.'
|
2152
|
+
end
|
2153
|
+
allowable_values = ['pass', 'fail']
|
2154
|
+
if @api_client.config.client_side_validation && opts[:'filter_evaluation'] && !allowable_values.include?(opts[:'filter_evaluation'])
|
2155
|
+
fail ArgumentError, "invalid value for \"filter_evaluation\", must be one of #{allowable_values}"
|
2156
|
+
end
|
2157
|
+
allowable_values = ['critical', 'high', 'medium', 'low', 'info']
|
2158
|
+
if @api_client.config.client_side_validation && opts[:'filter_status'] && !allowable_values.include?(opts[:'filter_status'])
|
2159
|
+
fail ArgumentError, "invalid value for \"filter_status\", must be one of #{allowable_values}"
|
2160
|
+
end
|
2161
|
+
# resource path
|
2162
|
+
local_var_path = '/api/v2/posture_management/findings'
|
2163
|
+
|
2164
|
+
# query parameters
|
2165
|
+
query_params = opts[:query_params] || {}
|
2166
|
+
query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
|
2167
|
+
query_params[:'snapshot_timestamp'] = opts[:'snapshot_timestamp'] if !opts[:'snapshot_timestamp'].nil?
|
2168
|
+
query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
|
2169
|
+
query_params[:'filter[tags]'] = opts[:'filter_tags'] if !opts[:'filter_tags'].nil?
|
2170
|
+
query_params[:'filter[evaluation_changed_at]'] = opts[:'filter_evaluation_changed_at'] if !opts[:'filter_evaluation_changed_at'].nil?
|
2171
|
+
query_params[:'filter[muted]'] = opts[:'filter_muted'] if !opts[:'filter_muted'].nil?
|
2172
|
+
query_params[:'filter[rule_id]'] = opts[:'filter_rule_id'] if !opts[:'filter_rule_id'].nil?
|
2173
|
+
query_params[:'filter[rule_name]'] = opts[:'filter_rule_name'] if !opts[:'filter_rule_name'].nil?
|
2174
|
+
query_params[:'filter[resource_type]'] = opts[:'filter_resource_type'] if !opts[:'filter_resource_type'].nil?
|
2175
|
+
query_params[:'filter[discovery_timestamp]'] = opts[:'filter_discovery_timestamp'] if !opts[:'filter_discovery_timestamp'].nil?
|
2176
|
+
query_params[:'filter[evaluation]'] = opts[:'filter_evaluation'] if !opts[:'filter_evaluation'].nil?
|
2177
|
+
query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil?
|
2178
|
+
query_params[:'filter[vulnerability_type]'] = @api_client.build_collection_param(opts[:'filter_vulnerability_type'], :multi) if !opts[:'filter_vulnerability_type'].nil?
|
2179
|
+
|
2180
|
+
# header parameters
|
2181
|
+
header_params = opts[:header_params] || {}
|
2182
|
+
# HTTP header 'Accept' (if needed)
|
2183
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2184
|
+
|
2185
|
+
# form parameters
|
2186
|
+
form_params = opts[:form_params] || {}
|
2187
|
+
|
2188
|
+
# http body (model)
|
2189
|
+
post_body = opts[:debug_body]
|
2190
|
+
|
2191
|
+
# return_type
|
2192
|
+
return_type = opts[:debug_return_type] || 'ListFindingsResponse'
|
2193
|
+
|
2194
|
+
# auth_names
|
2195
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
2196
|
+
|
2197
|
+
new_options = opts.merge(
|
2198
|
+
:operation => :list_findings,
|
2199
|
+
:header_params => header_params,
|
2200
|
+
:query_params => query_params,
|
2201
|
+
:form_params => form_params,
|
2202
|
+
:body => post_body,
|
2203
|
+
:auth_names => auth_names,
|
2204
|
+
:return_type => return_type,
|
2205
|
+
:api_version => "V2"
|
2206
|
+
)
|
2207
|
+
new_options[:query_string_normalizer] = HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER
|
2208
|
+
|
2209
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
2210
|
+
if @api_client.config.debugging
|
2211
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#list_findings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2212
|
+
end
|
2213
|
+
return data, status_code, headers
|
2214
|
+
end
|
2215
|
+
|
2216
|
+
# List findings.
|
2217
|
+
#
|
2218
|
+
# Provide a paginated version of {#list_findings}, returning all items.
|
2219
|
+
#
|
2220
|
+
# To use it you need to use a block: list_findings_with_pagination { |item| p item }
|
2221
|
+
#
|
2222
|
+
# @yield [Finding] Paginated items
|
2223
|
+
def list_findings_with_pagination(opts = {})
|
2224
|
+
api_version = "V2"
|
2225
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_limit", 100)
|
2226
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
|
2227
|
+
while true do
|
2228
|
+
response = list_findings(opts)
|
2229
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
2230
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
2231
|
+
break
|
2232
|
+
end
|
2233
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.cursor"))
|
2234
|
+
end
|
2235
|
+
end
|
2236
|
+
|
2237
|
+
# List historical jobs.
|
2238
|
+
#
|
2239
|
+
# @see #list_historical_jobs_with_http_info
|
2240
|
+
def list_historical_jobs(opts = {})
|
2241
|
+
data, _status_code, _headers = list_historical_jobs_with_http_info(opts)
|
2242
|
+
data
|
2243
|
+
end
|
2244
|
+
|
2245
|
+
# List historical jobs.
|
2246
|
+
#
|
2247
|
+
# List historical jobs.
|
2248
|
+
#
|
2249
|
+
# @param opts [Hash] the optional parameters
|
2250
|
+
# @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100.
|
2251
|
+
# @option opts [Integer] :page_number Specific page number to return.
|
2252
|
+
# @option opts [String] :sort The order of the jobs in results.
|
2253
|
+
# @option opts [String] :filter_query Query used to filter items from the fetched list.
|
2254
|
+
# @return [Array<(ListHistoricalJobsResponse, Integer, Hash)>] ListHistoricalJobsResponse data, response status code and response headers
|
2255
|
+
def list_historical_jobs_with_http_info(opts = {})
|
2256
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.list_historical_jobs".to_sym]
|
2257
|
+
if unstable_enabled
|
2258
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_historical_jobs")
|
2259
|
+
else
|
2260
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_historical_jobs"))
|
2261
|
+
end
|
2262
|
+
|
2263
|
+
if @api_client.config.debugging
|
2264
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_historical_jobs ...'
|
2265
|
+
end
|
2266
|
+
# resource path
|
2267
|
+
local_var_path = '/api/v2/siem-historical-detections/jobs'
|
2268
|
+
|
2269
|
+
# query parameters
|
2270
|
+
query_params = opts[:query_params] || {}
|
2271
|
+
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
2272
|
+
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
2273
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
2274
|
+
query_params[:'filter[query]'] = opts[:'filter_query'] if !opts[:'filter_query'].nil?
|
2275
|
+
|
2276
|
+
# header parameters
|
2277
|
+
header_params = opts[:header_params] || {}
|
2278
|
+
# HTTP header 'Accept' (if needed)
|
2279
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2280
|
+
|
2281
|
+
# form parameters
|
2282
|
+
form_params = opts[:form_params] || {}
|
2283
|
+
|
2284
|
+
# http body (model)
|
2285
|
+
post_body = opts[:debug_body]
|
2286
|
+
|
2287
|
+
# return_type
|
2288
|
+
return_type = opts[:debug_return_type] || 'ListHistoricalJobsResponse'
|
2289
|
+
|
2290
|
+
# auth_names
|
2291
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
2292
|
+
|
2293
|
+
new_options = opts.merge(
|
2294
|
+
:operation => :list_historical_jobs,
|
2295
|
+
:header_params => header_params,
|
2296
|
+
:query_params => query_params,
|
2297
|
+
:form_params => form_params,
|
2298
|
+
:body => post_body,
|
2299
|
+
:auth_names => auth_names,
|
2300
|
+
:return_type => return_type,
|
2301
|
+
:api_version => "V2"
|
2302
|
+
)
|
2303
|
+
|
2304
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
2305
|
+
if @api_client.config.debugging
|
2306
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#list_historical_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2307
|
+
end
|
2308
|
+
return data, status_code, headers
|
2309
|
+
end
|
2310
|
+
|
2311
|
+
# Get all security filters.
|
2312
|
+
#
|
2313
|
+
# @see #list_security_filters_with_http_info
|
2314
|
+
def list_security_filters(opts = {})
|
2315
|
+
data, _status_code, _headers = list_security_filters_with_http_info(opts)
|
2316
|
+
data
|
2317
|
+
end
|
2318
|
+
|
2319
|
+
# Get all security filters.
|
2320
|
+
#
|
2321
|
+
# Get the list of configured security filters with their definitions.
|
2322
|
+
#
|
2323
|
+
# @param opts [Hash] the optional parameters
|
2324
|
+
# @return [Array<(SecurityFiltersResponse, Integer, Hash)>] SecurityFiltersResponse data, response status code and response headers
|
2325
|
+
def list_security_filters_with_http_info(opts = {})
|
2326
|
+
|
2327
|
+
if @api_client.config.debugging
|
2328
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_security_filters ...'
|
2329
|
+
end
|
2330
|
+
# resource path
|
2331
|
+
local_var_path = '/api/v2/security_monitoring/configuration/security_filters'
|
2332
|
+
|
2333
|
+
# query parameters
|
2334
|
+
query_params = opts[:query_params] || {}
|
2335
|
+
|
2336
|
+
# header parameters
|
2337
|
+
header_params = opts[:header_params] || {}
|
2338
|
+
# HTTP header 'Accept' (if needed)
|
2339
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2340
|
+
|
2341
|
+
# form parameters
|
2342
|
+
form_params = opts[:form_params] || {}
|
2343
|
+
|
2344
|
+
# http body (model)
|
2345
|
+
post_body = opts[:debug_body]
|
2346
|
+
|
2347
|
+
# return_type
|
2348
|
+
return_type = opts[:debug_return_type] || 'SecurityFiltersResponse'
|
2349
|
+
|
2350
|
+
# auth_names
|
2351
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
2352
|
+
|
2353
|
+
new_options = opts.merge(
|
2354
|
+
:operation => :list_security_filters,
|
2355
|
+
:header_params => header_params,
|
2356
|
+
:query_params => query_params,
|
2357
|
+
:form_params => form_params,
|
2358
|
+
:body => post_body,
|
2359
|
+
:auth_names => auth_names,
|
2360
|
+
:return_type => return_type,
|
2361
|
+
:api_version => "V2"
|
2362
|
+
)
|
2363
|
+
|
2364
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
2365
|
+
if @api_client.config.debugging
|
2366
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#list_security_filters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2367
|
+
end
|
2368
|
+
return data, status_code, headers
|
2369
|
+
end
|
2370
|
+
|
2371
|
+
# List rules.
|
2372
|
+
#
|
2373
|
+
# @see #list_security_monitoring_rules_with_http_info
|
2374
|
+
def list_security_monitoring_rules(opts = {})
|
2375
|
+
data, _status_code, _headers = list_security_monitoring_rules_with_http_info(opts)
|
2376
|
+
data
|
2377
|
+
end
|
2378
|
+
|
2379
|
+
# List rules.
|
2380
|
+
#
|
2381
|
+
# List rules.
|
2382
|
+
#
|
2383
|
+
# @param opts [Hash] the optional parameters
|
2384
|
+
# @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100.
|
2385
|
+
# @option opts [Integer] :page_number Specific page number to return.
|
2386
|
+
# @return [Array<(SecurityMonitoringListRulesResponse, Integer, Hash)>] SecurityMonitoringListRulesResponse data, response status code and response headers
|
2387
|
+
def list_security_monitoring_rules_with_http_info(opts = {})
|
2388
|
+
|
2389
|
+
if @api_client.config.debugging
|
2390
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_security_monitoring_rules ...'
|
2391
|
+
end
|
2392
|
+
# resource path
|
2393
|
+
local_var_path = '/api/v2/security_monitoring/rules'
|
2394
|
+
|
2395
|
+
# query parameters
|
2396
|
+
query_params = opts[:query_params] || {}
|
2397
|
+
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
2398
|
+
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
2399
|
+
|
2400
|
+
# header parameters
|
2401
|
+
header_params = opts[:header_params] || {}
|
2402
|
+
# HTTP header 'Accept' (if needed)
|
2403
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2404
|
+
|
2405
|
+
# form parameters
|
2406
|
+
form_params = opts[:form_params] || {}
|
2407
|
+
|
2408
|
+
# http body (model)
|
2409
|
+
post_body = opts[:debug_body]
|
2410
|
+
|
2411
|
+
# return_type
|
2412
|
+
return_type = opts[:debug_return_type] || 'SecurityMonitoringListRulesResponse'
|
2413
|
+
|
2414
|
+
# auth_names
|
2415
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
2416
|
+
|
2417
|
+
new_options = opts.merge(
|
2418
|
+
:operation => :list_security_monitoring_rules,
|
2419
|
+
:header_params => header_params,
|
2420
|
+
:query_params => query_params,
|
2421
|
+
:form_params => form_params,
|
2422
|
+
:body => post_body,
|
2423
|
+
:auth_names => auth_names,
|
2424
|
+
:return_type => return_type,
|
2425
|
+
:api_version => "V2"
|
2426
|
+
)
|
2427
|
+
|
2428
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
2429
|
+
if @api_client.config.debugging
|
2430
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#list_security_monitoring_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2431
|
+
end
|
2432
|
+
return data, status_code, headers
|
2433
|
+
end
|
2434
|
+
|
2435
|
+
# Get a quick list of security signals.
|
2436
|
+
#
|
2437
|
+
# @see #list_security_monitoring_signals_with_http_info
|
2438
|
+
def list_security_monitoring_signals(opts = {})
|
2439
|
+
data, _status_code, _headers = list_security_monitoring_signals_with_http_info(opts)
|
2440
|
+
data
|
2441
|
+
end
|
2442
|
+
|
2443
|
+
# Get a quick list of security signals.
|
2444
|
+
#
|
2445
|
+
# The list endpoint returns security signals that match a search query.
|
2446
|
+
# Both this endpoint and the POST endpoint can be used interchangeably when listing
|
2447
|
+
# security signals.
|
2448
|
+
#
|
2449
|
+
# @param opts [Hash] the optional parameters
|
2450
|
+
# @option opts [String] :filter_query The search query for security signals.
|
2451
|
+
# @option opts [Time] :filter_from The minimum timestamp for requested security signals.
|
2452
|
+
# @option opts [Time] :filter_to The maximum timestamp for requested security signals.
|
2453
|
+
# @option opts [SecurityMonitoringSignalsSort] :sort The order of the security signals in results.
|
2454
|
+
# @option opts [String] :page_cursor A list of results using the cursor provided in the previous query.
|
2455
|
+
# @option opts [Integer] :page_limit The maximum number of security signals in the response.
|
2456
|
+
# @return [Array<(SecurityMonitoringSignalsListResponse, Integer, Hash)>] SecurityMonitoringSignalsListResponse data, response status code and response headers
|
2457
|
+
def list_security_monitoring_signals_with_http_info(opts = {})
|
2458
|
+
|
2459
|
+
if @api_client.config.debugging
|
2460
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_security_monitoring_signals ...'
|
2461
|
+
end
|
2462
|
+
allowable_values = ['timestamp', '-timestamp']
|
2463
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
2464
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
2465
|
+
end
|
2466
|
+
if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] > 1000
|
2467
|
+
fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling SecurityMonitoringAPI.list_security_monitoring_signals, must be smaller than or equal to 1000.'
|
2468
|
+
end
|
2469
|
+
# resource path
|
2470
|
+
local_var_path = '/api/v2/security_monitoring/signals'
|
2471
|
+
|
2472
|
+
# query parameters
|
2473
|
+
query_params = opts[:query_params] || {}
|
2474
|
+
query_params[:'filter[query]'] = opts[:'filter_query'] if !opts[:'filter_query'].nil?
|
2475
|
+
query_params[:'filter[from]'] = opts[:'filter_from'] if !opts[:'filter_from'].nil?
|
2476
|
+
query_params[:'filter[to]'] = opts[:'filter_to'] if !opts[:'filter_to'].nil?
|
2477
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
2478
|
+
query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
|
2479
|
+
query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
|
2480
|
+
|
2481
|
+
# header parameters
|
2482
|
+
header_params = opts[:header_params] || {}
|
2483
|
+
# HTTP header 'Accept' (if needed)
|
2484
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2485
|
+
|
2486
|
+
# form parameters
|
2487
|
+
form_params = opts[:form_params] || {}
|
2488
|
+
|
2489
|
+
# http body (model)
|
2490
|
+
post_body = opts[:debug_body]
|
2491
|
+
|
2492
|
+
# return_type
|
2493
|
+
return_type = opts[:debug_return_type] || 'SecurityMonitoringSignalsListResponse'
|
2494
|
+
|
2495
|
+
# auth_names
|
2496
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
2497
|
+
|
2498
|
+
new_options = opts.merge(
|
2499
|
+
:operation => :list_security_monitoring_signals,
|
2500
|
+
:header_params => header_params,
|
2501
|
+
:query_params => query_params,
|
2502
|
+
:form_params => form_params,
|
2503
|
+
:body => post_body,
|
2504
|
+
:auth_names => auth_names,
|
2505
|
+
:return_type => return_type,
|
2506
|
+
:api_version => "V2"
|
2507
|
+
)
|
2508
|
+
|
2509
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
2510
|
+
if @api_client.config.debugging
|
2511
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#list_security_monitoring_signals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2512
|
+
end
|
2513
|
+
return data, status_code, headers
|
2514
|
+
end
|
2515
|
+
|
2516
|
+
# Get a quick list of security signals.
|
2517
|
+
#
|
2518
|
+
# Provide a paginated version of {#list_security_monitoring_signals}, returning all items.
|
2519
|
+
#
|
2520
|
+
# To use it you need to use a block: list_security_monitoring_signals_with_pagination { |item| p item }
|
2521
|
+
#
|
2522
|
+
# @yield [SecurityMonitoringSignal] Paginated items
|
2523
|
+
def list_security_monitoring_signals_with_pagination(opts = {})
|
2524
|
+
api_version = "V2"
|
2525
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_limit", 10)
|
2526
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
|
2527
|
+
while true do
|
2528
|
+
response = list_security_monitoring_signals(opts)
|
2529
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
2530
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
2531
|
+
break
|
2532
|
+
end
|
2533
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
2534
|
+
end
|
2535
|
+
end
|
2536
|
+
|
2537
|
+
# Get all suppression rules.
|
2538
|
+
#
|
2539
|
+
# @see #list_security_monitoring_suppressions_with_http_info
|
2540
|
+
def list_security_monitoring_suppressions(opts = {})
|
2541
|
+
data, _status_code, _headers = list_security_monitoring_suppressions_with_http_info(opts)
|
2542
|
+
data
|
2543
|
+
end
|
2544
|
+
|
2545
|
+
# Get all suppression rules.
|
2546
|
+
#
|
2547
|
+
# Get the list of all suppression rules.
|
1574
2548
|
#
|
1575
2549
|
# @param opts [Hash] the optional parameters
|
1576
|
-
# @
|
1577
|
-
|
1578
|
-
# @option opts [String] :sort The order of the jobs in results.
|
1579
|
-
# @option opts [String] :filter_query Query used to filter items from the fetched list.
|
1580
|
-
# @return [Array<(ListHistoricalJobsResponse, Integer, Hash)>] ListHistoricalJobsResponse data, response status code and response headers
|
1581
|
-
def list_historical_jobs_with_http_info(opts = {})
|
1582
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.list_historical_jobs".to_sym]
|
1583
|
-
if unstable_enabled
|
1584
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_historical_jobs")
|
1585
|
-
else
|
1586
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_historical_jobs"))
|
1587
|
-
end
|
2550
|
+
# @return [Array<(SecurityMonitoringSuppressionsResponse, Integer, Hash)>] SecurityMonitoringSuppressionsResponse data, response status code and response headers
|
2551
|
+
def list_security_monitoring_suppressions_with_http_info(opts = {})
|
1588
2552
|
|
1589
2553
|
if @api_client.config.debugging
|
1590
|
-
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.
|
2554
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_security_monitoring_suppressions ...'
|
1591
2555
|
end
|
1592
2556
|
# resource path
|
1593
|
-
local_var_path = '/api/v2/
|
2557
|
+
local_var_path = '/api/v2/security_monitoring/configuration/suppressions'
|
1594
2558
|
|
1595
2559
|
# query parameters
|
1596
2560
|
query_params = opts[:query_params] || {}
|
1597
|
-
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
1598
|
-
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
1599
|
-
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
1600
|
-
query_params[:'filter[query]'] = opts[:'filter_query'] if !opts[:'filter_query'].nil?
|
1601
2561
|
|
1602
2562
|
# header parameters
|
1603
2563
|
header_params = opts[:header_params] || {}
|
@@ -1611,13 +2571,13 @@ module DatadogAPIClient::V2
|
|
1611
2571
|
post_body = opts[:debug_body]
|
1612
2572
|
|
1613
2573
|
# return_type
|
1614
|
-
return_type = opts[:debug_return_type] || '
|
2574
|
+
return_type = opts[:debug_return_type] || 'SecurityMonitoringSuppressionsResponse'
|
1615
2575
|
|
1616
2576
|
# auth_names
|
1617
2577
|
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1618
2578
|
|
1619
2579
|
new_options = opts.merge(
|
1620
|
-
:operation => :
|
2580
|
+
:operation => :list_security_monitoring_suppressions,
|
1621
2581
|
:header_params => header_params,
|
1622
2582
|
:query_params => query_params,
|
1623
2583
|
:form_params => form_params,
|
@@ -1629,35 +2589,254 @@ module DatadogAPIClient::V2
|
|
1629
2589
|
|
1630
2590
|
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
1631
2591
|
if @api_client.config.debugging
|
1632
|
-
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#
|
2592
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#list_security_monitoring_suppressions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1633
2593
|
end
|
1634
2594
|
return data, status_code, headers
|
1635
2595
|
end
|
1636
2596
|
|
1637
|
-
#
|
2597
|
+
# List vulnerabilities.
|
1638
2598
|
#
|
1639
|
-
# @see #
|
1640
|
-
def
|
1641
|
-
data, _status_code, _headers =
|
2599
|
+
# @see #list_vulnerabilities_with_http_info
|
2600
|
+
def list_vulnerabilities(opts = {})
|
2601
|
+
data, _status_code, _headers = list_vulnerabilities_with_http_info(opts)
|
1642
2602
|
data
|
1643
2603
|
end
|
1644
2604
|
|
1645
|
-
#
|
2605
|
+
# List vulnerabilities.
|
2606
|
+
#
|
2607
|
+
# Get a list of vulnerabilities.
|
2608
|
+
#
|
2609
|
+
# ### Pagination
|
2610
|
+
#
|
2611
|
+
# Pagination is enabled by default in both `vulnerabilities` and `assets`. The size of the page varies depending on the endpoint and cannot be modified. To automate the request of the next page, you can use the links section in the response.
|
2612
|
+
#
|
2613
|
+
# This endpoint will return paginated responses. The pages are stored in the links section of the response:
|
2614
|
+
#
|
2615
|
+
# ```JSON
|
2616
|
+
# {
|
2617
|
+
# "data": [...],
|
2618
|
+
# "meta": {...},
|
2619
|
+
# "links": {
|
2620
|
+
# "self": "https://.../api/v2/security/vulnerabilities",
|
2621
|
+
# "first": "https://.../api/v2/security/vulnerabilities?page[number]=1&page[token]=abc",
|
2622
|
+
# "last": "https://.../api/v2/security/vulnerabilities?page[number]=43&page[token]=abc",
|
2623
|
+
# "next": "https://.../api/v2/security/vulnerabilities?page[number]=2&page[token]=abc"
|
2624
|
+
# }
|
2625
|
+
# }
|
2626
|
+
# ```
|
2627
|
+
#
|
2628
|
+
#
|
2629
|
+
# - `links.previous` is empty if the first page is requested.
|
2630
|
+
# - `links.next` is empty if the last page is requested.
|
2631
|
+
#
|
2632
|
+
# #### Token
|
2633
|
+
#
|
2634
|
+
# Vulnerabilities can be created, updated or deleted at any point in time.
|
2635
|
+
#
|
2636
|
+
# Upon the first request, a token is created to ensure consistency across subsequent paginated requests.
|
2637
|
+
#
|
2638
|
+
# A token is valid only for 24 hours.
|
2639
|
+
#
|
2640
|
+
# #### First request
|
2641
|
+
#
|
2642
|
+
# We consider a request to be the first request when there is no `page[token]` parameter.
|
2643
|
+
#
|
2644
|
+
# The response of this first request contains the newly created token in the `links` section.
|
2645
|
+
#
|
2646
|
+
# This token can then be used in the subsequent paginated requests.
|
2647
|
+
#
|
2648
|
+
# #### Subsequent requests
|
2649
|
+
#
|
2650
|
+
# Any request containing valid `page[token]` and `page[number]` parameters will be considered a subsequent request.
|
2651
|
+
#
|
2652
|
+
# If the `token` is invalid, a `404` response will be returned.
|
2653
|
+
#
|
2654
|
+
# If the page `number` is invalid, a `400` response will be returned.
|
2655
|
+
#
|
2656
|
+
# ### Filtering
|
2657
|
+
#
|
2658
|
+
# The request can include some filter parameters to filter the data to be retrieved. The format of the filter parameters follows the [JSON:API format](https://jsonapi.org/format/#fetching-filtering): `filter[$prop_name]`, where `prop_name` is the property name in the entity being filtered by.
|
2659
|
+
#
|
2660
|
+
# All filters can include multiple values, where data will be filtered with an OR clause: `filter[title]=Title1,Title2` will filter all vulnerabilities where title is equal to `Title1` OR `Title2`.
|
2661
|
+
#
|
2662
|
+
# String filters are case sensitive.
|
2663
|
+
#
|
2664
|
+
# Boolean filters accept `true` or `false` as values.
|
2665
|
+
#
|
2666
|
+
# Number filters must include an operator as a second filter input: `filter[$prop_name][$operator]`. For example, for the vulnerabilities endpoint: `filter[cvss.base.score][lte]=8`.
|
2667
|
+
#
|
2668
|
+
# Available operators are: `eq` (==), `lt` (<), `lte` (<=), `gt` (>) and `gte` (>=).
|
2669
|
+
#
|
2670
|
+
# ### Metadata
|
2671
|
+
#
|
2672
|
+
# Following [JSON:API format](https://jsonapi.org/format/#document-meta), object including non-standard meta-information.
|
2673
|
+
#
|
2674
|
+
# This endpoint includes the meta member in the response. For more details on each of the properties included in this section, check the endpoints response tables.
|
2675
|
+
#
|
2676
|
+
# ```JSON
|
2677
|
+
# {
|
2678
|
+
# "data": [...],
|
2679
|
+
# "meta": {
|
2680
|
+
# "total": 1500,
|
2681
|
+
# "count": 18732,
|
2682
|
+
# "token": "some_token"
|
2683
|
+
# },
|
2684
|
+
# "links": {...}
|
2685
|
+
# }
|
2686
|
+
# ```
|
1646
2687
|
#
|
1647
|
-
# Get the list of configured security filters with their definitions.
|
1648
2688
|
#
|
1649
2689
|
# @param opts [Hash] the optional parameters
|
1650
|
-
# @
|
1651
|
-
|
2690
|
+
# @option opts [String] :page_token Its value must come from the `links` section of the response of the first request. Do not manually edit it.
|
2691
|
+
# @option opts [Integer] :page_number The page number to be retrieved. It should be equal or greater than `1`
|
2692
|
+
# @option opts [VulnerabilityType] :filter_type Filter by vulnerability type.
|
2693
|
+
# @option opts [Float] :filter_cvss_base_score_op Filter by vulnerability base (i.e. from the original advisory) severity score.
|
2694
|
+
# @option opts [VulnerabilitySeverity] :filter_cvss_base_severity Filter by vulnerability base severity.
|
2695
|
+
# @option opts [String] :filter_cvss_base_vector Filter by vulnerability base CVSS vector.
|
2696
|
+
# @option opts [Float] :filter_cvss_datadog_score_op Filter by vulnerability Datadog severity score.
|
2697
|
+
# @option opts [VulnerabilitySeverity] :filter_cvss_datadog_severity Filter by vulnerability Datadog severity.
|
2698
|
+
# @option opts [String] :filter_cvss_datadog_vector Filter by vulnerability Datadog CVSS vector.
|
2699
|
+
# @option opts [VulnerabilityStatus] :filter_status Filter by the status of the vulnerability.
|
2700
|
+
# @option opts [VulnerabilityTool] :filter_tool Filter by the tool of the vulnerability.
|
2701
|
+
# @option opts [String] :filter_library_name Filter by library name.
|
2702
|
+
# @option opts [String] :filter_library_version Filter by library version.
|
2703
|
+
# @option opts [String] :filter_advisory_id Filter by advisory ID.
|
2704
|
+
# @option opts [Boolean] :filter_risks_exploitation_probability Filter by exploitation probability.
|
2705
|
+
# @option opts [Boolean] :filter_risks_poc_exploit_available Filter by POC exploit availability.
|
2706
|
+
# @option opts [Boolean] :filter_risks_exploit_available Filter by public exploit availability.
|
2707
|
+
# @option opts [Float] :filter_risks_epss_score_op Filter by vulnerability [EPSS](https://www.first.org/epss/) severity score.
|
2708
|
+
# @option opts [VulnerabilitySeverity] :filter_risks_epss_severity Filter by vulnerability [EPSS](https://www.first.org/epss/) severity.
|
2709
|
+
# @option opts [String] :filter_language Filter by language.
|
2710
|
+
# @option opts [VulnerabilityEcosystem] :filter_ecosystem Filter by ecosystem.
|
2711
|
+
# @option opts [String] :filter_code_location_location Filter by vulnerability location.
|
2712
|
+
# @option opts [String] :filter_code_location_file_path Filter by vulnerability file path.
|
2713
|
+
# @option opts [String] :filter_code_location_method Filter by method.
|
2714
|
+
# @option opts [Boolean] :filter_fix_available Filter by fix availability.
|
2715
|
+
# @option opts [String] :filter_repo_digests Filter by vulnerability `repo_digest` (when the vulnerability is related to `Image` asset).
|
2716
|
+
# @option opts [String] :filter_asset_name Filter by asset name.
|
2717
|
+
# @option opts [AssetType] :filter_asset_type Filter by asset type.
|
2718
|
+
# @option opts [String] :filter_asset_version_first Filter by the first version of the asset this vulnerability has been detected on.
|
2719
|
+
# @option opts [String] :filter_asset_version_last Filter by the last version of the asset this vulnerability has been detected on.
|
2720
|
+
# @option opts [String] :filter_asset_repository_url Filter by the repository url associated to the asset.
|
2721
|
+
# @option opts [Boolean] :filter_asset_risks_in_production Filter whether the asset is in production or not.
|
2722
|
+
# @option opts [Boolean] :filter_asset_risks_under_attack Filter whether the asset is under attack or not.
|
2723
|
+
# @option opts [Boolean] :filter_asset_risks_is_publicly_accessible Filter whether the asset is publicly accessible or not.
|
2724
|
+
# @option opts [Boolean] :filter_asset_risks_has_privileged_access Filter whether the asset is publicly accessible or not.
|
2725
|
+
# @option opts [Boolean] :filter_asset_risks_has_access_to_sensitive_data Filter whether the asset has access to sensitive data or not.
|
2726
|
+
# @option opts [String] :filter_asset_environments Filter by asset environments.
|
2727
|
+
# @option opts [String] :filter_asset_arch Filter by asset architecture.
|
2728
|
+
# @option opts [String] :filter_asset_operating_system_name Filter by asset operating system name.
|
2729
|
+
# @option opts [String] :filter_asset_operating_system_version Filter by asset operating system version.
|
2730
|
+
# @return [Array<(ListVulnerabilitiesResponse, Integer, Hash)>] ListVulnerabilitiesResponse data, response status code and response headers
|
2731
|
+
def list_vulnerabilities_with_http_info(opts = {})
|
2732
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.list_vulnerabilities".to_sym]
|
2733
|
+
if unstable_enabled
|
2734
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_vulnerabilities")
|
2735
|
+
else
|
2736
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_vulnerabilities"))
|
2737
|
+
end
|
1652
2738
|
|
1653
2739
|
if @api_client.config.debugging
|
1654
|
-
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.
|
2740
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_vulnerabilities ...'
|
2741
|
+
end
|
2742
|
+
if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 1
|
2743
|
+
fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling SecurityMonitoringAPI.list_vulnerabilities, must be greater than or equal to 1.'
|
2744
|
+
end
|
2745
|
+
allowable_values = ['AdminConsoleActive', 'CodeInjection', 'CommandInjection', 'ComponentWithKnownVulnerability', 'DangerousWorkflows', 'DefaultAppDeployed', 'DefaultHtmlEscapeInvalid', 'DirectoryListingLeak', 'EmailHtmlInjection', 'EndOfLife', 'HardcodedPassword', 'HardcodedSecret', 'HeaderInjection', 'HstsHeaderMissing', 'InsecureAuthProtocol', 'InsecureCookie', 'InsecureJspLayout', 'LdapInjection', 'MaliciousPackage', 'MandatoryRemediation', 'NoHttpOnlyCookie', 'NoSameSiteCookie', 'NoSqlMongoDbInjection', 'PathTraversal', 'ReflectionInjection', 'RiskyLicense', 'SessionRewriting', 'SessionTimeout', 'SqlInjection', 'Ssrf', 'StackTraceLeak', 'TrustBoundaryViolation', 'Unmaintained', 'UntrustedDeserialization', 'UnvalidatedRedirect', 'VerbTampering', 'WeakCipher', 'WeakHash', 'WeakRandomness', 'XContentTypeHeaderMissing', 'XPathInjection', 'Xss']
|
2746
|
+
if @api_client.config.client_side_validation && opts[:'filter_type'] && !allowable_values.include?(opts[:'filter_type'])
|
2747
|
+
fail ArgumentError, "invalid value for \"filter_type\", must be one of #{allowable_values}"
|
2748
|
+
end
|
2749
|
+
if @api_client.config.client_side_validation && !opts[:'filter_cvss_base_score_op'].nil? && opts[:'filter_cvss_base_score_op'] > 10
|
2750
|
+
fail ArgumentError, 'invalid value for "opts[:"filter_cvss_base_score_op"]" when calling SecurityMonitoringAPI.list_vulnerabilities, must be smaller than or equal to 10.'
|
2751
|
+
end
|
2752
|
+
if @api_client.config.client_side_validation && !opts[:'filter_cvss_base_score_op'].nil? && opts[:'filter_cvss_base_score_op'] < 0
|
2753
|
+
fail ArgumentError, 'invalid value for "opts[:"filter_cvss_base_score_op"]" when calling SecurityMonitoringAPI.list_vulnerabilities, must be greater than or equal to 0.'
|
2754
|
+
end
|
2755
|
+
allowable_values = ['Unknown', 'None', 'Low', 'Medium', 'High', 'Critical']
|
2756
|
+
if @api_client.config.client_side_validation && opts[:'filter_cvss_base_severity'] && !allowable_values.include?(opts[:'filter_cvss_base_severity'])
|
2757
|
+
fail ArgumentError, "invalid value for \"filter_cvss_base_severity\", must be one of #{allowable_values}"
|
2758
|
+
end
|
2759
|
+
if @api_client.config.client_side_validation && !opts[:'filter_cvss_datadog_score_op'].nil? && opts[:'filter_cvss_datadog_score_op'] > 10
|
2760
|
+
fail ArgumentError, 'invalid value for "opts[:"filter_cvss_datadog_score_op"]" when calling SecurityMonitoringAPI.list_vulnerabilities, must be smaller than or equal to 10.'
|
2761
|
+
end
|
2762
|
+
if @api_client.config.client_side_validation && !opts[:'filter_cvss_datadog_score_op'].nil? && opts[:'filter_cvss_datadog_score_op'] < 0
|
2763
|
+
fail ArgumentError, 'invalid value for "opts[:"filter_cvss_datadog_score_op"]" when calling SecurityMonitoringAPI.list_vulnerabilities, must be greater than or equal to 0.'
|
2764
|
+
end
|
2765
|
+
allowable_values = ['Unknown', 'None', 'Low', 'Medium', 'High', 'Critical']
|
2766
|
+
if @api_client.config.client_side_validation && opts[:'filter_cvss_datadog_severity'] && !allowable_values.include?(opts[:'filter_cvss_datadog_severity'])
|
2767
|
+
fail ArgumentError, "invalid value for \"filter_cvss_datadog_severity\", must be one of #{allowable_values}"
|
2768
|
+
end
|
2769
|
+
allowable_values = ['Open', 'Muted', 'Remediated', 'InProgress', 'AutoClosed']
|
2770
|
+
if @api_client.config.client_side_validation && opts[:'filter_status'] && !allowable_values.include?(opts[:'filter_status'])
|
2771
|
+
fail ArgumentError, "invalid value for \"filter_status\", must be one of #{allowable_values}"
|
2772
|
+
end
|
2773
|
+
allowable_values = ['IAST', 'SCA', 'Infra']
|
2774
|
+
if @api_client.config.client_side_validation && opts[:'filter_tool'] && !allowable_values.include?(opts[:'filter_tool'])
|
2775
|
+
fail ArgumentError, "invalid value for \"filter_tool\", must be one of #{allowable_values}"
|
2776
|
+
end
|
2777
|
+
if @api_client.config.client_side_validation && !opts[:'filter_risks_epss_score_op'].nil? && opts[:'filter_risks_epss_score_op'] > 1
|
2778
|
+
fail ArgumentError, 'invalid value for "opts[:"filter_risks_epss_score_op"]" when calling SecurityMonitoringAPI.list_vulnerabilities, must be smaller than or equal to 1.'
|
2779
|
+
end
|
2780
|
+
if @api_client.config.client_side_validation && !opts[:'filter_risks_epss_score_op'].nil? && opts[:'filter_risks_epss_score_op'] < 0
|
2781
|
+
fail ArgumentError, 'invalid value for "opts[:"filter_risks_epss_score_op"]" when calling SecurityMonitoringAPI.list_vulnerabilities, must be greater than or equal to 0.'
|
2782
|
+
end
|
2783
|
+
allowable_values = ['Unknown', 'None', 'Low', 'Medium', 'High', 'Critical']
|
2784
|
+
if @api_client.config.client_side_validation && opts[:'filter_risks_epss_severity'] && !allowable_values.include?(opts[:'filter_risks_epss_severity'])
|
2785
|
+
fail ArgumentError, "invalid value for \"filter_risks_epss_severity\", must be one of #{allowable_values}"
|
2786
|
+
end
|
2787
|
+
allowable_values = ['PyPI', 'Maven', 'NuGet', 'Npm', 'RubyGems', 'Go', 'Packagist', 'Ddeb', 'Rpm', 'Apk', 'Windows']
|
2788
|
+
if @api_client.config.client_side_validation && opts[:'filter_ecosystem'] && !allowable_values.include?(opts[:'filter_ecosystem'])
|
2789
|
+
fail ArgumentError, "invalid value for \"filter_ecosystem\", must be one of #{allowable_values}"
|
2790
|
+
end
|
2791
|
+
allowable_values = ['Repository', 'Service', 'Host', 'HostImage', 'Image']
|
2792
|
+
if @api_client.config.client_side_validation && opts[:'filter_asset_type'] && !allowable_values.include?(opts[:'filter_asset_type'])
|
2793
|
+
fail ArgumentError, "invalid value for \"filter_asset_type\", must be one of #{allowable_values}"
|
1655
2794
|
end
|
1656
2795
|
# resource path
|
1657
|
-
local_var_path = '/api/v2/
|
2796
|
+
local_var_path = '/api/v2/security/vulnerabilities'
|
1658
2797
|
|
1659
2798
|
# query parameters
|
1660
2799
|
query_params = opts[:query_params] || {}
|
2800
|
+
query_params[:'page[token]'] = opts[:'page_token'] if !opts[:'page_token'].nil?
|
2801
|
+
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
2802
|
+
query_params[:'filter[type]'] = opts[:'filter_type'] if !opts[:'filter_type'].nil?
|
2803
|
+
query_params[:'filter[cvss.base.score][`$op`]'] = opts[:'filter_cvss_base_score_op'] if !opts[:'filter_cvss_base_score_op'].nil?
|
2804
|
+
query_params[:'filter[cvss.base.severity]'] = opts[:'filter_cvss_base_severity'] if !opts[:'filter_cvss_base_severity'].nil?
|
2805
|
+
query_params[:'filter[cvss.base.vector]'] = opts[:'filter_cvss_base_vector'] if !opts[:'filter_cvss_base_vector'].nil?
|
2806
|
+
query_params[:'filter[cvss.datadog.score][`$op`]'] = opts[:'filter_cvss_datadog_score_op'] if !opts[:'filter_cvss_datadog_score_op'].nil?
|
2807
|
+
query_params[:'filter[cvss.datadog.severity]'] = opts[:'filter_cvss_datadog_severity'] if !opts[:'filter_cvss_datadog_severity'].nil?
|
2808
|
+
query_params[:'filter[cvss.datadog.vector]'] = opts[:'filter_cvss_datadog_vector'] if !opts[:'filter_cvss_datadog_vector'].nil?
|
2809
|
+
query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil?
|
2810
|
+
query_params[:'filter[tool]'] = opts[:'filter_tool'] if !opts[:'filter_tool'].nil?
|
2811
|
+
query_params[:'filter[library.name]'] = opts[:'filter_library_name'] if !opts[:'filter_library_name'].nil?
|
2812
|
+
query_params[:'filter[library.version]'] = opts[:'filter_library_version'] if !opts[:'filter_library_version'].nil?
|
2813
|
+
query_params[:'filter[advisory_id]'] = opts[:'filter_advisory_id'] if !opts[:'filter_advisory_id'].nil?
|
2814
|
+
query_params[:'filter[risks.exploitation_probability]'] = opts[:'filter_risks_exploitation_probability'] if !opts[:'filter_risks_exploitation_probability'].nil?
|
2815
|
+
query_params[:'filter[risks.poc_exploit_available]'] = opts[:'filter_risks_poc_exploit_available'] if !opts[:'filter_risks_poc_exploit_available'].nil?
|
2816
|
+
query_params[:'filter[risks.exploit_available]'] = opts[:'filter_risks_exploit_available'] if !opts[:'filter_risks_exploit_available'].nil?
|
2817
|
+
query_params[:'filter[risks.epss.score][`$op`]'] = opts[:'filter_risks_epss_score_op'] if !opts[:'filter_risks_epss_score_op'].nil?
|
2818
|
+
query_params[:'filter[risks.epss.severity]'] = opts[:'filter_risks_epss_severity'] if !opts[:'filter_risks_epss_severity'].nil?
|
2819
|
+
query_params[:'filter[language]'] = opts[:'filter_language'] if !opts[:'filter_language'].nil?
|
2820
|
+
query_params[:'filter[ecosystem]'] = opts[:'filter_ecosystem'] if !opts[:'filter_ecosystem'].nil?
|
2821
|
+
query_params[:'filter[code_location.location]'] = opts[:'filter_code_location_location'] if !opts[:'filter_code_location_location'].nil?
|
2822
|
+
query_params[:'filter[code_location.file_path]'] = opts[:'filter_code_location_file_path'] if !opts[:'filter_code_location_file_path'].nil?
|
2823
|
+
query_params[:'filter[code_location.method]'] = opts[:'filter_code_location_method'] if !opts[:'filter_code_location_method'].nil?
|
2824
|
+
query_params[:'filter[fix_available]'] = opts[:'filter_fix_available'] if !opts[:'filter_fix_available'].nil?
|
2825
|
+
query_params[:'filter[repo_digests]'] = opts[:'filter_repo_digests'] if !opts[:'filter_repo_digests'].nil?
|
2826
|
+
query_params[:'filter[asset.name]'] = opts[:'filter_asset_name'] if !opts[:'filter_asset_name'].nil?
|
2827
|
+
query_params[:'filter[asset.type]'] = opts[:'filter_asset_type'] if !opts[:'filter_asset_type'].nil?
|
2828
|
+
query_params[:'filter[asset.version.first]'] = opts[:'filter_asset_version_first'] if !opts[:'filter_asset_version_first'].nil?
|
2829
|
+
query_params[:'filter[asset.version.last]'] = opts[:'filter_asset_version_last'] if !opts[:'filter_asset_version_last'].nil?
|
2830
|
+
query_params[:'filter[asset.repository_url]'] = opts[:'filter_asset_repository_url'] if !opts[:'filter_asset_repository_url'].nil?
|
2831
|
+
query_params[:'filter[asset.risks.in_production]'] = opts[:'filter_asset_risks_in_production'] if !opts[:'filter_asset_risks_in_production'].nil?
|
2832
|
+
query_params[:'filter[asset.risks.under_attack]'] = opts[:'filter_asset_risks_under_attack'] if !opts[:'filter_asset_risks_under_attack'].nil?
|
2833
|
+
query_params[:'filter[asset.risks.is_publicly_accessible]'] = opts[:'filter_asset_risks_is_publicly_accessible'] if !opts[:'filter_asset_risks_is_publicly_accessible'].nil?
|
2834
|
+
query_params[:'filter[asset.risks.has_privileged_access]'] = opts[:'filter_asset_risks_has_privileged_access'] if !opts[:'filter_asset_risks_has_privileged_access'].nil?
|
2835
|
+
query_params[:'filter[asset.risks.has_access_to_sensitive_data]'] = opts[:'filter_asset_risks_has_access_to_sensitive_data'] if !opts[:'filter_asset_risks_has_access_to_sensitive_data'].nil?
|
2836
|
+
query_params[:'filter[asset.environments]'] = opts[:'filter_asset_environments'] if !opts[:'filter_asset_environments'].nil?
|
2837
|
+
query_params[:'filter[asset.arch]'] = opts[:'filter_asset_arch'] if !opts[:'filter_asset_arch'].nil?
|
2838
|
+
query_params[:'filter[asset.operating_system.name]'] = opts[:'filter_asset_operating_system_name'] if !opts[:'filter_asset_operating_system_name'].nil?
|
2839
|
+
query_params[:'filter[asset.operating_system.version]'] = opts[:'filter_asset_operating_system_version'] if !opts[:'filter_asset_operating_system_version'].nil?
|
1661
2840
|
|
1662
2841
|
# header parameters
|
1663
2842
|
header_params = opts[:header_params] || {}
|
@@ -1671,13 +2850,13 @@ module DatadogAPIClient::V2
|
|
1671
2850
|
post_body = opts[:debug_body]
|
1672
2851
|
|
1673
2852
|
# return_type
|
1674
|
-
return_type = opts[:debug_return_type] || '
|
2853
|
+
return_type = opts[:debug_return_type] || 'ListVulnerabilitiesResponse'
|
1675
2854
|
|
1676
2855
|
# auth_names
|
1677
2856
|
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1678
2857
|
|
1679
2858
|
new_options = opts.merge(
|
1680
|
-
:operation => :
|
2859
|
+
:operation => :list_vulnerabilities,
|
1681
2860
|
:header_params => header_params,
|
1682
2861
|
:query_params => query_params,
|
1683
2862
|
:form_params => form_params,
|
@@ -1689,39 +2868,93 @@ module DatadogAPIClient::V2
|
|
1689
2868
|
|
1690
2869
|
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
1691
2870
|
if @api_client.config.debugging
|
1692
|
-
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#
|
2871
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#list_vulnerabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1693
2872
|
end
|
1694
2873
|
return data, status_code, headers
|
1695
2874
|
end
|
1696
2875
|
|
1697
|
-
# List
|
2876
|
+
# List vulnerable assets.
|
1698
2877
|
#
|
1699
|
-
# @see #
|
1700
|
-
def
|
1701
|
-
data, _status_code, _headers =
|
2878
|
+
# @see #list_vulnerable_assets_with_http_info
|
2879
|
+
def list_vulnerable_assets(opts = {})
|
2880
|
+
data, _status_code, _headers = list_vulnerable_assets_with_http_info(opts)
|
1702
2881
|
data
|
1703
2882
|
end
|
1704
2883
|
|
1705
|
-
# List
|
2884
|
+
# List vulnerable assets.
|
2885
|
+
#
|
2886
|
+
# Get a list of vulnerable assets.
|
2887
|
+
#
|
2888
|
+
# ### Pagination
|
2889
|
+
#
|
2890
|
+
# Please review the [Pagination section for the "List Vulnerabilities"](#pagination) endpoint.
|
2891
|
+
#
|
2892
|
+
# ### Filtering
|
2893
|
+
#
|
2894
|
+
# Please review the [Filtering section for the "List Vulnerabilities"](#filtering) endpoint.
|
2895
|
+
#
|
2896
|
+
# ### Metadata
|
2897
|
+
#
|
2898
|
+
# Please review the [Metadata section for the "List Vulnerabilities"](#metadata) endpoint.
|
1706
2899
|
#
|
1707
|
-
# List rules.
|
1708
2900
|
#
|
1709
2901
|
# @param opts [Hash] the optional parameters
|
1710
|
-
# @option opts [
|
1711
|
-
# @option opts [Integer] :page_number
|
1712
|
-
# @
|
1713
|
-
|
2902
|
+
# @option opts [String] :page_token Its value must come from the `links` section of the response of the first request. Do not manually edit it.
|
2903
|
+
# @option opts [Integer] :page_number The page number to be retrieved. It should be equal or greater than `1`
|
2904
|
+
# @option opts [String] :filter_name Filter by name.
|
2905
|
+
# @option opts [AssetType] :filter_type Filter by type.
|
2906
|
+
# @option opts [String] :filter_version_first Filter by the first version of the asset since it has been vulnerable.
|
2907
|
+
# @option opts [String] :filter_version_last Filter by the last detected version of the asset.
|
2908
|
+
# @option opts [String] :filter_repository_url Filter by the repository url associated to the asset.
|
2909
|
+
# @option opts [Boolean] :filter_risks_in_production Filter whether the asset is in production or not.
|
2910
|
+
# @option opts [Boolean] :filter_risks_under_attack Filter whether the asset (Service) is under attack or not.
|
2911
|
+
# @option opts [Boolean] :filter_risks_is_publicly_accessible Filter whether the asset (Host) is publicly accessible or not.
|
2912
|
+
# @option opts [Boolean] :filter_risks_has_privileged_access Filter whether the asset (Host) has privileged access or not.
|
2913
|
+
# @option opts [Boolean] :filter_risks_has_access_to_sensitive_data Filter whether the asset (Host) has access to sensitive data or not.
|
2914
|
+
# @option opts [String] :filter_environments Filter by environment.
|
2915
|
+
# @option opts [String] :filter_arch Filter by architecture.
|
2916
|
+
# @option opts [String] :filter_operating_system_name Filter by operating system name.
|
2917
|
+
# @option opts [String] :filter_operating_system_version Filter by operating system version.
|
2918
|
+
# @return [Array<(ListVulnerableAssetsResponse, Integer, Hash)>] ListVulnerableAssetsResponse data, response status code and response headers
|
2919
|
+
def list_vulnerable_assets_with_http_info(opts = {})
|
2920
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.list_vulnerable_assets".to_sym]
|
2921
|
+
if unstable_enabled
|
2922
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_vulnerable_assets")
|
2923
|
+
else
|
2924
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_vulnerable_assets"))
|
2925
|
+
end
|
1714
2926
|
|
1715
2927
|
if @api_client.config.debugging
|
1716
|
-
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.
|
2928
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_vulnerable_assets ...'
|
2929
|
+
end
|
2930
|
+
if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 1
|
2931
|
+
fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling SecurityMonitoringAPI.list_vulnerable_assets, must be greater than or equal to 1.'
|
2932
|
+
end
|
2933
|
+
allowable_values = ['Repository', 'Service', 'Host', 'HostImage', 'Image']
|
2934
|
+
if @api_client.config.client_side_validation && opts[:'filter_type'] && !allowable_values.include?(opts[:'filter_type'])
|
2935
|
+
fail ArgumentError, "invalid value for \"filter_type\", must be one of #{allowable_values}"
|
1717
2936
|
end
|
1718
2937
|
# resource path
|
1719
|
-
local_var_path = '/api/v2/
|
2938
|
+
local_var_path = '/api/v2/security/assets'
|
1720
2939
|
|
1721
2940
|
# query parameters
|
1722
2941
|
query_params = opts[:query_params] || {}
|
1723
|
-
query_params[:'page[
|
2942
|
+
query_params[:'page[token]'] = opts[:'page_token'] if !opts[:'page_token'].nil?
|
1724
2943
|
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
2944
|
+
query_params[:'filter[name]'] = opts[:'filter_name'] if !opts[:'filter_name'].nil?
|
2945
|
+
query_params[:'filter[type]'] = opts[:'filter_type'] if !opts[:'filter_type'].nil?
|
2946
|
+
query_params[:'filter[version.first]'] = opts[:'filter_version_first'] if !opts[:'filter_version_first'].nil?
|
2947
|
+
query_params[:'filter[version.last]'] = opts[:'filter_version_last'] if !opts[:'filter_version_last'].nil?
|
2948
|
+
query_params[:'filter[repository_url]'] = opts[:'filter_repository_url'] if !opts[:'filter_repository_url'].nil?
|
2949
|
+
query_params[:'filter[risks.in_production]'] = opts[:'filter_risks_in_production'] if !opts[:'filter_risks_in_production'].nil?
|
2950
|
+
query_params[:'filter[risks.under_attack]'] = opts[:'filter_risks_under_attack'] if !opts[:'filter_risks_under_attack'].nil?
|
2951
|
+
query_params[:'filter[risks.is_publicly_accessible]'] = opts[:'filter_risks_is_publicly_accessible'] if !opts[:'filter_risks_is_publicly_accessible'].nil?
|
2952
|
+
query_params[:'filter[risks.has_privileged_access]'] = opts[:'filter_risks_has_privileged_access'] if !opts[:'filter_risks_has_privileged_access'].nil?
|
2953
|
+
query_params[:'filter[risks.has_access_to_sensitive_data]'] = opts[:'filter_risks_has_access_to_sensitive_data'] if !opts[:'filter_risks_has_access_to_sensitive_data'].nil?
|
2954
|
+
query_params[:'filter[environments]'] = opts[:'filter_environments'] if !opts[:'filter_environments'].nil?
|
2955
|
+
query_params[:'filter[arch]'] = opts[:'filter_arch'] if !opts[:'filter_arch'].nil?
|
2956
|
+
query_params[:'filter[operating_system.name]'] = opts[:'filter_operating_system_name'] if !opts[:'filter_operating_system_name'].nil?
|
2957
|
+
query_params[:'filter[operating_system.version]'] = opts[:'filter_operating_system_version'] if !opts[:'filter_operating_system_version'].nil?
|
1725
2958
|
|
1726
2959
|
# header parameters
|
1727
2960
|
header_params = opts[:header_params] || {}
|
@@ -1735,13 +2968,13 @@ module DatadogAPIClient::V2
|
|
1735
2968
|
post_body = opts[:debug_body]
|
1736
2969
|
|
1737
2970
|
# return_type
|
1738
|
-
return_type = opts[:debug_return_type] || '
|
2971
|
+
return_type = opts[:debug_return_type] || 'ListVulnerableAssetsResponse'
|
1739
2972
|
|
1740
2973
|
# auth_names
|
1741
2974
|
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1742
2975
|
|
1743
2976
|
new_options = opts.merge(
|
1744
|
-
:operation => :
|
2977
|
+
:operation => :list_vulnerable_assets,
|
1745
2978
|
:header_params => header_params,
|
1746
2979
|
:query_params => query_params,
|
1747
2980
|
:form_params => form_params,
|
@@ -1753,76 +2986,68 @@ module DatadogAPIClient::V2
|
|
1753
2986
|
|
1754
2987
|
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
1755
2988
|
if @api_client.config.debugging
|
1756
|
-
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#
|
2989
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#list_vulnerable_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1757
2990
|
end
|
1758
2991
|
return data, status_code, headers
|
1759
2992
|
end
|
1760
2993
|
|
1761
|
-
#
|
2994
|
+
# Mute or unmute a batch of findings.
|
1762
2995
|
#
|
1763
|
-
# @see #
|
1764
|
-
def
|
1765
|
-
data, _status_code, _headers =
|
2996
|
+
# @see #mute_findings_with_http_info
|
2997
|
+
def mute_findings(body, opts = {})
|
2998
|
+
data, _status_code, _headers = mute_findings_with_http_info(body, opts)
|
1766
2999
|
data
|
1767
3000
|
end
|
1768
3001
|
|
1769
|
-
#
|
3002
|
+
# Mute or unmute a batch of findings.
|
1770
3003
|
#
|
1771
|
-
#
|
1772
|
-
# Both this endpoint and the POST endpoint can be used interchangeably when listing
|
1773
|
-
# security signals.
|
3004
|
+
# Mute or unmute findings.
|
1774
3005
|
#
|
3006
|
+
# @param body [BulkMuteFindingsRequest] ### Attributes All findings are updated with the same attributes. The request body must include at least two attributes: `muted` and `reason`. The allowed reasons depend on whether the finding is being muted or unmuted: - To mute a finding: `PENDING_FIX`, `FALSE_POSITIVE`, `ACCEPTED_RISK`, `OTHER`. - To unmute a finding : `NO_PENDING_FIX`, `HUMAN_ERROR`, `NO_LONGER_ACCEPTED_RISK`, `OTHER`. ### Meta The request body must include a list of the finding IDs to be updated.
|
1775
3007
|
# @param opts [Hash] the optional parameters
|
1776
|
-
# @
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
3008
|
+
# @return [Array<(BulkMuteFindingsResponse, Integer, Hash)>] BulkMuteFindingsResponse data, response status code and response headers
|
3009
|
+
def mute_findings_with_http_info(body, opts = {})
|
3010
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.mute_findings".to_sym]
|
3011
|
+
if unstable_enabled
|
3012
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.mute_findings")
|
3013
|
+
else
|
3014
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.mute_findings"))
|
3015
|
+
end
|
1784
3016
|
|
1785
3017
|
if @api_client.config.debugging
|
1786
|
-
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.
|
1787
|
-
end
|
1788
|
-
allowable_values = ['timestamp', '-timestamp']
|
1789
|
-
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
1790
|
-
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
3018
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.mute_findings ...'
|
1791
3019
|
end
|
1792
|
-
|
1793
|
-
|
3020
|
+
# verify the required parameter 'body' is set
|
3021
|
+
if @api_client.config.client_side_validation && body.nil?
|
3022
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.mute_findings"
|
1794
3023
|
end
|
1795
3024
|
# resource path
|
1796
|
-
local_var_path = '/api/v2/
|
3025
|
+
local_var_path = '/api/v2/posture_management/findings'
|
1797
3026
|
|
1798
3027
|
# query parameters
|
1799
3028
|
query_params = opts[:query_params] || {}
|
1800
|
-
query_params[:'filter[query]'] = opts[:'filter_query'] if !opts[:'filter_query'].nil?
|
1801
|
-
query_params[:'filter[from]'] = opts[:'filter_from'] if !opts[:'filter_from'].nil?
|
1802
|
-
query_params[:'filter[to]'] = opts[:'filter_to'] if !opts[:'filter_to'].nil?
|
1803
|
-
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
1804
|
-
query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
|
1805
|
-
query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
|
1806
3029
|
|
1807
3030
|
# header parameters
|
1808
3031
|
header_params = opts[:header_params] || {}
|
1809
3032
|
# HTTP header 'Accept' (if needed)
|
1810
3033
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
3034
|
+
# HTTP header 'Content-Type'
|
3035
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1811
3036
|
|
1812
3037
|
# form parameters
|
1813
3038
|
form_params = opts[:form_params] || {}
|
1814
3039
|
|
1815
3040
|
# http body (model)
|
1816
|
-
post_body = opts[:debug_body]
|
3041
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
1817
3042
|
|
1818
3043
|
# return_type
|
1819
|
-
return_type = opts[:debug_return_type] || '
|
3044
|
+
return_type = opts[:debug_return_type] || 'BulkMuteFindingsResponse'
|
1820
3045
|
|
1821
3046
|
# auth_names
|
1822
|
-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth
|
3047
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
1823
3048
|
|
1824
3049
|
new_options = opts.merge(
|
1825
|
-
:operation => :
|
3050
|
+
:operation => :mute_findings,
|
1826
3051
|
:header_params => header_params,
|
1827
3052
|
:query_params => query_params,
|
1828
3053
|
:form_params => form_params,
|
@@ -1832,55 +3057,44 @@ module DatadogAPIClient::V2
|
|
1832
3057
|
:api_version => "V2"
|
1833
3058
|
)
|
1834
3059
|
|
1835
|
-
data, status_code, headers = @api_client.call_api(Net::HTTP::
|
3060
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
1836
3061
|
if @api_client.config.debugging
|
1837
|
-
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#
|
3062
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#mute_findings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1838
3063
|
end
|
1839
3064
|
return data, status_code, headers
|
1840
3065
|
end
|
1841
3066
|
|
1842
|
-
#
|
1843
|
-
#
|
1844
|
-
# Provide a paginated version of {#list_security_monitoring_signals}, returning all items.
|
1845
|
-
#
|
1846
|
-
# To use it you need to use a block: list_security_monitoring_signals_with_pagination { |item| p item }
|
1847
|
-
#
|
1848
|
-
# @yield [SecurityMonitoringSignal] Paginated items
|
1849
|
-
def list_security_monitoring_signals_with_pagination(opts = {})
|
1850
|
-
api_version = "V2"
|
1851
|
-
page_size = @api_client.get_attribute_from_path(opts, "page_limit", 10)
|
1852
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
|
1853
|
-
while true do
|
1854
|
-
response = list_security_monitoring_signals(opts)
|
1855
|
-
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
1856
|
-
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
1857
|
-
break
|
1858
|
-
end
|
1859
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
1860
|
-
end
|
1861
|
-
end
|
1862
|
-
|
1863
|
-
# Get all suppression rules.
|
3067
|
+
# Patch a signal-based notification rule.
|
1864
3068
|
#
|
1865
|
-
# @see #
|
1866
|
-
def
|
1867
|
-
data, _status_code, _headers =
|
3069
|
+
# @see #patch_signal_notification_rule_with_http_info
|
3070
|
+
def patch_signal_notification_rule(id, body, opts = {})
|
3071
|
+
data, _status_code, _headers = patch_signal_notification_rule_with_http_info(id, body, opts)
|
1868
3072
|
data
|
1869
3073
|
end
|
1870
3074
|
|
1871
|
-
#
|
3075
|
+
# Patch a signal-based notification rule.
|
1872
3076
|
#
|
1873
|
-
#
|
3077
|
+
# Partially update the notification rule. All fields are optional; if a field is not provided, it is not updated.
|
1874
3078
|
#
|
3079
|
+
# @param id [String] ID of the notification rule.
|
3080
|
+
# @param body [PatchNotificationRuleParameters]
|
1875
3081
|
# @param opts [Hash] the optional parameters
|
1876
|
-
# @return [Array<(
|
1877
|
-
def
|
3082
|
+
# @return [Array<(NotificationRuleResponse, Integer, Hash)>] NotificationRuleResponse data, response status code and response headers
|
3083
|
+
def patch_signal_notification_rule_with_http_info(id, body, opts = {})
|
1878
3084
|
|
1879
3085
|
if @api_client.config.debugging
|
1880
|
-
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.
|
3086
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.patch_signal_notification_rule ...'
|
3087
|
+
end
|
3088
|
+
# verify the required parameter 'id' is set
|
3089
|
+
if @api_client.config.client_side_validation && id.nil?
|
3090
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SecurityMonitoringAPI.patch_signal_notification_rule"
|
3091
|
+
end
|
3092
|
+
# verify the required parameter 'body' is set
|
3093
|
+
if @api_client.config.client_side_validation && body.nil?
|
3094
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.patch_signal_notification_rule"
|
1881
3095
|
end
|
1882
3096
|
# resource path
|
1883
|
-
local_var_path = '/api/v2/
|
3097
|
+
local_var_path = '/api/v2/security/signals/notification_rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
|
1884
3098
|
|
1885
3099
|
# query parameters
|
1886
3100
|
query_params = opts[:query_params] || {}
|
@@ -1889,21 +3103,23 @@ module DatadogAPIClient::V2
|
|
1889
3103
|
header_params = opts[:header_params] || {}
|
1890
3104
|
# HTTP header 'Accept' (if needed)
|
1891
3105
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
3106
|
+
# HTTP header 'Content-Type'
|
3107
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1892
3108
|
|
1893
3109
|
# form parameters
|
1894
3110
|
form_params = opts[:form_params] || {}
|
1895
3111
|
|
1896
3112
|
# http body (model)
|
1897
|
-
post_body = opts[:debug_body]
|
3113
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
1898
3114
|
|
1899
3115
|
# return_type
|
1900
|
-
return_type = opts[:debug_return_type] || '
|
3116
|
+
return_type = opts[:debug_return_type] || 'NotificationRuleResponse'
|
1901
3117
|
|
1902
3118
|
# auth_names
|
1903
3119
|
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1904
3120
|
|
1905
3121
|
new_options = opts.merge(
|
1906
|
-
:operation => :
|
3122
|
+
:operation => :patch_signal_notification_rule,
|
1907
3123
|
:header_params => header_params,
|
1908
3124
|
:query_params => query_params,
|
1909
3125
|
:form_params => form_params,
|
@@ -1913,45 +3129,44 @@ module DatadogAPIClient::V2
|
|
1913
3129
|
:api_version => "V2"
|
1914
3130
|
)
|
1915
3131
|
|
1916
|
-
data, status_code, headers = @api_client.call_api(Net::HTTP::
|
3132
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
1917
3133
|
if @api_client.config.debugging
|
1918
|
-
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#
|
3134
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#patch_signal_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1919
3135
|
end
|
1920
3136
|
return data, status_code, headers
|
1921
3137
|
end
|
1922
3138
|
|
1923
|
-
#
|
3139
|
+
# Patch a vulnerability-based notification rule.
|
1924
3140
|
#
|
1925
|
-
# @see #
|
1926
|
-
def
|
1927
|
-
data, _status_code, _headers =
|
3141
|
+
# @see #patch_vulnerability_notification_rule_with_http_info
|
3142
|
+
def patch_vulnerability_notification_rule(id, body, opts = {})
|
3143
|
+
data, _status_code, _headers = patch_vulnerability_notification_rule_with_http_info(id, body, opts)
|
1928
3144
|
data
|
1929
3145
|
end
|
1930
3146
|
|
1931
|
-
#
|
3147
|
+
# Patch a vulnerability-based notification rule.
|
1932
3148
|
#
|
1933
|
-
#
|
3149
|
+
# Partially update the notification rule. All fields are optional; if a field is not provided, it is not updated.
|
1934
3150
|
#
|
1935
|
-
# @param
|
3151
|
+
# @param id [String] ID of the notification rule.
|
3152
|
+
# @param body [PatchNotificationRuleParameters]
|
1936
3153
|
# @param opts [Hash] the optional parameters
|
1937
|
-
# @return [Array<(
|
1938
|
-
def
|
1939
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.mute_findings".to_sym]
|
1940
|
-
if unstable_enabled
|
1941
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.mute_findings")
|
1942
|
-
else
|
1943
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.mute_findings"))
|
1944
|
-
end
|
3154
|
+
# @return [Array<(NotificationRuleResponse, Integer, Hash)>] NotificationRuleResponse data, response status code and response headers
|
3155
|
+
def patch_vulnerability_notification_rule_with_http_info(id, body, opts = {})
|
1945
3156
|
|
1946
3157
|
if @api_client.config.debugging
|
1947
|
-
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.
|
3158
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.patch_vulnerability_notification_rule ...'
|
3159
|
+
end
|
3160
|
+
# verify the required parameter 'id' is set
|
3161
|
+
if @api_client.config.client_side_validation && id.nil?
|
3162
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SecurityMonitoringAPI.patch_vulnerability_notification_rule"
|
1948
3163
|
end
|
1949
3164
|
# verify the required parameter 'body' is set
|
1950
3165
|
if @api_client.config.client_side_validation && body.nil?
|
1951
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.
|
3166
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.patch_vulnerability_notification_rule"
|
1952
3167
|
end
|
1953
3168
|
# resource path
|
1954
|
-
local_var_path = '/api/v2/
|
3169
|
+
local_var_path = '/api/v2/security/vulnerabilities/notification_rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
|
1955
3170
|
|
1956
3171
|
# query parameters
|
1957
3172
|
query_params = opts[:query_params] || {}
|
@@ -1970,13 +3185,13 @@ module DatadogAPIClient::V2
|
|
1970
3185
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
1971
3186
|
|
1972
3187
|
# return_type
|
1973
|
-
return_type = opts[:debug_return_type] || '
|
3188
|
+
return_type = opts[:debug_return_type] || 'NotificationRuleResponse'
|
1974
3189
|
|
1975
3190
|
# auth_names
|
1976
|
-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
3191
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1977
3192
|
|
1978
3193
|
new_options = opts.merge(
|
1979
|
-
:operation => :
|
3194
|
+
:operation => :patch_vulnerability_notification_rule,
|
1980
3195
|
:header_params => header_params,
|
1981
3196
|
:query_params => query_params,
|
1982
3197
|
:form_params => form_params,
|
@@ -1988,7 +3203,7 @@ module DatadogAPIClient::V2
|
|
1988
3203
|
|
1989
3204
|
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
1990
3205
|
if @api_client.config.debugging
|
1991
|
-
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#
|
3206
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#patch_vulnerability_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1992
3207
|
end
|
1993
3208
|
return data, status_code, headers
|
1994
3209
|
end
|