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.
Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +6 -6
  3. data/.generator/schemas/v1/openapi.yaml +808 -143
  4. data/.generator/schemas/v2/openapi.yaml +1808 -166
  5. data/.generator/src/generator/openapi.py +3 -1
  6. data/.generator/src/generator/templates/api.j2 +8 -2
  7. data/.generator/src/generator/templates/api_client.j2 +19 -1
  8. data/.generator/src/generator/templates/model_base.j2 +1 -0
  9. data/CHANGELOG.md +56 -0
  10. data/examples/v1/dashboards/CreateDashboard_1754992756.rb +44 -0
  11. data/examples/v1/dashboards/CreateDashboard_2278756614.rb +91 -0
  12. data/examples/v1/dashboards/CreateDashboard_2618036642.rb +36 -0
  13. data/examples/v1/dashboards/CreateDashboard_2705593938.rb +3 -0
  14. data/examples/v1/dashboards/CreateDashboard_3777304439.rb +50 -0
  15. data/examples/v1/dashboards/ListDashboards_1062671515.rb +8 -0
  16. data/examples/v1/monitors/CreateMonitor_1539578087.rb +36 -0
  17. data/examples/v1/monitors/ListMonitors_2966492814.rb +8 -0
  18. data/examples/v1/notebooks/ListNotebooks_788665428.rb +8 -0
  19. data/examples/v1/service-level-objective-corrections/ListSLOCorrection_2647266873.rb +8 -0
  20. data/examples/v1/service-level-objectives/ListSLOs_3036942817.rb +8 -0
  21. data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +1 -0
  22. data/examples/v1/synthetics/CreateSyntheticsBrowserTest.rb +1 -1
  23. data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +1 -1
  24. data/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.rb +1 -1
  25. data/examples/v1/synthetics/ListTests_1938827783.rb +8 -0
  26. data/examples/v1/usage-metering/GetUsageCIApp.rb +4 -1
  27. data/examples/v1/usage-metering/GetUsageCWS.rb +4 -1
  28. data/examples/v1/usage-metering/GetUsageCloudSecurityPostureManagement.rb +1 -1
  29. data/examples/v2/apm-retention-filters/CreateApmRetentionFilter.rb +20 -0
  30. data/examples/v2/apm-retention-filters/DeleteApmRetentionFilter.rb +8 -0
  31. data/examples/v2/apm-retention-filters/GetApmRetentionFilter.rb +8 -0
  32. data/examples/v2/apm-retention-filters/ListApmRetentionFilters.rb +5 -0
  33. data/examples/v2/apm-retention-filters/ReorderApmRetentionFilters.rb +18 -0
  34. data/examples/v2/apm-retention-filters/UpdateApmRetentionFilter.rb +24 -0
  35. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +0 -3
  36. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +0 -8
  37. data/examples/v2/container-images/ListContainerImages.rb +8 -0
  38. data/examples/v2/container-images/ListContainerImages_3088586393.rb +11 -0
  39. data/examples/v2/container-images/ListContainerImages_3974828736.rb +11 -0
  40. data/examples/v2/downtimes/CancelDowntime.rb +0 -3
  41. data/examples/v2/downtimes/CreateDowntime.rb +0 -3
  42. data/examples/v2/downtimes/GetDowntime.rb +0 -3
  43. data/examples/v2/downtimes/ListDowntimes.rb +0 -3
  44. data/examples/v2/downtimes/ListDowntimes_805770330.rb +8 -0
  45. data/examples/v2/downtimes/ListMonitorDowntimes.rb +0 -3
  46. data/examples/v2/downtimes/ListMonitorDowntimes_128979780.rb +0 -3
  47. data/examples/v2/downtimes/UpdateDowntime.rb +0 -3
  48. data/examples/v2/gcp-integration/CreateGCPSTSAccount_109518525.rb +19 -0
  49. data/examples/v2/powerpack/CreatePowerpack.rb +47 -0
  50. data/examples/v2/powerpack/DeletePowerpack.rb +8 -0
  51. data/examples/v2/powerpack/GetPowerpack.rb +8 -0
  52. data/examples/v2/powerpack/ListPowerpacks.rb +8 -0
  53. data/examples/v2/powerpack/ListPowerpacks_1173755071.rb +8 -0
  54. data/examples/v2/powerpack/UpdatePowerpack.rb +50 -0
  55. data/examples/v2/rum/CreateRUMApplication.rb +1 -1
  56. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.rb +1 -1
  57. data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule_428087276.rb +1 -1
  58. data/examples/v2/service-accounts/CreateServiceAccountApplicationKey.rb +5 -7
  59. data/examples/v2/service-accounts/DeleteServiceAccountApplicationKey.rb +7 -1
  60. data/examples/v2/service-accounts/GetServiceAccountApplicationKey.rb +7 -1
  61. data/examples/v2/service-accounts/ListServiceAccountApplicationKeys.rb +4 -1
  62. data/examples/v2/service-accounts/UpdateServiceAccountApplicationKey.rb +11 -9
  63. data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +23 -12
  64. data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_2621709423.rb +53 -0
  65. data/examples/v2/teams/ListTeams_3592098458.rb +8 -0
  66. data/examples/v2/users/ListUsers_4075885358.rb +8 -0
  67. data/lib/datadog_api_client/api_client.rb +19 -1
  68. data/lib/datadog_api_client/configuration.rb +1 -7
  69. data/lib/datadog_api_client/inflector.rb +81 -0
  70. data/lib/datadog_api_client/v1/api/dashboards_api.rb +25 -0
  71. data/lib/datadog_api_client/v1/api/monitors_api.rb +23 -20
  72. data/lib/datadog_api_client/v1/api/notebooks_api.rb +21 -0
  73. data/lib/datadog_api_client/v1/api/service_level_objective_corrections_api.rb +21 -0
  74. data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +21 -0
  75. data/lib/datadog_api_client/v1/api/synthetics_api.rb +25 -3
  76. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +6 -6
  77. data/lib/datadog_api_client/v1/api/webhooks_integration_api.rb +1 -1
  78. data/lib/datadog_api_client/v1/model_base.rb +1 -0
  79. data/lib/datadog_api_client/v1/models/heat_map_widget_request.rb +35 -1
  80. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +7 -4
  81. data/lib/datadog_api_client/v1/models/ip_prefixes_global.rb +94 -0
  82. data/lib/datadog_api_client/v1/models/ip_ranges.rb +11 -1
  83. data/lib/datadog_api_client/v1/models/list_stream_source.rb +1 -0
  84. data/lib/datadog_api_client/v1/models/monitor.rb +1 -1
  85. data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
  86. data/lib/datadog_api_client/v1/models/monitor_options_custom_schedule.rb +82 -0
  87. data/lib/datadog_api_client/v1/models/monitor_options_custom_schedule_recurrence.rb +100 -0
  88. data/lib/datadog_api_client/v1/models/monitor_options_scheduling_options.rb +11 -1
  89. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +6 -0
  90. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +65 -5
  91. data/lib/datadog_api_client/v1/models/powerpack_template_variable_contents.rb +131 -0
  92. data/lib/datadog_api_client/v1/models/powerpack_template_variables.rb +94 -0
  93. data/lib/datadog_api_client/v1/models/powerpack_widget_definition.rb +169 -0
  94. data/lib/datadog_api_client/v1/models/powerpack_widget_definition_type.rb +26 -0
  95. data/lib/datadog_api_client/v1/models/split_config.rb +181 -0
  96. data/lib/datadog_api_client/v1/models/split_config_sort_compute.rb +119 -0
  97. data/lib/datadog_api_client/v1/models/split_dimension.rb +98 -0
  98. data/lib/datadog_api_client/v1/models/split_graph_source_widget_definition.rb +70 -0
  99. data/lib/datadog_api_client/v1/models/split_graph_viz_size.rb +29 -0
  100. data/lib/datadog_api_client/v1/models/split_graph_widget_definition.rb +191 -0
  101. data/lib/datadog_api_client/v1/models/split_graph_widget_definition_type.rb +26 -0
  102. data/lib/datadog_api_client/v1/models/split_sort.rb +108 -0
  103. data/lib/datadog_api_client/v1/models/split_vector_entry_item.rb +125 -0
  104. data/lib/datadog_api_client/v1/models/sunburst_widget_request.rb +14 -4
  105. data/lib/datadog_api_client/v1/models/synthetics_assertion_target.rb +11 -1
  106. data/lib/datadog_api_client/v1/models/synthetics_assertion_timings_scope.rb +27 -0
  107. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +4 -4
  108. data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_hour.rb +8 -8
  109. data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_response.rb +2 -2
  110. data/lib/datadog_api_client/v1/models/usage_profiling_hour.rb +12 -1
  111. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +168 -8
  112. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +168 -8
  113. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +168 -8
  114. data/lib/datadog_api_client/v1/models/widget_definition.rb +8 -6
  115. data/lib/datadog_api_client/v2/api/apm_retention_filters_api.rb +423 -0
  116. data/lib/datadog_api_client/v2/api/audit_api.rb +1 -1
  117. data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +5 -11
  118. data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +4 -4
  119. data/lib/datadog_api_client/v2/api/container_images_api.rb +129 -0
  120. data/lib/datadog_api_client/v2/api/downtimes_api.rb +25 -36
  121. data/lib/datadog_api_client/v2/api/events_api.rb +1 -1
  122. data/lib/datadog_api_client/v2/api/incidents_api.rb +1 -1
  123. data/lib/datadog_api_client/v2/api/logs_api.rb +1 -1
  124. data/lib/datadog_api_client/v2/api/powerpack_api.rb +383 -0
  125. data/lib/datadog_api_client/v2/api/processes_api.rb +1 -1
  126. data/lib/datadog_api_client/v2/api/rum_api.rb +1 -1
  127. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +3 -3
  128. data/lib/datadog_api_client/v2/api/service_definition_api.rb +4 -4
  129. data/lib/datadog_api_client/v2/api/spans_api.rb +1 -1
  130. data/lib/datadog_api_client/v2/api/teams_api.rb +22 -0
  131. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
  132. data/lib/datadog_api_client/v2/api/users_api.rb +22 -0
  133. data/lib/datadog_api_client/v2/model_base.rb +1 -0
  134. data/lib/datadog_api_client/v2/models/apm_retention_filter_type.rb +26 -0
  135. data/lib/datadog_api_client/v2/models/container_image.rb +100 -0
  136. data/lib/datadog_api_client/v2/models/container_image_attributes.rb +261 -0
  137. data/lib/datadog_api_client/v2/models/container_image_flavor.rb +120 -0
  138. data/lib/datadog_api_client/v2/models/container_image_group.rb +110 -0
  139. data/lib/datadog_api_client/v2/models/container_image_group_attributes.rb +100 -0
  140. data/lib/datadog_api_client/v2/models/container_image_group_images_relationships_link.rb +92 -0
  141. data/lib/datadog_api_client/v2/models/container_image_group_relationships.rb +80 -0
  142. data/lib/datadog_api_client/v2/models/container_image_group_relationships_links.rb +80 -0
  143. data/lib/datadog_api_client/v2/models/container_image_group_type.rb +26 -0
  144. data/lib/datadog_api_client/v2/models/container_image_item.rb +63 -0
  145. data/lib/datadog_api_client/v2/models/container_image_meta.rb +80 -0
  146. data/lib/datadog_api_client/v2/models/container_image_meta_page.rb +160 -0
  147. data/lib/datadog_api_client/v2/models/container_image_meta_page_type.rb +26 -0
  148. data/lib/datadog_api_client/v2/models/container_image_type.rb +26 -0
  149. data/lib/datadog_api_client/v2/models/container_image_vulnerabilities.rb +140 -0
  150. data/lib/datadog_api_client/v2/models/container_images_response.rb +102 -0
  151. data/lib/datadog_api_client/v2/models/container_images_response_links.rb +130 -0
  152. data/lib/datadog_api_client/v2/models/data_scalar_column.rb +2 -2
  153. data/lib/datadog_api_client/v2/models/downtime_relationships_monitor_data.rb +1 -1
  154. data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +13 -1
  155. data/lib/datadog_api_client/v2/models/group_scalar_column.rb +2 -2
  156. data/lib/datadog_api_client/v2/models/list_powerpacks_response.rb +114 -0
  157. data/lib/datadog_api_client/v2/models/powerpack.rb +80 -0
  158. data/lib/datadog_api_client/v2/models/powerpack_attributes.rb +164 -0
  159. data/lib/datadog_api_client/v2/models/powerpack_data.rb +110 -0
  160. data/lib/datadog_api_client/v2/models/powerpack_group_widget.rb +108 -0
  161. data/lib/datadog_api_client/v2/models/powerpack_group_widget_definition.rb +162 -0
  162. data/lib/datadog_api_client/v2/models/powerpack_group_widget_layout.rb +177 -0
  163. data/lib/datadog_api_client/v2/models/powerpack_inner_widget_layout.rb +177 -0
  164. data/lib/datadog_api_client/v2/models/powerpack_inner_widgets.rb +108 -0
  165. data/lib/datadog_api_client/v2/models/powerpack_relationships.rb +80 -0
  166. data/lib/datadog_api_client/v2/models/powerpack_response.rb +92 -0
  167. data/lib/datadog_api_client/v2/models/powerpack_response_links.rb +129 -0
  168. data/lib/datadog_api_client/v2/models/powerpack_template_variable.rb +110 -0
  169. data/lib/datadog_api_client/v2/models/powerpacks_response_meta.rb +80 -0
  170. data/lib/datadog_api_client/v2/models/powerpacks_response_meta_pagination.rb +150 -0
  171. data/lib/datadog_api_client/v2/models/reorder_retention_filters_request.rb +100 -0
  172. data/lib/datadog_api_client/v2/models/restriction_policy_binding.rb +1 -1
  173. data/lib/datadog_api_client/v2/models/retention_filter.rb +140 -0
  174. data/lib/datadog_api_client/v2/models/retention_filter_all.rb +140 -0
  175. data/lib/datadog_api_client/v2/models/retention_filter_all_attributes.rb +181 -0
  176. data/lib/datadog_api_client/v2/models/retention_filter_all_type.rb +28 -0
  177. data/lib/datadog_api_client/v2/models/retention_filter_attributes.rb +181 -0
  178. data/lib/datadog_api_client/v2/models/retention_filter_create_attributes.rb +183 -0
  179. data/lib/datadog_api_client/v2/models/retention_filter_create_data.rb +119 -0
  180. data/lib/datadog_api_client/v2/models/retention_filter_create_request.rb +98 -0
  181. data/lib/datadog_api_client/v2/models/retention_filter_response.rb +80 -0
  182. data/lib/datadog_api_client/v2/models/retention_filter_type.rb +26 -0
  183. data/lib/datadog_api_client/v2/models/retention_filter_update_data.rb +140 -0
  184. data/lib/datadog_api_client/v2/models/retention_filter_update_request.rb +98 -0
  185. data/lib/datadog_api_client/v2/models/retention_filter_without_attributes.rb +119 -0
  186. data/lib/datadog_api_client/v2/models/retention_filters_response.rb +100 -0
  187. data/lib/datadog_api_client/v2/models/scalar_column_type_group.rb +26 -0
  188. data/lib/datadog_api_client/v2/models/scalar_column_type_number.rb +26 -0
  189. data/lib/datadog_api_client/v2/models/scalar_meta.rb +8 -0
  190. data/lib/datadog_api_client/v2/models/service_definition_schema.rb +2 -1
  191. data/lib/datadog_api_client/v2/models/service_definition_schema_versions.rb +1 -0
  192. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +247 -0
  193. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_contact.rb +129 -0
  194. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_integrations.rb +90 -0
  195. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_link.rb +150 -0
  196. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_opsgenie.rb +108 -0
  197. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_opsgenie_region.rb +27 -0
  198. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_pagerduty.rb +80 -0
  199. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_type.rb +32 -0
  200. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_version.rb +26 -0
  201. data/lib/datadog_api_client/v2/models/service_definitions_create_request.rb +1 -0
  202. data/lib/datadog_api_client/v2/models/spans_filter.rb +80 -0
  203. data/lib/datadog_api_client/v2/models/spans_filter_create.rb +98 -0
  204. data/lib/datadog_api_client/version.rb +1 -1
  205. data/run-tests.sh +6 -5
  206. metadata +114 -9
  207. data/examples/v1/usage-metering/GetUsageCIApp_1064440884.rb +0 -8
  208. data/examples/v1/usage-metering/GetUsageCWS_736958514.rb +0 -8
  209. data/examples/v2/service-accounts/CreateServiceAccountApplicationKey_1761876297.rb +0 -17
  210. data/examples/v2/service-accounts/DeleteServiceAccountApplicationKey_992091161.rb +0 -11
  211. data/examples/v2/service-accounts/GetServiceAccountApplicationKey_819075131.rb +0 -11
  212. data/examples/v2/service-accounts/ListServiceAccountApplicationKeys_1268914341.rb +0 -8
  213. data/examples/v2/service-accounts/UpdateServiceAccountApplicationKey_768415790.rb +0 -22
@@ -0,0 +1,423 @@
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 APMRetentionFiltersAPI
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 retention filter.
27
+ #
28
+ # @see #create_apm_retention_filter_with_http_info
29
+ def create_apm_retention_filter(body, opts = {})
30
+ data, _status_code, _headers = create_apm_retention_filter_with_http_info(body, opts)
31
+ data
32
+ end
33
+
34
+ # Create a retention filter.
35
+ #
36
+ # Create a retention filter to index spans in your organization.
37
+ # Returns the retention filter definition when the request is successful.
38
+ #
39
+ # @param body [RetentionFilterCreateRequest] The definition of the new retention filter.
40
+ # @param opts [Hash] the optional parameters
41
+ # @return [Array<(RetentionFilterResponse, Integer, Hash)>] RetentionFilterResponse data, response status code and response headers
42
+ def create_apm_retention_filter_with_http_info(body, opts = {})
43
+
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: APMRetentionFiltersAPI.create_apm_retention_filter ...'
46
+ end
47
+ # verify the required parameter 'body' is set
48
+ if @api_client.config.client_side_validation && body.nil?
49
+ fail ArgumentError, "Missing the required parameter 'body' when calling APMRetentionFiltersAPI.create_apm_retention_filter"
50
+ end
51
+ # resource path
52
+ local_var_path = '/api/v2/apm/config/retention-filters'
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
61
+ # HTTP header 'Content-Type'
62
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+
67
+ # http body (model)
68
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
69
+
70
+ # return_type
71
+ return_type = opts[:debug_return_type] || 'RetentionFilterResponse'
72
+
73
+ # auth_names
74
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
75
+
76
+ new_options = opts.merge(
77
+ :operation => :create_apm_retention_filter,
78
+ :header_params => header_params,
79
+ :query_params => query_params,
80
+ :form_params => form_params,
81
+ :body => post_body,
82
+ :auth_names => auth_names,
83
+ :return_type => return_type,
84
+ :api_version => "V2"
85
+ )
86
+
87
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
88
+ if @api_client.config.debugging
89
+ @api_client.config.logger.debug "API called: APMRetentionFiltersAPI#create_apm_retention_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
90
+ end
91
+ return data, status_code, headers
92
+ end
93
+
94
+ # Delete a retention filter.
95
+ #
96
+ # @see #delete_apm_retention_filter_with_http_info
97
+ def delete_apm_retention_filter(filter_id, opts = {})
98
+ delete_apm_retention_filter_with_http_info(filter_id, opts)
99
+ nil
100
+ end
101
+
102
+ # Delete a retention filter.
103
+ #
104
+ # Delete a specific retention filter from your organization.
105
+ #
106
+ # @param filter_id [String] The ID of the retention filter.
107
+ # @param opts [Hash] the optional parameters
108
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
109
+ def delete_apm_retention_filter_with_http_info(filter_id, opts = {})
110
+
111
+ if @api_client.config.debugging
112
+ @api_client.config.logger.debug 'Calling API: APMRetentionFiltersAPI.delete_apm_retention_filter ...'
113
+ end
114
+ # verify the required parameter 'filter_id' is set
115
+ if @api_client.config.client_side_validation && filter_id.nil?
116
+ fail ArgumentError, "Missing the required parameter 'filter_id' when calling APMRetentionFiltersAPI.delete_apm_retention_filter"
117
+ end
118
+ # resource path
119
+ local_var_path = '/api/v2/apm/config/retention-filters/{filter_id}'.sub('{filter_id}', CGI.escape(filter_id.to_s).gsub('%2F', '/'))
120
+
121
+ # query parameters
122
+ query_params = opts[:query_params] || {}
123
+
124
+ # header parameters
125
+ header_params = opts[:header_params] || {}
126
+ # HTTP header 'Accept' (if needed)
127
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
128
+
129
+ # form parameters
130
+ form_params = opts[:form_params] || {}
131
+
132
+ # http body (model)
133
+ post_body = opts[:debug_body]
134
+
135
+ # return_type
136
+ return_type = opts[:debug_return_type]
137
+
138
+ # auth_names
139
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
140
+
141
+ new_options = opts.merge(
142
+ :operation => :delete_apm_retention_filter,
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => return_type,
149
+ :api_version => "V2"
150
+ )
151
+
152
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
153
+ if @api_client.config.debugging
154
+ @api_client.config.logger.debug "API called: APMRetentionFiltersAPI#delete_apm_retention_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
155
+ end
156
+ return data, status_code, headers
157
+ end
158
+
159
+ # Get a given APM retention filter.
160
+ #
161
+ # @see #get_apm_retention_filter_with_http_info
162
+ def get_apm_retention_filter(filter_id, opts = {})
163
+ data, _status_code, _headers = get_apm_retention_filter_with_http_info(filter_id, opts)
164
+ data
165
+ end
166
+
167
+ # Get a given APM retention filter.
168
+ #
169
+ # Get an APM retention filter.
170
+ #
171
+ # @param filter_id [String] The ID of the retention filter.
172
+ # @param opts [Hash] the optional parameters
173
+ # @return [Array<(RetentionFilterResponse, Integer, Hash)>] RetentionFilterResponse data, response status code and response headers
174
+ def get_apm_retention_filter_with_http_info(filter_id, opts = {})
175
+
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug 'Calling API: APMRetentionFiltersAPI.get_apm_retention_filter ...'
178
+ end
179
+ # verify the required parameter 'filter_id' is set
180
+ if @api_client.config.client_side_validation && filter_id.nil?
181
+ fail ArgumentError, "Missing the required parameter 'filter_id' when calling APMRetentionFiltersAPI.get_apm_retention_filter"
182
+ end
183
+ # resource path
184
+ local_var_path = '/api/v2/apm/config/retention-filters/{filter_id}'.sub('{filter_id}', CGI.escape(filter_id.to_s).gsub('%2F', '/'))
185
+
186
+ # query parameters
187
+ query_params = opts[:query_params] || {}
188
+
189
+ # header parameters
190
+ header_params = opts[:header_params] || {}
191
+ # HTTP header 'Accept' (if needed)
192
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
193
+
194
+ # form parameters
195
+ form_params = opts[:form_params] || {}
196
+
197
+ # http body (model)
198
+ post_body = opts[:debug_body]
199
+
200
+ # return_type
201
+ return_type = opts[:debug_return_type] || 'RetentionFilterResponse'
202
+
203
+ # auth_names
204
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
205
+
206
+ new_options = opts.merge(
207
+ :operation => :get_apm_retention_filter,
208
+ :header_params => header_params,
209
+ :query_params => query_params,
210
+ :form_params => form_params,
211
+ :body => post_body,
212
+ :auth_names => auth_names,
213
+ :return_type => return_type,
214
+ :api_version => "V2"
215
+ )
216
+
217
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
218
+ if @api_client.config.debugging
219
+ @api_client.config.logger.debug "API called: APMRetentionFiltersAPI#get_apm_retention_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
220
+ end
221
+ return data, status_code, headers
222
+ end
223
+
224
+ # List all APM retention filters.
225
+ #
226
+ # @see #list_apm_retention_filters_with_http_info
227
+ def list_apm_retention_filters(opts = {})
228
+ data, _status_code, _headers = list_apm_retention_filters_with_http_info(opts)
229
+ data
230
+ end
231
+
232
+ # List all APM retention filters.
233
+ #
234
+ # Get the list of APM retention filters.
235
+ #
236
+ # @param opts [Hash] the optional parameters
237
+ # @return [Array<(RetentionFiltersResponse, Integer, Hash)>] RetentionFiltersResponse data, response status code and response headers
238
+ def list_apm_retention_filters_with_http_info(opts = {})
239
+
240
+ if @api_client.config.debugging
241
+ @api_client.config.logger.debug 'Calling API: APMRetentionFiltersAPI.list_apm_retention_filters ...'
242
+ end
243
+ # resource path
244
+ local_var_path = '/api/v2/apm/config/retention-filters'
245
+
246
+ # query parameters
247
+ query_params = opts[:query_params] || {}
248
+
249
+ # header parameters
250
+ header_params = opts[:header_params] || {}
251
+ # HTTP header 'Accept' (if needed)
252
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
253
+
254
+ # form parameters
255
+ form_params = opts[:form_params] || {}
256
+
257
+ # http body (model)
258
+ post_body = opts[:debug_body]
259
+
260
+ # return_type
261
+ return_type = opts[:debug_return_type] || 'RetentionFiltersResponse'
262
+
263
+ # auth_names
264
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
265
+
266
+ new_options = opts.merge(
267
+ :operation => :list_apm_retention_filters,
268
+ :header_params => header_params,
269
+ :query_params => query_params,
270
+ :form_params => form_params,
271
+ :body => post_body,
272
+ :auth_names => auth_names,
273
+ :return_type => return_type,
274
+ :api_version => "V2"
275
+ )
276
+
277
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
278
+ if @api_client.config.debugging
279
+ @api_client.config.logger.debug "API called: APMRetentionFiltersAPI#list_apm_retention_filters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
280
+ end
281
+ return data, status_code, headers
282
+ end
283
+
284
+ # Re-order retention filters.
285
+ #
286
+ # @see #reorder_apm_retention_filters_with_http_info
287
+ def reorder_apm_retention_filters(body, opts = {})
288
+ reorder_apm_retention_filters_with_http_info(body, opts)
289
+ nil
290
+ end
291
+
292
+ # Re-order retention filters.
293
+ #
294
+ # Re-order the execution order of retention filters.
295
+ #
296
+ # @param body [ReorderRetentionFiltersRequest] The list of retention filters in the new order.
297
+ # @param opts [Hash] the optional parameters
298
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
299
+ def reorder_apm_retention_filters_with_http_info(body, opts = {})
300
+
301
+ if @api_client.config.debugging
302
+ @api_client.config.logger.debug 'Calling API: APMRetentionFiltersAPI.reorder_apm_retention_filters ...'
303
+ end
304
+ # verify the required parameter 'body' is set
305
+ if @api_client.config.client_side_validation && body.nil?
306
+ fail ArgumentError, "Missing the required parameter 'body' when calling APMRetentionFiltersAPI.reorder_apm_retention_filters"
307
+ end
308
+ # resource path
309
+ local_var_path = '/api/v2/apm/config/retention-filters-execution-order'
310
+
311
+ # query parameters
312
+ query_params = opts[:query_params] || {}
313
+
314
+ # header parameters
315
+ header_params = opts[:header_params] || {}
316
+ # HTTP header 'Accept' (if needed)
317
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
318
+ # HTTP header 'Content-Type'
319
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
320
+
321
+ # form parameters
322
+ form_params = opts[:form_params] || {}
323
+
324
+ # http body (model)
325
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
326
+
327
+ # return_type
328
+ return_type = opts[:debug_return_type]
329
+
330
+ # auth_names
331
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
332
+
333
+ new_options = opts.merge(
334
+ :operation => :reorder_apm_retention_filters,
335
+ :header_params => header_params,
336
+ :query_params => query_params,
337
+ :form_params => form_params,
338
+ :body => post_body,
339
+ :auth_names => auth_names,
340
+ :return_type => return_type,
341
+ :api_version => "V2"
342
+ )
343
+
344
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options)
345
+ if @api_client.config.debugging
346
+ @api_client.config.logger.debug "API called: APMRetentionFiltersAPI#reorder_apm_retention_filters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
347
+ end
348
+ return data, status_code, headers
349
+ end
350
+
351
+ # Update a retention filter.
352
+ #
353
+ # @see #update_apm_retention_filter_with_http_info
354
+ def update_apm_retention_filter(filter_id, body, opts = {})
355
+ data, _status_code, _headers = update_apm_retention_filter_with_http_info(filter_id, body, opts)
356
+ data
357
+ end
358
+
359
+ # Update a retention filter.
360
+ #
361
+ # Update a retention filter from your organization.
362
+ #
363
+ # @param filter_id [String] The ID of the retention filter.
364
+ # @param body [RetentionFilterUpdateRequest] The updated definition of the retention filter.
365
+ # @param opts [Hash] the optional parameters
366
+ # @return [Array<(RetentionFilterResponse, Integer, Hash)>] RetentionFilterResponse data, response status code and response headers
367
+ def update_apm_retention_filter_with_http_info(filter_id, body, opts = {})
368
+
369
+ if @api_client.config.debugging
370
+ @api_client.config.logger.debug 'Calling API: APMRetentionFiltersAPI.update_apm_retention_filter ...'
371
+ end
372
+ # verify the required parameter 'filter_id' is set
373
+ if @api_client.config.client_side_validation && filter_id.nil?
374
+ fail ArgumentError, "Missing the required parameter 'filter_id' when calling APMRetentionFiltersAPI.update_apm_retention_filter"
375
+ end
376
+ # verify the required parameter 'body' is set
377
+ if @api_client.config.client_side_validation && body.nil?
378
+ fail ArgumentError, "Missing the required parameter 'body' when calling APMRetentionFiltersAPI.update_apm_retention_filter"
379
+ end
380
+ # resource path
381
+ local_var_path = '/api/v2/apm/config/retention-filters/{filter_id}'.sub('{filter_id}', CGI.escape(filter_id.to_s).gsub('%2F', '/'))
382
+
383
+ # query parameters
384
+ query_params = opts[:query_params] || {}
385
+
386
+ # header parameters
387
+ header_params = opts[:header_params] || {}
388
+ # HTTP header 'Accept' (if needed)
389
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
390
+ # HTTP header 'Content-Type'
391
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
392
+
393
+ # form parameters
394
+ form_params = opts[:form_params] || {}
395
+
396
+ # http body (model)
397
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
398
+
399
+ # return_type
400
+ return_type = opts[:debug_return_type] || 'RetentionFilterResponse'
401
+
402
+ # auth_names
403
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
404
+
405
+ new_options = opts.merge(
406
+ :operation => :update_apm_retention_filter,
407
+ :header_params => header_params,
408
+ :query_params => query_params,
409
+ :form_params => form_params,
410
+ :body => post_body,
411
+ :auth_names => auth_names,
412
+ :return_type => return_type,
413
+ :api_version => "V2"
414
+ )
415
+
416
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options)
417
+ if @api_client.config.debugging
418
+ @api_client.config.logger.debug "API called: APMRetentionFiltersAPI#update_apm_retention_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
419
+ end
420
+ return data, status_code, headers
421
+ end
422
+ end
423
+ end
@@ -124,7 +124,7 @@ module DatadogAPIClient::V2
124
124
  if @api_client.get_attribute_from_path(response, "data").length < page_size
125
125
  break
126
126
  end
127
- @api_client.set_attribute_from_path(api_version, opts, "page_cursor", Integer, @api_client.get_attribute_from_path(response, "meta.page.after"))
127
+ @api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
128
128
  end
129
129
  end
130
130
 
@@ -70,7 +70,7 @@ module DatadogAPIClient::V2
70
70
  return_type = opts[:debug_return_type] || 'CIAppPipelinesAnalyticsAggregateResponse'
71
71
 
72
72
  # auth_names
73
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
73
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
74
74
 
75
75
  new_options = opts.merge(
76
76
  :operation => :aggregate_ci_app_pipeline_events,
@@ -108,12 +108,6 @@ module DatadogAPIClient::V2
108
108
  # @param opts [Hash] the optional parameters
109
109
  # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
110
110
  def create_ci_app_pipeline_event_with_http_info(body, opts = {})
111
- unstable_enabled = @api_client.config.unstable_operations["v2.create_ci_app_pipeline_event".to_sym]
112
- if unstable_enabled
113
- @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_ci_app_pipeline_event")
114
- else
115
- raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_ci_app_pipeline_event"))
116
- end
117
111
 
118
112
  if @api_client.config.debugging
119
113
  @api_client.config.logger.debug 'Calling API: CIVisibilityPipelinesAPI.create_ci_app_pipeline_event ...'
@@ -145,7 +139,7 @@ module DatadogAPIClient::V2
145
139
  return_type = opts[:debug_return_type] || 'Object'
146
140
 
147
141
  # auth_names
148
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
142
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth]
149
143
 
150
144
  new_options = opts.merge(
151
145
  :operation => :create_ci_app_pipeline_event,
@@ -227,7 +221,7 @@ module DatadogAPIClient::V2
227
221
  return_type = opts[:debug_return_type] || 'CIAppPipelineEventsResponse'
228
222
 
229
223
  # auth_names
230
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
224
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
231
225
 
232
226
  new_options = opts.merge(
233
227
  :operation => :list_ci_app_pipeline_events,
@@ -264,7 +258,7 @@ module DatadogAPIClient::V2
264
258
  if @api_client.get_attribute_from_path(response, "data").length < page_size
265
259
  break
266
260
  end
267
- @api_client.set_attribute_from_path(api_version, opts, "page_cursor", Integer, @api_client.get_attribute_from_path(response, "meta.page.after"))
261
+ @api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
268
262
  end
269
263
  end
270
264
 
@@ -314,7 +308,7 @@ module DatadogAPIClient::V2
314
308
  return_type = opts[:debug_return_type] || 'CIAppPipelineEventsResponse'
315
309
 
316
310
  # auth_names
317
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
311
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
318
312
 
319
313
  new_options = opts.merge(
320
314
  :operation => :search_ci_app_pipeline_events,
@@ -70,7 +70,7 @@ module DatadogAPIClient::V2
70
70
  return_type = opts[:debug_return_type] || 'CIAppTestsAnalyticsAggregateResponse'
71
71
 
72
72
  # auth_names
73
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
73
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
74
74
 
75
75
  new_options = opts.merge(
76
76
  :operation => :aggregate_ci_app_test_events,
@@ -152,7 +152,7 @@ module DatadogAPIClient::V2
152
152
  return_type = opts[:debug_return_type] || 'CIAppTestEventsResponse'
153
153
 
154
154
  # auth_names
155
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
155
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
156
156
 
157
157
  new_options = opts.merge(
158
158
  :operation => :list_ci_app_test_events,
@@ -189,7 +189,7 @@ module DatadogAPIClient::V2
189
189
  if @api_client.get_attribute_from_path(response, "data").length < page_size
190
190
  break
191
191
  end
192
- @api_client.set_attribute_from_path(api_version, opts, "page_cursor", Integer, @api_client.get_attribute_from_path(response, "meta.page.after"))
192
+ @api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
193
193
  end
194
194
  end
195
195
 
@@ -239,7 +239,7 @@ module DatadogAPIClient::V2
239
239
  return_type = opts[:debug_return_type] || 'CIAppTestEventsResponse'
240
240
 
241
241
  # auth_names
242
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
242
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
243
243
 
244
244
  new_options = opts.merge(
245
245
  :operation => :search_ci_app_test_events,
@@ -0,0 +1,129 @@
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 ContainerImagesAPI
20
+ attr_accessor :api_client
21
+
22
+ def initialize(api_client = DatadogAPIClient::APIClient.default)
23
+ @api_client = api_client
24
+ end
25
+
26
+ # Get all Container Images.
27
+ #
28
+ # @see #list_container_images_with_http_info
29
+ def list_container_images(opts = {})
30
+ data, _status_code, _headers = list_container_images_with_http_info(opts)
31
+ data
32
+ end
33
+
34
+ # Get all Container Images.
35
+ #
36
+ # Get all Container Images for your organization.
37
+ #
38
+ # @param opts [Hash] the optional parameters
39
+ # @option opts [String] :filter_tags Comma-separated list of tags to filter Container Images by.
40
+ # @option opts [String] :group_by Comma-separated list of tags to group Container Images by.
41
+ # @option opts [String] :sort Attribute to sort Container Images by.
42
+ # @option opts [Integer] :page_size Maximum number of results returned.
43
+ # @option opts [String] :page_cursor String to query the next page of results. This key is provided with each valid response from the API in `meta.pagination.next_cursor`.
44
+ # @return [Array<(ContainerImagesResponse, Integer, Hash)>] ContainerImagesResponse data, response status code and response headers
45
+ def list_container_images_with_http_info(opts = {})
46
+ unstable_enabled = @api_client.config.unstable_operations["v2.list_container_images".to_sym]
47
+ if unstable_enabled
48
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_container_images")
49
+ else
50
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_container_images"))
51
+ end
52
+
53
+ if @api_client.config.debugging
54
+ @api_client.config.logger.debug 'Calling API: ContainerImagesAPI.list_container_images ...'
55
+ end
56
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
57
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ContainerImagesAPI.list_container_images, must be smaller than or equal to 10000.'
58
+ end
59
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
60
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ContainerImagesAPI.list_container_images, must be greater than or equal to 1.'
61
+ end
62
+ # resource path
63
+ local_var_path = '/api/v2/container_images'
64
+
65
+ # query parameters
66
+ query_params = opts[:query_params] || {}
67
+ query_params[:'filter[tags]'] = opts[:'filter_tags'] if !opts[:'filter_tags'].nil?
68
+ query_params[:'group_by'] = opts[:'group_by'] if !opts[:'group_by'].nil?
69
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
70
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
71
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
72
+
73
+ # header parameters
74
+ header_params = opts[:header_params] || {}
75
+ # HTTP header 'Accept' (if needed)
76
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
77
+
78
+ # form parameters
79
+ form_params = opts[:form_params] || {}
80
+
81
+ # http body (model)
82
+ post_body = opts[:debug_body]
83
+
84
+ # return_type
85
+ return_type = opts[:debug_return_type] || 'ContainerImagesResponse'
86
+
87
+ # auth_names
88
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
89
+
90
+ new_options = opts.merge(
91
+ :operation => :list_container_images,
92
+ :header_params => header_params,
93
+ :query_params => query_params,
94
+ :form_params => form_params,
95
+ :body => post_body,
96
+ :auth_names => auth_names,
97
+ :return_type => return_type,
98
+ :api_version => "V2"
99
+ )
100
+
101
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug "API called: ContainerImagesAPI#list_container_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
104
+ end
105
+ return data, status_code, headers
106
+ end
107
+
108
+ # Get all Container Images.
109
+ #
110
+ # Provide a paginated version of {#list_container_images}, returning all items.
111
+ #
112
+ # To use it you need to use a block: list_container_images_with_pagination { |item| p item }
113
+ #
114
+ # @yield [ContainerImageItem] Paginated items
115
+ def list_container_images_with_pagination(opts = {})
116
+ api_version = "V2"
117
+ page_size = @api_client.get_attribute_from_path(opts, "page_size", 1000)
118
+ @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size)
119
+ while true do
120
+ response = list_container_images(opts)
121
+ @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
122
+ if @api_client.get_attribute_from_path(response, "data").length < page_size
123
+ break
124
+ end
125
+ @api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.pagination.next_cursor"))
126
+ end
127
+ end
128
+ end
129
+ end