datadog_api_client 2.15.0 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.apigentools-info +6 -6
- data/.generator/schemas/v1/openapi.yaml +1316 -153
- data/.generator/schemas/v2/openapi.yaml +3367 -685
- data/.generator/src/generator/formatter.py +4 -0
- data/.generator/src/generator/openapi.py +2 -0
- data/.generator/src/generator/templates/api_client.j2 +22 -1
- data/.generator/src/generator/templates/inflector.j2 +1 -1
- data/.generator/src/generator/templates/model_base.j2 +5 -0
- data/CHANGELOG.md +59 -0
- data/Gemfile +1 -0
- data/LICENSE-3rdparty.csv +1 -0
- data/datadog_api_client.gemspec +2 -0
- data/examples/v1/aws-integration/CreateAWSAccount.rb +1 -1
- data/examples/v1/aws-integration/CreateAWSEventBridgeSource.rb +12 -0
- data/examples/v1/aws-integration/CreateAWSTagFilter.rb +1 -1
- data/examples/v1/aws-integration/CreateNewAWSExternalID.rb +1 -1
- data/examples/v1/aws-integration/DeleteAWSAccount.rb +1 -1
- data/examples/v1/aws-integration/DeleteAWSEventBridgeSource.rb +11 -0
- data/examples/v1/aws-integration/ListAWSEventBridgeSources.rb +5 -0
- data/examples/v1/azure-integration/CreateAzureIntegration.rb +1 -0
- data/examples/v1/azure-integration/DeleteAzureIntegration.rb +1 -0
- data/examples/v1/azure-integration/UpdateAzureHostFilters.rb +1 -0
- data/examples/v1/azure-integration/UpdateAzureIntegration.rb +1 -0
- data/examples/v1/dashboards/CreateDashboard_1213075383.rb +7 -0
- data/examples/v1/dashboards/CreateDashboard_1754992756.rb +44 -0
- data/examples/v1/dashboards/CreateDashboard_2278756614.rb +91 -0
- data/examples/v1/monitors/CreateMonitor_1539578087.rb +35 -0
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.rb +1 -1
- data/examples/v1/usage-metering/GetUsageCIApp.rb +4 -1
- data/examples/v1/usage-metering/GetUsageCWS.rb +4 -1
- data/examples/v1/usage-metering/GetUsageCloudSecurityPostureManagement.rb +1 -1
- data/examples/v2/apm-retention-filters/CreateApmRetentionFilter.rb +20 -0
- data/examples/v2/apm-retention-filters/DeleteApmRetentionFilter.rb +8 -0
- data/examples/v2/apm-retention-filters/GetApmRetentionFilter.rb +8 -0
- data/examples/v2/apm-retention-filters/ListApmRetentionFilters.rb +5 -0
- data/examples/v2/apm-retention-filters/ReorderApmRetentionFilters.rb +18 -0
- data/examples/v2/apm-retention-filters/UpdateApmRetentionFilter.rb +24 -0
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +0 -5
- data/examples/v2/confluent-cloud/DeleteConfluentAccount.rb +4 -1
- data/examples/v2/confluent-cloud/DeleteConfluentResource.rb +5 -0
- data/examples/v2/container-images/ListContainerImages.rb +8 -0
- data/examples/v2/container-images/ListContainerImages_3088586393.rb +11 -0
- data/examples/v2/container-images/ListContainerImages_3974828736.rb +11 -0
- data/examples/v2/containers/ListContainers.rb +8 -0
- data/examples/v2/containers/ListContainers_2175733917.rb +11 -0
- data/examples/v2/containers/ListContainers_931009654.rb +11 -0
- data/examples/v2/downtimes/ListMonitorDowntimes.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_109518525.rb +19 -0
- data/examples/v2/key-management/CreateCurrentUserApplicationKey.rb +2 -7
- data/examples/v2/key-management/DeleteApplicationKey.rb +4 -1
- data/examples/v2/key-management/DeleteCurrentUserApplicationKey.rb +4 -1
- data/examples/v2/powerpack/CreatePowerpack.rb +48 -0
- data/examples/v2/powerpack/DeletePowerpack.rb +8 -0
- data/examples/v2/powerpack/GetPowerpack.rb +8 -0
- data/examples/v2/powerpack/ListPowerpacks.rb +8 -0
- data/examples/v2/powerpack/ListPowerpacks_1173755071.rb +8 -0
- data/examples/v2/powerpack/UpdatePowerpack.rb +51 -0
- data/examples/v2/rum/CreateRUMApplication.rb +1 -1
- data/examples/v2/security-monitoring/MuteFindings.rb +29 -0
- data/examples/v2/service-accounts/CreateServiceAccountApplicationKey.rb +5 -7
- data/examples/v2/service-accounts/DeleteServiceAccountApplicationKey.rb +7 -1
- data/examples/v2/service-accounts/GetServiceAccountApplicationKey.rb +7 -1
- data/examples/v2/service-accounts/ListServiceAccountApplicationKeys.rb +4 -1
- data/examples/v2/service-accounts/UpdateServiceAccountApplicationKey.rb +11 -9
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +23 -12
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_2621709423.rb +53 -0
- data/examples/v2/service-scorecards/CreateScorecardOutcomesBatch.rb +27 -0
- data/examples/v2/service-scorecards/CreateScorecardRule.rb +19 -0
- data/examples/v2/service-scorecards/DeleteScorecardRule.rb +11 -0
- data/examples/v2/service-scorecards/ListScorecardOutcomes.rb +8 -0
- data/examples/v2/service-scorecards/ListScorecardOutcomes_2663454275.rb +13 -0
- data/examples/v2/service-scorecards/ListScorecardRules.rb +8 -0
- data/examples/v2/service-scorecards/ListScorecardRules_4057666343.rb +13 -0
- data/examples/v2/synthetics/SetOnDemandConcurrencyCap.rb +3 -1
- data/examples/v2/teams/ListTeams_3429963470.rb +12 -0
- data/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring.rb +4 -1
- data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.rb +4 -1
- data/examples/v2/usage-metering/GetUsageObservabilityPipelines.rb +4 -1
- data/examples/v2/users/GetUser.rb +5 -2
- data/lib/datadog_api_client/api_client.rb +22 -1
- data/lib/datadog_api_client/configuration.rb +8 -1
- data/lib/datadog_api_client/inflector.rb +156 -9
- data/lib/datadog_api_client/v1/api/aws_integration_api.rb +194 -0
- data/lib/datadog_api_client/v1/api/monitors_api.rb +6 -21
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +6 -6
- data/lib/datadog_api_client/v1/api/webhooks_integration_api.rb +1 -1
- data/lib/datadog_api_client/v1/model_base.rb +5 -0
- data/lib/datadog_api_client/v1/models/aws_account.rb +2 -1
- data/lib/datadog_api_client/v1/models/aws_event_bridge_account_configuration.rb +105 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_create_request.rb +112 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_create_response.rb +110 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_create_status.rb +26 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_delete_request.rb +100 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_delete_response.rb +80 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_delete_status.rb +26 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_list_response.rb +92 -0
- data/lib/datadog_api_client/v1/models/aws_event_bridge_source.rb +90 -0
- data/lib/datadog_api_client/v1/models/azure_account.rb +12 -1
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +27 -4
- data/lib/datadog_api_client/v1/models/ip_prefixes_global.rb +94 -0
- data/lib/datadog_api_client/v1/models/ip_ranges.rb +11 -1
- data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
- data/lib/datadog_api_client/v1/models/monitor_options_custom_schedule.rb +82 -0
- data/lib/datadog_api_client/v1/models/monitor_options_custom_schedule_recurrence.rb +100 -0
- data/lib/datadog_api_client/v1/models/monitor_options_scheduling_options.rb +11 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +46 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +465 -5
- data/lib/datadog_api_client/v1/models/powerpack_template_variable_contents.rb +131 -0
- data/lib/datadog_api_client/v1/models/powerpack_template_variables.rb +94 -0
- data/lib/datadog_api_client/v1/models/powerpack_widget_definition.rb +169 -0
- data/lib/datadog_api_client/v1/models/powerpack_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/split_config.rb +181 -0
- data/lib/datadog_api_client/v1/models/split_config_sort_compute.rb +119 -0
- data/lib/datadog_api_client/v1/models/split_dimension.rb +98 -0
- data/lib/datadog_api_client/v1/models/split_graph_source_widget_definition.rb +70 -0
- data/lib/datadog_api_client/v1/models/split_graph_viz_size.rb +29 -0
- data/lib/datadog_api_client/v1/models/split_graph_widget_definition.rb +191 -0
- data/lib/datadog_api_client/v1/models/split_graph_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/split_sort.rb +108 -0
- data/lib/datadog_api_client/v1/models/split_vector_entry_item.rb +125 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_definition.rb +11 -1
- data/lib/datadog_api_client/v1/models/toplist_widget_display.rb +63 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_flat.rb +98 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_flat_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_legend.rb +28 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_scaling.rb +27 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_stacked.rb +119 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_stacked_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/toplist_widget_style.rb +90 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +4 -4
- data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_hour.rb +8 -8
- data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_response.rb +2 -2
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +158 -8
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +158 -8
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +158 -8
- data/lib/datadog_api_client/v1/models/widget_definition.rb +8 -6
- data/lib/datadog_api_client/v2/api/apm_retention_filters_api.rb +423 -0
- data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +4 -4
- data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +3 -3
- data/lib/datadog_api_client/v2/api/container_images_api.rb +129 -0
- data/lib/datadog_api_client/v2/api/containers_api.rb +129 -0
- data/lib/datadog_api_client/v2/api/incidents_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/key_management_api.rb +8 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +6 -3
- data/lib/datadog_api_client/v2/api/powerpack_api.rb +383 -0
- data/lib/datadog_api_client/v2/api/roles_api.rb +2 -0
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +66 -72
- data/lib/datadog_api_client/v2/api/service_definition_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/service_scorecards_api.rb +457 -0
- data/lib/datadog_api_client/v2/api/teams_api.rb +2 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
- data/lib/datadog_api_client/v2/model_base.rb +5 -0
- data/lib/datadog_api_client/v2/models/apm_retention_filter_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/{mute_finding_request.rb → bulk_mute_findings_request.rb} +6 -6
- data/lib/datadog_api_client/v2/models/{mute_finding_request_attributes.rb → bulk_mute_findings_request_attributes.rb} +5 -5
- data/lib/datadog_api_client/v2/models/bulk_mute_findings_request_data.rb +161 -0
- data/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta.rb +82 -0
- data/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta_findings.rb +80 -0
- data/lib/datadog_api_client/v2/models/{mute_finding_request_properties.rb → bulk_mute_findings_request_properties.rb} +6 -6
- data/lib/datadog_api_client/v2/models/{mute_finding_response.rb → bulk_mute_findings_response.rb} +5 -5
- data/lib/datadog_api_client/v2/models/bulk_mute_findings_response_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/{mute_finding_response_data.rb → container.rb} +9 -9
- data/lib/datadog_api_client/v2/models/container_attributes.rb +183 -0
- data/lib/datadog_api_client/v2/models/container_group.rb +110 -0
- data/lib/datadog_api_client/v2/models/container_group_attributes.rb +90 -0
- data/lib/datadog_api_client/v2/models/container_group_relationships.rb +80 -0
- data/lib/datadog_api_client/v2/models/container_group_relationships_link.rb +92 -0
- data/lib/datadog_api_client/v2/models/container_group_relationships_links.rb +80 -0
- data/lib/datadog_api_client/v2/models/container_group_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/container_image.rb +100 -0
- data/lib/datadog_api_client/v2/models/container_image_attributes.rb +261 -0
- data/lib/datadog_api_client/v2/models/container_image_flavor.rb +120 -0
- data/lib/datadog_api_client/v2/models/container_image_group.rb +110 -0
- data/lib/datadog_api_client/v2/models/container_image_group_attributes.rb +100 -0
- data/lib/datadog_api_client/v2/models/container_image_group_images_relationships_link.rb +92 -0
- data/lib/datadog_api_client/v2/models/container_image_group_relationships.rb +80 -0
- data/lib/datadog_api_client/v2/models/container_image_group_relationships_links.rb +80 -0
- data/lib/datadog_api_client/v2/models/container_image_group_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/container_image_item.rb +63 -0
- data/lib/datadog_api_client/v2/models/container_image_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/container_image_meta_page.rb +160 -0
- data/lib/datadog_api_client/v2/models/container_image_meta_page_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/container_image_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/container_image_vulnerabilities.rb +140 -0
- data/lib/datadog_api_client/v2/models/container_images_response.rb +102 -0
- data/lib/datadog_api_client/v2/models/container_images_response_links.rb +130 -0
- data/lib/datadog_api_client/v2/models/container_item.rb +63 -0
- data/lib/datadog_api_client/v2/models/container_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/container_meta_page.rb +160 -0
- data/lib/datadog_api_client/v2/models/container_meta_page_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/container_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/containers_response.rb +102 -0
- data/lib/datadog_api_client/v2/models/containers_response_links.rb +130 -0
- data/lib/datadog_api_client/v2/models/create_rule_request.rb +80 -0
- data/lib/datadog_api_client/v2/models/create_rule_request_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/create_rule_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/create_rule_response_data.rb +110 -0
- data/lib/datadog_api_client/v2/models/data_scalar_column.rb +2 -2
- data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/group_scalar_column.rb +2 -2
- data/lib/datadog_api_client/v2/models/list_powerpacks_response.rb +114 -0
- data/lib/datadog_api_client/v2/models/list_rules_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/list_rules_response_data_item.rb +110 -0
- data/lib/datadog_api_client/v2/models/list_rules_response_links.rb +80 -0
- data/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status_attributes.rb +12 -1
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/outcome_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_attributes.rb +82 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_request.rb +80 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_request_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_request_item.rb +150 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_response.rb +121 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_response_attributes.rb +120 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_response_meta.rb +90 -0
- data/lib/datadog_api_client/v2/models/outcomes_batch_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/outcomes_response.rb +104 -0
- data/lib/datadog_api_client/v2/models/outcomes_response_data_item.rb +110 -0
- data/lib/datadog_api_client/v2/models/outcomes_response_included_item.rb +100 -0
- data/lib/datadog_api_client/v2/models/outcomes_response_included_rule_attributes.rb +90 -0
- data/lib/datadog_api_client/v2/models/outcomes_response_links.rb +80 -0
- data/lib/datadog_api_client/v2/models/powerpack.rb +80 -0
- data/lib/datadog_api_client/v2/models/powerpack_attributes.rb +164 -0
- data/lib/datadog_api_client/v2/models/powerpack_data.rb +110 -0
- data/lib/datadog_api_client/v2/models/powerpack_group_widget.rb +118 -0
- data/lib/datadog_api_client/v2/models/powerpack_group_widget_definition.rb +162 -0
- data/lib/datadog_api_client/v2/models/powerpack_group_widget_layout.rb +177 -0
- data/lib/datadog_api_client/v2/models/powerpack_inner_widget_layout.rb +177 -0
- data/lib/datadog_api_client/v2/models/powerpack_inner_widgets.rb +108 -0
- data/lib/datadog_api_client/v2/models/powerpack_relationships.rb +80 -0
- data/lib/datadog_api_client/v2/models/powerpack_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/powerpack_response_links.rb +129 -0
- data/lib/datadog_api_client/v2/models/powerpack_template_variable.rb +110 -0
- data/lib/datadog_api_client/v2/models/powerpacks_response_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/powerpacks_response_meta_pagination.rb +150 -0
- data/lib/datadog_api_client/v2/models/relationship_to_outcome.rb +80 -0
- data/lib/datadog_api_client/v2/models/relationship_to_outcome_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/relationship_to_rule.rb +80 -0
- data/lib/datadog_api_client/v2/models/relationship_to_rule_data.rb +80 -0
- data/lib/datadog_api_client/v2/models/relationship_to_rule_data_object.rb +90 -0
- data/lib/datadog_api_client/v2/models/reorder_retention_filters_request.rb +100 -0
- data/lib/datadog_api_client/v2/models/restriction_policy_binding.rb +1 -1
- data/lib/datadog_api_client/v2/models/{mute_finding_request_data.rb → retention_filter.rb} +9 -9
- data/lib/datadog_api_client/v2/models/retention_filter_all.rb +140 -0
- data/lib/datadog_api_client/v2/models/retention_filter_all_attributes.rb +181 -0
- data/lib/datadog_api_client/v2/models/retention_filter_all_type.rb +28 -0
- data/lib/datadog_api_client/v2/models/retention_filter_attributes.rb +181 -0
- data/lib/datadog_api_client/v2/models/retention_filter_create_attributes.rb +183 -0
- data/lib/datadog_api_client/v2/models/retention_filter_create_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/retention_filter_create_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/retention_filter_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/retention_filter_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/retention_filter_update_data.rb +140 -0
- data/lib/datadog_api_client/v2/models/retention_filter_update_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/retention_filter_without_attributes.rb +119 -0
- data/lib/datadog_api_client/v2/models/retention_filters_response.rb +100 -0
- data/lib/datadog_api_client/v2/models/rule_attributes.rb +160 -0
- data/lib/datadog_api_client/v2/models/rule_outcome_relationships.rb +80 -0
- data/lib/datadog_api_client/v2/models/rule_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/scalar_column_type_group.rb +26 -0
- data/lib/datadog_api_client/v2/models/scalar_column_type_number.rb +26 -0
- data/lib/datadog_api_client/v2/models/scalar_meta.rb +8 -0
- data/lib/datadog_api_client/v2/models/scorecard_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb +7 -7
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +11 -1
- data/lib/datadog_api_client/v2/models/service_definition_schema.rb +2 -1
- data/lib/datadog_api_client/v2/models/service_definition_schema_versions.rb +1 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +247 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_contact.rb +129 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_integrations.rb +90 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_link.rb +150 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_opsgenie.rb +108 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_opsgenie_region.rb +27 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_pagerduty.rb +80 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_type.rb +32 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_version.rb +26 -0
- data/lib/datadog_api_client/v2/models/service_definitions_create_request.rb +1 -0
- data/lib/datadog_api_client/v2/models/spans_filter.rb +80 -0
- data/lib/datadog_api_client/v2/models/spans_filter_create.rb +98 -0
- data/lib/datadog_api_client/v2/models/state.rb +28 -0
- data/lib/datadog_api_client/v2/models/teams_field.rb +40 -0
- data/lib/datadog_api_client/v2/models/user_team_permission_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/widget_live_span.rb +40 -0
- data/lib/datadog_api_client/version.rb +1 -1
- data/run-tests.sh +6 -5
- metadata +213 -32
- data/examples/v1/usage-metering/GetUsageCIApp_1064440884.rb +0 -8
- data/examples/v1/usage-metering/GetUsageCWS_736958514.rb +0 -8
- data/examples/v2/confluent-cloud/DeleteConfluentAccount_2919241291.rb +0 -8
- data/examples/v2/downtimes/ListMonitorDowntimes_128979780.rb +0 -5
- data/examples/v2/key-management/CreateCurrentUserApplicationKey_1999509896.rb +0 -14
- data/examples/v2/key-management/DeleteApplicationKey_771691550.rb +0 -8
- data/examples/v2/key-management/DeleteCurrentUserApplicationKey_1266687064.rb +0 -8
- data/examples/v2/key-management/GetCurrentUserApplicationKey_1060640890.rb +0 -8
- data/examples/v2/key-management/ListApplicationKeys_2237010090.rb +0 -5
- data/examples/v2/key-management/ListCurrentUserApplicationKeys_1503860964.rb +0 -5
- data/examples/v2/security-monitoring/UpdateFinding.rb +0 -23
- data/examples/v2/service-accounts/CreateServiceAccountApplicationKey_1761876297.rb +0 -17
- data/examples/v2/service-accounts/DeleteServiceAccountApplicationKey_992091161.rb +0 -11
- data/examples/v2/service-accounts/GetServiceAccountApplicationKey_819075131.rb +0 -11
- data/examples/v2/service-accounts/ListServiceAccountApplicationKeys_1268914341.rb +0 -8
- data/examples/v2/service-accounts/UpdateServiceAccountApplicationKey_768415790.rb +0 -22
- data/examples/v2/synthetics/GetOnDemandConcurrencyCap_2633566918.rb +0 -5
- data/examples/v2/synthetics/SetOnDemandConcurrencyCap_2850884405.rb +0 -9
- data/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring_3959166796.rb +0 -8
- data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations_1436752065.rb +0 -8
- data/examples/v2/usage-metering/GetUsageObservabilityPipelines_970725512.rb +0 -8
- data/examples/v2/users/GetUser_3047557953.rb +0 -8
- data/lib/datadog_api_client/v2/models/mute_finding_response_attributes.rb +0 -191
- data/lib/datadog_api_client/v2/models/mute_finding_response_properties.rb +0 -114
|
@@ -0,0 +1,457 @@
|
|
|
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 ServiceScorecardsAPI
|
|
20
|
+
attr_accessor :api_client
|
|
21
|
+
|
|
22
|
+
def initialize(api_client = DatadogAPIClient::APIClient.default)
|
|
23
|
+
@api_client = api_client
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Create outcomes batch.
|
|
27
|
+
#
|
|
28
|
+
# @see #create_scorecard_outcomes_batch_with_http_info
|
|
29
|
+
def create_scorecard_outcomes_batch(body, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_scorecard_outcomes_batch_with_http_info(body, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Create outcomes batch.
|
|
35
|
+
#
|
|
36
|
+
# Sets multiple service-rule outcomes in a single batched request.
|
|
37
|
+
#
|
|
38
|
+
# @param body [OutcomesBatchRequest] Set of scorecard outcomes.
|
|
39
|
+
# @param opts [Hash] the optional parameters
|
|
40
|
+
# @return [Array<(OutcomesBatchResponse, Integer, Hash)>] OutcomesBatchResponse data, response status code and response headers
|
|
41
|
+
def create_scorecard_outcomes_batch_with_http_info(body, opts = {})
|
|
42
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.create_scorecard_outcomes_batch".to_sym]
|
|
43
|
+
if unstable_enabled
|
|
44
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_scorecard_outcomes_batch")
|
|
45
|
+
else
|
|
46
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_scorecard_outcomes_batch"))
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
if @api_client.config.debugging
|
|
50
|
+
@api_client.config.logger.debug 'Calling API: ServiceScorecardsAPI.create_scorecard_outcomes_batch ...'
|
|
51
|
+
end
|
|
52
|
+
# verify the required parameter 'body' is set
|
|
53
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
54
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ServiceScorecardsAPI.create_scorecard_outcomes_batch"
|
|
55
|
+
end
|
|
56
|
+
# resource path
|
|
57
|
+
local_var_path = '/api/v2/scorecard/outcomes/batch'
|
|
58
|
+
|
|
59
|
+
# query parameters
|
|
60
|
+
query_params = opts[:query_params] || {}
|
|
61
|
+
|
|
62
|
+
# header parameters
|
|
63
|
+
header_params = opts[:header_params] || {}
|
|
64
|
+
# HTTP header 'Accept' (if needed)
|
|
65
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
66
|
+
# HTTP header 'Content-Type'
|
|
67
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
68
|
+
|
|
69
|
+
# form parameters
|
|
70
|
+
form_params = opts[:form_params] || {}
|
|
71
|
+
|
|
72
|
+
# http body (model)
|
|
73
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
74
|
+
|
|
75
|
+
# return_type
|
|
76
|
+
return_type = opts[:debug_return_type] || 'OutcomesBatchResponse'
|
|
77
|
+
|
|
78
|
+
# auth_names
|
|
79
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
80
|
+
|
|
81
|
+
new_options = opts.merge(
|
|
82
|
+
:operation => :create_scorecard_outcomes_batch,
|
|
83
|
+
:header_params => header_params,
|
|
84
|
+
:query_params => query_params,
|
|
85
|
+
:form_params => form_params,
|
|
86
|
+
:body => post_body,
|
|
87
|
+
:auth_names => auth_names,
|
|
88
|
+
:return_type => return_type,
|
|
89
|
+
:api_version => "V2"
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug "API called: ServiceScorecardsAPI#create_scorecard_outcomes_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
95
|
+
end
|
|
96
|
+
return data, status_code, headers
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Create a new rule.
|
|
100
|
+
#
|
|
101
|
+
# @see #create_scorecard_rule_with_http_info
|
|
102
|
+
def create_scorecard_rule(body, opts = {})
|
|
103
|
+
data, _status_code, _headers = create_scorecard_rule_with_http_info(body, opts)
|
|
104
|
+
data
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Create a new rule.
|
|
108
|
+
#
|
|
109
|
+
# Creates a new rule.
|
|
110
|
+
#
|
|
111
|
+
# @param body [CreateRuleRequest] Rule attributes.
|
|
112
|
+
# @param opts [Hash] the optional parameters
|
|
113
|
+
# @return [Array<(CreateRuleResponse, Integer, Hash)>] CreateRuleResponse data, response status code and response headers
|
|
114
|
+
def create_scorecard_rule_with_http_info(body, opts = {})
|
|
115
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.create_scorecard_rule".to_sym]
|
|
116
|
+
if unstable_enabled
|
|
117
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_scorecard_rule")
|
|
118
|
+
else
|
|
119
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_scorecard_rule"))
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if @api_client.config.debugging
|
|
123
|
+
@api_client.config.logger.debug 'Calling API: ServiceScorecardsAPI.create_scorecard_rule ...'
|
|
124
|
+
end
|
|
125
|
+
# verify the required parameter 'body' is set
|
|
126
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
127
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ServiceScorecardsAPI.create_scorecard_rule"
|
|
128
|
+
end
|
|
129
|
+
# resource path
|
|
130
|
+
local_var_path = '/api/v2/scorecard/rules'
|
|
131
|
+
|
|
132
|
+
# query parameters
|
|
133
|
+
query_params = opts[:query_params] || {}
|
|
134
|
+
|
|
135
|
+
# header parameters
|
|
136
|
+
header_params = opts[:header_params] || {}
|
|
137
|
+
# HTTP header 'Accept' (if needed)
|
|
138
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
139
|
+
# HTTP header 'Content-Type'
|
|
140
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
141
|
+
|
|
142
|
+
# form parameters
|
|
143
|
+
form_params = opts[:form_params] || {}
|
|
144
|
+
|
|
145
|
+
# http body (model)
|
|
146
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
147
|
+
|
|
148
|
+
# return_type
|
|
149
|
+
return_type = opts[:debug_return_type] || 'CreateRuleResponse'
|
|
150
|
+
|
|
151
|
+
# auth_names
|
|
152
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
153
|
+
|
|
154
|
+
new_options = opts.merge(
|
|
155
|
+
:operation => :create_scorecard_rule,
|
|
156
|
+
:header_params => header_params,
|
|
157
|
+
:query_params => query_params,
|
|
158
|
+
:form_params => form_params,
|
|
159
|
+
:body => post_body,
|
|
160
|
+
:auth_names => auth_names,
|
|
161
|
+
:return_type => return_type,
|
|
162
|
+
:api_version => "V2"
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
166
|
+
if @api_client.config.debugging
|
|
167
|
+
@api_client.config.logger.debug "API called: ServiceScorecardsAPI#create_scorecard_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
168
|
+
end
|
|
169
|
+
return data, status_code, headers
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Delete a rule.
|
|
173
|
+
#
|
|
174
|
+
# @see #delete_scorecard_rule_with_http_info
|
|
175
|
+
def delete_scorecard_rule(rule_id, opts = {})
|
|
176
|
+
delete_scorecard_rule_with_http_info(rule_id, opts)
|
|
177
|
+
nil
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Delete a rule.
|
|
181
|
+
#
|
|
182
|
+
# Deletes a single rule.
|
|
183
|
+
#
|
|
184
|
+
# @param rule_id [String] The ID of the rule/scorecard.
|
|
185
|
+
# @param opts [Hash] the optional parameters
|
|
186
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
187
|
+
def delete_scorecard_rule_with_http_info(rule_id, opts = {})
|
|
188
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.delete_scorecard_rule".to_sym]
|
|
189
|
+
if unstable_enabled
|
|
190
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_scorecard_rule")
|
|
191
|
+
else
|
|
192
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_scorecard_rule"))
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if @api_client.config.debugging
|
|
196
|
+
@api_client.config.logger.debug 'Calling API: ServiceScorecardsAPI.delete_scorecard_rule ...'
|
|
197
|
+
end
|
|
198
|
+
# verify the required parameter 'rule_id' is set
|
|
199
|
+
if @api_client.config.client_side_validation && rule_id.nil?
|
|
200
|
+
fail ArgumentError, "Missing the required parameter 'rule_id' when calling ServiceScorecardsAPI.delete_scorecard_rule"
|
|
201
|
+
end
|
|
202
|
+
# resource path
|
|
203
|
+
local_var_path = '/api/v2/scorecard/rules/{rule_id}'.sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/'))
|
|
204
|
+
|
|
205
|
+
# query parameters
|
|
206
|
+
query_params = opts[:query_params] || {}
|
|
207
|
+
|
|
208
|
+
# header parameters
|
|
209
|
+
header_params = opts[:header_params] || {}
|
|
210
|
+
# HTTP header 'Accept' (if needed)
|
|
211
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
212
|
+
|
|
213
|
+
# form parameters
|
|
214
|
+
form_params = opts[:form_params] || {}
|
|
215
|
+
|
|
216
|
+
# http body (model)
|
|
217
|
+
post_body = opts[:debug_body]
|
|
218
|
+
|
|
219
|
+
# return_type
|
|
220
|
+
return_type = opts[:debug_return_type]
|
|
221
|
+
|
|
222
|
+
# auth_names
|
|
223
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
224
|
+
|
|
225
|
+
new_options = opts.merge(
|
|
226
|
+
:operation => :delete_scorecard_rule,
|
|
227
|
+
:header_params => header_params,
|
|
228
|
+
:query_params => query_params,
|
|
229
|
+
:form_params => form_params,
|
|
230
|
+
:body => post_body,
|
|
231
|
+
:auth_names => auth_names,
|
|
232
|
+
:return_type => return_type,
|
|
233
|
+
:api_version => "V2"
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
|
237
|
+
if @api_client.config.debugging
|
|
238
|
+
@api_client.config.logger.debug "API called: ServiceScorecardsAPI#delete_scorecard_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
239
|
+
end
|
|
240
|
+
return data, status_code, headers
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# List all rule outcomes.
|
|
244
|
+
#
|
|
245
|
+
# @see #list_scorecard_outcomes_with_http_info
|
|
246
|
+
def list_scorecard_outcomes(opts = {})
|
|
247
|
+
data, _status_code, _headers = list_scorecard_outcomes_with_http_info(opts)
|
|
248
|
+
data
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# List all rule outcomes.
|
|
252
|
+
#
|
|
253
|
+
# Fetches all rule outcomes.
|
|
254
|
+
#
|
|
255
|
+
# @param opts [Hash] the optional parameters
|
|
256
|
+
# @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100.
|
|
257
|
+
# @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page.
|
|
258
|
+
# @option opts [String] :include Include related rule details in the response.
|
|
259
|
+
# @option opts [String] :fields_outcome Return only specified values in the outcome attributes.
|
|
260
|
+
# @option opts [String] :fields_rule Return only specified values in the included rule details.
|
|
261
|
+
# @option opts [String] :filter_outcome_service_name Filter the outcomes on a specific service name.
|
|
262
|
+
# @option opts [String] :filter_outcome_state Filter the outcomes by a specific state.
|
|
263
|
+
# @option opts [Boolean] :filter_rule_enabled Filter outcomes on whether a rule is enabled/disabled.
|
|
264
|
+
# @option opts [String] :filter_rule_id Filter outcomes based on rule ID.
|
|
265
|
+
# @option opts [String] :filter_rule_name Filter outcomes based on rule name.
|
|
266
|
+
# @return [Array<(OutcomesResponse, Integer, Hash)>] OutcomesResponse data, response status code and response headers
|
|
267
|
+
def list_scorecard_outcomes_with_http_info(opts = {})
|
|
268
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.list_scorecard_outcomes".to_sym]
|
|
269
|
+
if unstable_enabled
|
|
270
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_scorecard_outcomes")
|
|
271
|
+
else
|
|
272
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_scorecard_outcomes"))
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
if @api_client.config.debugging
|
|
276
|
+
@api_client.config.logger.debug 'Calling API: ServiceScorecardsAPI.list_scorecard_outcomes ...'
|
|
277
|
+
end
|
|
278
|
+
# resource path
|
|
279
|
+
local_var_path = '/api/v2/scorecard/outcomes'
|
|
280
|
+
|
|
281
|
+
# query parameters
|
|
282
|
+
query_params = opts[:query_params] || {}
|
|
283
|
+
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
284
|
+
query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil?
|
|
285
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
286
|
+
query_params[:'fields[outcome]'] = opts[:'fields_outcome'] if !opts[:'fields_outcome'].nil?
|
|
287
|
+
query_params[:'fields[rule]'] = opts[:'fields_rule'] if !opts[:'fields_rule'].nil?
|
|
288
|
+
query_params[:'filter[outcome][service_name]'] = opts[:'filter_outcome_service_name'] if !opts[:'filter_outcome_service_name'].nil?
|
|
289
|
+
query_params[:'filter[outcome][state]'] = opts[:'filter_outcome_state'] if !opts[:'filter_outcome_state'].nil?
|
|
290
|
+
query_params[:'filter[rule][enabled]'] = opts[:'filter_rule_enabled'] if !opts[:'filter_rule_enabled'].nil?
|
|
291
|
+
query_params[:'filter[rule][id]'] = opts[:'filter_rule_id'] if !opts[:'filter_rule_id'].nil?
|
|
292
|
+
query_params[:'filter[rule][name]'] = opts[:'filter_rule_name'] if !opts[:'filter_rule_name'].nil?
|
|
293
|
+
|
|
294
|
+
# header parameters
|
|
295
|
+
header_params = opts[:header_params] || {}
|
|
296
|
+
# HTTP header 'Accept' (if needed)
|
|
297
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
298
|
+
|
|
299
|
+
# form parameters
|
|
300
|
+
form_params = opts[:form_params] || {}
|
|
301
|
+
|
|
302
|
+
# http body (model)
|
|
303
|
+
post_body = opts[:debug_body]
|
|
304
|
+
|
|
305
|
+
# return_type
|
|
306
|
+
return_type = opts[:debug_return_type] || 'OutcomesResponse'
|
|
307
|
+
|
|
308
|
+
# auth_names
|
|
309
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
310
|
+
|
|
311
|
+
new_options = opts.merge(
|
|
312
|
+
:operation => :list_scorecard_outcomes,
|
|
313
|
+
:header_params => header_params,
|
|
314
|
+
:query_params => query_params,
|
|
315
|
+
:form_params => form_params,
|
|
316
|
+
:body => post_body,
|
|
317
|
+
:auth_names => auth_names,
|
|
318
|
+
:return_type => return_type,
|
|
319
|
+
:api_version => "V2"
|
|
320
|
+
)
|
|
321
|
+
|
|
322
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
323
|
+
if @api_client.config.debugging
|
|
324
|
+
@api_client.config.logger.debug "API called: ServiceScorecardsAPI#list_scorecard_outcomes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
325
|
+
end
|
|
326
|
+
return data, status_code, headers
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
# List all rule outcomes.
|
|
330
|
+
#
|
|
331
|
+
# Provide a paginated version of {#list_scorecard_outcomes}, returning all items.
|
|
332
|
+
#
|
|
333
|
+
# To use it you need to use a block: list_scorecard_outcomes_with_pagination { |item| p item }
|
|
334
|
+
#
|
|
335
|
+
# @yield [OutcomesResponseDataItem] Paginated items
|
|
336
|
+
def list_scorecard_outcomes_with_pagination(opts = {})
|
|
337
|
+
api_version = "V2"
|
|
338
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_size", 10)
|
|
339
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size)
|
|
340
|
+
while true do
|
|
341
|
+
response = list_scorecard_outcomes(opts)
|
|
342
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
|
343
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
344
|
+
break
|
|
345
|
+
end
|
|
346
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size)
|
|
347
|
+
end
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# List all rules.
|
|
351
|
+
#
|
|
352
|
+
# @see #list_scorecard_rules_with_http_info
|
|
353
|
+
def list_scorecard_rules(opts = {})
|
|
354
|
+
data, _status_code, _headers = list_scorecard_rules_with_http_info(opts)
|
|
355
|
+
data
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
# List all rules.
|
|
359
|
+
#
|
|
360
|
+
# Fetch all rules.
|
|
361
|
+
#
|
|
362
|
+
# @param opts [Hash] the optional parameters
|
|
363
|
+
# @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100.
|
|
364
|
+
# @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page.
|
|
365
|
+
# @option opts [String] :include Include related scorecard details in the response.
|
|
366
|
+
# @option opts [String] :filter_rule_id Filter the rules on a rule ID.
|
|
367
|
+
# @option opts [Boolean] :filter_rule_enabled Filter for enabled rules only.
|
|
368
|
+
# @option opts [Boolean] :filter_rule_custom Filter for custom rules only.
|
|
369
|
+
# @option opts [String] :filter_rule_name Filter rules on the rule name.
|
|
370
|
+
# @option opts [String] :filter_rule_description Filter rules on the rule description.
|
|
371
|
+
# @option opts [String] :fields_rule Return only specific fields in the response for rule attributes.
|
|
372
|
+
# @option opts [String] :fields_scorecard Return only specific fields in the included response for scorecard attributes.
|
|
373
|
+
# @return [Array<(ListRulesResponse, Integer, Hash)>] ListRulesResponse data, response status code and response headers
|
|
374
|
+
def list_scorecard_rules_with_http_info(opts = {})
|
|
375
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.list_scorecard_rules".to_sym]
|
|
376
|
+
if unstable_enabled
|
|
377
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_scorecard_rules")
|
|
378
|
+
else
|
|
379
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_scorecard_rules"))
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
if @api_client.config.debugging
|
|
383
|
+
@api_client.config.logger.debug 'Calling API: ServiceScorecardsAPI.list_scorecard_rules ...'
|
|
384
|
+
end
|
|
385
|
+
# resource path
|
|
386
|
+
local_var_path = '/api/v2/scorecard/rules'
|
|
387
|
+
|
|
388
|
+
# query parameters
|
|
389
|
+
query_params = opts[:query_params] || {}
|
|
390
|
+
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
391
|
+
query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil?
|
|
392
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
393
|
+
query_params[:'filter[rule][id]'] = opts[:'filter_rule_id'] if !opts[:'filter_rule_id'].nil?
|
|
394
|
+
query_params[:'filter[rule][enabled]'] = opts[:'filter_rule_enabled'] if !opts[:'filter_rule_enabled'].nil?
|
|
395
|
+
query_params[:'filter[rule][custom]'] = opts[:'filter_rule_custom'] if !opts[:'filter_rule_custom'].nil?
|
|
396
|
+
query_params[:'filter[rule][name]'] = opts[:'filter_rule_name'] if !opts[:'filter_rule_name'].nil?
|
|
397
|
+
query_params[:'filter[rule][description]'] = opts[:'filter_rule_description'] if !opts[:'filter_rule_description'].nil?
|
|
398
|
+
query_params[:'fields[rule]'] = opts[:'fields_rule'] if !opts[:'fields_rule'].nil?
|
|
399
|
+
query_params[:'fields[scorecard]'] = opts[:'fields_scorecard'] if !opts[:'fields_scorecard'].nil?
|
|
400
|
+
|
|
401
|
+
# header parameters
|
|
402
|
+
header_params = opts[:header_params] || {}
|
|
403
|
+
# HTTP header 'Accept' (if needed)
|
|
404
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
405
|
+
|
|
406
|
+
# form parameters
|
|
407
|
+
form_params = opts[:form_params] || {}
|
|
408
|
+
|
|
409
|
+
# http body (model)
|
|
410
|
+
post_body = opts[:debug_body]
|
|
411
|
+
|
|
412
|
+
# return_type
|
|
413
|
+
return_type = opts[:debug_return_type] || 'ListRulesResponse'
|
|
414
|
+
|
|
415
|
+
# auth_names
|
|
416
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
417
|
+
|
|
418
|
+
new_options = opts.merge(
|
|
419
|
+
:operation => :list_scorecard_rules,
|
|
420
|
+
:header_params => header_params,
|
|
421
|
+
:query_params => query_params,
|
|
422
|
+
:form_params => form_params,
|
|
423
|
+
:body => post_body,
|
|
424
|
+
:auth_names => auth_names,
|
|
425
|
+
:return_type => return_type,
|
|
426
|
+
:api_version => "V2"
|
|
427
|
+
)
|
|
428
|
+
|
|
429
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
430
|
+
if @api_client.config.debugging
|
|
431
|
+
@api_client.config.logger.debug "API called: ServiceScorecardsAPI#list_scorecard_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
432
|
+
end
|
|
433
|
+
return data, status_code, headers
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
# List all rules.
|
|
437
|
+
#
|
|
438
|
+
# Provide a paginated version of {#list_scorecard_rules}, returning all items.
|
|
439
|
+
#
|
|
440
|
+
# To use it you need to use a block: list_scorecard_rules_with_pagination { |item| p item }
|
|
441
|
+
#
|
|
442
|
+
# @yield [ListRulesResponseDataItem] Paginated items
|
|
443
|
+
def list_scorecard_rules_with_pagination(opts = {})
|
|
444
|
+
api_version = "V2"
|
|
445
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_size", 10)
|
|
446
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size)
|
|
447
|
+
while true do
|
|
448
|
+
response = list_scorecard_rules(opts)
|
|
449
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
|
450
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
451
|
+
break
|
|
452
|
+
end
|
|
453
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size)
|
|
454
|
+
end
|
|
455
|
+
end
|
|
456
|
+
end
|
|
457
|
+
end
|
|
@@ -867,6 +867,7 @@ module DatadogAPIClient::V2
|
|
|
867
867
|
# @option opts [Array<ListTeamsInclude>] :include Included related resources optionally requested. Allowed enum values: `team_links, user_team_permissions`
|
|
868
868
|
# @option opts [String] :filter_keyword Search query. Can be team name, team handle, or email of team member
|
|
869
869
|
# @option opts [Boolean] :filter_me When true, only returns teams the current user belongs to
|
|
870
|
+
# @option opts [Array<TeamsField>] :fields_team List of fields that need to be fetched.
|
|
870
871
|
# @return [Array<(TeamsResponse, Integer, Hash)>] TeamsResponse data, response status code and response headers
|
|
871
872
|
def list_teams_with_http_info(opts = {})
|
|
872
873
|
|
|
@@ -888,6 +889,7 @@ module DatadogAPIClient::V2
|
|
|
888
889
|
query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if !opts[:'include'].nil?
|
|
889
890
|
query_params[:'filter[keyword]'] = opts[:'filter_keyword'] if !opts[:'filter_keyword'].nil?
|
|
890
891
|
query_params[:'filter[me]'] = opts[:'filter_me'] if !opts[:'filter_me'].nil?
|
|
892
|
+
query_params[:'fields[team]'] = @api_client.build_collection_param(opts[:'fields_team'], :csv) if !opts[:'fields_team'].nil?
|
|
891
893
|
|
|
892
894
|
# header parameters
|
|
893
895
|
header_params = opts[:header_params] || {}
|
|
@@ -255,7 +255,7 @@ module DatadogAPIClient::V2
|
|
|
255
255
|
# Get hourly usage by product family.
|
|
256
256
|
#
|
|
257
257
|
# @param filter_timestamp_start [Time] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
|
|
258
|
-
# @param filter_product_families [String] Comma separated list of product families to retrieve. Available families are `all`, `analyzed_logs`, `application_security`, `audit_trail`, `serverless`, `ci_app`, `cloud_cost_management`, `cspm`, `custom_events`, `cws`, `dbm`, `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, `iot`, `lambda_traced_invocations`, `logs`, `network_flows`, `network_hosts`, `observability_pipelines`, `online_archive`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, `sds`, `snmp`, `synthetics_api`, `synthetics_browser`, `synthetics_mobile`, `synthetics_parallel_testing`, and `timeseries`. The following product family has been **deprecated**: `audit_logs`.
|
|
258
|
+
# @param filter_product_families [String] Comma separated list of product families to retrieve. Available families are `all`, `analyzed_logs`, `application_security`, `audit_trail`, `serverless`, `ci_app`, `cloud_cost_management`, `csm_container_enterprise`, `csm_host_enterprise`, `cspm`, `custom_events`, `cws`, `dbm`, `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, `iot`, `lambda_traced_invocations`, `logs`, `network_flows`, `network_hosts`, `netflow_monitoring`, `observability_pipelines`, `online_archive`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, `sds`, `snmp`, `synthetics_api`, `synthetics_browser`, `synthetics_mobile`, `synthetics_parallel_testing`, and `timeseries`. The following product family has been **deprecated**: `audit_logs`.
|
|
259
259
|
# @param opts [Hash] the optional parameters
|
|
260
260
|
# @option opts [Time] :filter_timestamp_end Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour.
|
|
261
261
|
# @option opts [Boolean] :filter_include_descendants Include child org usage in the response. Defaults to false.
|
|
@@ -94,6 +94,7 @@ module DatadogAPIClient::V2
|
|
|
94
94
|
# @return [Object] Deserialized data
|
|
95
95
|
# @!visibility private
|
|
96
96
|
def _deserialize(type, value)
|
|
97
|
+
return nil if value == nil
|
|
97
98
|
case type.to_sym
|
|
98
99
|
when :Time
|
|
99
100
|
Time.parse(value)
|
|
@@ -117,6 +118,8 @@ module DatadogAPIClient::V2
|
|
|
117
118
|
when :Array
|
|
118
119
|
# generic array, return directly
|
|
119
120
|
value
|
|
121
|
+
when :UUID
|
|
122
|
+
value.to_s
|
|
120
123
|
when /\AArray<(?<inner_type>.+)>\z/
|
|
121
124
|
inner_type = Regexp.last_match[:inner_type]
|
|
122
125
|
value.map { |v| _deserialize(inner_type, v) }
|
|
@@ -246,6 +249,8 @@ module DatadogAPIClient::V2
|
|
|
246
249
|
return data if data.instance_of?(String)
|
|
247
250
|
when 'Object' # "type: object"
|
|
248
251
|
return data if data.instance_of?(Hash)
|
|
252
|
+
when 'UUID'
|
|
253
|
+
return UUIDTools::UUID.parse(data)
|
|
249
254
|
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
|
250
255
|
if data.instance_of?(Array)
|
|
251
256
|
sub_type = Regexp.last_match[:sub_type]
|
|
@@ -0,0 +1,26 @@
|
|
|
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 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V2
|
|
20
|
+
# The type of the resource.
|
|
21
|
+
class ApmRetentionFilterType
|
|
22
|
+
include BaseEnumModel
|
|
23
|
+
|
|
24
|
+
apm_retention_filter = "apm_retention_filter".freeze
|
|
25
|
+
end
|
|
26
|
+
end
|
data/lib/datadog_api_client/v2/models/{mute_finding_request.rb → bulk_mute_findings_request.rb}
RENAMED
|
@@ -17,11 +17,11 @@ require 'date'
|
|
|
17
17
|
require 'time'
|
|
18
18
|
|
|
19
19
|
module DatadogAPIClient::V2
|
|
20
|
-
# The new mute finding request.
|
|
21
|
-
class
|
|
20
|
+
# The new bulk mute finding request.
|
|
21
|
+
class BulkMuteFindingsRequest
|
|
22
22
|
include BaseGenericModel
|
|
23
23
|
|
|
24
|
-
# Data object containing the new mute properties of the finding.
|
|
24
|
+
# Data object containing the new bulk mute properties of the finding.
|
|
25
25
|
attr_reader :data
|
|
26
26
|
|
|
27
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -36,7 +36,7 @@ module DatadogAPIClient::V2
|
|
|
36
36
|
# @!visibility private
|
|
37
37
|
def self.openapi_types
|
|
38
38
|
{
|
|
39
|
-
:'data' => :'
|
|
39
|
+
:'data' => :'BulkMuteFindingsRequestData'
|
|
40
40
|
}
|
|
41
41
|
end
|
|
42
42
|
|
|
@@ -45,13 +45,13 @@ module DatadogAPIClient::V2
|
|
|
45
45
|
# @!visibility private
|
|
46
46
|
def initialize(attributes = {})
|
|
47
47
|
if (!attributes.is_a?(Hash))
|
|
48
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::
|
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::BulkMuteFindingsRequest` initialize method"
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
52
52
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
53
53
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
54
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::
|
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::BulkMuteFindingsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
55
55
|
end
|
|
56
56
|
h[k.to_sym] = v
|
|
57
57
|
}
|
|
@@ -18,10 +18,10 @@ require 'time'
|
|
|
18
18
|
|
|
19
19
|
module DatadogAPIClient::V2
|
|
20
20
|
# The mute properties to be updated.
|
|
21
|
-
class
|
|
21
|
+
class BulkMuteFindingsRequestAttributes
|
|
22
22
|
include BaseGenericModel
|
|
23
23
|
|
|
24
|
-
# Object containing the new mute properties of the
|
|
24
|
+
# Object containing the new mute properties of the findings.
|
|
25
25
|
attr_reader :mute
|
|
26
26
|
|
|
27
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -36,7 +36,7 @@ module DatadogAPIClient::V2
|
|
|
36
36
|
# @!visibility private
|
|
37
37
|
def self.openapi_types
|
|
38
38
|
{
|
|
39
|
-
:'mute' => :'
|
|
39
|
+
:'mute' => :'BulkMuteFindingsRequestProperties'
|
|
40
40
|
}
|
|
41
41
|
end
|
|
42
42
|
|
|
@@ -45,13 +45,13 @@ module DatadogAPIClient::V2
|
|
|
45
45
|
# @!visibility private
|
|
46
46
|
def initialize(attributes = {})
|
|
47
47
|
if (!attributes.is_a?(Hash))
|
|
48
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::
|
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::BulkMuteFindingsRequestAttributes` initialize method"
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
52
52
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
53
53
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
54
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::
|
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::BulkMuteFindingsRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
55
55
|
end
|
|
56
56
|
h[k.to_sym] = v
|
|
57
57
|
}
|