datadog_api_client 2.20.0 → 2.22.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/conftest.py +5 -0
- data/.generator/schemas/v1/openapi.yaml +502 -754
- data/.generator/schemas/v2/openapi.yaml +2903 -102
- data/.github/workflows/prepare_release.yml +2 -2
- data/.github/workflows/publish.yml +2 -2
- data/.github/workflows/release.yml +2 -2
- data/.github/workflows/test.yml +1 -1
- data/CHANGELOG.md +52 -0
- data/Gemfile +1 -1
- data/examples/v1/aws-integration/CreateAWSAccount.rb +1 -1
- data/examples/v1/aws-integration/CreateNewAWSExternalID.rb +1 -0
- data/examples/v1/aws-integration/UpdateAWSAccount.rb +1 -1
- data/examples/v1/gcp-integration/CreateGCPIntegration.rb +3 -0
- data/examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.rb +25 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1241981394.rb +118 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +29 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +4 -0
- data/examples/v2/apm-retention-filters/UpdateApmRetentionFilter.rb +2 -2
- data/examples/v2/authn-mappings/CreateAuthNMapping.rb +1 -1
- data/examples/v2/authn-mappings/UpdateAuthNMapping.rb +1 -1
- data/examples/v2/case-management/ArchiveCase.rb +14 -0
- data/examples/v2/case-management/AssignCase.rb +20 -0
- data/examples/v2/case-management/CreateCase.rb +33 -0
- data/examples/v2/case-management/CreateProject.rb +15 -0
- data/examples/v2/case-management/DeleteProject.rb +5 -0
- data/examples/v2/case-management/GetCase.rb +8 -0
- data/examples/v2/case-management/GetProject.rb +5 -0
- data/examples/v2/case-management/GetProjects.rb +5 -0
- data/examples/v2/case-management/SearchCases.rb +5 -0
- data/examples/v2/case-management/SearchCases_3433960044.rb +5 -0
- data/examples/v2/case-management/UnarchiveCase.rb +14 -0
- data/examples/v2/case-management/UnassignCase.rb +14 -0
- data/examples/v2/case-management/UpdatePriority.rb +17 -0
- data/examples/v2/case-management/UpdateStatus.rb +17 -0
- data/examples/v2/cloud-workload-security/CreateCSMThreatsAgentRule.rb +17 -0
- data/examples/v2/cloud-workload-security/DeleteCSMThreatsAgentRule.rb +8 -0
- data/examples/v2/cloud-workload-security/DownloadCSMThreatsPolicy.rb +5 -0
- data/examples/v2/cloud-workload-security/GetCSMThreatsAgentRule.rb +8 -0
- data/examples/v2/cloud-workload-security/ListCSMThreatsAgentRules.rb +5 -0
- data/examples/v2/cloud-workload-security/UpdateCSMThreatsAgentRule.rb +20 -0
- data/examples/v2/dora-metrics/CreateDORAIncident.rb +6 -3
- data/examples/v2/gcp-integration/CreateGCPSTSAccount.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_109518525.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.rb +18 -0
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.rb +1 -1
- data/examples/v2/gcp-integration/UpdateGCPSTSAccount.rb +1 -1
- data/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.rb +21 -0
- data/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb +1 -1
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination.rb +31 -0
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1091442807.rb +31 -0
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1288180912.rb +27 -0
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_141236188.rb +32 -0
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2184123765.rb +31 -0
- data/examples/v2/logs-custom-destinations/DeleteLogsCustomDestination.rb +8 -0
- data/examples/v2/logs-custom-destinations/GetLogsCustomDestination.rb +8 -0
- data/examples/v2/logs-custom-destinations/ListLogsCustomDestinations.rb +5 -0
- data/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.rb +22 -0
- data/examples/v2/metrics/ListMetricAssets.rb +5 -0
- data/examples/v2/metrics/QueryScalarData_3112571352.rb +2 -2
- data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +3 -3
- data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.rb +19 -0
- data/examples/v2/security-monitoring/ValidateSecurityMonitoringRule.rb +42 -0
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +4 -0
- data/examples/v2/service-level-objectives/CreateSLOReportJob.rb +20 -0
- data/examples/v2/service-level-objectives/GetSLOReport.rb +8 -0
- data/examples/v2/service-level-objectives/GetSLOReportJobStatus.rb +11 -0
- data/lib/datadog_api_client/configuration.rb +3 -0
- data/lib/datadog_api_client/inflector.rb +132 -7
- data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -3
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +104 -131
- data/lib/datadog_api_client/v1/models/aws_account.rb +12 -2
- data/lib/datadog_api_client/v1/models/gcp_account.rb +14 -1
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +8 -0
- data/lib/datadog_api_client/v1/models/monitor_formula_and_function_events_data_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/monitor_options.rb +4 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +12 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +124 -4
- data/lib/datadog_api_client/v1/models/series.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb +14 -2
- data/lib/datadog_api_client/v1/models/slo_time_slice_interval.rb +29 -0
- data/lib/datadog_api_client/v1/models/slo_time_slice_spec.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_api_step_subtype.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +23 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request_body_file.rb +175 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_request_body_type.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +81 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +83 -3
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +182 -102
- data/lib/datadog_api_client/v2/api/apm_retention_filters_api.rb +6 -0
- data/lib/datadog_api_client/v2/api/case_management_api.rb +942 -0
- data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/cloud_workload_security_api.rb +392 -0
- data/lib/datadog_api_client/v2/api/incident_services_api.rb +15 -0
- data/lib/datadog_api_client/v2/api/logs_custom_destinations_api.rb +355 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +70 -2
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +67 -0
- data/lib/datadog_api_client/v2/api/service_definition_api.rb +2 -1
- data/lib/datadog_api_client/v2/api/service_level_objectives_api.rb +245 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +15 -6
- data/lib/datadog_api_client/v2/models/authn_mapping_create_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/authn_mapping_create_relationships.rb +37 -54
- data/lib/datadog_api_client/v2/models/authn_mapping_included.rb +2 -1
- data/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_role.rb +98 -0
- data/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_team.rb +98 -0
- data/lib/datadog_api_client/v2/models/authn_mapping_relationships.rb +14 -4
- data/lib/datadog_api_client/v2/models/authn_mapping_team.rb +100 -0
- data/lib/datadog_api_client/v2/models/authn_mapping_team_attributes.rb +212 -0
- data/lib/datadog_api_client/v2/models/authn_mapping_update_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/authn_mapping_update_relationships.rb +37 -54
- data/lib/datadog_api_client/v2/models/case.rb +150 -0
- data/lib/datadog_api_client/v2/models/case3rd_party_ticket_status.rb +28 -0
- data/lib/datadog_api_client/v2/models/case_assign.rb +119 -0
- data/lib/datadog_api_client/v2/models/case_assign_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_assign_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_attributes.rb +202 -0
- data/lib/datadog_api_client/v2/models/case_create.rb +129 -0
- data/lib/datadog_api_client/v2/models/case_create_attributes.rb +139 -0
- data/lib/datadog_api_client/v2/models/case_create_relationships.rb +116 -0
- data/lib/datadog_api_client/v2/models/case_create_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_empty.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_empty_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_priority.rb +31 -0
- data/lib/datadog_api_client/v2/models/case_relationships.rb +120 -0
- data/lib/datadog_api_client/v2/models/case_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/case_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/case_sortable_field.rb +28 -0
- data/lib/datadog_api_client/v2/models/case_status.rb +28 -0
- data/lib/datadog_api_client/v2/models/case_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/case_update_priority.rb +119 -0
- data/lib/datadog_api_client/v2/models/case_update_priority_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_update_priority_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_update_status.rb +119 -0
- data/lib/datadog_api_client/{v1/models/usage_attribution_pagination.rb → v2/models/case_update_status_attributes.rb} +29 -51
- data/lib/datadog_api_client/v2/models/case_update_status_request.rb +98 -0
- data/lib/datadog_api_client/{v1/models/usage_attribution_metadata.rb → v2/models/cases_response.rb} +22 -22
- data/lib/datadog_api_client/v2/models/cases_response_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/cases_response_meta_pagination.rb +100 -0
- data/lib/datadog_api_client/v2/models/ci_app_aggregate_sort.rb +1 -1
- data/lib/datadog_api_client/v2/models/ci_app_pipelines_group_by.rb +1 -1
- data/lib/datadog_api_client/v2/models/ci_app_tests_group_by.rb +1 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +90 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +21 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_kill.rb +80 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_data.rb +11 -1
- data/lib/datadog_api_client/v2/models/custom_destination_attribute_tags_restriction_list_type.rb +31 -0
- data/lib/datadog_api_client/v2/models/custom_destination_create_request.rb +80 -0
- data/lib/datadog_api_client/v2/models/custom_destination_create_request_attributes.rb +193 -0
- data/lib/datadog_api_client/v2/models/custom_destination_create_request_definition.rb +119 -0
- data/lib/datadog_api_client/v2/models/custom_destination_elasticsearch_destination_auth.rb +119 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination.rb +64 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch.rb +181 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http.rb +141 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb +141 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth.rb +63 -0
- data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic.rb +140 -0
- data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header.rb +140 -0
- data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_attributes.rb +171 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_definition.rb +100 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination.rb +64 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch.rb +181 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http.rb +141 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb +120 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth.rb +63 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic.rb +98 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header.rb +119 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_update_request.rb +80 -0
- data/lib/datadog_api_client/v2/models/custom_destination_update_request_attributes.rb +169 -0
- data/lib/datadog_api_client/v2/models/custom_destination_update_request_definition.rb +129 -0
- data/lib/datadog_api_client/v2/models/custom_destinations_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +21 -20
- data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +14 -1
- data/lib/datadog_api_client/v2/models/jira_issue.rb +90 -0
- data/lib/datadog_api_client/v2/models/jira_issue_result.rb +110 -0
- data/lib/datadog_api_client/v2/models/logs_archive_integration_gcs.rb +1 -12
- data/lib/datadog_api_client/v2/models/metric_asset_attributes.rb +80 -0
- data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationship.rb +90 -0
- data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationships.rb +82 -0
- data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationship.rb +90 -0
- data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationships.rb +82 -0
- data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationship.rb +90 -0
- data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationships.rb +82 -0
- data/lib/datadog_api_client/v2/models/metric_asset_response_data.rb +129 -0
- data/lib/datadog_api_client/v2/models/metric_asset_response_included.rb +65 -0
- data/lib/datadog_api_client/v2/models/metric_asset_response_relationships.rb +110 -0
- data/lib/datadog_api_client/v2/models/metric_asset_slo_relationship.rb +90 -0
- data/lib/datadog_api_client/v2/models/metric_asset_slo_relationships.rb +82 -0
- data/lib/datadog_api_client/v2/models/metric_assets_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/metric_dashboard_asset.rb +129 -0
- data/lib/datadog_api_client/v2/models/metric_dashboard_attributes.rb +112 -0
- data/lib/datadog_api_client/v2/models/metric_dashboard_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_monitor_asset.rb +129 -0
- data/lib/datadog_api_client/v2/models/metric_monitor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_notebook_asset.rb +129 -0
- data/lib/datadog_api_client/v2/models/metric_notebook_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_series.rb +1 -1
- data/lib/datadog_api_client/v2/models/metric_slo_asset.rb +129 -0
- data/lib/datadog_api_client/v2/models/metric_slo_type.rb +26 -0
- data/lib/datadog_api_client/{v1/models/usage_attribution_response.rb → v2/models/nullable_user_relationship.rb} +22 -26
- data/lib/datadog_api_client/v2/models/nullable_user_relationship_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/project.rb +150 -0
- data/lib/datadog_api_client/v2/models/project_attributes.rb +90 -0
- data/lib/datadog_api_client/v2/models/project_create.rb +119 -0
- data/lib/datadog_api_client/v2/models/project_create_attributes.rb +119 -0
- data/lib/datadog_api_client/v2/models/project_create_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/project_relationship.rb +98 -0
- data/lib/datadog_api_client/v2/models/project_relationship_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/project_relationships.rb +90 -0
- data/lib/datadog_api_client/v2/models/project_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/project_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/projects_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/relationship_to_team.rb +80 -0
- data/lib/datadog_api_client/v2/models/relationship_to_team_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/retention_filter_update_attributes.rb +183 -0
- data/lib/datadog_api_client/v2/models/retention_filter_update_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +13 -14
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +13 -1
- data/lib/datadog_api_client/v2/models/service_now_ticket.rb +90 -0
- data/lib/datadog_api_client/v2/models/service_now_ticket_result.rb +80 -0
- data/lib/datadog_api_client/v2/models/slo_report_create_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/slo_report_create_request_attributes.rb +160 -0
- data/lib/datadog_api_client/v2/models/slo_report_create_request_data.rb +98 -0
- data/lib/datadog_api_client/v2/models/slo_report_interval.rb +27 -0
- data/lib/datadog_api_client/v2/models/slo_report_post_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/slo_report_post_response_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/slo_report_status.rb +29 -0
- data/lib/datadog_api_client/v2/models/slo_report_status_get_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/slo_report_status_get_response_attributes.rb +80 -0
- data/lib/datadog_api_client/v2/models/slo_report_status_get_response_data.rb +100 -0
- data/lib/datadog_api_client/v2/models/timeseries_response_series.rb +8 -0
- data/lib/datadog_api_client/v2/models/user_relationship_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/user_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/user_team_included.rb +62 -0
- data/lib/datadog_api_client/v2/models/user_team_response.rb +16 -4
- data/lib/datadog_api_client/v2/models/user_teams_response.rb +13 -1
- data/lib/datadog_api_client/v2/models/users_relationship.rb +100 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +196 -33
- data/examples/v1/usage-metering/GetUsageAttribution.rb +0 -9
- data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +0 -152
- data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +0 -61
- data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +0 -72
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +0 -590
|
@@ -0,0 +1,355 @@
|
|
|
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 LogsCustomDestinationsAPI
|
|
20
|
+
attr_accessor :api_client
|
|
21
|
+
|
|
22
|
+
def initialize(api_client = DatadogAPIClient::APIClient.default)
|
|
23
|
+
@api_client = api_client
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Create a custom destination.
|
|
27
|
+
#
|
|
28
|
+
# @see #create_logs_custom_destination_with_http_info
|
|
29
|
+
def create_logs_custom_destination(body, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_logs_custom_destination_with_http_info(body, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Create a custom destination.
|
|
35
|
+
#
|
|
36
|
+
# Create a custom destination in your organization.
|
|
37
|
+
#
|
|
38
|
+
# @param body [CustomDestinationCreateRequest] The definition of the new custom destination.
|
|
39
|
+
# @param opts [Hash] the optional parameters
|
|
40
|
+
# @return [Array<(CustomDestinationResponse, Integer, Hash)>] CustomDestinationResponse data, response status code and response headers
|
|
41
|
+
def create_logs_custom_destination_with_http_info(body, opts = {})
|
|
42
|
+
|
|
43
|
+
if @api_client.config.debugging
|
|
44
|
+
@api_client.config.logger.debug 'Calling API: LogsCustomDestinationsAPI.create_logs_custom_destination ...'
|
|
45
|
+
end
|
|
46
|
+
# verify the required parameter 'body' is set
|
|
47
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
48
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling LogsCustomDestinationsAPI.create_logs_custom_destination"
|
|
49
|
+
end
|
|
50
|
+
# resource path
|
|
51
|
+
local_var_path = '/api/v2/logs/config/custom-destinations'
|
|
52
|
+
|
|
53
|
+
# query parameters
|
|
54
|
+
query_params = opts[:query_params] || {}
|
|
55
|
+
|
|
56
|
+
# header parameters
|
|
57
|
+
header_params = opts[:header_params] || {}
|
|
58
|
+
# HTTP header 'Accept' (if needed)
|
|
59
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
60
|
+
# HTTP header 'Content-Type'
|
|
61
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
62
|
+
|
|
63
|
+
# form parameters
|
|
64
|
+
form_params = opts[:form_params] || {}
|
|
65
|
+
|
|
66
|
+
# http body (model)
|
|
67
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
68
|
+
|
|
69
|
+
# return_type
|
|
70
|
+
return_type = opts[:debug_return_type] || 'CustomDestinationResponse'
|
|
71
|
+
|
|
72
|
+
# auth_names
|
|
73
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
74
|
+
|
|
75
|
+
new_options = opts.merge(
|
|
76
|
+
:operation => :create_logs_custom_destination,
|
|
77
|
+
:header_params => header_params,
|
|
78
|
+
:query_params => query_params,
|
|
79
|
+
:form_params => form_params,
|
|
80
|
+
:body => post_body,
|
|
81
|
+
:auth_names => auth_names,
|
|
82
|
+
:return_type => return_type,
|
|
83
|
+
:api_version => "V2"
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
87
|
+
if @api_client.config.debugging
|
|
88
|
+
@api_client.config.logger.debug "API called: LogsCustomDestinationsAPI#create_logs_custom_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
89
|
+
end
|
|
90
|
+
return data, status_code, headers
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Delete a custom destination.
|
|
94
|
+
#
|
|
95
|
+
# @see #delete_logs_custom_destination_with_http_info
|
|
96
|
+
def delete_logs_custom_destination(custom_destination_id, opts = {})
|
|
97
|
+
delete_logs_custom_destination_with_http_info(custom_destination_id, opts)
|
|
98
|
+
nil
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Delete a custom destination.
|
|
102
|
+
#
|
|
103
|
+
# Delete a specific custom destination in your organization.
|
|
104
|
+
#
|
|
105
|
+
# @param custom_destination_id [String] The ID of the custom destination.
|
|
106
|
+
# @param opts [Hash] the optional parameters
|
|
107
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
108
|
+
def delete_logs_custom_destination_with_http_info(custom_destination_id, opts = {})
|
|
109
|
+
|
|
110
|
+
if @api_client.config.debugging
|
|
111
|
+
@api_client.config.logger.debug 'Calling API: LogsCustomDestinationsAPI.delete_logs_custom_destination ...'
|
|
112
|
+
end
|
|
113
|
+
# verify the required parameter 'custom_destination_id' is set
|
|
114
|
+
if @api_client.config.client_side_validation && custom_destination_id.nil?
|
|
115
|
+
fail ArgumentError, "Missing the required parameter 'custom_destination_id' when calling LogsCustomDestinationsAPI.delete_logs_custom_destination"
|
|
116
|
+
end
|
|
117
|
+
# resource path
|
|
118
|
+
local_var_path = '/api/v2/logs/config/custom-destinations/{custom_destination_id}'.sub('{custom_destination_id}', CGI.escape(custom_destination_id.to_s).gsub('%2F', '/'))
|
|
119
|
+
|
|
120
|
+
# query parameters
|
|
121
|
+
query_params = opts[:query_params] || {}
|
|
122
|
+
|
|
123
|
+
# header parameters
|
|
124
|
+
header_params = opts[:header_params] || {}
|
|
125
|
+
# HTTP header 'Accept' (if needed)
|
|
126
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
127
|
+
|
|
128
|
+
# form parameters
|
|
129
|
+
form_params = opts[:form_params] || {}
|
|
130
|
+
|
|
131
|
+
# http body (model)
|
|
132
|
+
post_body = opts[:debug_body]
|
|
133
|
+
|
|
134
|
+
# return_type
|
|
135
|
+
return_type = opts[:debug_return_type]
|
|
136
|
+
|
|
137
|
+
# auth_names
|
|
138
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
139
|
+
|
|
140
|
+
new_options = opts.merge(
|
|
141
|
+
:operation => :delete_logs_custom_destination,
|
|
142
|
+
:header_params => header_params,
|
|
143
|
+
:query_params => query_params,
|
|
144
|
+
:form_params => form_params,
|
|
145
|
+
:body => post_body,
|
|
146
|
+
:auth_names => auth_names,
|
|
147
|
+
:return_type => return_type,
|
|
148
|
+
:api_version => "V2"
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug "API called: LogsCustomDestinationsAPI#delete_logs_custom_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
154
|
+
end
|
|
155
|
+
return data, status_code, headers
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Get a custom destination.
|
|
159
|
+
#
|
|
160
|
+
# @see #get_logs_custom_destination_with_http_info
|
|
161
|
+
def get_logs_custom_destination(custom_destination_id, opts = {})
|
|
162
|
+
data, _status_code, _headers = get_logs_custom_destination_with_http_info(custom_destination_id, opts)
|
|
163
|
+
data
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Get a custom destination.
|
|
167
|
+
#
|
|
168
|
+
# Get a specific custom destination in your organization.
|
|
169
|
+
#
|
|
170
|
+
# @param custom_destination_id [String] The ID of the custom destination.
|
|
171
|
+
# @param opts [Hash] the optional parameters
|
|
172
|
+
# @return [Array<(CustomDestinationResponse, Integer, Hash)>] CustomDestinationResponse data, response status code and response headers
|
|
173
|
+
def get_logs_custom_destination_with_http_info(custom_destination_id, opts = {})
|
|
174
|
+
|
|
175
|
+
if @api_client.config.debugging
|
|
176
|
+
@api_client.config.logger.debug 'Calling API: LogsCustomDestinationsAPI.get_logs_custom_destination ...'
|
|
177
|
+
end
|
|
178
|
+
# verify the required parameter 'custom_destination_id' is set
|
|
179
|
+
if @api_client.config.client_side_validation && custom_destination_id.nil?
|
|
180
|
+
fail ArgumentError, "Missing the required parameter 'custom_destination_id' when calling LogsCustomDestinationsAPI.get_logs_custom_destination"
|
|
181
|
+
end
|
|
182
|
+
# resource path
|
|
183
|
+
local_var_path = '/api/v2/logs/config/custom-destinations/{custom_destination_id}'.sub('{custom_destination_id}', CGI.escape(custom_destination_id.to_s).gsub('%2F', '/'))
|
|
184
|
+
|
|
185
|
+
# query parameters
|
|
186
|
+
query_params = opts[:query_params] || {}
|
|
187
|
+
|
|
188
|
+
# header parameters
|
|
189
|
+
header_params = opts[:header_params] || {}
|
|
190
|
+
# HTTP header 'Accept' (if needed)
|
|
191
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
192
|
+
|
|
193
|
+
# form parameters
|
|
194
|
+
form_params = opts[:form_params] || {}
|
|
195
|
+
|
|
196
|
+
# http body (model)
|
|
197
|
+
post_body = opts[:debug_body]
|
|
198
|
+
|
|
199
|
+
# return_type
|
|
200
|
+
return_type = opts[:debug_return_type] || 'CustomDestinationResponse'
|
|
201
|
+
|
|
202
|
+
# auth_names
|
|
203
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
204
|
+
|
|
205
|
+
new_options = opts.merge(
|
|
206
|
+
:operation => :get_logs_custom_destination,
|
|
207
|
+
:header_params => header_params,
|
|
208
|
+
:query_params => query_params,
|
|
209
|
+
:form_params => form_params,
|
|
210
|
+
:body => post_body,
|
|
211
|
+
:auth_names => auth_names,
|
|
212
|
+
:return_type => return_type,
|
|
213
|
+
:api_version => "V2"
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
217
|
+
if @api_client.config.debugging
|
|
218
|
+
@api_client.config.logger.debug "API called: LogsCustomDestinationsAPI#get_logs_custom_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
219
|
+
end
|
|
220
|
+
return data, status_code, headers
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Get all custom destinations.
|
|
224
|
+
#
|
|
225
|
+
# @see #list_logs_custom_destinations_with_http_info
|
|
226
|
+
def list_logs_custom_destinations(opts = {})
|
|
227
|
+
data, _status_code, _headers = list_logs_custom_destinations_with_http_info(opts)
|
|
228
|
+
data
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Get all custom destinations.
|
|
232
|
+
#
|
|
233
|
+
# Get the list of configured custom destinations in your organization with their definitions.
|
|
234
|
+
#
|
|
235
|
+
# @param opts [Hash] the optional parameters
|
|
236
|
+
# @return [Array<(CustomDestinationsResponse, Integer, Hash)>] CustomDestinationsResponse data, response status code and response headers
|
|
237
|
+
def list_logs_custom_destinations_with_http_info(opts = {})
|
|
238
|
+
|
|
239
|
+
if @api_client.config.debugging
|
|
240
|
+
@api_client.config.logger.debug 'Calling API: LogsCustomDestinationsAPI.list_logs_custom_destinations ...'
|
|
241
|
+
end
|
|
242
|
+
# resource path
|
|
243
|
+
local_var_path = '/api/v2/logs/config/custom-destinations'
|
|
244
|
+
|
|
245
|
+
# query parameters
|
|
246
|
+
query_params = opts[:query_params] || {}
|
|
247
|
+
|
|
248
|
+
# header parameters
|
|
249
|
+
header_params = opts[:header_params] || {}
|
|
250
|
+
# HTTP header 'Accept' (if needed)
|
|
251
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
252
|
+
|
|
253
|
+
# form parameters
|
|
254
|
+
form_params = opts[:form_params] || {}
|
|
255
|
+
|
|
256
|
+
# http body (model)
|
|
257
|
+
post_body = opts[:debug_body]
|
|
258
|
+
|
|
259
|
+
# return_type
|
|
260
|
+
return_type = opts[:debug_return_type] || 'CustomDestinationsResponse'
|
|
261
|
+
|
|
262
|
+
# auth_names
|
|
263
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
264
|
+
|
|
265
|
+
new_options = opts.merge(
|
|
266
|
+
:operation => :list_logs_custom_destinations,
|
|
267
|
+
:header_params => header_params,
|
|
268
|
+
:query_params => query_params,
|
|
269
|
+
:form_params => form_params,
|
|
270
|
+
:body => post_body,
|
|
271
|
+
:auth_names => auth_names,
|
|
272
|
+
:return_type => return_type,
|
|
273
|
+
:api_version => "V2"
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
277
|
+
if @api_client.config.debugging
|
|
278
|
+
@api_client.config.logger.debug "API called: LogsCustomDestinationsAPI#list_logs_custom_destinations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
279
|
+
end
|
|
280
|
+
return data, status_code, headers
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# Update a custom destination.
|
|
284
|
+
#
|
|
285
|
+
# @see #update_logs_custom_destination_with_http_info
|
|
286
|
+
def update_logs_custom_destination(custom_destination_id, body, opts = {})
|
|
287
|
+
data, _status_code, _headers = update_logs_custom_destination_with_http_info(custom_destination_id, body, opts)
|
|
288
|
+
data
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Update a custom destination.
|
|
292
|
+
#
|
|
293
|
+
# Update the given fields of a specific custom destination in your organization.
|
|
294
|
+
#
|
|
295
|
+
# @param custom_destination_id [String] The ID of the custom destination.
|
|
296
|
+
# @param body [CustomDestinationUpdateRequest] New definition of the custom destination's fields.
|
|
297
|
+
# @param opts [Hash] the optional parameters
|
|
298
|
+
# @return [Array<(CustomDestinationResponse, Integer, Hash)>] CustomDestinationResponse data, response status code and response headers
|
|
299
|
+
def update_logs_custom_destination_with_http_info(custom_destination_id, body, opts = {})
|
|
300
|
+
|
|
301
|
+
if @api_client.config.debugging
|
|
302
|
+
@api_client.config.logger.debug 'Calling API: LogsCustomDestinationsAPI.update_logs_custom_destination ...'
|
|
303
|
+
end
|
|
304
|
+
# verify the required parameter 'custom_destination_id' is set
|
|
305
|
+
if @api_client.config.client_side_validation && custom_destination_id.nil?
|
|
306
|
+
fail ArgumentError, "Missing the required parameter 'custom_destination_id' when calling LogsCustomDestinationsAPI.update_logs_custom_destination"
|
|
307
|
+
end
|
|
308
|
+
# verify the required parameter 'body' is set
|
|
309
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
310
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling LogsCustomDestinationsAPI.update_logs_custom_destination"
|
|
311
|
+
end
|
|
312
|
+
# resource path
|
|
313
|
+
local_var_path = '/api/v2/logs/config/custom-destinations/{custom_destination_id}'.sub('{custom_destination_id}', CGI.escape(custom_destination_id.to_s).gsub('%2F', '/'))
|
|
314
|
+
|
|
315
|
+
# query parameters
|
|
316
|
+
query_params = opts[:query_params] || {}
|
|
317
|
+
|
|
318
|
+
# header parameters
|
|
319
|
+
header_params = opts[:header_params] || {}
|
|
320
|
+
# HTTP header 'Accept' (if needed)
|
|
321
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
322
|
+
# HTTP header 'Content-Type'
|
|
323
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
324
|
+
|
|
325
|
+
# form parameters
|
|
326
|
+
form_params = opts[:form_params] || {}
|
|
327
|
+
|
|
328
|
+
# http body (model)
|
|
329
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
330
|
+
|
|
331
|
+
# return_type
|
|
332
|
+
return_type = opts[:debug_return_type] || 'CustomDestinationResponse'
|
|
333
|
+
|
|
334
|
+
# auth_names
|
|
335
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
336
|
+
|
|
337
|
+
new_options = opts.merge(
|
|
338
|
+
:operation => :update_logs_custom_destination,
|
|
339
|
+
:header_params => header_params,
|
|
340
|
+
:query_params => query_params,
|
|
341
|
+
:form_params => form_params,
|
|
342
|
+
:body => post_body,
|
|
343
|
+
:auth_names => auth_names,
|
|
344
|
+
:return_type => return_type,
|
|
345
|
+
:api_version => "V2"
|
|
346
|
+
)
|
|
347
|
+
|
|
348
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
|
349
|
+
if @api_client.config.debugging
|
|
350
|
+
@api_client.config.logger.debug "API called: LogsCustomDestinationsAPI#update_logs_custom_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
351
|
+
end
|
|
352
|
+
return data, status_code, headers
|
|
353
|
+
end
|
|
354
|
+
end
|
|
355
|
+
end
|
|
@@ -323,7 +323,7 @@ module DatadogAPIClient::V2
|
|
|
323
323
|
# @param metric_name [String] The name of the metric.
|
|
324
324
|
# @param opts [Hash] the optional parameters
|
|
325
325
|
# @option opts [String] :filter_groups Filtered tag keys that the metric is configured to query with.
|
|
326
|
-
# @option opts [Integer] :filter_hours_ago The number of hours of look back (from now) to estimate cardinality with.
|
|
326
|
+
# @option opts [Integer] :filter_hours_ago The number of hours of look back (from now) to estimate cardinality with. Estimates are based on historical data, and unspecified fields default to the minimum 49 hours.
|
|
327
327
|
# @option opts [Integer] :filter_num_aggregations The number of aggregations that a `count`, `rate`, or `gauge` metric is configured to use. Max number of aggregation combos is 9.
|
|
328
328
|
# @option opts [Boolean] :filter_pct A boolean, for distribution metrics only, to estimate cardinality if the metric includes additional percentile aggregators.
|
|
329
329
|
# @option opts [Integer] :filter_timespan_h A window, in hours, from the look back to estimate cardinality with.
|
|
@@ -340,6 +340,9 @@ module DatadogAPIClient::V2
|
|
|
340
340
|
if @api_client.config.client_side_validation && !opts[:'filter_hours_ago'].nil? && opts[:'filter_hours_ago'] > 2147483647
|
|
341
341
|
fail ArgumentError, 'invalid value for "opts[:"filter_hours_ago"]" when calling MetricsAPI.estimate_metrics_output_series, must be smaller than or equal to 2147483647.'
|
|
342
342
|
end
|
|
343
|
+
if @api_client.config.client_side_validation && !opts[:'filter_hours_ago'].nil? && opts[:'filter_hours_ago'] < 49
|
|
344
|
+
fail ArgumentError, 'invalid value for "opts[:"filter_hours_ago"]" when calling MetricsAPI.estimate_metrics_output_series, must be greater than or equal to 49.'
|
|
345
|
+
end
|
|
343
346
|
if @api_client.config.client_side_validation && !opts[:'filter_num_aggregations'].nil? && opts[:'filter_num_aggregations'] > 9
|
|
344
347
|
fail ArgumentError, 'invalid value for "opts[:"filter_num_aggregations"]" when calling MetricsAPI.estimate_metrics_output_series, must be smaller than or equal to 9.'
|
|
345
348
|
end
|
|
@@ -402,7 +405,7 @@ module DatadogAPIClient::V2
|
|
|
402
405
|
|
|
403
406
|
# List active tags and aggregations.
|
|
404
407
|
#
|
|
405
|
-
# List tags and aggregations that are actively queried on dashboards
|
|
408
|
+
# List tags and aggregations that are actively queried on dashboards, notebooks, monitors, and the Metrics Explorer for a given metric name.
|
|
406
409
|
#
|
|
407
410
|
# @param metric_name [String] The name of the metric.
|
|
408
411
|
# @param opts [Hash] the optional parameters
|
|
@@ -459,6 +462,71 @@ module DatadogAPIClient::V2
|
|
|
459
462
|
return data, status_code, headers
|
|
460
463
|
end
|
|
461
464
|
|
|
465
|
+
# Related Assets to a Metric.
|
|
466
|
+
#
|
|
467
|
+
# @see #list_metric_assets_with_http_info
|
|
468
|
+
def list_metric_assets(metric_name, opts = {})
|
|
469
|
+
data, _status_code, _headers = list_metric_assets_with_http_info(metric_name, opts)
|
|
470
|
+
data
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
# Related Assets to a Metric.
|
|
474
|
+
#
|
|
475
|
+
# Returns dashboards, monitors, notebooks, and SLOs that a metric is stored in, if any. Updated every 24 hours.
|
|
476
|
+
#
|
|
477
|
+
# @param metric_name [String] The name of the metric.
|
|
478
|
+
# @param opts [Hash] the optional parameters
|
|
479
|
+
# @return [Array<(MetricAssetsResponse, Integer, Hash)>] MetricAssetsResponse data, response status code and response headers
|
|
480
|
+
def list_metric_assets_with_http_info(metric_name, opts = {})
|
|
481
|
+
|
|
482
|
+
if @api_client.config.debugging
|
|
483
|
+
@api_client.config.logger.debug 'Calling API: MetricsAPI.list_metric_assets ...'
|
|
484
|
+
end
|
|
485
|
+
# verify the required parameter 'metric_name' is set
|
|
486
|
+
if @api_client.config.client_side_validation && metric_name.nil?
|
|
487
|
+
fail ArgumentError, "Missing the required parameter 'metric_name' when calling MetricsAPI.list_metric_assets"
|
|
488
|
+
end
|
|
489
|
+
# resource path
|
|
490
|
+
local_var_path = '/api/v2/metrics/{metric_name}/assets'.sub('{metric_name}', CGI.escape(metric_name.to_s).gsub('%2F', '/'))
|
|
491
|
+
|
|
492
|
+
# query parameters
|
|
493
|
+
query_params = opts[:query_params] || {}
|
|
494
|
+
|
|
495
|
+
# header parameters
|
|
496
|
+
header_params = opts[:header_params] || {}
|
|
497
|
+
# HTTP header 'Accept' (if needed)
|
|
498
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
499
|
+
|
|
500
|
+
# form parameters
|
|
501
|
+
form_params = opts[:form_params] || {}
|
|
502
|
+
|
|
503
|
+
# http body (model)
|
|
504
|
+
post_body = opts[:debug_body]
|
|
505
|
+
|
|
506
|
+
# return_type
|
|
507
|
+
return_type = opts[:debug_return_type] || 'MetricAssetsResponse'
|
|
508
|
+
|
|
509
|
+
# auth_names
|
|
510
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
511
|
+
|
|
512
|
+
new_options = opts.merge(
|
|
513
|
+
:operation => :list_metric_assets,
|
|
514
|
+
:header_params => header_params,
|
|
515
|
+
:query_params => query_params,
|
|
516
|
+
:form_params => form_params,
|
|
517
|
+
:body => post_body,
|
|
518
|
+
:auth_names => auth_names,
|
|
519
|
+
:return_type => return_type,
|
|
520
|
+
:api_version => "V2"
|
|
521
|
+
)
|
|
522
|
+
|
|
523
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
524
|
+
if @api_client.config.debugging
|
|
525
|
+
@api_client.config.logger.debug "API called: MetricsAPI#list_metric_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
526
|
+
end
|
|
527
|
+
return data, status_code, headers
|
|
528
|
+
end
|
|
529
|
+
|
|
462
530
|
# List tag configuration by name.
|
|
463
531
|
#
|
|
464
532
|
# @see #list_tag_configuration_by_name_with_http_info
|
|
@@ -1798,5 +1798,72 @@ module DatadogAPIClient::V2
|
|
|
1798
1798
|
end
|
|
1799
1799
|
return data, status_code, headers
|
|
1800
1800
|
end
|
|
1801
|
+
|
|
1802
|
+
# Validate a detection rule.
|
|
1803
|
+
#
|
|
1804
|
+
# @see #validate_security_monitoring_rule_with_http_info
|
|
1805
|
+
def validate_security_monitoring_rule(body, opts = {})
|
|
1806
|
+
validate_security_monitoring_rule_with_http_info(body, opts)
|
|
1807
|
+
nil
|
|
1808
|
+
end
|
|
1809
|
+
|
|
1810
|
+
# Validate a detection rule.
|
|
1811
|
+
#
|
|
1812
|
+
# Validate a detection rule.
|
|
1813
|
+
#
|
|
1814
|
+
# @param body [SecurityMonitoringRuleCreatePayload]
|
|
1815
|
+
# @param opts [Hash] the optional parameters
|
|
1816
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1817
|
+
def validate_security_monitoring_rule_with_http_info(body, opts = {})
|
|
1818
|
+
|
|
1819
|
+
if @api_client.config.debugging
|
|
1820
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.validate_security_monitoring_rule ...'
|
|
1821
|
+
end
|
|
1822
|
+
# verify the required parameter 'body' is set
|
|
1823
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
1824
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.validate_security_monitoring_rule"
|
|
1825
|
+
end
|
|
1826
|
+
# resource path
|
|
1827
|
+
local_var_path = '/api/v2/security_monitoring/rules/validation'
|
|
1828
|
+
|
|
1829
|
+
# query parameters
|
|
1830
|
+
query_params = opts[:query_params] || {}
|
|
1831
|
+
|
|
1832
|
+
# header parameters
|
|
1833
|
+
header_params = opts[:header_params] || {}
|
|
1834
|
+
# HTTP header 'Accept' (if needed)
|
|
1835
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
1836
|
+
# HTTP header 'Content-Type'
|
|
1837
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1838
|
+
|
|
1839
|
+
# form parameters
|
|
1840
|
+
form_params = opts[:form_params] || {}
|
|
1841
|
+
|
|
1842
|
+
# http body (model)
|
|
1843
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
1844
|
+
|
|
1845
|
+
# return_type
|
|
1846
|
+
return_type = opts[:debug_return_type]
|
|
1847
|
+
|
|
1848
|
+
# auth_names
|
|
1849
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
1850
|
+
|
|
1851
|
+
new_options = opts.merge(
|
|
1852
|
+
:operation => :validate_security_monitoring_rule,
|
|
1853
|
+
:header_params => header_params,
|
|
1854
|
+
:query_params => query_params,
|
|
1855
|
+
:form_params => form_params,
|
|
1856
|
+
:body => post_body,
|
|
1857
|
+
:auth_names => auth_names,
|
|
1858
|
+
:return_type => return_type,
|
|
1859
|
+
:api_version => "V2"
|
|
1860
|
+
)
|
|
1861
|
+
|
|
1862
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
1863
|
+
if @api_client.config.debugging
|
|
1864
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#validate_security_monitoring_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1865
|
+
end
|
|
1866
|
+
return data, status_code, headers
|
|
1867
|
+
end
|
|
1801
1868
|
end
|
|
1802
1869
|
end
|
|
@@ -307,13 +307,14 @@ module DatadogAPIClient::V2
|
|
|
307
307
|
api_version = "V2"
|
|
308
308
|
page_size = @api_client.get_attribute_from_path(opts, "page_size", 10)
|
|
309
309
|
@api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size)
|
|
310
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0)
|
|
310
311
|
while true do
|
|
311
312
|
response = list_service_definitions(opts)
|
|
312
313
|
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
|
313
314
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
314
315
|
break
|
|
315
316
|
end
|
|
316
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) +
|
|
317
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1)
|
|
317
318
|
end
|
|
318
319
|
end
|
|
319
320
|
end
|