datadog_api_client 2.43.0 → 2.44.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/.generator/schemas/v1/openapi.yaml +263 -29
- data/.generator/schemas/v2/openapi.yaml +5051 -432
- data/.generator/src/generator/formatter.py +15 -1
- data/.generator/src/generator/templates/api.j2 +2 -2
- data/.generator/src/generator/templates/model.j2 +1 -1
- data/.generator/src/generator/templates/model_generic.j2 +1 -1
- data/.generator/tests/test_formatter.rb +69 -0
- data/CHANGELOG.md +27 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline.rb +2 -2
- data/examples/v1/logs-pipelines/CreateLogsPipeline_1745625064.rb +248 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_2256674867.rb +248 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_501419705.rb +236 -0
- data/examples/v1/logs-pipelines/UpdateLogsPipeline.rb +2 -2
- data/examples/v1/notebooks/CreateNotebook.rb +1 -1
- data/examples/v1/notebooks/UpdateNotebook.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +1 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -0
- data/examples/v2/actions-datastores/BulkDeleteDatastoreItems.rb +19 -0
- data/examples/v2/agentless-scanning/CreateAwsOnDemandTask.rb +1 -1
- data/examples/v2/agentless-scanning/CreateAwsScanOptions.rb +1 -1
- data/examples/v2/agentless-scanning/CreateAzureScanOptions.rb +16 -0
- data/examples/v2/agentless-scanning/CreateGcpScanOptions.rb +16 -0
- data/examples/v2/agentless-scanning/DeleteAwsScanOptions.rb +1 -1
- data/examples/v2/agentless-scanning/DeleteAzureScanOptions.rb +5 -0
- data/examples/v2/agentless-scanning/DeleteGcpScanOptions.rb +5 -0
- data/examples/v2/agentless-scanning/GetAwsOnDemandTask.rb +1 -1
- data/examples/v2/agentless-scanning/GetAzureScanOptions.rb +5 -0
- data/examples/v2/agentless-scanning/GetGcpScanOptions.rb +5 -0
- data/examples/v2/agentless-scanning/ListAwsOnDemandTasks.rb +1 -1
- data/examples/v2/agentless-scanning/ListAwsScanOptions.rb +1 -1
- data/examples/v2/agentless-scanning/ListAzureScanOptions.rb +5 -0
- data/examples/v2/agentless-scanning/ListGcpScanOptions.rb +5 -0
- data/examples/v2/agentless-scanning/UpdateAwsScanOptions.rb +1 -1
- data/examples/v2/agentless-scanning/UpdateAzureScanOptions.rb +12 -0
- data/examples/v2/agentless-scanning/UpdateGcpScanOptions.rb +15 -0
- data/examples/v2/case-management/CommentCase.rb +17 -0
- data/examples/v2/case-management/CreateCase.rb +1 -1
- data/examples/v2/case-management/DeleteCaseComment.rb +11 -0
- data/examples/v2/case-management/DeleteCaseCustomAttribute.rb +11 -0
- data/examples/v2/case-management/UpdateCaseCustomAttribute.rb +25 -0
- data/examples/v2/case-management/UpdateCaseDescription.rb +17 -0
- data/examples/v2/case-management/UpdateCaseTitle.rb +17 -0
- data/examples/v2/case-management-attribute/CreateCustomAttributeConfig.rb +20 -0
- data/examples/v2/case-management-attribute/DeleteCustomAttributeConfig.rb +11 -0
- data/examples/v2/case-management-attribute/GetAllCustomAttributeConfigsByCaseType.rb +8 -0
- data/examples/v2/case-management-attribute/GetAllCustomAttributes.rb +5 -0
- data/examples/v2/case-management-type/CreateCaseType.rb +16 -0
- data/examples/v2/case-management-type/DeleteCaseType.rb +5 -0
- data/examples/v2/case-management-type/DeleteCaseType_2790986149.rb +8 -0
- data/examples/v2/case-management-type/GetAllCaseTypes.rb +5 -0
- data/examples/v2/cloud-cost-management/{UpdateArbitraryCostRule.rb → CreateCustomAllocationRule.rb} +2 -4
- data/examples/v2/cloud-cost-management/{CreateRuleset.rb → CreateTagPipelinesRuleset.rb} +2 -2
- data/examples/v2/cloud-cost-management/DeleteCustomAllocationRule.rb +5 -0
- data/examples/v2/cloud-cost-management/DeleteTagPipelinesRuleset.rb +5 -0
- data/examples/v2/cloud-cost-management/GetCustomAllocationRule.rb +5 -0
- data/examples/v2/cloud-cost-management/GetTagPipelinesRuleset.rb +5 -0
- data/examples/v2/cloud-cost-management/ListCustomAllocationRules.rb +5 -0
- data/examples/v2/cloud-cost-management/ListTagPipelinesRulesets.rb +5 -0
- data/examples/v2/cloud-cost-management/{ReorderArbitraryCostRules.rb → ReorderCustomAllocationRules.rb} +2 -2
- data/examples/v2/cloud-cost-management/ReorderTagPipelinesRulesets.rb +22 -0
- data/examples/v2/cloud-cost-management/{CreateArbitraryCostRule.rb → UpdateCustomAllocationRule.rb} +2 -2
- data/examples/v2/cloud-cost-management/{UpdateRuleset.rb → UpdateTagPipelinesRuleset.rb} +4 -3
- data/examples/v2/csm-threats/CreateCSMThreatsAgentPolicy.rb +1 -1
- data/examples/v2/csm-threats/CreateCSMThreatsAgentRule.rb +1 -0
- data/examples/v2/csm-threats/CreateCSMThreatsAgentRule_1295653933.rb +1 -0
- data/examples/v2/csm-threats/CreateCSMThreatsAgentRule_1363354233.rb +33 -0
- data/examples/v2/dora-metrics/CreateDORADeployment.rb +1 -1
- data/examples/v2/dora-metrics/CreateDORAFailure.rb +1 -1
- data/examples/v2/dora-metrics/CreateDORAIncident.rb +1 -1
- data/examples/v2/dora-metrics/{CreateDORAIncident_1768887482.rb → CreateDORAIncident_1101664022.rb} +1 -1
- data/examples/v2/error-tracking/DeleteIssueAssignee.rb +8 -0
- data/examples/v2/fleet-automation/CancelFleetDeployment.rb +8 -0
- data/examples/v2/fleet-automation/CreateFleetDeploymentConfigure.rb +26 -0
- data/examples/v2/fleet-automation/GetFleetDeployment.rb +11 -0
- data/examples/v2/fleet-automation/ListFleetDeployments.rb +8 -0
- data/examples/v2/monitors/CreateMonitorNotificationRule_1181818787.rb +30 -0
- data/examples/v2/monitors/UpdateMonitorNotificationRule_1400905713.rb +35 -0
- data/examples/v2/reference-tables/CreateReferenceTable.rb +44 -0
- data/examples/v2/reference-tables/CreateReferenceTableUpload.rb +21 -0
- data/examples/v2/reference-tables/CreateReferenceTable_3196130987.rb +41 -0
- data/examples/v2/reference-tables/DeleteTable.rb +5 -0
- data/examples/v2/reference-tables/GetRowsByID.rb +5 -0
- data/examples/v2/reference-tables/GetTable.rb +5 -0
- data/examples/v2/reference-tables/ListTables.rb +5 -0
- data/examples/v2/reference-tables/UpdateReferenceTable.rb +44 -0
- data/examples/v2/roles/ListRoleTemplates.rb +8 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_868881438.rb +3 -1
- data/examples/v2/security-monitoring/ListScannedAssetsMetadata.rb +8 -0
- data/examples/v2/static-analysis/CreateSCAResolveVulnerableSymbols.rb +17 -0
- data/examples/v2/static-analysis/CreateSCAResult.rb +61 -0
- data/examples/v2/test-optimization/SearchFlakyTests.rb +27 -0
- data/examples/v2/test-optimization/SearchFlakyTests_1224086727.rb +27 -0
- data/examples/v2/test-optimization/SearchFlakyTests_2665223746.rb +26 -0
- data/lib/datadog_api_client/configuration.rb +9 -0
- data/lib/datadog_api_client/inflector.rb +208 -0
- data/lib/datadog_api_client/v1/api/hosts_api.rb +1 -0
- data/lib/datadog_api_client/v1/models/logs_processor.rb +2 -1
- data/lib/datadog_api_client/v1/models/logs_schema_category_mapper.rb +211 -0
- data/lib/datadog_api_client/v1/models/logs_schema_category_mapper_category.rb +165 -0
- data/lib/datadog_api_client/v1/models/logs_schema_category_mapper_fallback.rb +115 -0
- data/lib/datadog_api_client/v1/models/logs_schema_category_mapper_targets.rb +115 -0
- data/lib/datadog_api_client/v1/models/logs_schema_category_mapper_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/logs_schema_data.rb +198 -0
- data/lib/datadog_api_client/v1/models/logs_schema_mapper.rb +63 -0
- data/lib/datadog_api_client/v1/models/logs_schema_processor.rb +198 -0
- data/lib/datadog_api_client/v1/models/logs_schema_processor_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/logs_schema_remapper.rb +220 -0
- data/lib/datadog_api_client/v1/models/logs_schema_remapper_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/monitor.rb +0 -1
- data/lib/datadog_api_client/v1/models/monitor_update_request.rb +0 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +13 -1
- data/lib/datadog_api_client/v1/models/widget_marker.rb +0 -1
- data/lib/datadog_api_client/v2/api/actions_datastores_api.rb +72 -0
- data/lib/datadog_api_client/v2/api/agentless_scanning_api.rb +680 -22
- data/lib/datadog_api_client/v2/api/api_management_api.rb +0 -2
- data/lib/datadog_api_client/v2/api/case_management_api.rb +433 -0
- data/lib/datadog_api_client/v2/api/case_management_attribute_api.rb +293 -0
- data/lib/datadog_api_client/v2/api/case_management_type_api.rb +218 -0
- data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +1 -0
- data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +336 -336
- data/lib/datadog_api_client/v2/api/container_images_api.rb +1 -0
- data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +9 -9
- data/lib/datadog_api_client/v2/api/error_tracking_api.rb +65 -0
- data/lib/datadog_api_client/v2/api/fleet_automation_api.rb +318 -0
- data/lib/datadog_api_client/v2/api/incidents_api.rb +8 -8
- data/lib/datadog_api_client/v2/api/observability_pipelines_api.rb +0 -1
- data/lib/datadog_api_client/v2/api/on_call_paging_api.rb +0 -4
- data/lib/datadog_api_client/v2/api/reference_tables_api.rb +519 -0
- data/lib/datadog_api_client/v2/api/roles_api.rb +66 -0
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +149 -10
- data/lib/datadog_api_client/v2/api/static_analysis_api.rb +166 -0
- data/lib/datadog_api_client/v2/api/test_optimization_api.rb +116 -0
- data/lib/datadog_api_client/v2/models/arbitrary_rule_response_array.rb +13 -3
- data/lib/datadog_api_client/v2/models/arbitrary_rule_response_array_meta.rb +105 -0
- data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/azure_scan_options.rb +105 -0
- data/lib/datadog_api_client/v2/models/azure_scan_options_array.rb +125 -0
- data/lib/datadog_api_client/v2/models/azure_scan_options_data.rb +154 -0
- data/lib/datadog_api_client/v2/models/azure_scan_options_data_attributes.rb +115 -0
- data/lib/datadog_api_client/v2/models/azure_scan_options_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/azure_scan_options_input_update.rb +105 -0
- data/lib/datadog_api_client/v2/models/azure_scan_options_input_update_data.rb +154 -0
- data/lib/datadog_api_client/v2/models/azure_scan_options_input_update_data_attributes.rb +115 -0
- data/lib/datadog_api_client/v2/models/azure_scan_options_input_update_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/bulk_delete_apps_datastore_items_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/bulk_delete_apps_datastore_items_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/bulk_delete_apps_datastore_items_request_data_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/bulk_delete_apps_datastore_items_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/bulk_mute_findings_request_properties.rb +0 -1
- data/lib/datadog_api_client/v2/models/case_attributes.rb +23 -3
- data/lib/datadog_api_client/v2/models/case_comment.rb +144 -0
- data/lib/datadog_api_client/v2/models/case_comment_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/case_comment_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/case_create_attributes.rb +14 -14
- data/lib/datadog_api_client/v2/models/case_type.rb +2 -0
- data/lib/datadog_api_client/v2/models/case_type_create.rb +144 -0
- data/lib/datadog_api_client/v2/models/case_type_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/case_type_resource.rb +125 -0
- data/lib/datadog_api_client/v2/models/case_type_resource_attributes.rb +161 -0
- data/lib/datadog_api_client/v2/models/case_type_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/case_type_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/case_types_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/case_update_custom_attribute.rb +144 -0
- data/lib/datadog_api_client/v2/models/case_update_custom_attribute_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/case_update_description.rb +144 -0
- data/lib/datadog_api_client/v2/models/case_update_description_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/case_update_description_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/case_update_title.rb +144 -0
- data/lib/datadog_api_client/v2/models/case_update_title_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/case_update_title_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/cloud_asset_type.rb +28 -0
- data/lib/datadog_api_client/v2/models/cloud_configuration_compliance_rule_options.rb +0 -2
- data/lib/datadog_api_client/v2/models/cloud_configuration_rule_create_payload.rb +0 -1
- data/lib/datadog_api_client/v2/models/cloud_configuration_rule_options.rb +0 -1
- data/lib/datadog_api_client/v2/models/cloud_configuration_rule_payload.rb +0 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_attributes.rb +25 -3
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_version.rb +123 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_set.rb +35 -5
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_attributes.rb +30 -10
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_attributes.rb +23 -3
- data/lib/datadog_api_client/v2/models/create_table_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/create_table_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/create_table_request_data_attributes.rb +197 -0
- data/lib/datadog_api_client/v2/models/create_table_request_data_attributes_file_metadata.rb +63 -0
- data/lib/datadog_api_client/v2/models/create_table_request_data_attributes_file_metadata_cloud_storage.rb +119 -0
- data/lib/datadog_api_client/v2/models/create_table_request_data_attributes_file_metadata_local_file.rb +98 -0
- data/lib/datadog_api_client/v2/models/create_table_request_data_attributes_file_metadata_one_of_access_details.rb +125 -0
- data/lib/datadog_api_client/v2/models/create_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.rb +165 -0
- data/lib/datadog_api_client/v2/models/create_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.rb +207 -0
- data/lib/datadog_api_client/v2/models/create_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.rb +186 -0
- data/lib/datadog_api_client/v2/models/create_table_request_data_attributes_schema.rb +148 -0
- data/lib/datadog_api_client/v2/models/create_table_request_data_attributes_schema_fields_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/create_table_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/create_upload_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/create_upload_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/create_upload_request_data_attributes.rb +192 -0
- data/lib/datadog_api_client/v2/models/create_upload_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/create_upload_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/create_upload_response_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/create_upload_response_data_attributes.rb +107 -0
- data/lib/datadog_api_client/v2/models/create_upload_response_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_attribute_config.rb +125 -0
- data/lib/datadog_api_client/v2/models/custom_attribute_config_attributes_create.rb +196 -0
- data/lib/datadog_api_client/v2/models/custom_attribute_config_create.rb +144 -0
- data/lib/datadog_api_client/v2/models/custom_attribute_config_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/custom_attribute_config_resource_attributes.rb +217 -0
- data/lib/datadog_api_client/v2/models/custom_attribute_config_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_attribute_config_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/custom_attribute_configs_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/custom_attribute_type.rb +28 -0
- data/lib/datadog_api_client/v2/models/custom_attribute_value.rb +165 -0
- data/lib/datadog_api_client/v2/models/custom_attribute_values_union.rb +65 -0
- data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_response_array.rb +125 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/flaky_test.rb +125 -0
- data/lib/datadog_api_client/v2/models/flaky_test_attributes.rb +301 -0
- data/lib/datadog_api_client/v2/models/flaky_test_attributes_flaky_state.rb +29 -0
- data/lib/datadog_api_client/v2/models/flaky_test_pipeline_stats.rb +124 -0
- data/lib/datadog_api_client/v2/models/flaky_test_run_metadata.rb +168 -0
- data/lib/datadog_api_client/v2/models/flaky_test_stats.rb +113 -0
- data/lib/datadog_api_client/v2/models/flaky_test_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/flaky_tests_pagination.rb +113 -0
- data/lib/datadog_api_client/v2/models/flaky_tests_search_filter.rb +115 -0
- data/lib/datadog_api_client/v2/models/flaky_tests_search_page_options.rb +137 -0
- data/lib/datadog_api_client/v2/models/flaky_tests_search_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/flaky_tests_search_request_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/flaky_tests_search_request_data.rb +115 -0
- data/lib/datadog_api_client/v2/models/flaky_tests_search_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/flaky_tests_search_response.rb +117 -0
- data/lib/datadog_api_client/v2/models/flaky_tests_search_response_meta.rb +105 -0
- data/lib/datadog_api_client/v2/models/flaky_tests_search_sort.rb +37 -0
- data/lib/datadog_api_client/v2/models/fleet_deployment.rb +165 -0
- data/lib/datadog_api_client/v2/models/fleet_deployment_attributes.rb +147 -0
- data/lib/datadog_api_client/v2/models/fleet_deployment_configure_attributes.rb +135 -0
- data/lib/datadog_api_client/v2/models/fleet_deployment_configure_create.rb +144 -0
- data/lib/datadog_api_client/v2/models/fleet_deployment_configure_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/fleet_deployment_file_op.rb +30 -0
- data/lib/datadog_api_client/v2/models/fleet_deployment_operation.rb +161 -0
- data/lib/datadog_api_client/v2/models/fleet_deployment_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/fleet_deployment_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/fleet_deployments_page.rb +105 -0
- data/lib/datadog_api_client/v2/models/fleet_deployments_response.rb +135 -0
- data/lib/datadog_api_client/v2/models/fleet_deployments_response_meta.rb +105 -0
- data/lib/datadog_api_client/v2/models/gcp_scan_options.rb +105 -0
- data/lib/datadog_api_client/v2/models/gcp_scan_options_array.rb +125 -0
- data/lib/datadog_api_client/v2/models/gcp_scan_options_data.rb +154 -0
- data/lib/datadog_api_client/v2/models/gcp_scan_options_data_attributes.rb +115 -0
- data/lib/datadog_api_client/v2/models/gcp_scan_options_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/gcp_scan_options_input_update.rb +105 -0
- data/lib/datadog_api_client/v2/models/gcp_scan_options_input_update_data.rb +154 -0
- data/lib/datadog_api_client/v2/models/gcp_scan_options_input_update_data_attributes.rb +115 -0
- data/lib/datadog_api_client/v2/models/gcp_scan_options_input_update_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_tag_cardinalities_meta.rb +0 -1
- data/lib/datadog_api_client/v2/models/monitor_notification_rule_attributes.rb +15 -9
- data/lib/datadog_api_client/v2/models/monitor_notification_rule_condition.rb +162 -0
- data/lib/datadog_api_client/v2/models/monitor_notification_rule_conditional_recipients.rb +160 -0
- data/lib/datadog_api_client/v2/models/monitor_notification_rule_response_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/notification_rule_response.rb +0 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_amazon_data_firehose_source.rb +0 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_amazon_open_search_destination.rb +0 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_destination.rb +0 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_source.rb +0 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_amazon_security_lake_destination.rb +0 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_google_chronicle_destination.rb +0 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_google_cloud_storage_destination.rb +0 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_google_pub_sub_destination.rb +0 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_google_pub_sub_source.rb +0 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor_rule.rb +0 -2
- data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor.rb +0 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_splunk_hec_destination.rb +0 -1
- data/lib/datadog_api_client/v2/models/patch_table_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/patch_table_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/patch_table_request_data_attributes.rb +147 -0
- data/lib/datadog_api_client/v2/models/patch_table_request_data_attributes_file_metadata.rb +63 -0
- data/lib/datadog_api_client/v2/models/patch_table_request_data_attributes_file_metadata_cloud_storage.rb +90 -0
- data/lib/datadog_api_client/v2/models/patch_table_request_data_attributes_file_metadata_local_file.rb +98 -0
- data/lib/datadog_api_client/v2/models/patch_table_request_data_attributes_file_metadata_one_of_access_details.rb +125 -0
- data/lib/datadog_api_client/v2/models/patch_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.rb +125 -0
- data/lib/datadog_api_client/v2/models/patch_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.rb +145 -0
- data/lib/datadog_api_client/v2/models/patch_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.rb +135 -0
- data/lib/datadog_api_client/v2/models/patch_table_request_data_attributes_schema.rb +148 -0
- data/lib/datadog_api_client/v2/models/patch_table_request_data_attributes_schema_fields_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/patch_table_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/reference_table_create_source_type.rb +29 -0
- data/lib/datadog_api_client/v2/models/reference_table_schema_field_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/reference_table_sort_type.rb +31 -0
- data/lib/datadog_api_client/v2/models/reference_table_source_type.rb +33 -0
- data/lib/datadog_api_client/v2/models/resolve_vulnerable_symbols_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/resolve_vulnerable_symbols_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/resolve_vulnerable_symbols_request_data_attributes.rb +107 -0
- data/lib/datadog_api_client/v2/models/resolve_vulnerable_symbols_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/resolve_vulnerable_symbols_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/resolve_vulnerable_symbols_response_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/resolve_vulnerable_symbols_response_data_attributes.rb +107 -0
- data/lib/datadog_api_client/v2/models/resolve_vulnerable_symbols_response_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/resolve_vulnerable_symbols_response_results.rb +117 -0
- data/lib/datadog_api_client/v2/models/resolve_vulnerable_symbols_response_results_vulnerable_symbols.rb +117 -0
- data/lib/datadog_api_client/v2/models/resolve_vulnerable_symbols_response_results_vulnerable_symbols_symbols.rb +125 -0
- data/lib/datadog_api_client/v2/models/role_template_array.rb +125 -0
- data/lib/datadog_api_client/v2/models/role_template_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/role_template_data_attributes.rb +115 -0
- data/lib/datadog_api_client/v2/models/role_template_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/sbom_format.rb +27 -0
- data/lib/datadog_api_client/v2/models/sca_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/sca_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/sca_request_data_attributes.rb +193 -0
- data/lib/datadog_api_client/v2/models/sca_request_data_attributes_commit.rb +165 -0
- data/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items.rb +211 -0
- data/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items_locations_items.rb +135 -0
- data/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items_locations_items_file_position.rb +125 -0
- data/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items_locations_items_position.rb +144 -0
- data/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items_reachable_symbol_properties_items.rb +115 -0
- data/lib/datadog_api_client/v2/models/sca_request_data_attributes_files_items.rb +115 -0
- data/lib/datadog_api_client/v2/models/sca_request_data_attributes_relations_items.rb +117 -0
- data/lib/datadog_api_client/v2/models/sca_request_data_attributes_repository.rb +105 -0
- data/lib/datadog_api_client/v2/models/sca_request_data_attributes_vulnerabilities_items.rb +127 -0
- data/lib/datadog_api_client/v2/models/sca_request_data_attributes_vulnerabilities_items_affects_items.rb +105 -0
- data/lib/datadog_api_client/v2/models/sca_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/scanned_asset_metadata.rb +144 -0
- data/lib/datadog_api_client/v2/models/scanned_asset_metadata_asset.rb +144 -0
- data/lib/datadog_api_client/v2/models/scanned_asset_metadata_attributes.rb +165 -0
- data/lib/datadog_api_client/v2/models/scanned_asset_metadata_last_success.rb +145 -0
- data/lib/datadog_api_client/v2/models/scanned_assets_metadata.rb +145 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +0 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +13 -1
- data/lib/datadog_api_client/v2/models/table_result_v2.rb +105 -0
- data/lib/datadog_api_client/v2/models/table_result_v2_array.rb +125 -0
- data/lib/datadog_api_client/v2/models/table_result_v2_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes.rb +207 -0
- data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata.rb +63 -0
- data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_cloud_storage.rb +145 -0
- data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_cloud_storage_error_type.rb +34 -0
- data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_local_file.rb +125 -0
- data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_one_of_access_details.rb +125 -0
- data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_one_of_access_details_aws_detail.rb +125 -0
- data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_one_of_access_details_azure_detail.rb +145 -0
- data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_one_of_access_details_gcp_detail.rb +135 -0
- data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_schema.rb +148 -0
- data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_schema_fields_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/table_result_v2_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/table_row_resource_array.rb +125 -0
- data/lib/datadog_api_client/v2/models/table_row_resource_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/table_row_resource_data_attributes.rb +105 -0
- data/lib/datadog_api_client/v2/models/table_row_resource_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/timeline_cell.rb +155 -0
- data/lib/datadog_api_client/v2/models/timeline_cell_author.rb +62 -0
- data/lib/datadog_api_client/v2/models/timeline_cell_author_user.rb +115 -0
- data/lib/datadog_api_client/v2/models/timeline_cell_author_user_content.rb +135 -0
- data/lib/datadog_api_client/v2/models/timeline_cell_author_user_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/timeline_cell_content.rb +62 -0
- data/lib/datadog_api_client/v2/models/timeline_cell_content_comment.rb +105 -0
- data/lib/datadog_api_client/v2/models/timeline_cell_resource.rb +165 -0
- data/lib/datadog_api_client/v2/models/timeline_cell_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/timeline_cell_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/timeline_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/vulnerability_advisory.rb +143 -0
- data/lib/datadog_api_client/v2/models/vulnerability_attributes.rb +11 -1
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +274 -14
- data/examples/v2/cloud-cost-management/DeleteArbitraryCostRule.rb +0 -5
- data/examples/v2/cloud-cost-management/DeleteRuleset.rb +0 -5
- data/examples/v2/cloud-cost-management/GetArbitraryCostRule.rb +0 -5
- data/examples/v2/cloud-cost-management/GetRuleset.rb +0 -5
- data/examples/v2/cloud-cost-management/ListArbitraryCostRules.rb +0 -5
- data/examples/v2/cloud-cost-management/ListRulesets.rb +0 -5
- data/examples/v2/cloud-cost-management/ReorderRulesets.rb +0 -13
|
@@ -584,7 +584,7 @@ module DatadogAPIClient::V2
|
|
|
584
584
|
#
|
|
585
585
|
# Create a new notification rule for security signals and return the created rule.
|
|
586
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.
|
|
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
588
|
# @param opts [Hash] the optional parameters
|
|
589
589
|
# @return [Array<(NotificationRuleResponse, Integer, Hash)>] NotificationRuleResponse data, response status code and response headers
|
|
590
590
|
def create_signal_notification_rule_with_http_info(body, opts = {})
|
|
@@ -651,7 +651,7 @@ module DatadogAPIClient::V2
|
|
|
651
651
|
#
|
|
652
652
|
# Create a new notification rule for security vulnerabilities and return the created rule.
|
|
653
653
|
#
|
|
654
|
-
# @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.
|
|
654
|
+
# @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.
|
|
655
655
|
# @param opts [Hash] the optional parameters
|
|
656
656
|
# @return [Array<(NotificationRuleResponse, Integer, Hash)>] NotificationRuleResponse data, response status code and response headers
|
|
657
657
|
def create_vulnerability_notification_rule_with_http_info(body, opts = {})
|
|
@@ -1758,11 +1758,11 @@ module DatadogAPIClient::V2
|
|
|
1758
1758
|
#
|
|
1759
1759
|
# Get a single SBOM related to an asset by its type and name.
|
|
1760
1760
|
#
|
|
1761
|
-
#
|
|
1762
1761
|
# @param asset_type [AssetType] The type of the asset for the SBOM request.
|
|
1763
1762
|
# @param filter_asset_name [String] The name of the asset for the SBOM request.
|
|
1764
1763
|
# @param opts [Hash] the optional parameters
|
|
1765
1764
|
# @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.
|
|
1765
|
+
# @option opts [SBOMFormat] :ext_format The standard of the SBOM.
|
|
1766
1766
|
# @return [Array<(GetSBOMResponse, Integer, Hash)>] GetSBOMResponse data, response status code and response headers
|
|
1767
1767
|
def get_sbom_with_http_info(asset_type, filter_asset_name, opts = {})
|
|
1768
1768
|
unstable_enabled = @api_client.config.unstable_operations["v2.get_sbom".to_sym]
|
|
@@ -1788,6 +1788,10 @@ module DatadogAPIClient::V2
|
|
|
1788
1788
|
if @api_client.config.client_side_validation && filter_asset_name.nil?
|
|
1789
1789
|
fail ArgumentError, "Missing the required parameter 'filter_asset_name' when calling SecurityMonitoringAPI.get_sbom"
|
|
1790
1790
|
end
|
|
1791
|
+
allowable_values = ['CycloneDX', 'SPDX']
|
|
1792
|
+
if @api_client.config.client_side_validation && opts[:'ext_format'] && !allowable_values.include?(opts[:'ext_format'])
|
|
1793
|
+
fail ArgumentError, "invalid value for \"ext_format\", must be one of #{allowable_values}"
|
|
1794
|
+
end
|
|
1791
1795
|
# resource path
|
|
1792
1796
|
local_var_path = '/api/v2/security/sboms/{asset_type}'.sub('{asset_type}', CGI.escape(asset_type.to_s).gsub('%2F', '/'))
|
|
1793
1797
|
|
|
@@ -1795,6 +1799,7 @@ module DatadogAPIClient::V2
|
|
|
1795
1799
|
query_params = opts[:query_params] || {}
|
|
1796
1800
|
query_params[:'filter[asset_name]'] = filter_asset_name
|
|
1797
1801
|
query_params[:'filter[repo_digest]'] = opts[:'filter_repo_digest'] if !opts[:'filter_repo_digest'].nil?
|
|
1802
|
+
query_params[:'ext:format'] = opts[:'ext_format'] if !opts[:'ext_format'].nil?
|
|
1798
1803
|
|
|
1799
1804
|
# header parameters
|
|
1800
1805
|
header_params = opts[:header_params] || {}
|
|
@@ -2797,7 +2802,6 @@ module DatadogAPIClient::V2
|
|
|
2797
2802
|
# - `evaluation_changed_at` and `resource_discovery_date` time stamps.
|
|
2798
2803
|
# - An array of associated tags.
|
|
2799
2804
|
#
|
|
2800
|
-
#
|
|
2801
2805
|
# @param opts [Hash] the optional parameters
|
|
2802
2806
|
# @option opts [Integer] :page_limit Limit the number of findings returned. Must be <= 1000.
|
|
2803
2807
|
# @option opts [Integer] :snapshot_timestamp Return findings for a given snapshot of time (Unix ms).
|
|
@@ -2995,6 +2999,134 @@ module DatadogAPIClient::V2
|
|
|
2995
2999
|
return data, status_code, headers
|
|
2996
3000
|
end
|
|
2997
3001
|
|
|
3002
|
+
# List scanned assets metadata.
|
|
3003
|
+
#
|
|
3004
|
+
# @see #list_scanned_assets_metadata_with_http_info
|
|
3005
|
+
def list_scanned_assets_metadata(opts = {})
|
|
3006
|
+
data, _status_code, _headers = list_scanned_assets_metadata_with_http_info(opts)
|
|
3007
|
+
data
|
|
3008
|
+
end
|
|
3009
|
+
|
|
3010
|
+
# List scanned assets metadata.
|
|
3011
|
+
#
|
|
3012
|
+
# Get a list of security scanned assets metadata for an organization.
|
|
3013
|
+
#
|
|
3014
|
+
# ### Pagination
|
|
3015
|
+
#
|
|
3016
|
+
# For the "List Vulnerabilities" endpoint, see the [Pagination section](#pagination).
|
|
3017
|
+
#
|
|
3018
|
+
# ### Filtering
|
|
3019
|
+
#
|
|
3020
|
+
# For the "List Vulnerabilities" endpoint, see the [Filtering section](#filtering).
|
|
3021
|
+
#
|
|
3022
|
+
# ### Metadata
|
|
3023
|
+
#
|
|
3024
|
+
# For the "List Vulnerabilities" endpoint, see the [Metadata section](#metadata).
|
|
3025
|
+
#
|
|
3026
|
+
# ### Related endpoints
|
|
3027
|
+
#
|
|
3028
|
+
# This endpoint returns additional metadata for cloud resources that is not available from the standard resource endpoints. To access a richer dataset, call this endpoint together with the relevant resource endpoint(s) and merge (join) their results using the resource identifier.
|
|
3029
|
+
#
|
|
3030
|
+
# **Hosts**
|
|
3031
|
+
#
|
|
3032
|
+
# To enrich host data, join the response from the [Hosts](https://docs.datadoghq.com/api/latest/hosts/) endpoint with the response from the scanned-assets-metadata endpoint on the following key fields:
|
|
3033
|
+
#
|
|
3034
|
+
# | ENDPOINT | JOIN KEY | TYPE |
|
|
3035
|
+
# | --- | --- | --- |
|
|
3036
|
+
# | [/api/v1/hosts](https://docs.datadoghq.com/api/latest/hosts/) | host_list.host_name | string |
|
|
3037
|
+
# | /api/v2/security/scanned-assets-metadata | data.attributes.asset.name | string |
|
|
3038
|
+
#
|
|
3039
|
+
# **Host Images**
|
|
3040
|
+
#
|
|
3041
|
+
# To enrich host image data, join the response from the [Hosts](https://docs.datadoghq.com/api/latest/hosts/) endpoint with the response from the scanned-assets-metadata endpoint on the following key fields:
|
|
3042
|
+
#
|
|
3043
|
+
# | ENDPOINT | JOIN KEY | TYPE |
|
|
3044
|
+
# | --- | --- | --- |
|
|
3045
|
+
# | [/api/v1/hosts](https://docs.datadoghq.com/api/latest/hosts/) | host_list.tags_by_source["Amazon Web Services"]["image"] | string |
|
|
3046
|
+
# | /api/v2/security/scanned-assets-metadata | data.attributes.asset.name | string |
|
|
3047
|
+
#
|
|
3048
|
+
# **Container Images**
|
|
3049
|
+
#
|
|
3050
|
+
# To enrich container image data, join the response from the [Container Images](https://docs.datadoghq.com/api/latest/container-images/) endpoint with the response from the scanned-assets-metadata endpoint on the following key fields:
|
|
3051
|
+
#
|
|
3052
|
+
# | ENDPOINT | JOIN KEY | TYPE |
|
|
3053
|
+
# | --- | --- | --- |
|
|
3054
|
+
# | [/api/v2/container_images](https://docs.datadoghq.com/api/latest/container-images/) | `data.attributes.name`@`data.attributes.repo_digest` | string |
|
|
3055
|
+
# | /api/v2/security/scanned-assets-metadata | data.attributes.asset.name | string |
|
|
3056
|
+
#
|
|
3057
|
+
# @param opts [Hash] the optional parameters
|
|
3058
|
+
# @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.
|
|
3059
|
+
# @option opts [Integer] :page_number The page number to be retrieved. It should be equal to or greater than 1.
|
|
3060
|
+
# @option opts [CloudAssetType] :filter_asset_type The type of the scanned asset.
|
|
3061
|
+
# @option opts [String] :filter_asset_name The name of the scanned asset.
|
|
3062
|
+
# @option opts [String] :filter_last_success_origin The origin of last success scan.
|
|
3063
|
+
# @option opts [String] :filter_last_success_env The environment of last success scan.
|
|
3064
|
+
# @return [Array<(ScannedAssetsMetadata, Integer, Hash)>] ScannedAssetsMetadata data, response status code and response headers
|
|
3065
|
+
def list_scanned_assets_metadata_with_http_info(opts = {})
|
|
3066
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.list_scanned_assets_metadata".to_sym]
|
|
3067
|
+
if unstable_enabled
|
|
3068
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_scanned_assets_metadata")
|
|
3069
|
+
else
|
|
3070
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_scanned_assets_metadata"))
|
|
3071
|
+
end
|
|
3072
|
+
|
|
3073
|
+
if @api_client.config.debugging
|
|
3074
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_scanned_assets_metadata ...'
|
|
3075
|
+
end
|
|
3076
|
+
if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 1
|
|
3077
|
+
fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling SecurityMonitoringAPI.list_scanned_assets_metadata, must be greater than or equal to 1.'
|
|
3078
|
+
end
|
|
3079
|
+
allowable_values = ['Host', 'HostImage', 'Image']
|
|
3080
|
+
if @api_client.config.client_side_validation && opts[:'filter_asset_type'] && !allowable_values.include?(opts[:'filter_asset_type'])
|
|
3081
|
+
fail ArgumentError, "invalid value for \"filter_asset_type\", must be one of #{allowable_values}"
|
|
3082
|
+
end
|
|
3083
|
+
# resource path
|
|
3084
|
+
local_var_path = '/api/v2/security/scanned-assets-metadata'
|
|
3085
|
+
|
|
3086
|
+
# query parameters
|
|
3087
|
+
query_params = opts[:query_params] || {}
|
|
3088
|
+
query_params[:'page[token]'] = opts[:'page_token'] if !opts[:'page_token'].nil?
|
|
3089
|
+
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
|
3090
|
+
query_params[:'filter[asset.type]'] = opts[:'filter_asset_type'] if !opts[:'filter_asset_type'].nil?
|
|
3091
|
+
query_params[:'filter[asset.name]'] = opts[:'filter_asset_name'] if !opts[:'filter_asset_name'].nil?
|
|
3092
|
+
query_params[:'filter[last_success.origin]'] = opts[:'filter_last_success_origin'] if !opts[:'filter_last_success_origin'].nil?
|
|
3093
|
+
query_params[:'filter[last_success.env]'] = opts[:'filter_last_success_env'] if !opts[:'filter_last_success_env'].nil?
|
|
3094
|
+
|
|
3095
|
+
# header parameters
|
|
3096
|
+
header_params = opts[:header_params] || {}
|
|
3097
|
+
# HTTP header 'Accept' (if needed)
|
|
3098
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
3099
|
+
|
|
3100
|
+
# form parameters
|
|
3101
|
+
form_params = opts[:form_params] || {}
|
|
3102
|
+
|
|
3103
|
+
# http body (model)
|
|
3104
|
+
post_body = opts[:debug_body]
|
|
3105
|
+
|
|
3106
|
+
# return_type
|
|
3107
|
+
return_type = opts[:debug_return_type] || 'ScannedAssetsMetadata'
|
|
3108
|
+
|
|
3109
|
+
# auth_names
|
|
3110
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
3111
|
+
|
|
3112
|
+
new_options = opts.merge(
|
|
3113
|
+
:operation => :list_scanned_assets_metadata,
|
|
3114
|
+
:header_params => header_params,
|
|
3115
|
+
:query_params => query_params,
|
|
3116
|
+
:form_params => form_params,
|
|
3117
|
+
:body => post_body,
|
|
3118
|
+
:auth_names => auth_names,
|
|
3119
|
+
:return_type => return_type,
|
|
3120
|
+
:api_version => "V2"
|
|
3121
|
+
)
|
|
3122
|
+
|
|
3123
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
3124
|
+
if @api_client.config.debugging
|
|
3125
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#list_scanned_assets_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3126
|
+
end
|
|
3127
|
+
return data, status_code, headers
|
|
3128
|
+
end
|
|
3129
|
+
|
|
2998
3130
|
# Get all security filters.
|
|
2999
3131
|
#
|
|
3000
3132
|
# @see #list_security_filters_with_http_info
|
|
@@ -3419,6 +3551,8 @@ module DatadogAPIClient::V2
|
|
|
3419
3551
|
#
|
|
3420
3552
|
# This token can then be used in the subsequent paginated requests.
|
|
3421
3553
|
#
|
|
3554
|
+
# *Note: The first request may take longer to complete than subsequent requests.*
|
|
3555
|
+
#
|
|
3422
3556
|
# #### Subsequent requests
|
|
3423
3557
|
#
|
|
3424
3558
|
# Any request containing valid `page[token]` and `page[number]` parameters will be considered a subsequent request.
|
|
@@ -3427,6 +3561,8 @@ module DatadogAPIClient::V2
|
|
|
3427
3561
|
#
|
|
3428
3562
|
# If the page `number` is invalid, a `400` response will be returned.
|
|
3429
3563
|
#
|
|
3564
|
+
# The returned `token` is valid for all requests in the pagination sequence. To send paginated requests in parallel, reuse the same `token` and change only the `page[number]` parameter.
|
|
3565
|
+
#
|
|
3430
3566
|
# ### Filtering
|
|
3431
3567
|
#
|
|
3432
3568
|
# 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.
|
|
@@ -3458,7 +3594,11 @@ module DatadogAPIClient::V2
|
|
|
3458
3594
|
# "links": {...}
|
|
3459
3595
|
# }
|
|
3460
3596
|
# ```
|
|
3597
|
+
# ### Extensions
|
|
3461
3598
|
#
|
|
3599
|
+
# Requests may include extensions to modify the behavior of the requested endpoint. The filter parameters follow the [JSON:API format](https://jsonapi.org/extensions/#extensions) format: `ext:$extension_name`, where `extension_name` is the name of the modifier that is being applied.
|
|
3600
|
+
#
|
|
3601
|
+
# Extensions can only include one value: `ext:modifier=value`.
|
|
3462
3602
|
#
|
|
3463
3603
|
# @param opts [Hash] the optional parameters
|
|
3464
3604
|
# @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.
|
|
@@ -3488,7 +3628,7 @@ module DatadogAPIClient::V2
|
|
|
3488
3628
|
# @option opts [Boolean] :filter_fix_available Filter by fix availability.
|
|
3489
3629
|
# @option opts [String] :filter_repo_digests Filter by vulnerability `repo_digest` (when the vulnerability is related to `Image` asset).
|
|
3490
3630
|
# @option opts [String] :filter_origin Filter by origin.
|
|
3491
|
-
# @option opts [String] :filter_asset_name Filter by asset name.
|
|
3631
|
+
# @option opts [String] :filter_asset_name Filter by asset name. This field supports the usage of wildcards (*).
|
|
3492
3632
|
# @option opts [AssetType] :filter_asset_type Filter by asset type.
|
|
3493
3633
|
# @option opts [String] :filter_asset_version_first Filter by the first version of the asset this vulnerability has been detected on.
|
|
3494
3634
|
# @option opts [String] :filter_asset_version_last Filter by the last version of the asset this vulnerability has been detected on.
|
|
@@ -3586,7 +3726,7 @@ module DatadogAPIClient::V2
|
|
|
3586
3726
|
query_params[:'filter[tool]'] = opts[:'filter_tool'] if !opts[:'filter_tool'].nil?
|
|
3587
3727
|
query_params[:'filter[library.name]'] = opts[:'filter_library_name'] if !opts[:'filter_library_name'].nil?
|
|
3588
3728
|
query_params[:'filter[library.version]'] = opts[:'filter_library_version'] if !opts[:'filter_library_version'].nil?
|
|
3589
|
-
query_params[:'filter[
|
|
3729
|
+
query_params[:'filter[advisory.id]'] = opts[:'filter_advisory_id'] if !opts[:'filter_advisory_id'].nil?
|
|
3590
3730
|
query_params[:'filter[risks.exploitation_probability]'] = opts[:'filter_risks_exploitation_probability'] if !opts[:'filter_risks_exploitation_probability'].nil?
|
|
3591
3731
|
query_params[:'filter[risks.poc_exploit_available]'] = opts[:'filter_risks_poc_exploit_available'] if !opts[:'filter_risks_poc_exploit_available'].nil?
|
|
3592
3732
|
query_params[:'filter[risks.exploit_available]'] = opts[:'filter_risks_exploit_available'] if !opts[:'filter_risks_exploit_available'].nil?
|
|
@@ -3675,11 +3815,10 @@ module DatadogAPIClient::V2
|
|
|
3675
3815
|
#
|
|
3676
3816
|
# Please review the [Metadata section for the "List Vulnerabilities"](#metadata) endpoint.
|
|
3677
3817
|
#
|
|
3678
|
-
#
|
|
3679
3818
|
# @param opts [Hash] the optional parameters
|
|
3680
3819
|
# @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.
|
|
3681
3820
|
# @option opts [Integer] :page_number The page number to be retrieved. It should be equal or greater than `1`
|
|
3682
|
-
# @option opts [String] :filter_name Filter by name.
|
|
3821
|
+
# @option opts [String] :filter_name Filter by name. This field supports the usage of wildcards (*).
|
|
3683
3822
|
# @option opts [AssetType] :filter_type Filter by type.
|
|
3684
3823
|
# @option opts [String] :filter_version_first Filter by the first version of the asset since it has been vulnerable.
|
|
3685
3824
|
# @option opts [String] :filter_version_last Filter by the last detected version of the asset.
|
|
@@ -3714,7 +3853,7 @@ module DatadogAPIClient::V2
|
|
|
3714
3853
|
fail ArgumentError, "invalid value for \"filter_type\", must be one of #{allowable_values}"
|
|
3715
3854
|
end
|
|
3716
3855
|
# resource path
|
|
3717
|
-
local_var_path = '/api/v2/security/assets'
|
|
3856
|
+
local_var_path = '/api/v2/security/vulnerable-assets'
|
|
3718
3857
|
|
|
3719
3858
|
# query parameters
|
|
3720
3859
|
query_params = opts[:query_params] || {}
|
|
@@ -3783,7 +3922,7 @@ module DatadogAPIClient::V2
|
|
|
3783
3922
|
#
|
|
3784
3923
|
# Mute or unmute findings.
|
|
3785
3924
|
#
|
|
3786
|
-
# @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.
|
|
3925
|
+
# @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.
|
|
3787
3926
|
# @param opts [Hash] the optional parameters
|
|
3788
3927
|
# @return [Array<(BulkMuteFindingsResponse, Integer, Hash)>] BulkMuteFindingsResponse data, response status code and response headers
|
|
3789
3928
|
def mute_findings_with_http_info(body, opts = {})
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'cgi'
|
|
17
|
+
|
|
18
|
+
module DatadogAPIClient::V2
|
|
19
|
+
class StaticAnalysisAPI
|
|
20
|
+
attr_accessor :api_client
|
|
21
|
+
|
|
22
|
+
def initialize(api_client = DatadogAPIClient::APIClient.default)
|
|
23
|
+
@api_client = api_client
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# POST request to resolve vulnerable symbols.
|
|
27
|
+
#
|
|
28
|
+
# @see #create_sca_resolve_vulnerable_symbols_with_http_info
|
|
29
|
+
def create_sca_resolve_vulnerable_symbols(body, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_sca_resolve_vulnerable_symbols_with_http_info(body, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# POST request to resolve vulnerable symbols.
|
|
35
|
+
# @param body [ResolveVulnerableSymbolsRequest]
|
|
36
|
+
# @param opts [Hash] the optional parameters
|
|
37
|
+
# @return [Array<(ResolveVulnerableSymbolsResponse, Integer, Hash)>] ResolveVulnerableSymbolsResponse data, response status code and response headers
|
|
38
|
+
def create_sca_resolve_vulnerable_symbols_with_http_info(body, opts = {})
|
|
39
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.create_sca_resolve_vulnerable_symbols".to_sym]
|
|
40
|
+
if unstable_enabled
|
|
41
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_sca_resolve_vulnerable_symbols")
|
|
42
|
+
else
|
|
43
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_sca_resolve_vulnerable_symbols"))
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
if @api_client.config.debugging
|
|
47
|
+
@api_client.config.logger.debug 'Calling API: StaticAnalysisAPI.create_sca_resolve_vulnerable_symbols ...'
|
|
48
|
+
end
|
|
49
|
+
# verify the required parameter 'body' is set
|
|
50
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
51
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling StaticAnalysisAPI.create_sca_resolve_vulnerable_symbols"
|
|
52
|
+
end
|
|
53
|
+
# resource path
|
|
54
|
+
local_var_path = '/api/v2/static-analysis-sca/vulnerabilities/resolve-vulnerable-symbols'
|
|
55
|
+
|
|
56
|
+
# query parameters
|
|
57
|
+
query_params = opts[:query_params] || {}
|
|
58
|
+
|
|
59
|
+
# header parameters
|
|
60
|
+
header_params = opts[:header_params] || {}
|
|
61
|
+
# HTTP header 'Accept' (if needed)
|
|
62
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
63
|
+
# HTTP header 'Content-Type'
|
|
64
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
65
|
+
|
|
66
|
+
# form parameters
|
|
67
|
+
form_params = opts[:form_params] || {}
|
|
68
|
+
|
|
69
|
+
# http body (model)
|
|
70
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
71
|
+
|
|
72
|
+
# return_type
|
|
73
|
+
return_type = opts[:debug_return_type] || 'ResolveVulnerableSymbolsResponse'
|
|
74
|
+
|
|
75
|
+
# auth_names
|
|
76
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
77
|
+
|
|
78
|
+
new_options = opts.merge(
|
|
79
|
+
:operation => :create_sca_resolve_vulnerable_symbols,
|
|
80
|
+
:header_params => header_params,
|
|
81
|
+
:query_params => query_params,
|
|
82
|
+
:form_params => form_params,
|
|
83
|
+
:body => post_body,
|
|
84
|
+
:auth_names => auth_names,
|
|
85
|
+
:return_type => return_type,
|
|
86
|
+
:api_version => "V2"
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug "API called: StaticAnalysisAPI#create_sca_resolve_vulnerable_symbols\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
+
end
|
|
93
|
+
return data, status_code, headers
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Post dependencies for analysis.
|
|
97
|
+
#
|
|
98
|
+
# @see #create_sca_result_with_http_info
|
|
99
|
+
def create_sca_result(body, opts = {})
|
|
100
|
+
create_sca_result_with_http_info(body, opts)
|
|
101
|
+
nil
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Post dependencies for analysis.
|
|
105
|
+
# @param body [ScaRequest]
|
|
106
|
+
# @param opts [Hash] the optional parameters
|
|
107
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
108
|
+
def create_sca_result_with_http_info(body, opts = {})
|
|
109
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.create_sca_result".to_sym]
|
|
110
|
+
if unstable_enabled
|
|
111
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_sca_result")
|
|
112
|
+
else
|
|
113
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_sca_result"))
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if @api_client.config.debugging
|
|
117
|
+
@api_client.config.logger.debug 'Calling API: StaticAnalysisAPI.create_sca_result ...'
|
|
118
|
+
end
|
|
119
|
+
# verify the required parameter 'body' is set
|
|
120
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
121
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling StaticAnalysisAPI.create_sca_result"
|
|
122
|
+
end
|
|
123
|
+
# resource path
|
|
124
|
+
local_var_path = '/api/v2/static-analysis-sca/dependencies'
|
|
125
|
+
|
|
126
|
+
# query parameters
|
|
127
|
+
query_params = opts[:query_params] || {}
|
|
128
|
+
|
|
129
|
+
# header parameters
|
|
130
|
+
header_params = opts[:header_params] || {}
|
|
131
|
+
# HTTP header 'Accept' (if needed)
|
|
132
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
133
|
+
# HTTP header 'Content-Type'
|
|
134
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
135
|
+
|
|
136
|
+
# form parameters
|
|
137
|
+
form_params = opts[:form_params] || {}
|
|
138
|
+
|
|
139
|
+
# http body (model)
|
|
140
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
141
|
+
|
|
142
|
+
# return_type
|
|
143
|
+
return_type = opts[:debug_return_type]
|
|
144
|
+
|
|
145
|
+
# auth_names
|
|
146
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
147
|
+
|
|
148
|
+
new_options = opts.merge(
|
|
149
|
+
:operation => :create_sca_result,
|
|
150
|
+
:header_params => header_params,
|
|
151
|
+
:query_params => query_params,
|
|
152
|
+
:form_params => form_params,
|
|
153
|
+
:body => post_body,
|
|
154
|
+
:auth_names => auth_names,
|
|
155
|
+
:return_type => return_type,
|
|
156
|
+
:api_version => "V2"
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
160
|
+
if @api_client.config.debugging
|
|
161
|
+
@api_client.config.logger.debug "API called: StaticAnalysisAPI#create_sca_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
162
|
+
end
|
|
163
|
+
return data, status_code, headers
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
end
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'cgi'
|
|
17
|
+
|
|
18
|
+
module DatadogAPIClient::V2
|
|
19
|
+
class TestOptimizationAPI
|
|
20
|
+
attr_accessor :api_client
|
|
21
|
+
|
|
22
|
+
def initialize(api_client = DatadogAPIClient::APIClient.default)
|
|
23
|
+
@api_client = api_client
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Search flaky tests.
|
|
27
|
+
#
|
|
28
|
+
# @see #search_flaky_tests_with_http_info
|
|
29
|
+
def search_flaky_tests(opts = {})
|
|
30
|
+
data, _status_code, _headers = search_flaky_tests_with_http_info(opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Search flaky tests.
|
|
35
|
+
#
|
|
36
|
+
# List endpoint returning flaky tests from Flaky Test Management. Results are paginated.
|
|
37
|
+
#
|
|
38
|
+
# @param opts [Hash] the optional parameters
|
|
39
|
+
# @option opts [FlakyTestsSearchRequest] :body
|
|
40
|
+
# @return [Array<(FlakyTestsSearchResponse, Integer, Hash)>] FlakyTestsSearchResponse data, response status code and response headers
|
|
41
|
+
def search_flaky_tests_with_http_info(opts = {})
|
|
42
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.search_flaky_tests".to_sym]
|
|
43
|
+
if unstable_enabled
|
|
44
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.search_flaky_tests")
|
|
45
|
+
else
|
|
46
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.search_flaky_tests"))
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
if @api_client.config.debugging
|
|
50
|
+
@api_client.config.logger.debug 'Calling API: TestOptimizationAPI.search_flaky_tests ...'
|
|
51
|
+
end
|
|
52
|
+
# resource path
|
|
53
|
+
local_var_path = '/api/v2/test/flaky-test-management/tests'
|
|
54
|
+
|
|
55
|
+
# query parameters
|
|
56
|
+
query_params = opts[:query_params] || {}
|
|
57
|
+
|
|
58
|
+
# header parameters
|
|
59
|
+
header_params = opts[:header_params] || {}
|
|
60
|
+
# HTTP header 'Accept' (if needed)
|
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
62
|
+
# HTTP header 'Content-Type'
|
|
63
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
64
|
+
|
|
65
|
+
# form parameters
|
|
66
|
+
form_params = opts[:form_params] || {}
|
|
67
|
+
|
|
68
|
+
# http body (model)
|
|
69
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
|
70
|
+
|
|
71
|
+
# return_type
|
|
72
|
+
return_type = opts[:debug_return_type] || 'FlakyTestsSearchResponse'
|
|
73
|
+
|
|
74
|
+
# auth_names
|
|
75
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
76
|
+
|
|
77
|
+
new_options = opts.merge(
|
|
78
|
+
:operation => :search_flaky_tests,
|
|
79
|
+
:header_params => header_params,
|
|
80
|
+
:query_params => query_params,
|
|
81
|
+
:form_params => form_params,
|
|
82
|
+
:body => post_body,
|
|
83
|
+
:auth_names => auth_names,
|
|
84
|
+
:return_type => return_type,
|
|
85
|
+
:api_version => "V2"
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
89
|
+
if @api_client.config.debugging
|
|
90
|
+
@api_client.config.logger.debug "API called: TestOptimizationAPI#search_flaky_tests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
91
|
+
end
|
|
92
|
+
return data, status_code, headers
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Search flaky tests.
|
|
96
|
+
#
|
|
97
|
+
# Provide a paginated version of {#search_flaky_tests}, returning all items.
|
|
98
|
+
#
|
|
99
|
+
# To use it you need to use a block: search_flaky_tests_with_pagination { |item| p item }
|
|
100
|
+
#
|
|
101
|
+
# @yield [FlakyTest] Paginated items
|
|
102
|
+
def search_flaky_tests_with_pagination(opts = {})
|
|
103
|
+
api_version = "V2"
|
|
104
|
+
page_size = @api_client.get_attribute_from_path(opts, "body.data.attributes.page.limit", 10)
|
|
105
|
+
@api_client.set_attribute_from_path(api_version, opts, "body.data.attributes.page.limit", FlakyTestsSearchRequest, page_size)
|
|
106
|
+
while true do
|
|
107
|
+
response = search_flaky_tests(opts)
|
|
108
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
|
109
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
110
|
+
break
|
|
111
|
+
end
|
|
112
|
+
@api_client.set_attribute_from_path(api_version, opts, "body.data.attributes.page.cursor", FlakyTestsSearchRequest, @api_client.get_attribute_from_path(response, "meta.pagination.next_page"))
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
@@ -24,13 +24,17 @@ module DatadogAPIClient::V2
|
|
|
24
24
|
# The `ArbitraryRuleResponseArray` `data`.
|
|
25
25
|
attr_reader :data
|
|
26
26
|
|
|
27
|
+
# The `ArbitraryRuleResponseArray` `meta`.
|
|
28
|
+
attr_accessor :meta
|
|
29
|
+
|
|
27
30
|
attr_accessor :additional_properties
|
|
28
31
|
|
|
29
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
33
|
# @!visibility private
|
|
31
34
|
def self.attribute_map
|
|
32
35
|
{
|
|
33
|
-
:'data' => :'data'
|
|
36
|
+
:'data' => :'data',
|
|
37
|
+
:'meta' => :'meta'
|
|
34
38
|
}
|
|
35
39
|
end
|
|
36
40
|
|
|
@@ -38,7 +42,8 @@ module DatadogAPIClient::V2
|
|
|
38
42
|
# @!visibility private
|
|
39
43
|
def self.openapi_types
|
|
40
44
|
{
|
|
41
|
-
:'data' => :'Array<ArbitraryRuleResponseData>'
|
|
45
|
+
:'data' => :'Array<ArbitraryRuleResponseData>',
|
|
46
|
+
:'meta' => :'ArbitraryRuleResponseArrayMeta'
|
|
42
47
|
}
|
|
43
48
|
end
|
|
44
49
|
|
|
@@ -65,6 +70,10 @@ module DatadogAPIClient::V2
|
|
|
65
70
|
self.data = value
|
|
66
71
|
end
|
|
67
72
|
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'meta')
|
|
75
|
+
self.meta = attributes[:'meta']
|
|
76
|
+
end
|
|
68
77
|
end
|
|
69
78
|
|
|
70
79
|
# Check to see if the all the properties in the model are valid
|
|
@@ -112,6 +121,7 @@ module DatadogAPIClient::V2
|
|
|
112
121
|
return true if self.equal?(o)
|
|
113
122
|
self.class == o.class &&
|
|
114
123
|
data == o.data &&
|
|
124
|
+
meta == o.meta &&
|
|
115
125
|
additional_properties == o.additional_properties
|
|
116
126
|
end
|
|
117
127
|
|
|
@@ -119,7 +129,7 @@ module DatadogAPIClient::V2
|
|
|
119
129
|
# @return [Integer] Hash code
|
|
120
130
|
# @!visibility private
|
|
121
131
|
def hash
|
|
122
|
-
[data, additional_properties].hash
|
|
132
|
+
[data, meta, additional_properties].hash
|
|
123
133
|
end
|
|
124
134
|
end
|
|
125
135
|
end
|