datadog_api_client 2.26.1 → 2.28.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/conftest.py +0 -3
- data/.generator/schemas/v1/openapi.yaml +2123 -212
- data/.generator/schemas/v2/openapi.yaml +3082 -240
- data/.generator/src/generator/formatter.py +3 -44
- data/.generator/src/generator/keywords.json +43 -0
- data/.generator/src/generator/templates/api.j2 +4 -0
- data/.generator/src/generator/templates/api_client.j2 +1 -0
- data/.github/workflows/approved_status.yml +4 -0
- data/.github/workflows/changelog.yml +5 -0
- data/.github/workflows/codeql-analysis.yml +4 -0
- data/.github/workflows/docs.yml +3 -0
- data/.github/workflows/labeler.yml +5 -0
- data/.github/workflows/prepare_release.yml +4 -0
- data/.github/workflows/publish.yml +5 -0
- data/.github/workflows/release.yml +4 -0
- data/.github/workflows/stale.yml +6 -0
- data/.github/workflows/test.yml +3 -0
- data/.github/workflows/test_integration.yml +3 -0
- data/CHANGELOG.md +66 -0
- data/examples/v1/dashboards/CreateDashboard_1413226400.rb +66 -0
- data/examples/v1/dashboards/CreateDashboard_1433408735.rb +44 -0
- data/examples/v1/dashboards/CreateDashboard_3298564989.rb +65 -0
- data/examples/v1/dashboards/CreateDashboard_794302680.rb +152 -0
- data/examples/v1/gcp-integration/CreateGCPIntegration.rb +1 -0
- data/examples/v1/gcp-integration/UpdateGCPIntegration.rb +1 -0
- data/examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.rb +1 -0
- data/examples/v1/monitors/ValidateExistingMonitor.rb +0 -1
- data/examples/v1/monitors/ValidateMonitor.rb +0 -1
- data/examples/v1/monitors/ValidateMonitor_4247196452.rb +0 -1
- data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +3 -1
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsAPITest_3829801148.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsMobileTest.rb +27 -0
- data/examples/v1/synthetics/FetchUptimes.rb +13 -0
- data/examples/v1/synthetics/GetMobileTest.rb +8 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +3 -1
- data/examples/v1/synthetics/UpdateMobileTest.rb +30 -0
- data/examples/v2/domain-allowlist/GetDomainAllowlist.rb +5 -0
- data/examples/v2/domain-allowlist/PatchDomainAllowlist.rb +17 -0
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.rb +1 -0
- data/examples/v2/incidents/CreateIncidentType.rb +19 -0
- data/examples/v2/incidents/DeleteIncidentType.rb +11 -0
- data/examples/v2/incidents/GetIncidentType.rb +8 -0
- data/examples/v2/incidents/ListIncidentTypes.rb +8 -0
- data/examples/v2/incidents/UpdateIncidentType.rb +22 -0
- data/examples/v2/logs/AggregateLogs_2955613758.rb +0 -1
- data/examples/v2/metrics/QueryScalarData.rb +0 -3
- data/examples/v2/metrics/QueryScalarData_3112571352.rb +0 -3
- data/examples/v2/metrics/QueryTimeseriesData.rb +0 -3
- data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +0 -3
- data/examples/v2/microsoft-teams-integration/CreateTenantBasedHandle.rb +17 -0
- data/examples/v2/microsoft-teams-integration/CreateTenantBasedHandle_1540689753.rb +17 -0
- data/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle.rb +5 -0
- data/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle_377884154.rb +8 -0
- data/examples/v2/microsoft-teams-integration/GetChannelByName.rb +5 -0
- data/examples/v2/microsoft-teams-integration/GetTenantBasedHandle.rb +5 -0
- data/examples/v2/microsoft-teams-integration/GetTenantBasedHandle_2883785101.rb +8 -0
- data/examples/v2/microsoft-teams-integration/ListTenantBasedHandles.rb +5 -0
- data/examples/v2/microsoft-teams-integration/ListTenantBasedHandles_769592979.rb +5 -0
- data/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle.rb +17 -0
- data/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle_419892746.rb +18 -0
- data/examples/v2/rum-metrics/CreateRumMetric.rb +32 -0
- data/examples/v2/rum-metrics/DeleteRumMetric.rb +8 -0
- data/examples/v2/rum-metrics/GetRumMetric.rb +8 -0
- data/examples/v2/rum-metrics/ListRumMetrics.rb +5 -0
- data/examples/v2/rum-metrics/UpdateRumMetric.rb +29 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +9 -0
- data/examples/v2/security-monitoring/ListFindings_1668290866.rb +14 -0
- data/examples/v2/usage-metering/GetBillingDimensionMapping.rb +8 -0
- data/examples/v2/usage-metering/GetMonthlyCostAttribution.rb +4 -1
- data/lib/datadog_api_client/api_client.rb +1 -0
- data/lib/datadog_api_client/configuration.rb +6 -2
- data/lib/datadog_api_client/inflector.rb +109 -5
- data/lib/datadog_api_client/v1/api/monitors_api.rb +6 -3
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +274 -0
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +5 -3
- data/lib/datadog_api_client/v1/models/gcp_account.rb +11 -1
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +2 -3
- data/lib/datadog_api_client/v1/models/list_stream_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -6
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +21 -61
- data/lib/datadog_api_client/v1/models/slo_history_monitor.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_batch_details_data.rb +2 -2
- data/lib/datadog_api_client/v1/models/synthetics_batch_result.rb +2 -2
- data/lib/datadog_api_client/v1/models/{synthetics_status.rb → synthetics_batch_status.rb} +4 -4
- data/lib/datadog_api_client/v1/models/synthetics_config_variable_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_fetch_uptimes_payload.rb +167 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step.rb +229 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params.rb +249 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_direction.rb +29 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_element.rb +175 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_element_context_type.rb +27 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_element_relative_position.rb +115 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_element_user_locator.rb +117 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_element_user_locator_values_items.rb +115 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_element_user_locator_values_items_type.rb +30 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_positions_items.rb +115 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_value.rb +63 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_variable.rb +144 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step_type.rb +42 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test.rb +263 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test_config.rb +117 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test_options.rb +380 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_tests_mobile_application.rb +173 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_tests_mobile_application_reference_type.rb +27 -0
- data/lib/datadog_api_client/v1/models/synthetics_step.rb +22 -2
- data/lib/datadog_api_client/v1/models/synthetics_step_detail.rb +21 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_ci_options.rb +19 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_details_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_options_monitor_options.rb +34 -4
- data/lib/datadog_api_client/v1/models/synthetics_test_options_monitor_options_notification_preset_name.rb +29 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling.rb +31 -2
- data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling_timeframe.rb +32 -6
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request_port.rb +63 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_restriction_policy_binding.rb +117 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_restriction_policy_binding_relation.rb +27 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_uptime.rb +135 -0
- data/lib/datadog_api_client/v1/models/synthetics_uptime.rb +161 -0
- data/lib/datadog_api_client/v1/models/table_widget_request.rb +16 -4
- data/lib/datadog_api_client/v1/models/table_widget_text_format_match.rb +144 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_match_type.rb +31 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_palette.rb +36 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_replace.rb +63 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_all.rb +144 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_all_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_substring.rb +165 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_substring_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_rule.rb +163 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_stacked.rb +1 -12
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +51 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +51 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +51 -1
- data/lib/datadog_api_client/v2/api/authn_mappings_api.rb +3 -3
- data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +3 -69
- data/lib/datadog_api_client/v2/api/domain_allowlist_api.rb +153 -0
- data/lib/datadog_api_client/v2/api/incidents_api.rb +362 -1
- data/lib/datadog_api_client/v2/api/metrics_api.rb +5 -17
- data/lib/datadog_api_client/v2/api/microsoft_teams_integration_api.rb +434 -0
- data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +3 -3
- data/lib/datadog_api_client/v2/api/rum_metrics_api.rb +357 -0
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +3 -0
- data/lib/datadog_api_client/v2/api/software_catalog_api.rb +19 -19
- data/lib/datadog_api_client/v2/api/teams_api.rb +1 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +79 -10
- data/lib/datadog_api_client/v2/models/billing_dimensions_mapping_body_item.rb +125 -0
- data/lib/datadog_api_client/v2/models/billing_dimensions_mapping_body_item_attributes.rb +127 -0
- data/lib/datadog_api_client/v2/models/billing_dimensions_mapping_body_item_attributes_endpoints_items.rb +127 -0
- data/lib/datadog_api_client/v2/models/billing_dimensions_mapping_body_item_attributes_endpoints_items_status.rb +27 -0
- data/lib/datadog_api_client/v2/models/billing_dimensions_mapping_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/domain_allowlist.rb +151 -0
- data/lib/datadog_api_client/v2/models/domain_allowlist_attributes.rb +117 -0
- data/lib/datadog_api_client/v2/models/domain_allowlist_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/domain_allowlist_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/domain_allowlist_response_data.rb +151 -0
- data/lib/datadog_api_client/v2/models/domain_allowlist_response_data_attributes.rb +117 -0
- data/lib/datadog_api_client/v2/models/domain_allowlist_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/entity_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_response_included_incident.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_response_included_raw_schema.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_response_included_related_oncall_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_response_included_related_oncall_escalation_item.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_response_included_schema.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_v3_api_version.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_v3_datadog_code_location_item.rb +3 -3
- data/lib/datadog_api_client/v2/models/entity_v3_datadog_event_item.rb +2 -2
- data/lib/datadog_api_client/v2/models/entity_v3_datadog_integration_opsgenie.rb +2 -2
- data/lib/datadog_api_client/v2/models/entity_v3_datadog_integration_pagerduty.rb +2 -2
- data/lib/datadog_api_client/v2/models/entity_v3_datadog_log_item.rb +3 -3
- data/lib/datadog_api_client/v2/models/entity_v3_datadog_performance.rb +2 -2
- data/lib/datadog_api_client/v2/models/entity_v3_datadog_pipelines.rb +2 -2
- data/lib/datadog_api_client/v2/models/entity_v3_datastore.rb +4 -4
- data/lib/datadog_api_client/v2/models/entity_v3_datastore_datadog.rb +4 -4
- data/lib/datadog_api_client/v2/models/entity_v3_datastore_spec.rb +2 -2
- data/lib/datadog_api_client/v2/models/entity_v3_integrations.rb +3 -3
- data/lib/datadog_api_client/v2/models/entity_v3_metadata.rb +9 -9
- data/lib/datadog_api_client/v2/models/entity_v3_metadata_additional_owners_items.rb +2 -2
- data/lib/datadog_api_client/v2/models/entity_v3_metadata_contacts_items.rb +2 -2
- data/lib/datadog_api_client/v2/models/entity_v3_metadata_links_items.rb +2 -2
- data/lib/datadog_api_client/v2/models/entity_v3_metadata_owner.rb +2 -2
- data/lib/datadog_api_client/v2/models/entity_v3_queue.rb +5 -5
- data/lib/datadog_api_client/v2/models/entity_v3_queue_datadog.rb +4 -4
- data/lib/datadog_api_client/v2/models/entity_v3_queue_spec.rb +2 -2
- data/lib/datadog_api_client/v2/models/entity_v3_service.rb +5 -5
- data/lib/datadog_api_client/v2/models/entity_v3_service_datadog.rb +6 -6
- data/lib/datadog_api_client/v2/models/entity_v3_service_spec.rb +3 -3
- data/lib/datadog_api_client/v2/models/entity_v3_system.rb +5 -5
- data/lib/datadog_api_client/v2/models/entity_v3_system_datadog.rb +5 -5
- data/lib/datadog_api_client/v2/models/fastly_services_response.rb +1 -1
- data/lib/datadog_api_client/v2/models/finding_attributes.rb +14 -4
- data/lib/datadog_api_client/v2/models/finding_vulnerability_type.rb +29 -0
- data/lib/datadog_api_client/v2/models/gcp_metric_namespace_config.rb +115 -0
- data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +23 -1
- data/lib/datadog_api_client/v2/models/incident_create_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_metadata.rb +2 -1
- data/lib/datadog_api_client/v2/models/incident_notification_handle.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_type_attributes.rb +193 -0
- data/lib/datadog_api_client/v2/models/incident_type_create_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/incident_type_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/incident_type_list_response.rb +125 -0
- data/lib/datadog_api_client/v2/models/{aws_related_account.rb → incident_type_object.rb} +8 -8
- data/lib/datadog_api_client/v2/models/incident_type_patch_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/incident_type_patch_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/incident_type_response.rb +123 -0
- data/lib/datadog_api_client/v2/models/{aws_related_account_type.rb → incident_type_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/incident_type_update_attributes.rb +175 -0
- data/lib/datadog_api_client/v2/models/incident_user_attributes.rb +153 -0
- data/lib/datadog_api_client/v2/models/incident_user_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/include_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/list_entity_catalog_response_links.rb +3 -3
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_metric_type_category.rb +27 -0
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_response_attributes.rb +165 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_response_data.rb +147 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_create_tenant_based_handle_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_get_channel_by_name_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_attributes.rb +186 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_info_response_attributes.rb +249 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_info_response_data.rb +147 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_info_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_request_attributes.rb +202 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_request_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_response.rb +123 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_response_data.rb +147 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handles_response.rb +125 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_update_tenant_based_handle_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_update_tenant_based_handle_request_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/ms_teams_integration_metadata.rb +125 -0
- data/lib/datadog_api_client/v2/models/ms_teams_integration_metadata_teams_item.rb +186 -0
- data/lib/datadog_api_client/v2/models/powerpack_template_variable.rb +35 -4
- data/lib/datadog_api_client/v2/models/relation_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/relationship_item.rb +1 -1
- data/lib/datadog_api_client/v2/models/rum_metric_compute.rb +145 -0
- data/lib/datadog_api_client/v2/models/rum_metric_compute_aggregation_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/rum_metric_create_attributes.rb +176 -0
- data/lib/datadog_api_client/v2/models/rum_metric_create_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/rum_metric_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/rum_metric_event_type.rb +32 -0
- data/lib/datadog_api_client/v2/models/rum_metric_filter.rb +123 -0
- data/lib/datadog_api_client/v2/models/rum_metric_group_by.rb +133 -0
- data/lib/datadog_api_client/v2/models/rum_metric_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/rum_metric_response_attributes.rb +147 -0
- data/lib/datadog_api_client/v2/models/rum_metric_response_compute.rb +127 -0
- data/lib/datadog_api_client/v2/models/rum_metric_response_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/rum_metric_response_filter.rb +105 -0
- data/lib/datadog_api_client/v2/models/rum_metric_response_group_by.rb +115 -0
- data/lib/datadog_api_client/v2/models/{aws_related_account_attributes.rb → rum_metric_response_uniqueness.rb} +11 -21
- data/lib/datadog_api_client/v2/models/rum_metric_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rum_metric_uniqueness.rb +123 -0
- data/lib/datadog_api_client/v2/models/rum_metric_uniqueness_when.rb +27 -0
- data/lib/datadog_api_client/v2/models/rum_metric_update_attributes.rb +127 -0
- data/lib/datadog_api_client/v2/models/rum_metric_update_compute.rb +106 -0
- data/lib/datadog_api_client/v2/models/rum_metric_update_data.rb +154 -0
- data/lib/datadog_api_client/v2/models/rum_metric_update_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/{aws_related_accounts_response.rb → rum_metrics_response.rb} +5 -5
- data/lib/datadog_api_client/v2/models/security_monitoring_reference_table.rb +145 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_test_payload.rb +13 -1
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb +15 -4
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_meta.rb +2 -2
- data/lib/datadog_api_client/v2/models/team_update_attributes.rb +1 -26
- data/lib/datadog_api_client/v2/models/upsert_catalog_entity_request.rb +1 -1
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +145 -8
- data/examples/v2/cloud-cost-management/ListAWSRelatedAccounts.rb +0 -5
@@ -12,6 +12,7 @@ body = DatadogAPIClient::V1::GCPAccount.new({
|
|
12
12
|
host_filters: "key:value,filter:example",
|
13
13
|
is_cspm_enabled: true,
|
14
14
|
is_security_command_center_enabled: true,
|
15
|
+
is_resource_change_collection_enabled: true,
|
15
16
|
private_key: "private_key",
|
16
17
|
private_key_id: "123456789abcdefghi123456789abcdefghijklm",
|
17
18
|
project_id: "datadog-apitest",
|
@@ -15,6 +15,7 @@ body = DatadogAPIClient::V1::GCPAccount.new({
|
|
15
15
|
],
|
16
16
|
is_cspm_enabled: true,
|
17
17
|
is_security_command_center_enabled: true,
|
18
|
+
is_resource_change_collection_enabled: true,
|
18
19
|
private_key: "private_key",
|
19
20
|
private_key_id: "123456789abcdefghi123456789abcdefghijklm",
|
20
21
|
project_id: "datadog-apitest",
|
@@ -30,7 +30,9 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
|
|
30
30
|
DatadogAPIClient::V1::SyntheticsDeviceID::CHROME_LAPTOP_LARGE,
|
31
31
|
],
|
32
32
|
http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1,
|
33
|
-
monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({
|
33
|
+
monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({
|
34
|
+
notification_preset_name: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptionsNotificationPresetName::SHOW_ALL,
|
35
|
+
}),
|
34
36
|
restricted_roles: [
|
35
37
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
36
38
|
],
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Create a mobile test returns "OK - Returns the created test details." response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
|
5
|
+
|
6
|
+
body = DatadogAPIClient::V1::SyntheticsMobileTest.new({
|
7
|
+
name: "Example-Synthetic",
|
8
|
+
status: DatadogAPIClient::V1::SyntheticsTestPauseStatus::PAUSED,
|
9
|
+
type: DatadogAPIClient::V1::SyntheticsMobileTestType::MOBILE,
|
10
|
+
config: DatadogAPIClient::V1::SyntheticsMobileTestConfig.new({
|
11
|
+
variables: [],
|
12
|
+
}),
|
13
|
+
message: "",
|
14
|
+
options: DatadogAPIClient::V1::SyntheticsMobileTestOptions.new({
|
15
|
+
device_ids: [
|
16
|
+
"synthetics:mobile:device:iphone_15_ios_17",
|
17
|
+
],
|
18
|
+
mobile_application: DatadogAPIClient::V1::SyntheticsMobileTestsMobileApplication.new({
|
19
|
+
application_id: "ab0e0aed-536d-411a-9a99-5428c27d8f8e",
|
20
|
+
reference_id: "6115922a-5f5d-455e-bc7e-7955a57f3815",
|
21
|
+
reference_type: DatadogAPIClient::V1::SyntheticsMobileTestsMobileApplicationReferenceType::VERSION,
|
22
|
+
}),
|
23
|
+
tick_every: 3600,
|
24
|
+
}),
|
25
|
+
steps: [],
|
26
|
+
})
|
27
|
+
p api_instance.create_synthetics_mobile_test(body)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# Fetch uptime for multiple tests returns "OK." response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
|
5
|
+
|
6
|
+
body = DatadogAPIClient::V1::SyntheticsFetchUptimesPayload.new({
|
7
|
+
from_ts: 1726041488,
|
8
|
+
public_ids: [
|
9
|
+
"p8m-9gw-nte",
|
10
|
+
],
|
11
|
+
to_ts: 1726055954,
|
12
|
+
})
|
13
|
+
p api_instance.fetch_uptimes(body)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Get a Mobile test returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
|
5
|
+
|
6
|
+
# there is a valid "synthetics_mobile_test" in the system
|
7
|
+
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = ENV["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
|
8
|
+
p api_instance.get_mobile_test(SYNTHETICS_MOBILE_TEST_PUBLIC_ID)
|
@@ -56,7 +56,9 @@ body = DatadogAPIClient::V1::SyntheticsBrowserTest.new({
|
|
56
56
|
DatadogAPIClient::V1::SyntheticsDeviceID::CHROME_LAPTOP_LARGE,
|
57
57
|
],
|
58
58
|
http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1,
|
59
|
-
monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({
|
59
|
+
monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({
|
60
|
+
notification_preset_name: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptionsNotificationPresetName::SHOW_ALL,
|
61
|
+
}),
|
60
62
|
restricted_roles: [
|
61
63
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
62
64
|
],
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Edit a Mobile test returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
|
5
|
+
|
6
|
+
# there is a valid "synthetics_mobile_test" in the system
|
7
|
+
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = ENV["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
|
8
|
+
|
9
|
+
body = DatadogAPIClient::V1::SyntheticsMobileTest.new({
|
10
|
+
name: "Example-Synthetic-updated",
|
11
|
+
status: DatadogAPIClient::V1::SyntheticsTestPauseStatus::PAUSED,
|
12
|
+
type: DatadogAPIClient::V1::SyntheticsMobileTestType::MOBILE,
|
13
|
+
config: DatadogAPIClient::V1::SyntheticsMobileTestConfig.new({
|
14
|
+
variables: [],
|
15
|
+
}),
|
16
|
+
message: "",
|
17
|
+
options: DatadogAPIClient::V1::SyntheticsMobileTestOptions.new({
|
18
|
+
device_ids: [
|
19
|
+
"synthetics:mobile:device:iphone_15_ios_17",
|
20
|
+
],
|
21
|
+
mobile_application: DatadogAPIClient::V1::SyntheticsMobileTestsMobileApplication.new({
|
22
|
+
application_id: "ab0e0aed-536d-411a-9a99-5428c27d8f8e",
|
23
|
+
reference_id: "6115922a-5f5d-455e-bc7e-7955a57f3815",
|
24
|
+
reference_type: DatadogAPIClient::V1::SyntheticsMobileTestsMobileApplicationReferenceType::VERSION,
|
25
|
+
}),
|
26
|
+
tick_every: 3600,
|
27
|
+
}),
|
28
|
+
steps: [],
|
29
|
+
})
|
30
|
+
p api_instance.update_mobile_test(SYNTHETICS_MOBILE_TEST_PUBLIC_ID, body)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Sets Domain Allowlist returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::DomainAllowlistAPI.new
|
5
|
+
|
6
|
+
body = DatadogAPIClient::V2::DomainAllowlistRequest.new({
|
7
|
+
data: DatadogAPIClient::V2::DomainAllowlist.new({
|
8
|
+
attributes: DatadogAPIClient::V2::DomainAllowlistAttributes.new({
|
9
|
+
domains: [
|
10
|
+
"@static-test-domain.test",
|
11
|
+
],
|
12
|
+
enabled: false,
|
13
|
+
}),
|
14
|
+
type: DatadogAPIClient::V2::DomainAllowlistType::DOMAIN_ALLOWLIST,
|
15
|
+
}),
|
16
|
+
})
|
17
|
+
p api_instance.patch_domain_allowlist(body)
|
@@ -7,6 +7,7 @@ body = DatadogAPIClient::V2::GCPSTSServiceAccountCreateRequest.new({
|
|
7
7
|
data: DatadogAPIClient::V2::GCPSTSServiceAccountData.new({
|
8
8
|
attributes: DatadogAPIClient::V2::GCPSTSServiceAccountAttributes.new({
|
9
9
|
is_security_command_center_enabled: true,
|
10
|
+
is_resource_change_collection_enabled: true,
|
10
11
|
client_email: "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
|
11
12
|
host_filters: [],
|
12
13
|
}),
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Create an incident type returns "CREATED" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
DatadogAPIClient.configure do |config|
|
5
|
+
config.unstable_operations["v2.create_incident_type".to_sym] = true
|
6
|
+
end
|
7
|
+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
|
8
|
+
|
9
|
+
body = DatadogAPIClient::V2::IncidentTypeCreateRequest.new({
|
10
|
+
data: DatadogAPIClient::V2::IncidentTypeCreateData.new({
|
11
|
+
attributes: DatadogAPIClient::V2::IncidentTypeAttributes.new({
|
12
|
+
description: "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.",
|
13
|
+
is_default: false,
|
14
|
+
name: "Security Incident",
|
15
|
+
}),
|
16
|
+
type: DatadogAPIClient::V2::IncidentTypeType::INCIDENT_TYPES,
|
17
|
+
}),
|
18
|
+
})
|
19
|
+
p api_instance.create_incident_type(body)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Delete an incident type returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
DatadogAPIClient.configure do |config|
|
5
|
+
config.unstable_operations["v2.delete_incident_type".to_sym] = true
|
6
|
+
end
|
7
|
+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
|
8
|
+
|
9
|
+
# there is a valid "incident_type" in the system
|
10
|
+
INCIDENT_TYPE_DATA_ID = ENV["INCIDENT_TYPE_DATA_ID"]
|
11
|
+
api_instance.delete_incident_type(INCIDENT_TYPE_DATA_ID)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Get incident type details returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
DatadogAPIClient.configure do |config|
|
5
|
+
config.unstable_operations["v2.get_incident_type".to_sym] = true
|
6
|
+
end
|
7
|
+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
|
8
|
+
p api_instance.get_incident_type("incident_type_id")
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Get a list of incident types returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
DatadogAPIClient.configure do |config|
|
5
|
+
config.unstable_operations["v2.list_incident_types".to_sym] = true
|
6
|
+
end
|
7
|
+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
|
8
|
+
p api_instance.list_incident_types()
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Update an incident type returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
DatadogAPIClient.configure do |config|
|
5
|
+
config.unstable_operations["v2.update_incident_type".to_sym] = true
|
6
|
+
end
|
7
|
+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
|
8
|
+
|
9
|
+
# there is a valid "incident_type" in the system
|
10
|
+
INCIDENT_TYPE_DATA_ATTRIBUTES_NAME = ENV["INCIDENT_TYPE_DATA_ATTRIBUTES_NAME"]
|
11
|
+
INCIDENT_TYPE_DATA_ID = ENV["INCIDENT_TYPE_DATA_ID"]
|
12
|
+
|
13
|
+
body = DatadogAPIClient::V2::IncidentTypePatchRequest.new({
|
14
|
+
data: DatadogAPIClient::V2::IncidentTypePatchData.new({
|
15
|
+
id: INCIDENT_TYPE_DATA_ID,
|
16
|
+
attributes: DatadogAPIClient::V2::IncidentTypeUpdateAttributes.new({
|
17
|
+
name: "Security Incident-updated",
|
18
|
+
}),
|
19
|
+
type: DatadogAPIClient::V2::IncidentTypeType::INCIDENT_TYPES,
|
20
|
+
}),
|
21
|
+
})
|
22
|
+
p api_instance.update_incident_type(INCIDENT_TYPE_DATA_ID, body)
|
@@ -1,9 +1,6 @@
|
|
1
1
|
# Query scalar data across multiple products returns "OK" response
|
2
2
|
|
3
3
|
require "datadog_api_client"
|
4
|
-
DatadogAPIClient.configure do |config|
|
5
|
-
config.unstable_operations["v2.query_scalar_data".to_sym] = true
|
6
|
-
end
|
7
4
|
api_instance = DatadogAPIClient::V2::MetricsAPI.new
|
8
5
|
|
9
6
|
body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({
|
@@ -1,9 +1,6 @@
|
|
1
1
|
# Scalar cross product query returns "OK" response
|
2
2
|
|
3
3
|
require "datadog_api_client"
|
4
|
-
DatadogAPIClient.configure do |config|
|
5
|
-
config.unstable_operations["v2.query_scalar_data".to_sym] = true
|
6
|
-
end
|
7
4
|
api_instance = DatadogAPIClient::V2::MetricsAPI.new
|
8
5
|
|
9
6
|
body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({
|
@@ -1,9 +1,6 @@
|
|
1
1
|
# Query timeseries data across multiple products returns "OK" response
|
2
2
|
|
3
3
|
require "datadog_api_client"
|
4
|
-
DatadogAPIClient.configure do |config|
|
5
|
-
config.unstable_operations["v2.query_timeseries_data".to_sym] = true
|
6
|
-
end
|
7
4
|
api_instance = DatadogAPIClient::V2::MetricsAPI.new
|
8
5
|
|
9
6
|
body = DatadogAPIClient::V2::TimeseriesFormulaQueryRequest.new({
|
@@ -1,9 +1,6 @@
|
|
1
1
|
# Timeseries cross product query returns "OK" response
|
2
2
|
|
3
3
|
require "datadog_api_client"
|
4
|
-
DatadogAPIClient.configure do |config|
|
5
|
-
config.unstable_operations["v2.query_timeseries_data".to_sym] = true
|
6
|
-
end
|
7
4
|
api_instance = DatadogAPIClient::V2::MetricsAPI.new
|
8
5
|
|
9
6
|
body = DatadogAPIClient::V2::TimeseriesFormulaQueryRequest.new({
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Create tenant-based handle returns "CREATED" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
|
5
|
+
|
6
|
+
body = DatadogAPIClient::V2::MicrosoftTeamsCreateTenantBasedHandleRequest.new({
|
7
|
+
data: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleRequestData.new({
|
8
|
+
attributes: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleRequestAttributes.new({
|
9
|
+
channel_id: "fake-channel-id",
|
10
|
+
name: "fake-handle-name",
|
11
|
+
team_id: "00000000-0000-0000-0000-000000000000",
|
12
|
+
tenant_id: "00000000-0000-0000-0000-000000000001",
|
13
|
+
}),
|
14
|
+
type: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE,
|
15
|
+
}),
|
16
|
+
})
|
17
|
+
p api_instance.create_tenant_based_handle(body)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Create api handle returns "CREATED" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
|
5
|
+
|
6
|
+
body = DatadogAPIClient::V2::MicrosoftTeamsCreateTenantBasedHandleRequest.new({
|
7
|
+
data: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleRequestData.new({
|
8
|
+
attributes: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleRequestAttributes.new({
|
9
|
+
channel_id: "19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2",
|
10
|
+
name: "Example-Microsoft-Teams-Integration",
|
11
|
+
team_id: "e5f50a58-c929-4fb3-8866-e2cd836de3c2",
|
12
|
+
tenant_id: "4d3bac44-0230-4732-9e70-cc00736f0a97",
|
13
|
+
}),
|
14
|
+
type: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE,
|
15
|
+
}),
|
16
|
+
})
|
17
|
+
p api_instance.create_tenant_based_handle(body)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Delete api handle returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
|
5
|
+
|
6
|
+
# there is a valid "tenant_based_handle" in the system
|
7
|
+
TENANT_BASED_HANDLE_DATA_ID = ENV["TENANT_BASED_HANDLE_DATA_ID"]
|
8
|
+
api_instance.delete_tenant_based_handle(TENANT_BASED_HANDLE_DATA_ID)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Get api handle information returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
|
5
|
+
|
6
|
+
# there is a valid "tenant_based_handle" in the system
|
7
|
+
TENANT_BASED_HANDLE_DATA_ID = ENV["TENANT_BASED_HANDLE_DATA_ID"]
|
8
|
+
p api_instance.get_tenant_based_handle(TENANT_BASED_HANDLE_DATA_ID)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Update tenant-based handle returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
|
5
|
+
|
6
|
+
body = DatadogAPIClient::V2::MicrosoftTeamsUpdateTenantBasedHandleRequest.new({
|
7
|
+
data: DatadogAPIClient::V2::MicrosoftTeamsUpdateTenantBasedHandleRequestData.new({
|
8
|
+
attributes: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleAttributes.new({
|
9
|
+
channel_id: "fake-channel-id",
|
10
|
+
name: "fake-handle-name",
|
11
|
+
team_id: "00000000-0000-0000-0000-000000000000",
|
12
|
+
tenant_id: "00000000-0000-0000-0000-000000000001",
|
13
|
+
}),
|
14
|
+
type: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE,
|
15
|
+
}),
|
16
|
+
})
|
17
|
+
p api_instance.update_tenant_based_handle("handle_id", body)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Update api handle returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
|
5
|
+
|
6
|
+
# there is a valid "tenant_based_handle" in the system
|
7
|
+
TENANT_BASED_HANDLE_DATA_ATTRIBUTES_NAME = ENV["TENANT_BASED_HANDLE_DATA_ATTRIBUTES_NAME"]
|
8
|
+
TENANT_BASED_HANDLE_DATA_ID = ENV["TENANT_BASED_HANDLE_DATA_ID"]
|
9
|
+
|
10
|
+
body = DatadogAPIClient::V2::MicrosoftTeamsUpdateTenantBasedHandleRequest.new({
|
11
|
+
data: DatadogAPIClient::V2::MicrosoftTeamsUpdateTenantBasedHandleRequestData.new({
|
12
|
+
attributes: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleAttributes.new({
|
13
|
+
name: "fake-handle-name--updated",
|
14
|
+
}),
|
15
|
+
type: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE,
|
16
|
+
}),
|
17
|
+
})
|
18
|
+
p api_instance.update_tenant_based_handle(TENANT_BASED_HANDLE_DATA_ID, body)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Create a rum-based metric returns "Created" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::RumMetricsAPI.new
|
5
|
+
|
6
|
+
body = DatadogAPIClient::V2::RumMetricCreateRequest.new({
|
7
|
+
data: DatadogAPIClient::V2::RumMetricCreateData.new({
|
8
|
+
attributes: DatadogAPIClient::V2::RumMetricCreateAttributes.new({
|
9
|
+
compute: DatadogAPIClient::V2::RumMetricCompute.new({
|
10
|
+
aggregation_type: DatadogAPIClient::V2::RumMetricComputeAggregationType::DISTRIBUTION,
|
11
|
+
include_percentiles: true,
|
12
|
+
path: "@duration",
|
13
|
+
}),
|
14
|
+
event_type: DatadogAPIClient::V2::RumMetricEventType::SESSION,
|
15
|
+
filter: DatadogAPIClient::V2::RumMetricFilter.new({
|
16
|
+
query: "@service:web-ui",
|
17
|
+
}),
|
18
|
+
group_by: [
|
19
|
+
DatadogAPIClient::V2::RumMetricGroupBy.new({
|
20
|
+
path: "@browser.name",
|
21
|
+
tag_name: "browser_name",
|
22
|
+
}),
|
23
|
+
],
|
24
|
+
uniqueness: DatadogAPIClient::V2::RumMetricUniqueness.new({
|
25
|
+
_when: DatadogAPIClient::V2::RumMetricUniquenessWhen::WHEN_MATCH,
|
26
|
+
}),
|
27
|
+
}),
|
28
|
+
id: "rum.sessions.webui.count",
|
29
|
+
type: DatadogAPIClient::V2::RumMetricType::RUM_METRICS,
|
30
|
+
}),
|
31
|
+
})
|
32
|
+
p api_instance.create_rum_metric(body)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Delete a rum-based metric returns "No Content" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::RumMetricsAPI.new
|
5
|
+
|
6
|
+
# there is a valid "rum_metric" in the system
|
7
|
+
RUM_METRIC_DATA_ID = ENV["RUM_METRIC_DATA_ID"]
|
8
|
+
api_instance.delete_rum_metric(RUM_METRIC_DATA_ID)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Get a rum-based metric returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::RumMetricsAPI.new
|
5
|
+
|
6
|
+
# there is a valid "rum_metric" in the system
|
7
|
+
RUM_METRIC_DATA_ID = ENV["RUM_METRIC_DATA_ID"]
|
8
|
+
p api_instance.get_rum_metric(RUM_METRIC_DATA_ID)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Update a rum-based metric returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::RumMetricsAPI.new
|
5
|
+
|
6
|
+
# there is a valid "rum_metric" in the system
|
7
|
+
RUM_METRIC_DATA_ID = ENV["RUM_METRIC_DATA_ID"]
|
8
|
+
|
9
|
+
body = DatadogAPIClient::V2::RumMetricUpdateRequest.new({
|
10
|
+
data: DatadogAPIClient::V2::RumMetricUpdateData.new({
|
11
|
+
id: RUM_METRIC_DATA_ID,
|
12
|
+
type: DatadogAPIClient::V2::RumMetricType::RUM_METRICS,
|
13
|
+
attributes: DatadogAPIClient::V2::RumMetricUpdateAttributes.new({
|
14
|
+
compute: DatadogAPIClient::V2::RumMetricUpdateCompute.new({
|
15
|
+
include_percentiles: false,
|
16
|
+
}),
|
17
|
+
filter: DatadogAPIClient::V2::RumMetricFilter.new({
|
18
|
+
query: "@service:rum-config",
|
19
|
+
}),
|
20
|
+
group_by: [
|
21
|
+
DatadogAPIClient::V2::RumMetricGroupBy.new({
|
22
|
+
path: "@browser.version",
|
23
|
+
tag_name: "browser_version",
|
24
|
+
}),
|
25
|
+
],
|
26
|
+
}),
|
27
|
+
}),
|
28
|
+
})
|
29
|
+
p api_instance.update_rum_metric(RUM_METRIC_DATA_ID, body)
|
@@ -32,5 +32,14 @@ body = DatadogAPIClient::V2::SecurityMonitoringStandardRuleCreatePayload.new({
|
|
32
32
|
tags: [],
|
33
33
|
is_enabled: true,
|
34
34
|
type: DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate::LOG_DETECTION,
|
35
|
+
reference_tables: [
|
36
|
+
DatadogAPIClient::V2::SecurityMonitoringReferenceTable.new({
|
37
|
+
table_name: "synthetics_test_reference_table_dont_delete",
|
38
|
+
column_name: "value",
|
39
|
+
log_field_path: "testtag",
|
40
|
+
check_presence: true,
|
41
|
+
rule_query_name: "a",
|
42
|
+
}),
|
43
|
+
],
|
35
44
|
})
|
36
45
|
p api_instance.create_security_monitoring_rule(body)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# List findings with detection_type query param returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
DatadogAPIClient.configure do |config|
|
5
|
+
config.unstable_operations["v2.list_findings".to_sym] = true
|
6
|
+
end
|
7
|
+
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
|
8
|
+
opts = {
|
9
|
+
filter_vulnerability_type: [
|
10
|
+
FindingVulnerabilityType::MISCONFIGURATION,
|
11
|
+
FindingVulnerabilityType::ATTACK_PATH,
|
12
|
+
],
|
13
|
+
}
|
14
|
+
p api_instance.list_findings(opts)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Get billing dimension mapping for usage endpoints returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
DatadogAPIClient.configure do |config|
|
5
|
+
config.unstable_operations["v2.get_billing_dimension_mapping".to_sym] = true
|
6
|
+
end
|
7
|
+
api_instance = DatadogAPIClient::V2::UsageMeteringAPI.new
|
8
|
+
p api_instance.get_billing_dimension_mapping()
|
@@ -5,4 +5,7 @@ DatadogAPIClient.configure do |config|
|
|
5
5
|
config.unstable_operations["v2.get_monthly_cost_attribution".to_sym] = true
|
6
6
|
end
|
7
7
|
api_instance = DatadogAPIClient::V2::UsageMeteringAPI.new
|
8
|
-
|
8
|
+
opts = {
|
9
|
+
end_month: (Time.now + -3 * 86400),
|
10
|
+
}
|
11
|
+
p api_instance.get_monthly_cost_attribution((Time.now + -5 * 86400), "infra_host_total_cost", opts)
|
@@ -199,6 +199,7 @@ module DatadogAPIClient
|
|
199
199
|
|
200
200
|
req_opts[:pem] = File.read(@config.cert_file) if @config.cert_file
|
201
201
|
req_opts[:pem_password] = File.read(@config.key_file) if @config.key_file
|
202
|
+
req_opts[:query_string_normalizer] = opts[:query_string_normalizer] if opts[:query_string_normalizer]
|
202
203
|
|
203
204
|
opts[:stream_body] = true if opts[:return_type] == 'File'
|
204
205
|
|