datadog_api_client 1.10.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +715 -44
  4. data/.generator/schemas/v2/openapi.yaml +458 -44
  5. data/.generator/src/generator/formatter.py +14 -0
  6. data/.github/workflows/test_integration.yml +0 -7
  7. data/CHANGELOG.md +34 -0
  8. data/examples/v1/dashboards/CreateDashboard_1442588603.rb +61 -0
  9. data/examples/v1/dashboards/CreateDashboard_252716965.rb +52 -0
  10. data/examples/v1/dashboards/CreateDashboard_3882428227.rb +60 -0
  11. data/examples/v1/metrics/SubmitDistributionPoints.rb +22 -0
  12. data/examples/v1/metrics/SubmitDistributionPoints_3109558960.rb +25 -0
  13. data/examples/v1/organizations/DowngradeOrg.rb +5 -0
  14. data/examples/v1/organizations/UpdateOrg.rb +1 -0
  15. data/examples/v1/service-level-objectives/SearchSLO.rb +16 -0
  16. data/examples/v1/snapshots/GetGraphSnapshot.rb +2 -0
  17. data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +3 -0
  18. data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +3 -0
  19. data/examples/v1/synthetics/UpdateBrowserTest.rb +3 -0
  20. data/examples/v2/metrics/CreateTagConfiguration.rb +0 -3
  21. data/examples/v2/metrics/DeleteTagConfiguration.rb +0 -3
  22. data/examples/v2/metrics/ListTagConfigurationByName.rb +0 -3
  23. data/examples/v2/metrics/ListTagConfigurations.rb +0 -3
  24. data/examples/v2/metrics/ListTagConfigurations_103226315.rb +0 -3
  25. data/examples/v2/metrics/ListTagConfigurations_1799362914.rb +0 -3
  26. data/examples/v2/metrics/UpdateTagConfiguration.rb +0 -3
  27. data/examples/v2/opsgenie-integration/CreateOpsgenieService.rb +16 -0
  28. data/examples/v2/opsgenie-integration/DeleteOpsgenieService.rb +8 -0
  29. data/examples/v2/opsgenie-integration/GetOpsgenieService.rb +8 -0
  30. data/examples/v2/opsgenie-integration/ListOpsgenieServices.rb +5 -0
  31. data/examples/v2/opsgenie-integration/UpdateOpsgenieService.rb +21 -0
  32. data/examples/v2/security-monitoring/ListSecurityMonitoringSignals.rb +0 -3
  33. data/examples/v2/security-monitoring/SearchSecurityMonitoringSignals.rb +0 -3
  34. data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +3 -0
  35. data/examples/v2/usage-metering/GetEstimatedCostByOrg.rb +5 -0
  36. data/examples/v2/usage-metering/GetEstimatedCostByOrg_1171921972.rb +9 -0
  37. data/examples/v2/usage-metering/GetEstimatedCostByOrg_627383212.rb +9 -0
  38. data/lib/datadog_api_client/v1/api/metrics_api.rb +81 -0
  39. data/lib/datadog_api_client/v1/api/organizations_api.rb +74 -1
  40. data/lib/datadog_api_client/v1/api/security_monitoring_api.rb +2 -2
  41. data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +78 -4
  42. data/lib/datadog_api_client/v1/api/snapshots_api.rb +4 -0
  43. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +9 -5
  44. data/lib/datadog_api_client/v1/configuration.rb +51 -0
  45. data/lib/datadog_api_client/v1/models/distribution_point_item.rb +63 -0
  46. data/lib/datadog_api_client/v1/models/distribution_points_content_encoding.rb +26 -0
  47. data/lib/datadog_api_client/v1/models/distribution_points_payload.rb +124 -0
  48. data/lib/datadog_api_client/v1/models/distribution_points_series.rb +179 -0
  49. data/lib/datadog_api_client/v1/models/distribution_points_type.rb +26 -0
  50. data/lib/datadog_api_client/v1/models/distribution_widget_histogram_request_query.rb +64 -0
  51. data/lib/datadog_api_client/v1/models/distribution_widget_histogram_request_type.rb +26 -0
  52. data/lib/datadog_api_client/v1/models/distribution_widget_request.rb +21 -1
  53. data/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stat_name.rb +1 -0
  54. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +2 -0
  55. data/lib/datadog_api_client/v1/models/ip_prefixes_synthetics_private_locations.rb +125 -0
  56. data/lib/datadog_api_client/v1/models/ip_ranges.rb +11 -1
  57. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -0
  58. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +41 -1
  59. data/lib/datadog_api_client/v1/models/org_downgraded_response.rb +111 -0
  60. data/lib/datadog_api_client/v1/models/organization.rb +14 -4
  61. data/lib/datadog_api_client/v1/models/search_slo_response.rb +131 -0
  62. data/lib/datadog_api_client/v1/models/search_slo_response_data.rb +121 -0
  63. data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes.rb +123 -0
  64. data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets.rb +197 -0
  65. data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_int.rb +121 -0
  66. data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_string.rb +121 -0
  67. data/lib/datadog_api_client/v1/models/search_slo_response_links.rb +151 -0
  68. data/lib/datadog_api_client/v1/models/search_slo_response_meta.rb +111 -0
  69. data/lib/datadog_api_client/v1/models/search_slo_response_meta_page.rb +181 -0
  70. data/lib/datadog_api_client/v1/models/service_level_objective.rb +3 -3
  71. data/lib/datadog_api_client/v1/models/service_level_objective_query.rb +1 -1
  72. data/lib/datadog_api_client/v1/models/service_level_objective_request.rb +3 -3
  73. data/lib/datadog_api_client/v1/models/slo_history_metrics.rb +1 -1
  74. data/lib/datadog_api_client/v1/models/slo_response_data.rb +1 -1
  75. data/lib/datadog_api_client/v1/models/synthetics_api_test.rb +11 -0
  76. data/lib/datadog_api_client/v1/models/synthetics_browser_test.rb +11 -0
  77. data/lib/datadog_api_client/v1/models/synthetics_core_web_vitals.rb +2 -2
  78. data/lib/datadog_api_client/v1/models/synthetics_test_ci_options.rb +111 -0
  79. data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +11 -1
  80. data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +4 -0
  81. data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +4 -0
  82. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +41 -1
  83. data/lib/datadog_api_client/v1/models/usage_billable_summary_keys.rb +474 -4
  84. data/lib/datadog_api_client/v1.rb +19 -0
  85. data/lib/datadog_api_client/v2/api/cloud_workload_security_api.rb +1 -1
  86. data/lib/datadog_api_client/v2/api/metrics_api.rb +0 -2
  87. data/lib/datadog_api_client/v2/api/opsgenie_integration_api.rb +395 -0
  88. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +76 -0
  89. data/lib/datadog_api_client/v2/configuration.rb +0 -7
  90. data/lib/datadog_api_client/v2/models/intake_payload_accepted.rb +10 -8
  91. data/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +0 -2
  92. data/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +0 -2
  93. data/lib/datadog_api_client/v2/models/opsgenie_service_create_attributes.rb +174 -0
  94. data/lib/datadog_api_client/v2/models/opsgenie_service_create_data.rb +145 -0
  95. data/lib/datadog_api_client/v2/models/opsgenie_service_create_request.rb +122 -0
  96. data/lib/datadog_api_client/v2/models/opsgenie_service_region_type.rb +28 -0
  97. data/lib/datadog_api_client/v2/models/opsgenie_service_response.rb +122 -0
  98. data/lib/datadog_api_client/v2/models/opsgenie_service_response_attributes.rb +132 -0
  99. data/lib/datadog_api_client/v2/models/opsgenie_service_response_data.rb +166 -0
  100. data/lib/datadog_api_client/v2/models/opsgenie_service_type.rb +26 -0
  101. data/lib/datadog_api_client/v2/models/opsgenie_service_update_attributes.rb +142 -0
  102. data/lib/datadog_api_client/v2/models/opsgenie_service_update_data.rb +166 -0
  103. data/lib/datadog_api_client/v2/models/opsgenie_service_update_request.rb +122 -0
  104. data/lib/datadog_api_client/v2/models/opsgenie_services_response.rb +124 -0
  105. data/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb +30 -4
  106. data/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_learning_method.rb +27 -0
  107. data/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_learning_threshold.rb +27 -0
  108. data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +13 -1
  109. data/lib/datadog_api_client/v2.rb +15 -0
  110. data/lib/datadog_api_client/version.rb +1 -1
  111. metadata +51 -2
@@ -107,6 +107,79 @@ module DatadogAPIClient::V1
107
107
  return data, status_code, headers
108
108
  end
109
109
 
110
+ # Spin-off Child Organization.
111
+ #
112
+ # @see #downgrade_org_with_http_info
113
+ def downgrade_org(public_id, opts = {})
114
+ data, _status_code, _headers = downgrade_org_with_http_info(public_id, opts)
115
+ data
116
+ end
117
+
118
+ # Spin-off Child Organization.
119
+ #
120
+ # Only available for MSP customers. Removes a child organization from the hierarchy of the master organization and places the child organization on a 30-day trial.
121
+ #
122
+ # @param public_id [String] The `public_id` of the organization you are operating within.
123
+ # @param opts [Hash] the optional parameters
124
+ # @return [Array<(OrgDowngradedResponse, Integer, Hash)>] OrgDowngradedResponse data, response status code and response headers
125
+ def downgrade_org_with_http_info(public_id, opts = {})
126
+
127
+ if @api_client.config.unstable_operations.has_key?(:downgrade_org)
128
+ unstable_enabled = @api_client.config.unstable_operations[:downgrade_org]
129
+ if unstable_enabled
130
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "downgrade_org")
131
+ else
132
+ raise APIError.new(message: format("Unstable operation '%s' is disabled", "downgrade_org"))
133
+ end
134
+ end
135
+
136
+ if @api_client.config.debugging
137
+ @api_client.config.logger.debug 'Calling API: OrganizationsAPI.downgrade_org ...'
138
+ end
139
+ # verify the required parameter 'public_id' is set
140
+ if @api_client.config.client_side_validation && public_id.nil?
141
+ fail ArgumentError, "Missing the required parameter 'public_id' when calling OrganizationsAPI.downgrade_org"
142
+ end
143
+ # resource path
144
+ local_var_path = '/api/v1/org/{public_id}/downgrade'.sub('{public_id}', CGI.escape(public_id.to_s).gsub('%2F', '/'))
145
+
146
+ # query parameters
147
+ query_params = opts[:query_params] || {}
148
+
149
+ # header parameters
150
+ header_params = opts[:header_params] || {}
151
+ # HTTP header 'Accept' (if needed)
152
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
153
+
154
+ # form parameters
155
+ form_params = opts[:form_params] || {}
156
+
157
+ # http body (model)
158
+ post_body = opts[:debug_body]
159
+
160
+ # return_type
161
+ return_type = opts[:debug_return_type] || 'OrgDowngradedResponse'
162
+
163
+ # auth_names
164
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
165
+
166
+ new_options = opts.merge(
167
+ :operation => :downgrade_org,
168
+ :header_params => header_params,
169
+ :query_params => query_params,
170
+ :form_params => form_params,
171
+ :body => post_body,
172
+ :auth_names => auth_names,
173
+ :return_type => return_type
174
+ )
175
+
176
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
177
+ if @api_client.config.debugging
178
+ @api_client.config.logger.debug "API called: OrganizationsAPI#downgrade_org\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
179
+ end
180
+ return data, status_code, headers
181
+ end
182
+
110
183
  # Get organization information.
111
184
  #
112
185
  # @see #get_org_with_http_info
@@ -190,7 +263,7 @@ module DatadogAPIClient::V1
190
263
 
191
264
  # List your managed organizations.
192
265
  #
193
- # List your managed organizations.
266
+ # This endpoint returns data on your top-level organization.
194
267
  #
195
268
  # @param opts [Hash] the optional parameters
196
269
  # @return [Array<(OrganizationListResponse, Integer, Hash)>] OrganizationListResponse data, response status code and response headers
@@ -164,7 +164,7 @@ module DatadogAPIClient::V1
164
164
  return_type = opts[:debug_return_type] || 'SuccessfulSignalUpdateResponse'
165
165
 
166
166
  # auth_names
167
- auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth]
167
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
168
168
 
169
169
  new_options = opts.merge(
170
170
  :operation => :edit_security_monitoring_signal_assignee,
@@ -244,7 +244,7 @@ module DatadogAPIClient::V1
244
244
  return_type = opts[:debug_return_type] || 'SuccessfulSignalUpdateResponse'
245
245
 
246
246
  # auth_names
247
- auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth]
247
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
248
248
 
249
249
  new_options = opts.merge(
250
250
  :operation => :edit_security_monitoring_signal_state,
@@ -386,7 +386,7 @@ module DatadogAPIClient::V1
386
386
  return_type = opts[:debug_return_type] || 'SLOResponse'
387
387
 
388
388
  # auth_names
389
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
389
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
390
390
 
391
391
  new_options = opts.merge(
392
392
  :operation => :get_slo,
@@ -459,7 +459,7 @@ module DatadogAPIClient::V1
459
459
  return_type = opts[:debug_return_type] || 'SLOCorrectionListResponse'
460
460
 
461
461
  # auth_names
462
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
462
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
463
463
 
464
464
  new_options = opts.merge(
465
465
  :operation => :get_slo_corrections,
@@ -561,7 +561,7 @@ module DatadogAPIClient::V1
561
561
  return_type = opts[:debug_return_type] || 'SLOHistoryResponse'
562
562
 
563
563
  # auth_names
564
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
564
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
565
565
 
566
566
  new_options = opts.merge(
567
567
  :operation => :get_slo_history,
@@ -641,7 +641,7 @@ module DatadogAPIClient::V1
641
641
  return_type = opts[:debug_return_type] || 'SLOListResponse'
642
642
 
643
643
  # auth_names
644
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
644
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
645
645
 
646
646
  new_options = opts.merge(
647
647
  :operation => :list_slos,
@@ -660,6 +660,80 @@ module DatadogAPIClient::V1
660
660
  return data, status_code, headers
661
661
  end
662
662
 
663
+ # Search for SLOs.
664
+ #
665
+ # @see #search_slo_with_http_info
666
+ def search_slo(opts = {})
667
+ data, _status_code, _headers = search_slo_with_http_info(opts)
668
+ data
669
+ end
670
+
671
+ # Search for SLOs.
672
+ #
673
+ # Get a list of service level objective objects for your organization.
674
+ #
675
+ # @param opts [Hash] the optional parameters
676
+ # @option opts [String] :query The query string to filter results based on SLO names.
677
+ # @option opts [Integer] :page_size The number of files to return in the response `[default=10]`.
678
+ # @option opts [Integer] :page_number The identifier of the first page to return. This parameter is used for the pagination feature `[default=0]`.
679
+ # @return [Array<(SearchSLOResponse, Integer, Hash)>] SearchSLOResponse data, response status code and response headers
680
+ def search_slo_with_http_info(opts = {})
681
+
682
+ if @api_client.config.unstable_operations.has_key?(:search_slo)
683
+ unstable_enabled = @api_client.config.unstable_operations[:search_slo]
684
+ if unstable_enabled
685
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "search_slo")
686
+ else
687
+ raise APIError.new(message: format("Unstable operation '%s' is disabled", "search_slo"))
688
+ end
689
+ end
690
+
691
+ if @api_client.config.debugging
692
+ @api_client.config.logger.debug 'Calling API: ServiceLevelObjectivesAPI.search_slo ...'
693
+ end
694
+ # resource path
695
+ local_var_path = '/api/v1/slo/search'
696
+
697
+ # query parameters
698
+ query_params = opts[:query_params] || {}
699
+ query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
700
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
701
+ query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
702
+
703
+ # header parameters
704
+ header_params = opts[:header_params] || {}
705
+ # HTTP header 'Accept' (if needed)
706
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
707
+
708
+ # form parameters
709
+ form_params = opts[:form_params] || {}
710
+
711
+ # http body (model)
712
+ post_body = opts[:debug_body]
713
+
714
+ # return_type
715
+ return_type = opts[:debug_return_type] || 'SearchSLOResponse'
716
+
717
+ # auth_names
718
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
719
+
720
+ new_options = opts.merge(
721
+ :operation => :search_slo,
722
+ :header_params => header_params,
723
+ :query_params => query_params,
724
+ :form_params => form_params,
725
+ :body => post_body,
726
+ :auth_names => auth_names,
727
+ :return_type => return_type
728
+ )
729
+
730
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
731
+ if @api_client.config.debugging
732
+ @api_client.config.logger.debug "API called: ServiceLevelObjectivesAPI#search_slo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
733
+ end
734
+ return data, status_code, headers
735
+ end
736
+
663
737
  # Update an SLO.
664
738
  #
665
739
  # @see #update_slo_with_http_info
@@ -43,6 +43,8 @@ module DatadogAPIClient::V1
43
43
  # @option opts [String] :event_query A query that adds event bands to the graph.
44
44
  # @option opts [String] :graph_def A JSON document defining the graph. `graph_def` can be used instead of `metric_query`. The JSON document uses the [grammar defined here](https://docs.datadoghq.com/graphing/graphing_json/#grammar) and should be formatted to a single line then URL encoded.
45
45
  # @option opts [String] :title A title for the graph. If no title is specified, the graph does not have a title.
46
+ # @option opts [Integer] :height The height of the graph. If no height is specified, the graph's original height is used.
47
+ # @option opts [Integer] :width The width of the graph. If no width is specified, the graph's original width is used.
46
48
  # @return [Array<(GraphSnapshot, Integer, Hash)>] GraphSnapshot data, response status code and response headers
47
49
  def get_graph_snapshot_with_http_info(start, _end, opts = {})
48
50
 
@@ -77,6 +79,8 @@ module DatadogAPIClient::V1
77
79
  query_params[:'event_query'] = opts[:'event_query'] if !opts[:'event_query'].nil?
78
80
  query_params[:'graph_def'] = opts[:'graph_def'] if !opts[:'graph_def'].nil?
79
81
  query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
82
+ query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
83
+ query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
80
84
 
81
85
  # header parameters
82
86
  header_params = opts[:header_params] || {}
@@ -139,6 +139,7 @@ module DatadogAPIClient::V1
139
139
  # @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.
140
140
  # @option opts [String] :next_record_id List following results with a next_record_id provided in the previous query.
141
141
  # @option opts [String] :tag_breakdown_keys Comma separated list of tags used to group usage. If no value is provided the usage will not be broken down by tags. To see which tags are available, look for the value of `tag_config_source` in the API response.
142
+ # @option opts [Boolean] :include_descendants Include child org usage in the response. Defaults to `true`.
142
143
  # @return [Array<(HourlyUsageAttributionResponse, Integer, Hash)>] HourlyUsageAttributionResponse data, response status code and response headers
143
144
  def get_hourly_usage_attribution_with_http_info(start_hr, usage_type, opts = {})
144
145
 
@@ -163,7 +164,7 @@ module DatadogAPIClient::V1
163
164
  fail ArgumentError, "Missing the required parameter 'usage_type' when calling UsageMeteringAPI.get_hourly_usage_attribution"
164
165
  end
165
166
  # verify enum value
166
- allowable_values = ['api_usage', 'apm_host_usage', 'browser_usage', 'container_usage', 'custom_timeseries_usage', 'estimated_indexed_logs_usage', 'fargate_usage', 'functions_usage', 'indexed_logs_usage', 'infra_host_usage', 'invocations_usage', 'npm_host_usage', 'profiled_container_usage', 'profiled_host_usage', 'snmp_usage']
167
+ allowable_values = ['api_usage', 'apm_host_usage', 'appsec_usage', 'browser_usage', 'container_usage', 'custom_timeseries_usage', 'estimated_indexed_logs_usage', 'estimated_indexed_spans_usage', 'fargate_usage', 'functions_usage', 'indexed_logs_usage', 'infra_host_usage', 'invocations_usage', 'npm_host_usage', 'profiled_container_usage', 'profiled_host_usage', 'snmp_usage']
167
168
  if @api_client.config.client_side_validation && !allowable_values.include?(usage_type)
168
169
  fail ArgumentError, "invalid value for \"usage_type\", must be one of #{allowable_values}"
169
170
  end
@@ -177,6 +178,7 @@ module DatadogAPIClient::V1
177
178
  query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil?
178
179
  query_params[:'next_record_id'] = opts[:'next_record_id'] if !opts[:'next_record_id'].nil?
179
180
  query_params[:'tag_breakdown_keys'] = opts[:'tag_breakdown_keys'] if !opts[:'tag_breakdown_keys'].nil?
181
+ query_params[:'include_descendants'] = opts[:'include_descendants'] if !opts[:'include_descendants'].nil?
180
182
 
181
183
  # header parameters
182
184
  header_params = opts[:header_params] || {}
@@ -482,6 +484,7 @@ module DatadogAPIClient::V1
482
484
  # @option opts [MonthlyUsageAttributionSupportedMetrics] :sort_name The field to sort by.
483
485
  # @option opts [String] :tag_breakdown_keys Comma separated list of tag keys used to group usage. If no value is provided the usage will not be broken down by tags. To see which tags are available, look for the value of `tag_config_source` in the API response.
484
486
  # @option opts [String] :next_record_id List following results with a next_record_id provided in the previous query.
487
+ # @option opts [Boolean] :include_descendants Include child org usage in the response. Defaults to `true`.
485
488
  # @return [Array<(MonthlyUsageAttributionResponse, Integer, Hash)>] MonthlyUsageAttributionResponse data, response status code and response headers
486
489
  def get_monthly_usage_attribution_with_http_info(start_month, fields, opts = {})
487
490
 
@@ -506,7 +509,7 @@ module DatadogAPIClient::V1
506
509
  fail ArgumentError, "Missing the required parameter 'fields' when calling UsageMeteringAPI.get_monthly_usage_attribution"
507
510
  end
508
511
  # verify enum value
509
- allowable_values = ['api_usage', 'api_percentage', 'apm_host_usage', 'apm_host_percentage', 'browser_usage', 'browser_percentage', 'container_usage', 'container_percentage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'fargate_usage', 'fargate_percentage', 'functions_usage', 'functions_percentage', 'indexed_logs_usage', 'indexed_logs_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'npm_host_usage', 'npm_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'snmp_usage', 'snmp_percentage', '*']
512
+ allowable_values = ['api_usage', 'api_percentage', 'apm_host_usage', 'apm_host_percentage', 'appsec_usage', 'appsec_percentage', 'browser_usage', 'browser_percentage', 'container_usage', 'container_percentage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'fargate_usage', 'fargate_percentage', 'functions_usage', 'functions_percentage', 'indexed_logs_usage', 'indexed_logs_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'npm_host_usage', 'npm_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'snmp_usage', 'snmp_percentage', '*']
510
513
  if @api_client.config.client_side_validation && !allowable_values.include?(fields)
511
514
  fail ArgumentError, "invalid value for \"fields\", must be one of #{allowable_values}"
512
515
  end
@@ -514,7 +517,7 @@ module DatadogAPIClient::V1
514
517
  if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction'])
515
518
  fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}"
516
519
  end
517
- allowable_values = ['api_usage', 'api_percentage', 'apm_host_usage', 'apm_host_percentage', 'browser_usage', 'browser_percentage', 'container_usage', 'container_percentage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'fargate_usage', 'fargate_percentage', 'functions_usage', 'functions_percentage', 'indexed_logs_usage', 'indexed_logs_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'npm_host_usage', 'npm_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'snmp_usage', 'snmp_percentage', '*']
520
+ allowable_values = ['api_usage', 'api_percentage', 'apm_host_usage', 'apm_host_percentage', 'appsec_usage', 'appsec_percentage', 'browser_usage', 'browser_percentage', 'container_usage', 'container_percentage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'fargate_usage', 'fargate_percentage', 'functions_usage', 'functions_percentage', 'indexed_logs_usage', 'indexed_logs_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'npm_host_usage', 'npm_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'snmp_usage', 'snmp_percentage', '*']
518
521
  if @api_client.config.client_side_validation && opts[:'sort_name'] && !allowable_values.include?(opts[:'sort_name'])
519
522
  fail ArgumentError, "invalid value for \"sort_name\", must be one of #{allowable_values}"
520
523
  end
@@ -530,6 +533,7 @@ module DatadogAPIClient::V1
530
533
  query_params[:'sort_name'] = opts[:'sort_name'] if !opts[:'sort_name'].nil?
531
534
  query_params[:'tag_breakdown_keys'] = opts[:'tag_breakdown_keys'] if !opts[:'tag_breakdown_keys'].nil?
532
535
  query_params[:'next_record_id'] = opts[:'next_record_id'] if !opts[:'next_record_id'].nil?
536
+ query_params[:'include_descendants'] = opts[:'include_descendants'] if !opts[:'include_descendants'].nil?
533
537
 
534
538
  # header parameters
535
539
  header_params = opts[:header_params] || {}
@@ -832,7 +836,7 @@ module DatadogAPIClient::V1
832
836
  fail ArgumentError, "Missing the required parameter 'fields' when calling UsageMeteringAPI.get_usage_attribution"
833
837
  end
834
838
  # verify enum value
835
- allowable_values = ['custom_timeseries_usage', 'container_usage', 'snmp_percentage', 'apm_host_usage', 'browser_usage', 'npm_host_percentage', 'infra_host_usage', 'custom_timeseries_percentage', 'container_percentage', 'api_usage', 'apm_host_percentage', 'infra_host_percentage', 'snmp_usage', 'browser_percentage', 'api_percentage', 'npm_host_usage', 'lambda_functions_usage', 'lambda_functions_percentage', 'lambda_invocations_usage', 'lambda_invocations_percentage', 'fargate_usage', 'fargate_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'dbm_hosts_usage', 'dbm_hosts_percentage', 'dbm_queries_usage', 'dbm_queries_percentage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', '*']
839
+ allowable_values = ['custom_timeseries_usage', 'container_usage', 'snmp_percentage', 'apm_host_usage', 'browser_usage', 'npm_host_percentage', 'infra_host_usage', 'custom_timeseries_percentage', 'container_percentage', 'api_usage', 'apm_host_percentage', 'infra_host_percentage', 'snmp_usage', 'browser_percentage', 'api_percentage', 'npm_host_usage', 'lambda_functions_usage', 'lambda_functions_percentage', 'lambda_invocations_usage', 'lambda_invocations_percentage', 'fargate_usage', 'fargate_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'dbm_hosts_usage', 'dbm_hosts_percentage', 'dbm_queries_usage', 'dbm_queries_percentage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'appsec_usage', 'appsec_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', '*']
836
840
  if @api_client.config.client_side_validation && !allowable_values.include?(fields)
837
841
  fail ArgumentError, "invalid value for \"fields\", must be one of #{allowable_values}"
838
842
  end
@@ -840,7 +844,7 @@ module DatadogAPIClient::V1
840
844
  if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction'])
841
845
  fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}"
842
846
  end
843
- allowable_values = ['api_percentage', 'snmp_usage', 'apm_host_usage', 'api_usage', 'container_usage', 'custom_timeseries_percentage', 'container_percentage', 'apm_host_percentage', 'npm_host_percentage', 'browser_percentage', 'browser_usage', 'infra_host_percentage', 'snmp_percentage', 'npm_host_usage', 'infra_host_usage', 'custom_timeseries_usage', 'lambda_functions_usage', 'lambda_functions_percentage', 'lambda_invocations_usage', 'lambda_invocations_percentage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage']
847
+ allowable_values = ['api_percentage', 'snmp_usage', 'apm_host_usage', 'api_usage', 'appsec_usage', 'appsec_percentage', 'container_usage', 'custom_timeseries_percentage', 'container_percentage', 'apm_host_percentage', 'npm_host_percentage', 'browser_percentage', 'browser_usage', 'infra_host_percentage', 'snmp_percentage', 'npm_host_usage', 'infra_host_usage', 'custom_timeseries_usage', 'lambda_functions_usage', 'lambda_functions_percentage', 'lambda_invocations_usage', 'lambda_invocations_percentage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage']
844
848
  if @api_client.config.client_side_validation && opts[:'sort_name'] && !allowable_values.include?(opts[:'sort_name'])
845
849
  fail ArgumentError, "invalid value for \"sort_name\", must be one of #{allowable_values}"
846
850
  end
@@ -162,6 +162,7 @@ module DatadogAPIClient::V1
162
162
  get_specified_daily_custom_reports: false,
163
163
  get_monthly_custom_reports: false,
164
164
  get_specified_monthly_custom_reports: false,
165
+ search_slo: false,
165
166
  get_slo_history: false,
166
167
  get_usage_attribution: false,
167
168
  get_hourly_usage_attribution: false,
@@ -369,6 +370,56 @@ module DatadogAPIClient::V1
369
370
  }
370
371
  }
371
372
  ],
373
+ search_slo: [
374
+ {
375
+ url: "https://{subdomain}.{site}",
376
+ description: "No description provided",
377
+ variables: {
378
+ site: {
379
+ description: "The regional site for Datadog customers.",
380
+ default_value: "datadoghq.com",
381
+ enum_values: [
382
+ "datadoghq.com",
383
+ "us3.datadoghq.com",
384
+ "us5.datadoghq.com",
385
+ "ddog-gov.com"
386
+ ]
387
+ },
388
+ subdomain: {
389
+ description: "The subdomain where the API is deployed.",
390
+ default_value: "api",
391
+ }
392
+ }
393
+ },
394
+ {
395
+ url: "{protocol}://{name}",
396
+ description: "No description provided",
397
+ variables: {
398
+ name: {
399
+ description: "Full site DNS name.",
400
+ default_value: "api.datadoghq.com",
401
+ },
402
+ protocol: {
403
+ description: "The protocol for accessing the API.",
404
+ default_value: "https",
405
+ }
406
+ }
407
+ },
408
+ {
409
+ url: "https://{subdomain}.{site}",
410
+ description: "No description provided",
411
+ variables: {
412
+ site: {
413
+ description: "Any Datadog deployment.",
414
+ default_value: "datadoghq.com",
415
+ },
416
+ subdomain: {
417
+ description: "The subdomain where the API is deployed.",
418
+ default_value: "api",
419
+ }
420
+ }
421
+ }
422
+ ],
372
423
  submit_log: [
373
424
  {
374
425
  url: "https://{subdomain}.{site}",
@@ -0,0 +1,63 @@
1
+ =begin
2
+ #Datadog API V1 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V1
20
+ # List of distribution point.
21
+ module DistributionPointItem
22
+ class << self
23
+ include BaseOneOfModel
24
+ include BaseOneOfModelNoDiscriminator
25
+
26
+ # List of class defined in oneOf (OpenAPI v3)
27
+ def openapi_one_of
28
+ [
29
+ :'Float',
30
+ :'Array<Float>'
31
+ ]
32
+ end
33
+ # Builds the object
34
+ # @param [Mixed] Data to be matched against the list of oneOf items
35
+ # @return [Object] Returns the model or the data itself
36
+ def build(data)
37
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
38
+ # Note:
39
+ # - We do not attempt to check whether exactly one item matches.
40
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
41
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
42
+ # - TODO: scalar values are de facto behaving as if they were nullable.
43
+ # - TODO: logging when debugging is set.
44
+ openapi_one_of.each do |klass|
45
+ begin
46
+ next if klass == :AnyType # "nullable: true"
47
+ typed_data = find_and_cast_into_type(klass, data)
48
+ next if typed_data._unparsed
49
+ return typed_data if typed_data
50
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
51
+ end
52
+ end
53
+
54
+ if openapi_one_of.include?(:AnyType)
55
+ data
56
+ else
57
+ self._unparsed = true
58
+ DatadogAPIClient::V1::UnparsedObject.new(data)
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,26 @@
1
+ =begin
2
+ #Datadog API V1 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V1
20
+ # HTTP header used to compress the media-type.
21
+ class DistributionPointsContentEncoding
22
+ include BaseEnumModel
23
+
24
+ DEFLATE = "deflate".freeze
25
+ end
26
+ end
@@ -0,0 +1,124 @@
1
+ =begin
2
+ #Datadog API V1 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V1
20
+ # The distribution points payload.
21
+ class DistributionPointsPayload
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # A list of distribution points series to submit to Datadog.
29
+ attr_accessor :series
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ # @!visibility private
33
+ def self.attribute_map
34
+ {
35
+ :'series' => :'series'
36
+ }
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ # @!visibility private
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ # @!visibility private
47
+ def self.openapi_types
48
+ {
49
+ :'series' => :'Array<DistributionPointsSeries>'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ # @!visibility private
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ ])
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param attributes [Hash] Model attributes in the form of hash
62
+ # @!visibility private
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DistributionPointsPayload` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DistributionPointsPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'series')
77
+ if (value = attributes[:'series']).is_a?(Array)
78
+ self.series = value
79
+ end
80
+ end
81
+ end
82
+
83
+ # Check to see if the all the properties in the model are valid
84
+ # @return true if the model is valid
85
+ # @!visibility private
86
+ def valid?
87
+ return false if @series.nil?
88
+ true
89
+ end
90
+
91
+ # Custom attribute writer method with validation
92
+ # @param series [Object] Object to be assigned
93
+ # @!visibility private
94
+ def series=(series)
95
+ if series.nil?
96
+ fail ArgumentError, 'invalid value for "series", series cannot be nil.'
97
+ end
98
+ @series = series
99
+ end
100
+
101
+ # Checks equality by comparing each attribute.
102
+ # @param o [Object] Object to be compared
103
+ # @!visibility private
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ series == o.series
108
+ end
109
+
110
+ # @see the `==` method
111
+ # @param o [Object] Object to be compared
112
+ # @!visibility private
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ # @!visibility private
120
+ def hash
121
+ [series].hash
122
+ end
123
+ end
124
+ end