datadog_api_client 2.16.0 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/schemas/v1/openapi.yaml +799 -16
- data/.generator/schemas/v2/openapi.yaml +2732 -409
- data/.generator/src/generator/cli.py +5 -0
- data/.generator/src/generator/formatter.py +4 -0
- data/.generator/src/generator/openapi.py +2 -0
- data/.generator/src/generator/templates/api_client.j2 +3 -0
- data/.generator/src/generator/templates/datadog_api_client.j2 +19 -0
- data/.generator/src/generator/templates/inflector.j2 +1 -1
- data/.generator/src/generator/templates/model_base.j2 +4 -0
- data/.pre-commit-config.yaml +1 -1
- data/CHANGELOG.md +54 -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 +2 -2
- 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/aws-integration/UpdateAWSAccount.rb +6 -6
- data/examples/v1/azure-integration/CreateAzureIntegration.rb +2 -0
- data/examples/v1/azure-integration/DeleteAzureIntegration.rb +2 -0
- data/examples/v1/azure-integration/UpdateAzureHostFilters.rb +2 -0
- data/examples/v1/azure-integration/UpdateAzureIntegration.rb +2 -0
- data/examples/v1/dashboards/CreateDashboard_1213075383.rb +7 -0
- data/examples/v1/dashboards/CreateDashboard_1284514532.rb +3 -0
- data/examples/v1/monitors/CreateMonitor_1539578087.rb +0 -1
- data/examples/v1/synthetics/PatchTest.rb +22 -0
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +3 -0
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +3 -0
- 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 +0 -3
- data/examples/v2/container-images/ListContainerImages_3088586393.rb +0 -3
- data/examples/v2/container-images/ListContainerImages_3974828736.rb +0 -3
- data/examples/v2/containers/ListContainers.rb +5 -0
- data/examples/v2/containers/ListContainers_2175733917.rb +8 -0
- data/examples/v2/containers/ListContainers_931009654.rb +8 -0
- data/examples/v2/dora-metrics/CreateDORADeployment.rb +23 -0
- data/examples/v2/dora-metrics/CreateDORAIncident.rb +25 -0
- data/examples/v2/downtimes/ListMonitorDowntimes.rb +1 -1
- data/examples/v2/events/ListEvents.rb +0 -3
- data/examples/v2/events/ListEvents_1527584014.rb +0 -3
- data/examples/v2/events/ListEvents_2663715109.rb +0 -3
- data/examples/v2/events/SearchEvents.rb +0 -3
- data/examples/v2/events/SearchEvents_3856995058.rb +0 -3
- 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/okta-integration/CreateOktaAccount.rb +19 -0
- data/examples/v2/okta-integration/DeleteOktaAccount.rb +5 -0
- data/examples/v2/okta-integration/GetOktaAccount.rb +8 -0
- data/examples/v2/okta-integration/ListOktaAccounts.rb +5 -0
- data/examples/v2/okta-integration/UpdateOktaAccount.rb +20 -0
- data/examples/v2/powerpack/CreatePowerpack.rb +1 -0
- data/examples/v2/powerpack/UpdatePowerpack.rb +1 -0
- data/examples/v2/security-monitoring/MuteFindings.rb +29 -0
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +1 -1
- 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/GetActiveBillingDimensions.rb +8 -0
- data/examples/v2/usage-metering/GetMonthlyCostAttribution.rb +8 -0
- data/examples/v2/usage-metering/GetProjectedCost.rb +8 -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 +3 -0
- data/lib/datadog_api_client/configuration.rb +11 -4
- data/lib/datadog_api_client/inflector.rb +137 -9
- data/lib/datadog_api_client/v1/api/aws_integration_api.rb +194 -0
- data/lib/datadog_api_client/v1/api/hosts_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/monitors_api.rb +5 -1
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +73 -1
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
- data/lib/datadog_api_client/v1/model_base.rb +4 -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 +24 -2
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +21 -0
- data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +42 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +421 -1
- data/lib/datadog_api_client/v1/models/synthetics_patch_test_body.rb +82 -0
- data/lib/datadog_api_client/v1/models/synthetics_patch_test_operation.rb +100 -0
- data/lib/datadog_api_client/v1/models/synthetics_patch_test_operation_name.rb +31 -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_summary_date.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +31 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +31 -1
- data/lib/datadog_api_client/v1/models/widget_live_span.rb +2 -0
- data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +6 -0
- data/lib/datadog_api_client/v2/api/container_images_api.rb +0 -6
- data/lib/datadog_api_client/v2/api/containers_api.rb +123 -0
- data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +181 -0
- data/lib/datadog_api_client/v2/api/events_api.rb +0 -12
- 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/okta_integration_api.rb +355 -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_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 +241 -0
- data/lib/datadog_api_client/v2/model_base.rb +4 -0
- data/lib/datadog_api_client/v2/models/active_billing_dimensions_attributes.rb +92 -0
- data/lib/datadog_api_client/v2/models/active_billing_dimensions_body.rb +100 -0
- data/lib/datadog_api_client/v2/models/active_billing_dimensions_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/active_billing_dimensions_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/api_keys_response.rb +14 -4
- data/lib/datadog_api_client/v2/models/api_keys_response_meta.rb +90 -0
- data/lib/datadog_api_client/v2/models/api_keys_response_meta_page.rb +80 -0
- data/lib/datadog_api_client/v2/models/application_key_response_meta.rb +90 -0
- data/lib/datadog_api_client/v2/models/application_key_response_meta_page.rb +80 -0
- data/lib/datadog_api_client/v2/models/bulk_mute_findings_request.rb +98 -0
- 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/bulk_mute_findings_response.rb +98 -0
- data/lib/datadog_api_client/v2/models/bulk_mute_findings_response_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +13 -1
- 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_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/cost_attribution_aggregates_body.rb +100 -0
- data/lib/datadog_api_client/v2/models/cost_attribution_type.rb +26 -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/dora_deployment_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +170 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request_data.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_response.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_response_data.rb +108 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/dora_git_info.rb +125 -0
- data/lib/datadog_api_client/v2/models/{mute_finding_response.rb → dora_incident_request.rb} +6 -6
- data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +179 -0
- data/lib/datadog_api_client/v2/models/dora_incident_request_data.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_incident_response.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_incident_response_data.rb +108 -0
- data/lib/datadog_api_client/v2/models/dora_incident_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/full_api_key_attributes.rb +24 -4
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb +14 -4
- data/lib/datadog_api_client/v2/models/incident_create_relationships.rb +9 -19
- data/lib/datadog_api_client/v2/models/incident_impacts_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_attributes.rb +21 -1
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_response_data.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_integration_relationships.rb +90 -0
- data/lib/datadog_api_client/v2/models/incident_non_datadog_creator.rb +90 -0
- data/lib/datadog_api_client/v2/models/incident_responders_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +69 -4
- data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +42 -4
- data/lib/datadog_api_client/v2/models/incident_severity.rb +31 -0
- data/lib/datadog_api_client/v2/models/incident_todo_attributes.rb +24 -4
- data/lib/datadog_api_client/v2/models/incident_todo_relationships.rb +90 -0
- data/lib/datadog_api_client/v2/models/incident_todo_response_data.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_update_relationships.rb +8 -0
- data/lib/datadog_api_client/v2/models/incident_user_defined_field_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/list_application_keys_response.rb +14 -4
- 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/monthly_cost_attribution_attributes.rb +151 -0
- data/lib/datadog_api_client/v2/models/monthly_cost_attribution_body.rb +100 -0
- data/lib/datadog_api_client/v2/models/monthly_cost_attribution_meta.rb +92 -0
- data/lib/datadog_api_client/v2/models/monthly_cost_attribution_pagination.rb +88 -0
- data/lib/datadog_api_client/v2/models/monthly_cost_attribution_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/okta_account.rb +129 -0
- data/lib/datadog_api_client/v2/models/okta_account_attributes.rb +170 -0
- data/lib/datadog_api_client/v2/models/{mute_finding_request.rb → okta_account_request.rb} +6 -6
- data/lib/datadog_api_client/v2/models/okta_account_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/{mute_finding_request_data.rb → okta_account_response_data.rb} +9 -9
- data/lib/datadog_api_client/v2/models/okta_account_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/okta_account_update_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/okta_account_update_request_attributes.rb +149 -0
- data/lib/datadog_api_client/v2/models/okta_account_update_request_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/okta_accounts_response.rb +82 -0
- 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/partial_api_key_attributes.rb +24 -4
- data/lib/datadog_api_client/v2/models/powerpack_group_widget.rb +14 -4
- data/lib/datadog_api_client/v2/models/powerpack_relationships.rb +2 -2
- data/lib/datadog_api_client/v2/models/powerpacks_response_meta_pagination.rb +8 -0
- data/lib/datadog_api_client/v2/models/projected_cost.rb +100 -0
- data/lib/datadog_api_client/v2/models/projected_cost_attributes.rb +132 -0
- data/lib/datadog_api_client/v2/models/projected_cost_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/projected_cost_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_impact_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_impacts.rb +100 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_responder_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_responders.rb +100 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_field_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_fields.rb +100 -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/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/scorecard_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb +1 -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/sensitive_data_scanner_standard_pattern_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +8 -8
- data/lib/datadog_api_client/v2/models/sort_direction.rb +27 -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/lib/datadog_api_client.rb +16 -1
- metadata +186 -25
- 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/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
|
@@ -1164,30 +1164,38 @@ module DatadogAPIClient::V2
|
|
|
1164
1164
|
end
|
|
1165
1165
|
end
|
|
1166
1166
|
|
|
1167
|
-
#
|
|
1167
|
+
# Mute or unmute a batch of findings.
|
|
1168
1168
|
#
|
|
1169
|
-
# @see #
|
|
1170
|
-
def
|
|
1171
|
-
data, _status_code, _headers =
|
|
1169
|
+
# @see #mute_findings_with_http_info
|
|
1170
|
+
def mute_findings(body, opts = {})
|
|
1171
|
+
data, _status_code, _headers = mute_findings_with_http_info(body, opts)
|
|
1172
1172
|
data
|
|
1173
1173
|
end
|
|
1174
1174
|
|
|
1175
|
-
#
|
|
1175
|
+
# Mute or unmute a batch of findings.
|
|
1176
1176
|
#
|
|
1177
|
-
#
|
|
1178
|
-
# Both this endpoint and the GET endpoint can be used interchangeably for listing
|
|
1179
|
-
# security signals.
|
|
1177
|
+
# Mute or unmute findings.
|
|
1180
1178
|
#
|
|
1179
|
+
# @param body [BulkMuteFindingsRequest] ### Attributes All findings are updated with the same attributes. The request body must include at least two attributes: `muted` and `reason`. The allowed reasons depend on whether the finding is being muted or unmuted: - To mute a finding: `PENDING_FIX`, `FALSE_POSITIVE`, `ACCEPTED_RISK`, `OTHER`. - To unmute a finding : `NO_PENDING_FIX`, `HUMAN_ERROR`, `NO_LONGER_ACCEPTED_RISK`, `OTHER`. ### Meta The request body must include a list of the finding IDs to be updated.
|
|
1181
1180
|
# @param opts [Hash] the optional parameters
|
|
1182
|
-
# @
|
|
1183
|
-
|
|
1184
|
-
|
|
1181
|
+
# @return [Array<(BulkMuteFindingsResponse, Integer, Hash)>] BulkMuteFindingsResponse data, response status code and response headers
|
|
1182
|
+
def mute_findings_with_http_info(body, opts = {})
|
|
1183
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.mute_findings".to_sym]
|
|
1184
|
+
if unstable_enabled
|
|
1185
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.mute_findings")
|
|
1186
|
+
else
|
|
1187
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.mute_findings"))
|
|
1188
|
+
end
|
|
1185
1189
|
|
|
1186
1190
|
if @api_client.config.debugging
|
|
1187
|
-
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.
|
|
1191
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.mute_findings ...'
|
|
1192
|
+
end
|
|
1193
|
+
# verify the required parameter 'body' is set
|
|
1194
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
1195
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.mute_findings"
|
|
1188
1196
|
end
|
|
1189
1197
|
# resource path
|
|
1190
|
-
local_var_path = '/api/v2/
|
|
1198
|
+
local_var_path = '/api/v2/posture_management/findings'
|
|
1191
1199
|
|
|
1192
1200
|
# query parameters
|
|
1193
1201
|
query_params = opts[:query_params] || {}
|
|
@@ -1203,16 +1211,16 @@ module DatadogAPIClient::V2
|
|
|
1203
1211
|
form_params = opts[:form_params] || {}
|
|
1204
1212
|
|
|
1205
1213
|
# http body (model)
|
|
1206
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
1214
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
1207
1215
|
|
|
1208
1216
|
# return_type
|
|
1209
|
-
return_type = opts[:debug_return_type] || '
|
|
1217
|
+
return_type = opts[:debug_return_type] || 'BulkMuteFindingsResponse'
|
|
1210
1218
|
|
|
1211
1219
|
# auth_names
|
|
1212
|
-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth
|
|
1220
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
1213
1221
|
|
|
1214
1222
|
new_options = opts.merge(
|
|
1215
|
-
:operation => :
|
|
1223
|
+
:operation => :mute_findings,
|
|
1216
1224
|
:header_params => header_params,
|
|
1217
1225
|
:query_params => query_params,
|
|
1218
1226
|
:form_params => form_params,
|
|
@@ -1222,72 +1230,37 @@ module DatadogAPIClient::V2
|
|
|
1222
1230
|
:api_version => "V2"
|
|
1223
1231
|
)
|
|
1224
1232
|
|
|
1225
|
-
data, status_code, headers = @api_client.call_api(Net::HTTP::
|
|
1233
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
|
1226
1234
|
if @api_client.config.debugging
|
|
1227
|
-
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#
|
|
1235
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#mute_findings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1228
1236
|
end
|
|
1229
1237
|
return data, status_code, headers
|
|
1230
1238
|
end
|
|
1231
1239
|
|
|
1232
1240
|
# Get a list of security signals.
|
|
1233
1241
|
#
|
|
1234
|
-
#
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
#
|
|
1238
|
-
# @yield [SecurityMonitoringSignal] Paginated items
|
|
1239
|
-
def search_security_monitoring_signals_with_pagination(opts = {})
|
|
1240
|
-
api_version = "V2"
|
|
1241
|
-
page_size = @api_client.get_attribute_from_path(opts, "body.page.limit", 10)
|
|
1242
|
-
@api_client.set_attribute_from_path(api_version, opts, "body.page.limit", SecurityMonitoringSignalListRequest, page_size)
|
|
1243
|
-
while true do
|
|
1244
|
-
response = search_security_monitoring_signals(opts)
|
|
1245
|
-
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
|
1246
|
-
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
1247
|
-
break
|
|
1248
|
-
end
|
|
1249
|
-
@api_client.set_attribute_from_path(api_version, opts, "body.page.cursor", SecurityMonitoringSignalListRequest, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
|
1250
|
-
end
|
|
1251
|
-
end
|
|
1252
|
-
|
|
1253
|
-
# Mute or unmute a finding.
|
|
1254
|
-
#
|
|
1255
|
-
# @see #update_finding_with_http_info
|
|
1256
|
-
def update_finding(finding_id, body, opts = {})
|
|
1257
|
-
data, _status_code, _headers = update_finding_with_http_info(finding_id, body, opts)
|
|
1242
|
+
# @see #search_security_monitoring_signals_with_http_info
|
|
1243
|
+
def search_security_monitoring_signals(opts = {})
|
|
1244
|
+
data, _status_code, _headers = search_security_monitoring_signals_with_http_info(opts)
|
|
1258
1245
|
data
|
|
1259
1246
|
end
|
|
1260
1247
|
|
|
1261
|
-
#
|
|
1248
|
+
# Get a list of security signals.
|
|
1262
1249
|
#
|
|
1263
|
-
#
|
|
1264
|
-
#
|
|
1250
|
+
# Returns security signals that match a search query.
|
|
1251
|
+
# Both this endpoint and the GET endpoint can be used interchangeably for listing
|
|
1252
|
+
# security signals.
|
|
1265
1253
|
#
|
|
1266
|
-
# @param finding_id [String] The ID of the finding.
|
|
1267
|
-
# @param body [MuteFindingRequest] To mute or unmute a finding, the request body should include at least two attributes: `muted` and `reason`. The allowed reasons depend on whether the finding is being muted or unmuted: - To mute a finding: `PENDING_FIX`, `FALSE_POSITIVE`, `ACCEPTED_RISK`, `OTHER`. - To unmute a finding : `NO_PENDING_FIX`, `HUMAN_ERROR`, `NO_LONGER_ACCEPTED_RISK`, `OTHER`.
|
|
1268
1254
|
# @param opts [Hash] the optional parameters
|
|
1269
|
-
# @
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
if unstable_enabled
|
|
1273
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_finding")
|
|
1274
|
-
else
|
|
1275
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_finding"))
|
|
1276
|
-
end
|
|
1255
|
+
# @option opts [SecurityMonitoringSignalListRequest] :body
|
|
1256
|
+
# @return [Array<(SecurityMonitoringSignalsListResponse, Integer, Hash)>] SecurityMonitoringSignalsListResponse data, response status code and response headers
|
|
1257
|
+
def search_security_monitoring_signals_with_http_info(opts = {})
|
|
1277
1258
|
|
|
1278
1259
|
if @api_client.config.debugging
|
|
1279
|
-
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.
|
|
1280
|
-
end
|
|
1281
|
-
# verify the required parameter 'finding_id' is set
|
|
1282
|
-
if @api_client.config.client_side_validation && finding_id.nil?
|
|
1283
|
-
fail ArgumentError, "Missing the required parameter 'finding_id' when calling SecurityMonitoringAPI.update_finding"
|
|
1284
|
-
end
|
|
1285
|
-
# verify the required parameter 'body' is set
|
|
1286
|
-
if @api_client.config.client_side_validation && body.nil?
|
|
1287
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.update_finding"
|
|
1260
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.search_security_monitoring_signals ...'
|
|
1288
1261
|
end
|
|
1289
1262
|
# resource path
|
|
1290
|
-
local_var_path = '/api/v2/
|
|
1263
|
+
local_var_path = '/api/v2/security_monitoring/signals/search'
|
|
1291
1264
|
|
|
1292
1265
|
# query parameters
|
|
1293
1266
|
query_params = opts[:query_params] || {}
|
|
@@ -1303,16 +1276,16 @@ module DatadogAPIClient::V2
|
|
|
1303
1276
|
form_params = opts[:form_params] || {}
|
|
1304
1277
|
|
|
1305
1278
|
# http body (model)
|
|
1306
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
1279
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
|
1307
1280
|
|
|
1308
1281
|
# return_type
|
|
1309
|
-
return_type = opts[:debug_return_type] || '
|
|
1282
|
+
return_type = opts[:debug_return_type] || 'SecurityMonitoringSignalsListResponse'
|
|
1310
1283
|
|
|
1311
1284
|
# auth_names
|
|
1312
|
-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
1285
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
1313
1286
|
|
|
1314
1287
|
new_options = opts.merge(
|
|
1315
|
-
:operation => :
|
|
1288
|
+
:operation => :search_security_monitoring_signals,
|
|
1316
1289
|
:header_params => header_params,
|
|
1317
1290
|
:query_params => query_params,
|
|
1318
1291
|
:form_params => form_params,
|
|
@@ -1322,13 +1295,34 @@ module DatadogAPIClient::V2
|
|
|
1322
1295
|
:api_version => "V2"
|
|
1323
1296
|
)
|
|
1324
1297
|
|
|
1325
|
-
data, status_code, headers = @api_client.call_api(Net::HTTP::
|
|
1298
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
1326
1299
|
if @api_client.config.debugging
|
|
1327
|
-
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#
|
|
1300
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#search_security_monitoring_signals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1328
1301
|
end
|
|
1329
1302
|
return data, status_code, headers
|
|
1330
1303
|
end
|
|
1331
1304
|
|
|
1305
|
+
# Get a list of security signals.
|
|
1306
|
+
#
|
|
1307
|
+
# Provide a paginated version of {#search_security_monitoring_signals}, returning all items.
|
|
1308
|
+
#
|
|
1309
|
+
# To use it you need to use a block: search_security_monitoring_signals_with_pagination { |item| p item }
|
|
1310
|
+
#
|
|
1311
|
+
# @yield [SecurityMonitoringSignal] Paginated items
|
|
1312
|
+
def search_security_monitoring_signals_with_pagination(opts = {})
|
|
1313
|
+
api_version = "V2"
|
|
1314
|
+
page_size = @api_client.get_attribute_from_path(opts, "body.page.limit", 10)
|
|
1315
|
+
@api_client.set_attribute_from_path(api_version, opts, "body.page.limit", SecurityMonitoringSignalListRequest, page_size)
|
|
1316
|
+
while true do
|
|
1317
|
+
response = search_security_monitoring_signals(opts)
|
|
1318
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
|
1319
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
1320
|
+
break
|
|
1321
|
+
end
|
|
1322
|
+
@api_client.set_attribute_from_path(api_version, opts, "body.page.cursor", SecurityMonitoringSignalListRequest, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
|
1323
|
+
end
|
|
1324
|
+
end
|
|
1325
|
+
|
|
1332
1326
|
# Update a security filter.
|
|
1333
1327
|
#
|
|
1334
1328
|
# @see #update_security_filter_with_http_info
|
|
@@ -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
|