datadog_api_client 2.14.0 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.apigentools-info +6 -6
- data/.generator/schemas/v1/openapi.yaml +808 -143
- data/.generator/schemas/v2/openapi.yaml +1808 -166
- data/.generator/src/generator/openapi.py +3 -1
- data/.generator/src/generator/templates/api.j2 +8 -2
- data/.generator/src/generator/templates/api_client.j2 +19 -1
- data/.generator/src/generator/templates/model_base.j2 +1 -0
- data/CHANGELOG.md +56 -0
- data/examples/v1/dashboards/CreateDashboard_1754992756.rb +44 -0
- data/examples/v1/dashboards/CreateDashboard_2278756614.rb +91 -0
- data/examples/v1/dashboards/CreateDashboard_2618036642.rb +36 -0
- data/examples/v1/dashboards/CreateDashboard_2705593938.rb +3 -0
- data/examples/v1/dashboards/CreateDashboard_3777304439.rb +50 -0
- data/examples/v1/dashboards/ListDashboards_1062671515.rb +8 -0
- data/examples/v1/monitors/CreateMonitor_1539578087.rb +36 -0
- data/examples/v1/monitors/ListMonitors_2966492814.rb +8 -0
- data/examples/v1/notebooks/ListNotebooks_788665428.rb +8 -0
- data/examples/v1/service-level-objective-corrections/ListSLOCorrection_2647266873.rb +8 -0
- data/examples/v1/service-level-objectives/ListSLOs_3036942817.rb +8 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +1 -0
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.rb +1 -1
- data/examples/v1/synthetics/ListTests_1938827783.rb +8 -0
- data/examples/v1/usage-metering/GetUsageCIApp.rb +4 -1
- data/examples/v1/usage-metering/GetUsageCWS.rb +4 -1
- data/examples/v1/usage-metering/GetUsageCloudSecurityPostureManagement.rb +1 -1
- data/examples/v2/apm-retention-filters/CreateApmRetentionFilter.rb +20 -0
- data/examples/v2/apm-retention-filters/DeleteApmRetentionFilter.rb +8 -0
- data/examples/v2/apm-retention-filters/GetApmRetentionFilter.rb +8 -0
- data/examples/v2/apm-retention-filters/ListApmRetentionFilters.rb +5 -0
- data/examples/v2/apm-retention-filters/ReorderApmRetentionFilters.rb +18 -0
- data/examples/v2/apm-retention-filters/UpdateApmRetentionFilter.rb +24 -0
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +0 -3
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +0 -8
- data/examples/v2/container-images/ListContainerImages.rb +8 -0
- data/examples/v2/container-images/ListContainerImages_3088586393.rb +11 -0
- data/examples/v2/container-images/ListContainerImages_3974828736.rb +11 -0
- data/examples/v2/downtimes/CancelDowntime.rb +0 -3
- data/examples/v2/downtimes/CreateDowntime.rb +0 -3
- data/examples/v2/downtimes/GetDowntime.rb +0 -3
- data/examples/v2/downtimes/ListDowntimes.rb +0 -3
- data/examples/v2/downtimes/ListDowntimes_805770330.rb +8 -0
- data/examples/v2/downtimes/ListMonitorDowntimes.rb +0 -3
- data/examples/v2/downtimes/ListMonitorDowntimes_128979780.rb +0 -3
- data/examples/v2/downtimes/UpdateDowntime.rb +0 -3
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_109518525.rb +19 -0
- data/examples/v2/powerpack/CreatePowerpack.rb +47 -0
- data/examples/v2/powerpack/DeletePowerpack.rb +8 -0
- data/examples/v2/powerpack/GetPowerpack.rb +8 -0
- data/examples/v2/powerpack/ListPowerpacks.rb +8 -0
- data/examples/v2/powerpack/ListPowerpacks_1173755071.rb +8 -0
- data/examples/v2/powerpack/UpdatePowerpack.rb +50 -0
- data/examples/v2/rum/CreateRUMApplication.rb +1 -1
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.rb +1 -1
- data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule_428087276.rb +1 -1
- data/examples/v2/service-accounts/CreateServiceAccountApplicationKey.rb +5 -7
- data/examples/v2/service-accounts/DeleteServiceAccountApplicationKey.rb +7 -1
- data/examples/v2/service-accounts/GetServiceAccountApplicationKey.rb +7 -1
- data/examples/v2/service-accounts/ListServiceAccountApplicationKeys.rb +4 -1
- data/examples/v2/service-accounts/UpdateServiceAccountApplicationKey.rb +11 -9
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +23 -12
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_2621709423.rb +53 -0
- data/examples/v2/teams/ListTeams_3592098458.rb +8 -0
- data/examples/v2/users/ListUsers_4075885358.rb +8 -0
- data/lib/datadog_api_client/api_client.rb +19 -1
- data/lib/datadog_api_client/configuration.rb +1 -7
- data/lib/datadog_api_client/inflector.rb +81 -0
- data/lib/datadog_api_client/v1/api/dashboards_api.rb +25 -0
- data/lib/datadog_api_client/v1/api/monitors_api.rb +23 -20
- data/lib/datadog_api_client/v1/api/notebooks_api.rb +21 -0
- data/lib/datadog_api_client/v1/api/service_level_objective_corrections_api.rb +21 -0
- data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +21 -0
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +25 -3
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +6 -6
- data/lib/datadog_api_client/v1/api/webhooks_integration_api.rb +1 -1
- data/lib/datadog_api_client/v1/model_base.rb +1 -0
- data/lib/datadog_api_client/v1/models/heat_map_widget_request.rb +35 -1
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +7 -4
- data/lib/datadog_api_client/v1/models/ip_prefixes_global.rb +94 -0
- data/lib/datadog_api_client/v1/models/ip_ranges.rb +11 -1
- data/lib/datadog_api_client/v1/models/list_stream_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/monitor.rb +1 -1
- data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
- data/lib/datadog_api_client/v1/models/monitor_options_custom_schedule.rb +82 -0
- data/lib/datadog_api_client/v1/models/monitor_options_custom_schedule_recurrence.rb +100 -0
- data/lib/datadog_api_client/v1/models/monitor_options_scheduling_options.rb +11 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +6 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +65 -5
- data/lib/datadog_api_client/v1/models/powerpack_template_variable_contents.rb +131 -0
- data/lib/datadog_api_client/v1/models/powerpack_template_variables.rb +94 -0
- data/lib/datadog_api_client/v1/models/powerpack_widget_definition.rb +169 -0
- data/lib/datadog_api_client/v1/models/powerpack_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/split_config.rb +181 -0
- data/lib/datadog_api_client/v1/models/split_config_sort_compute.rb +119 -0
- data/lib/datadog_api_client/v1/models/split_dimension.rb +98 -0
- data/lib/datadog_api_client/v1/models/split_graph_source_widget_definition.rb +70 -0
- data/lib/datadog_api_client/v1/models/split_graph_viz_size.rb +29 -0
- data/lib/datadog_api_client/v1/models/split_graph_widget_definition.rb +191 -0
- data/lib/datadog_api_client/v1/models/split_graph_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/split_sort.rb +108 -0
- data/lib/datadog_api_client/v1/models/split_vector_entry_item.rb +125 -0
- data/lib/datadog_api_client/v1/models/sunburst_widget_request.rb +14 -4
- data/lib/datadog_api_client/v1/models/synthetics_assertion_target.rb +11 -1
- data/lib/datadog_api_client/v1/models/synthetics_assertion_timings_scope.rb +27 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +4 -4
- data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_hour.rb +8 -8
- data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_response.rb +2 -2
- data/lib/datadog_api_client/v1/models/usage_profiling_hour.rb +12 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +168 -8
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +168 -8
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +168 -8
- data/lib/datadog_api_client/v1/models/widget_definition.rb +8 -6
- data/lib/datadog_api_client/v2/api/apm_retention_filters_api.rb +423 -0
- data/lib/datadog_api_client/v2/api/audit_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +5 -11
- data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +4 -4
- data/lib/datadog_api_client/v2/api/container_images_api.rb +129 -0
- data/lib/datadog_api_client/v2/api/downtimes_api.rb +25 -36
- data/lib/datadog_api_client/v2/api/events_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/incidents_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/logs_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/powerpack_api.rb +383 -0
- data/lib/datadog_api_client/v2/api/processes_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/rum_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +3 -3
- data/lib/datadog_api_client/v2/api/service_definition_api.rb +4 -4
- data/lib/datadog_api_client/v2/api/spans_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/teams_api.rb +22 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/users_api.rb +22 -0
- data/lib/datadog_api_client/v2/model_base.rb +1 -0
- data/lib/datadog_api_client/v2/models/apm_retention_filter_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/container_image.rb +100 -0
- data/lib/datadog_api_client/v2/models/container_image_attributes.rb +261 -0
- data/lib/datadog_api_client/v2/models/container_image_flavor.rb +120 -0
- data/lib/datadog_api_client/v2/models/container_image_group.rb +110 -0
- data/lib/datadog_api_client/v2/models/container_image_group_attributes.rb +100 -0
- data/lib/datadog_api_client/v2/models/container_image_group_images_relationships_link.rb +92 -0
- data/lib/datadog_api_client/v2/models/container_image_group_relationships.rb +80 -0
- data/lib/datadog_api_client/v2/models/container_image_group_relationships_links.rb +80 -0
- data/lib/datadog_api_client/v2/models/container_image_group_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/container_image_item.rb +63 -0
- data/lib/datadog_api_client/v2/models/container_image_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/container_image_meta_page.rb +160 -0
- data/lib/datadog_api_client/v2/models/container_image_meta_page_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/container_image_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/container_image_vulnerabilities.rb +140 -0
- data/lib/datadog_api_client/v2/models/container_images_response.rb +102 -0
- data/lib/datadog_api_client/v2/models/container_images_response_links.rb +130 -0
- data/lib/datadog_api_client/v2/models/data_scalar_column.rb +2 -2
- data/lib/datadog_api_client/v2/models/downtime_relationships_monitor_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/group_scalar_column.rb +2 -2
- data/lib/datadog_api_client/v2/models/list_powerpacks_response.rb +114 -0
- data/lib/datadog_api_client/v2/models/powerpack.rb +80 -0
- data/lib/datadog_api_client/v2/models/powerpack_attributes.rb +164 -0
- data/lib/datadog_api_client/v2/models/powerpack_data.rb +110 -0
- data/lib/datadog_api_client/v2/models/powerpack_group_widget.rb +108 -0
- data/lib/datadog_api_client/v2/models/powerpack_group_widget_definition.rb +162 -0
- data/lib/datadog_api_client/v2/models/powerpack_group_widget_layout.rb +177 -0
- data/lib/datadog_api_client/v2/models/powerpack_inner_widget_layout.rb +177 -0
- data/lib/datadog_api_client/v2/models/powerpack_inner_widgets.rb +108 -0
- data/lib/datadog_api_client/v2/models/powerpack_relationships.rb +80 -0
- data/lib/datadog_api_client/v2/models/powerpack_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/powerpack_response_links.rb +129 -0
- data/lib/datadog_api_client/v2/models/powerpack_template_variable.rb +110 -0
- data/lib/datadog_api_client/v2/models/powerpacks_response_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/powerpacks_response_meta_pagination.rb +150 -0
- data/lib/datadog_api_client/v2/models/reorder_retention_filters_request.rb +100 -0
- data/lib/datadog_api_client/v2/models/restriction_policy_binding.rb +1 -1
- data/lib/datadog_api_client/v2/models/retention_filter.rb +140 -0
- data/lib/datadog_api_client/v2/models/retention_filter_all.rb +140 -0
- data/lib/datadog_api_client/v2/models/retention_filter_all_attributes.rb +181 -0
- data/lib/datadog_api_client/v2/models/retention_filter_all_type.rb +28 -0
- data/lib/datadog_api_client/v2/models/retention_filter_attributes.rb +181 -0
- data/lib/datadog_api_client/v2/models/retention_filter_create_attributes.rb +183 -0
- data/lib/datadog_api_client/v2/models/retention_filter_create_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/retention_filter_create_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/retention_filter_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/retention_filter_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/retention_filter_update_data.rb +140 -0
- data/lib/datadog_api_client/v2/models/retention_filter_update_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/retention_filter_without_attributes.rb +119 -0
- data/lib/datadog_api_client/v2/models/retention_filters_response.rb +100 -0
- data/lib/datadog_api_client/v2/models/scalar_column_type_group.rb +26 -0
- data/lib/datadog_api_client/v2/models/scalar_column_type_number.rb +26 -0
- data/lib/datadog_api_client/v2/models/scalar_meta.rb +8 -0
- data/lib/datadog_api_client/v2/models/service_definition_schema.rb +2 -1
- data/lib/datadog_api_client/v2/models/service_definition_schema_versions.rb +1 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +247 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_contact.rb +129 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_integrations.rb +90 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_link.rb +150 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_opsgenie.rb +108 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_opsgenie_region.rb +27 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_pagerduty.rb +80 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_type.rb +32 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_version.rb +26 -0
- data/lib/datadog_api_client/v2/models/service_definitions_create_request.rb +1 -0
- data/lib/datadog_api_client/v2/models/spans_filter.rb +80 -0
- data/lib/datadog_api_client/v2/models/spans_filter_create.rb +98 -0
- data/lib/datadog_api_client/version.rb +1 -1
- data/run-tests.sh +6 -5
- metadata +114 -9
- data/examples/v1/usage-metering/GetUsageCIApp_1064440884.rb +0 -8
- data/examples/v1/usage-metering/GetUsageCWS_736958514.rb +0 -8
- data/examples/v2/service-accounts/CreateServiceAccountApplicationKey_1761876297.rb +0 -17
- data/examples/v2/service-accounts/DeleteServiceAccountApplicationKey_992091161.rb +0 -11
- data/examples/v2/service-accounts/GetServiceAccountApplicationKey_819075131.rb +0 -11
- data/examples/v2/service-accounts/ListServiceAccountApplicationKeys_1268914341.rb +0 -8
- data/examples/v2/service-accounts/UpdateServiceAccountApplicationKey_768415790.rb +0 -22
|
@@ -39,12 +39,6 @@ module DatadogAPIClient::V2
|
|
|
39
39
|
# @param opts [Hash] the optional parameters
|
|
40
40
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
41
41
|
def cancel_downtime_with_http_info(downtime_id, opts = {})
|
|
42
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.cancel_downtime".to_sym]
|
|
43
|
-
if unstable_enabled
|
|
44
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.cancel_downtime")
|
|
45
|
-
else
|
|
46
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.cancel_downtime"))
|
|
47
|
-
end
|
|
48
42
|
|
|
49
43
|
if @api_client.config.debugging
|
|
50
44
|
@api_client.config.logger.debug 'Calling API: DowntimesAPI.cancel_downtime ...'
|
|
@@ -110,12 +104,6 @@ module DatadogAPIClient::V2
|
|
|
110
104
|
# @param opts [Hash] the optional parameters
|
|
111
105
|
# @return [Array<(DowntimeResponse, Integer, Hash)>] DowntimeResponse data, response status code and response headers
|
|
112
106
|
def create_downtime_with_http_info(body, opts = {})
|
|
113
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.create_downtime".to_sym]
|
|
114
|
-
if unstable_enabled
|
|
115
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_downtime")
|
|
116
|
-
else
|
|
117
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_downtime"))
|
|
118
|
-
end
|
|
119
107
|
|
|
120
108
|
if @api_client.config.debugging
|
|
121
109
|
@api_client.config.logger.debug 'Calling API: DowntimesAPI.create_downtime ...'
|
|
@@ -184,12 +172,6 @@ module DatadogAPIClient::V2
|
|
|
184
172
|
# @option opts [String] :include Comma-separated list of resource paths for related resources to include in the response. Supported resource paths are `created_by` and `monitor`.
|
|
185
173
|
# @return [Array<(DowntimeResponse, Integer, Hash)>] DowntimeResponse data, response status code and response headers
|
|
186
174
|
def get_downtime_with_http_info(downtime_id, opts = {})
|
|
187
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.get_downtime".to_sym]
|
|
188
|
-
if unstable_enabled
|
|
189
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_downtime")
|
|
190
|
-
else
|
|
191
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_downtime"))
|
|
192
|
-
end
|
|
193
175
|
|
|
194
176
|
if @api_client.config.debugging
|
|
195
177
|
@api_client.config.logger.debug 'Calling API: DowntimesAPI.get_downtime ...'
|
|
@@ -255,14 +237,10 @@ module DatadogAPIClient::V2
|
|
|
255
237
|
# @param opts [Hash] the optional parameters
|
|
256
238
|
# @option opts [Boolean] :current_only Only return downtimes that are active when the request is made.
|
|
257
239
|
# @option opts [String] :include Comma-separated list of resource paths for related resources to include in the response. Supported resource paths are `created_by` and `monitor`.
|
|
240
|
+
# @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page.
|
|
241
|
+
# @option opts [Integer] :page_limit Maximum number of downtimes in the response.
|
|
258
242
|
# @return [Array<(ListDowntimesResponse, Integer, Hash)>] ListDowntimesResponse data, response status code and response headers
|
|
259
243
|
def list_downtimes_with_http_info(opts = {})
|
|
260
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.list_downtimes".to_sym]
|
|
261
|
-
if unstable_enabled
|
|
262
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_downtimes")
|
|
263
|
-
else
|
|
264
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_downtimes"))
|
|
265
|
-
end
|
|
266
244
|
|
|
267
245
|
if @api_client.config.debugging
|
|
268
246
|
@api_client.config.logger.debug 'Calling API: DowntimesAPI.list_downtimes ...'
|
|
@@ -274,6 +252,8 @@ module DatadogAPIClient::V2
|
|
|
274
252
|
query_params = opts[:query_params] || {}
|
|
275
253
|
query_params[:'current_only'] = opts[:'current_only'] if !opts[:'current_only'].nil?
|
|
276
254
|
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
255
|
+
query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil?
|
|
256
|
+
query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
|
|
277
257
|
|
|
278
258
|
# header parameters
|
|
279
259
|
header_params = opts[:header_params] || {}
|
|
@@ -310,6 +290,27 @@ module DatadogAPIClient::V2
|
|
|
310
290
|
return data, status_code, headers
|
|
311
291
|
end
|
|
312
292
|
|
|
293
|
+
# Get all downtimes.
|
|
294
|
+
#
|
|
295
|
+
# Provide a paginated version of {#list_downtimes}, returning all items.
|
|
296
|
+
#
|
|
297
|
+
# To use it you need to use a block: list_downtimes_with_pagination { |item| p item }
|
|
298
|
+
#
|
|
299
|
+
# @yield [DowntimeResponseData] Paginated items
|
|
300
|
+
def list_downtimes_with_pagination(opts = {})
|
|
301
|
+
api_version = "V2"
|
|
302
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_limit", 30)
|
|
303
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
|
|
304
|
+
while true do
|
|
305
|
+
response = list_downtimes(opts)
|
|
306
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
|
307
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
308
|
+
break
|
|
309
|
+
end
|
|
310
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size)
|
|
311
|
+
end
|
|
312
|
+
end
|
|
313
|
+
|
|
313
314
|
# Get active downtimes for a monitor.
|
|
314
315
|
#
|
|
315
316
|
# @see #list_monitor_downtimes_with_http_info
|
|
@@ -326,12 +327,6 @@ module DatadogAPIClient::V2
|
|
|
326
327
|
# @param opts [Hash] the optional parameters
|
|
327
328
|
# @return [Array<(MonitorDowntimeMatchResponse, Integer, Hash)>] MonitorDowntimeMatchResponse data, response status code and response headers
|
|
328
329
|
def list_monitor_downtimes_with_http_info(monitor_id, opts = {})
|
|
329
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.list_monitor_downtimes".to_sym]
|
|
330
|
-
if unstable_enabled
|
|
331
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_monitor_downtimes")
|
|
332
|
-
else
|
|
333
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_monitor_downtimes"))
|
|
334
|
-
end
|
|
335
330
|
|
|
336
331
|
if @api_client.config.debugging
|
|
337
332
|
@api_client.config.logger.debug 'Calling API: DowntimesAPI.list_monitor_downtimes ...'
|
|
@@ -398,12 +393,6 @@ module DatadogAPIClient::V2
|
|
|
398
393
|
# @param opts [Hash] the optional parameters
|
|
399
394
|
# @return [Array<(DowntimeResponse, Integer, Hash)>] DowntimeResponse data, response status code and response headers
|
|
400
395
|
def update_downtime_with_http_info(downtime_id, body, opts = {})
|
|
401
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.update_downtime".to_sym]
|
|
402
|
-
if unstable_enabled
|
|
403
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_downtime")
|
|
404
|
-
else
|
|
405
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_downtime"))
|
|
406
|
-
end
|
|
407
396
|
|
|
408
397
|
if @api_client.config.debugging
|
|
409
398
|
@api_client.config.logger.debug 'Calling API: DowntimesAPI.update_downtime ...'
|
|
@@ -128,7 +128,7 @@ module DatadogAPIClient::V2
|
|
|
128
128
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
129
129
|
break
|
|
130
130
|
end
|
|
131
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor",
|
|
131
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
|
132
132
|
end
|
|
133
133
|
end
|
|
134
134
|
|
|
@@ -1022,7 +1022,7 @@ module DatadogAPIClient::V2
|
|
|
1022
1022
|
#
|
|
1023
1023
|
# Search for incidents matching a certain query.
|
|
1024
1024
|
#
|
|
1025
|
-
# @param query [String] Specifies which incidents should be returned.
|
|
1025
|
+
# @param query [String] Specifies which incidents should be returned. The query can contain any number of incident facets joined by `ANDs`, along with multiple values for each of those facets joined by `OR`s. For example: `state:active AND severity:(SEV-2 OR SEV-1)`.
|
|
1026
1026
|
# @param opts [Hash] the optional parameters
|
|
1027
1027
|
# @option opts [IncidentRelatedObject] :include Specifies which types of related objects should be included in the response.
|
|
1028
1028
|
# @option opts [IncidentSearchSortOrder] :sort Specifies the order of returned incidents.
|
|
@@ -298,7 +298,7 @@ module DatadogAPIClient::V2
|
|
|
298
298
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
299
299
|
break
|
|
300
300
|
end
|
|
301
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor",
|
|
301
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
|
302
302
|
end
|
|
303
303
|
end
|
|
304
304
|
|
|
@@ -0,0 +1,383 @@
|
|
|
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 PowerpackAPI
|
|
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 new powerpack.
|
|
27
|
+
#
|
|
28
|
+
# @see #create_powerpack_with_http_info
|
|
29
|
+
def create_powerpack(body, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_powerpack_with_http_info(body, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Create a new powerpack.
|
|
35
|
+
#
|
|
36
|
+
# Create a powerpack.
|
|
37
|
+
#
|
|
38
|
+
# @param body [Powerpack] Create a powerpack request body.
|
|
39
|
+
# @param opts [Hash] the optional parameters
|
|
40
|
+
# @return [Array<(PowerpackResponse, Integer, Hash)>] PowerpackResponse data, response status code and response headers
|
|
41
|
+
def create_powerpack_with_http_info(body, opts = {})
|
|
42
|
+
|
|
43
|
+
if @api_client.config.debugging
|
|
44
|
+
@api_client.config.logger.debug 'Calling API: PowerpackAPI.create_powerpack ...'
|
|
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 PowerpackAPI.create_powerpack"
|
|
49
|
+
end
|
|
50
|
+
# resource path
|
|
51
|
+
local_var_path = '/api/v2/powerpacks'
|
|
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] || 'PowerpackResponse'
|
|
71
|
+
|
|
72
|
+
# auth_names
|
|
73
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
74
|
+
|
|
75
|
+
new_options = opts.merge(
|
|
76
|
+
:operation => :create_powerpack,
|
|
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: PowerpackAPI#create_powerpack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
89
|
+
end
|
|
90
|
+
return data, status_code, headers
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Delete a powerpack.
|
|
94
|
+
#
|
|
95
|
+
# @see #delete_powerpack_with_http_info
|
|
96
|
+
def delete_powerpack(powerpack_id, opts = {})
|
|
97
|
+
delete_powerpack_with_http_info(powerpack_id, opts)
|
|
98
|
+
nil
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Delete a powerpack.
|
|
102
|
+
#
|
|
103
|
+
# Delete a powerpack.
|
|
104
|
+
#
|
|
105
|
+
# @param powerpack_id [String] Powerpack id
|
|
106
|
+
# @param opts [Hash] the optional parameters
|
|
107
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
108
|
+
def delete_powerpack_with_http_info(powerpack_id, opts = {})
|
|
109
|
+
|
|
110
|
+
if @api_client.config.debugging
|
|
111
|
+
@api_client.config.logger.debug 'Calling API: PowerpackAPI.delete_powerpack ...'
|
|
112
|
+
end
|
|
113
|
+
# verify the required parameter 'powerpack_id' is set
|
|
114
|
+
if @api_client.config.client_side_validation && powerpack_id.nil?
|
|
115
|
+
fail ArgumentError, "Missing the required parameter 'powerpack_id' when calling PowerpackAPI.delete_powerpack"
|
|
116
|
+
end
|
|
117
|
+
# resource path
|
|
118
|
+
local_var_path = '/api/v2/powerpacks/{powerpack_id}'.sub('{powerpack_id}', CGI.escape(powerpack_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, :AuthZ]
|
|
139
|
+
|
|
140
|
+
new_options = opts.merge(
|
|
141
|
+
:operation => :delete_powerpack,
|
|
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: PowerpackAPI#delete_powerpack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
154
|
+
end
|
|
155
|
+
return data, status_code, headers
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Get a Powerpack.
|
|
159
|
+
#
|
|
160
|
+
# @see #get_powerpack_with_http_info
|
|
161
|
+
def get_powerpack(powerpack_id, opts = {})
|
|
162
|
+
data, _status_code, _headers = get_powerpack_with_http_info(powerpack_id, opts)
|
|
163
|
+
data
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Get a Powerpack.
|
|
167
|
+
#
|
|
168
|
+
# Get a powerpack.
|
|
169
|
+
#
|
|
170
|
+
# @param powerpack_id [String] ID of the powerpack.
|
|
171
|
+
# @param opts [Hash] the optional parameters
|
|
172
|
+
# @return [Array<(PowerpackResponse, Integer, Hash)>] PowerpackResponse data, response status code and response headers
|
|
173
|
+
def get_powerpack_with_http_info(powerpack_id, opts = {})
|
|
174
|
+
|
|
175
|
+
if @api_client.config.debugging
|
|
176
|
+
@api_client.config.logger.debug 'Calling API: PowerpackAPI.get_powerpack ...'
|
|
177
|
+
end
|
|
178
|
+
# verify the required parameter 'powerpack_id' is set
|
|
179
|
+
if @api_client.config.client_side_validation && powerpack_id.nil?
|
|
180
|
+
fail ArgumentError, "Missing the required parameter 'powerpack_id' when calling PowerpackAPI.get_powerpack"
|
|
181
|
+
end
|
|
182
|
+
# resource path
|
|
183
|
+
local_var_path = '/api/v2/powerpacks/{powerpack_id}'.sub('{powerpack_id}', CGI.escape(powerpack_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] || 'PowerpackResponse'
|
|
201
|
+
|
|
202
|
+
# auth_names
|
|
203
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
204
|
+
|
|
205
|
+
new_options = opts.merge(
|
|
206
|
+
:operation => :get_powerpack,
|
|
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: PowerpackAPI#get_powerpack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
219
|
+
end
|
|
220
|
+
return data, status_code, headers
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Get all powerpacks.
|
|
224
|
+
#
|
|
225
|
+
# @see #list_powerpacks_with_http_info
|
|
226
|
+
def list_powerpacks(opts = {})
|
|
227
|
+
data, _status_code, _headers = list_powerpacks_with_http_info(opts)
|
|
228
|
+
data
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Get all powerpacks.
|
|
232
|
+
#
|
|
233
|
+
# Get a list of all powerpacks.
|
|
234
|
+
#
|
|
235
|
+
# @param opts [Hash] the optional parameters
|
|
236
|
+
# @option opts [Integer] :page_limit Maximum number of powerpacks in the response.
|
|
237
|
+
# @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page.
|
|
238
|
+
# @return [Array<(ListPowerpacksResponse, Integer, Hash)>] ListPowerpacksResponse data, response status code and response headers
|
|
239
|
+
def list_powerpacks_with_http_info(opts = {})
|
|
240
|
+
|
|
241
|
+
if @api_client.config.debugging
|
|
242
|
+
@api_client.config.logger.debug 'Calling API: PowerpackAPI.list_powerpacks ...'
|
|
243
|
+
end
|
|
244
|
+
if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] > 1000
|
|
245
|
+
fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling PowerpackAPI.list_powerpacks, must be smaller than or equal to 1000.'
|
|
246
|
+
end
|
|
247
|
+
# resource path
|
|
248
|
+
local_var_path = '/api/v2/powerpacks'
|
|
249
|
+
|
|
250
|
+
# query parameters
|
|
251
|
+
query_params = opts[:query_params] || {}
|
|
252
|
+
query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
|
|
253
|
+
query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil?
|
|
254
|
+
|
|
255
|
+
# header parameters
|
|
256
|
+
header_params = opts[:header_params] || {}
|
|
257
|
+
# HTTP header 'Accept' (if needed)
|
|
258
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
259
|
+
|
|
260
|
+
# form parameters
|
|
261
|
+
form_params = opts[:form_params] || {}
|
|
262
|
+
|
|
263
|
+
# http body (model)
|
|
264
|
+
post_body = opts[:debug_body]
|
|
265
|
+
|
|
266
|
+
# return_type
|
|
267
|
+
return_type = opts[:debug_return_type] || 'ListPowerpacksResponse'
|
|
268
|
+
|
|
269
|
+
# auth_names
|
|
270
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
271
|
+
|
|
272
|
+
new_options = opts.merge(
|
|
273
|
+
:operation => :list_powerpacks,
|
|
274
|
+
:header_params => header_params,
|
|
275
|
+
:query_params => query_params,
|
|
276
|
+
:form_params => form_params,
|
|
277
|
+
:body => post_body,
|
|
278
|
+
:auth_names => auth_names,
|
|
279
|
+
:return_type => return_type,
|
|
280
|
+
:api_version => "V2"
|
|
281
|
+
)
|
|
282
|
+
|
|
283
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
284
|
+
if @api_client.config.debugging
|
|
285
|
+
@api_client.config.logger.debug "API called: PowerpackAPI#list_powerpacks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
286
|
+
end
|
|
287
|
+
return data, status_code, headers
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Get all powerpacks.
|
|
291
|
+
#
|
|
292
|
+
# Provide a paginated version of {#list_powerpacks}, returning all items.
|
|
293
|
+
#
|
|
294
|
+
# To use it you need to use a block: list_powerpacks_with_pagination { |item| p item }
|
|
295
|
+
#
|
|
296
|
+
# @yield [PowerpackData] Paginated items
|
|
297
|
+
def list_powerpacks_with_pagination(opts = {})
|
|
298
|
+
api_version = "V2"
|
|
299
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_limit", 25)
|
|
300
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
|
|
301
|
+
while true do
|
|
302
|
+
response = list_powerpacks(opts)
|
|
303
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
|
304
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
305
|
+
break
|
|
306
|
+
end
|
|
307
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size)
|
|
308
|
+
end
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
# Update a powerpack.
|
|
312
|
+
#
|
|
313
|
+
# @see #update_powerpack_with_http_info
|
|
314
|
+
def update_powerpack(powerpack_id, body, opts = {})
|
|
315
|
+
data, _status_code, _headers = update_powerpack_with_http_info(powerpack_id, body, opts)
|
|
316
|
+
data
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Update a powerpack.
|
|
320
|
+
#
|
|
321
|
+
# Update a powerpack.
|
|
322
|
+
#
|
|
323
|
+
# @param powerpack_id [String] ID of the powerpack.
|
|
324
|
+
# @param body [Powerpack] Update a powerpack request body.
|
|
325
|
+
# @param opts [Hash] the optional parameters
|
|
326
|
+
# @return [Array<(PowerpackResponse, Integer, Hash)>] PowerpackResponse data, response status code and response headers
|
|
327
|
+
def update_powerpack_with_http_info(powerpack_id, body, opts = {})
|
|
328
|
+
|
|
329
|
+
if @api_client.config.debugging
|
|
330
|
+
@api_client.config.logger.debug 'Calling API: PowerpackAPI.update_powerpack ...'
|
|
331
|
+
end
|
|
332
|
+
# verify the required parameter 'powerpack_id' is set
|
|
333
|
+
if @api_client.config.client_side_validation && powerpack_id.nil?
|
|
334
|
+
fail ArgumentError, "Missing the required parameter 'powerpack_id' when calling PowerpackAPI.update_powerpack"
|
|
335
|
+
end
|
|
336
|
+
# verify the required parameter 'body' is set
|
|
337
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
338
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PowerpackAPI.update_powerpack"
|
|
339
|
+
end
|
|
340
|
+
# resource path
|
|
341
|
+
local_var_path = '/api/v2/powerpacks/{powerpack_id}'.sub('{powerpack_id}', CGI.escape(powerpack_id.to_s).gsub('%2F', '/'))
|
|
342
|
+
|
|
343
|
+
# query parameters
|
|
344
|
+
query_params = opts[:query_params] || {}
|
|
345
|
+
|
|
346
|
+
# header parameters
|
|
347
|
+
header_params = opts[:header_params] || {}
|
|
348
|
+
# HTTP header 'Accept' (if needed)
|
|
349
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
350
|
+
# HTTP header 'Content-Type'
|
|
351
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
352
|
+
|
|
353
|
+
# form parameters
|
|
354
|
+
form_params = opts[:form_params] || {}
|
|
355
|
+
|
|
356
|
+
# http body (model)
|
|
357
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
358
|
+
|
|
359
|
+
# return_type
|
|
360
|
+
return_type = opts[:debug_return_type] || 'PowerpackResponse'
|
|
361
|
+
|
|
362
|
+
# auth_names
|
|
363
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
364
|
+
|
|
365
|
+
new_options = opts.merge(
|
|
366
|
+
:operation => :update_powerpack,
|
|
367
|
+
:header_params => header_params,
|
|
368
|
+
:query_params => query_params,
|
|
369
|
+
:form_params => form_params,
|
|
370
|
+
:body => post_body,
|
|
371
|
+
:auth_names => auth_names,
|
|
372
|
+
:return_type => return_type,
|
|
373
|
+
:api_version => "V2"
|
|
374
|
+
)
|
|
375
|
+
|
|
376
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
|
377
|
+
if @api_client.config.debugging
|
|
378
|
+
@api_client.config.logger.debug "API called: PowerpackAPI#update_powerpack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
379
|
+
end
|
|
380
|
+
return data, status_code, headers
|
|
381
|
+
end
|
|
382
|
+
end
|
|
383
|
+
end
|
|
@@ -111,7 +111,7 @@ module DatadogAPIClient::V2
|
|
|
111
111
|
def list_processes_with_pagination(opts = {})
|
|
112
112
|
api_version = "V2"
|
|
113
113
|
page_size = @api_client.get_attribute_from_path(opts, "page_limit", 1000)
|
|
114
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_limit",
|
|
114
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
|
|
115
115
|
while true do
|
|
116
116
|
response = list_processes(opts)
|
|
117
117
|
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
|
@@ -448,7 +448,7 @@ module DatadogAPIClient::V2
|
|
|
448
448
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
449
449
|
break
|
|
450
450
|
end
|
|
451
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor",
|
|
451
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
|
452
452
|
end
|
|
453
453
|
end
|
|
454
454
|
|
|
@@ -927,14 +927,14 @@ module DatadogAPIClient::V2
|
|
|
927
927
|
def list_findings_with_pagination(opts = {})
|
|
928
928
|
api_version = "V2"
|
|
929
929
|
page_size = @api_client.get_attribute_from_path(opts, "page_limit", 100)
|
|
930
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_limit",
|
|
930
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
|
|
931
931
|
while true do
|
|
932
932
|
response = list_findings(opts)
|
|
933
933
|
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
|
934
934
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
935
935
|
break
|
|
936
936
|
end
|
|
937
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor",
|
|
937
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.cursor"))
|
|
938
938
|
end
|
|
939
939
|
end
|
|
940
940
|
|
|
@@ -1160,7 +1160,7 @@ module DatadogAPIClient::V2
|
|
|
1160
1160
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
1161
1161
|
break
|
|
1162
1162
|
end
|
|
1163
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor",
|
|
1163
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
|
1164
1164
|
end
|
|
1165
1165
|
end
|
|
1166
1166
|
|
|
@@ -180,7 +180,7 @@ module DatadogAPIClient::V2
|
|
|
180
180
|
if @api_client.config.client_side_validation && service_name.nil?
|
|
181
181
|
fail ArgumentError, "Missing the required parameter 'service_name' when calling ServiceDefinitionAPI.get_service_definition"
|
|
182
182
|
end
|
|
183
|
-
allowable_values = ['v1', 'v2', 'v2.1']
|
|
183
|
+
allowable_values = ['v1', 'v2', 'v2.1', 'v2.2']
|
|
184
184
|
if @api_client.config.client_side_validation && opts[:'schema_version'] && !allowable_values.include?(opts[:'schema_version'])
|
|
185
185
|
fail ArgumentError, "invalid value for \"schema_version\", must be one of #{allowable_values}"
|
|
186
186
|
end
|
|
@@ -248,7 +248,7 @@ module DatadogAPIClient::V2
|
|
|
248
248
|
if @api_client.config.debugging
|
|
249
249
|
@api_client.config.logger.debug 'Calling API: ServiceDefinitionAPI.list_service_definitions ...'
|
|
250
250
|
end
|
|
251
|
-
allowable_values = ['v1', 'v2', 'v2.1']
|
|
251
|
+
allowable_values = ['v1', 'v2', 'v2.1', 'v2.2']
|
|
252
252
|
if @api_client.config.client_side_validation && opts[:'schema_version'] && !allowable_values.include?(opts[:'schema_version'])
|
|
253
253
|
fail ArgumentError, "invalid value for \"schema_version\", must be one of #{allowable_values}"
|
|
254
254
|
end
|
|
@@ -306,14 +306,14 @@ module DatadogAPIClient::V2
|
|
|
306
306
|
def list_service_definitions_with_pagination(opts = {})
|
|
307
307
|
api_version = "V2"
|
|
308
308
|
page_size = @api_client.get_attribute_from_path(opts, "page_size", 10)
|
|
309
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_size",
|
|
309
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size)
|
|
310
310
|
while true do
|
|
311
311
|
response = list_service_definitions(opts)
|
|
312
312
|
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
|
313
313
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
314
314
|
break
|
|
315
315
|
end
|
|
316
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_number",
|
|
316
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + page_size)
|
|
317
317
|
end
|
|
318
318
|
end
|
|
319
319
|
end
|
|
@@ -287,7 +287,7 @@ module DatadogAPIClient::V2
|
|
|
287
287
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
288
288
|
break
|
|
289
289
|
end
|
|
290
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor",
|
|
290
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
|
291
291
|
end
|
|
292
292
|
end
|
|
293
293
|
end
|
|
@@ -924,6 +924,28 @@ module DatadogAPIClient::V2
|
|
|
924
924
|
return data, status_code, headers
|
|
925
925
|
end
|
|
926
926
|
|
|
927
|
+
# Get all teams.
|
|
928
|
+
#
|
|
929
|
+
# Provide a paginated version of {#list_teams}, returning all items.
|
|
930
|
+
#
|
|
931
|
+
# To use it you need to use a block: list_teams_with_pagination { |item| p item }
|
|
932
|
+
#
|
|
933
|
+
# @yield [Team] Paginated items
|
|
934
|
+
def list_teams_with_pagination(opts = {})
|
|
935
|
+
api_version = "V2"
|
|
936
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_size", 10)
|
|
937
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size)
|
|
938
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0)
|
|
939
|
+
while true do
|
|
940
|
+
response = list_teams(opts)
|
|
941
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
|
942
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
943
|
+
break
|
|
944
|
+
end
|
|
945
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1)
|
|
946
|
+
end
|
|
947
|
+
end
|
|
948
|
+
|
|
927
949
|
# Update a team.
|
|
928
950
|
#
|
|
929
951
|
# @see #update_team_with_http_info
|
|
@@ -255,7 +255,7 @@ module DatadogAPIClient::V2
|
|
|
255
255
|
# Get hourly usage by product family.
|
|
256
256
|
#
|
|
257
257
|
# @param filter_timestamp_start [Time] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
|
|
258
|
-
# @param filter_product_families [String] Comma separated list of product families to retrieve. Available families are `all`, `analyzed_logs`, `application_security`, `audit_trail`, `serverless`, `ci_app`, `cloud_cost_management`, `cspm`, `custom_events`, `cws`, `dbm`, `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, `iot`, `lambda_traced_invocations`, `logs`, `network_flows`, `network_hosts`, `observability_pipelines`, `online_archive`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, `sds`, `snmp`, `synthetics_api`, `synthetics_browser`, `synthetics_parallel_testing`, and `timeseries`. The following product family has been **deprecated**: `audit_logs`.
|
|
258
|
+
# @param filter_product_families [String] Comma separated list of product families to retrieve. Available families are `all`, `analyzed_logs`, `application_security`, `audit_trail`, `serverless`, `ci_app`, `cloud_cost_management`, `csm_container_enterprise`, `csm_host_enterprise`, `cspm`, `custom_events`, `cws`, `dbm`, `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, `iot`, `lambda_traced_invocations`, `logs`, `network_flows`, `network_hosts`, `netflow_monitoring`, `observability_pipelines`, `online_archive`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, `sds`, `snmp`, `synthetics_api`, `synthetics_browser`, `synthetics_mobile`, `synthetics_parallel_testing`, and `timeseries`. The following product family has been **deprecated**: `audit_logs`.
|
|
259
259
|
# @param opts [Hash] the optional parameters
|
|
260
260
|
# @option opts [Time] :filter_timestamp_end Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour.
|
|
261
261
|
# @option opts [Boolean] :filter_include_descendants Include child org usage in the response. Defaults to false.
|