datadog_api_client 2.20.0 → 2.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/conftest.py +5 -0
  4. data/.generator/schemas/v1/openapi.yaml +333 -128
  5. data/.generator/schemas/v2/openapi.yaml +2450 -131
  6. data/CHANGELOG.md +28 -0
  7. data/examples/v1/gcp-integration/CreateGCPIntegration.rb +3 -0
  8. data/examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.rb +25 -0
  9. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +29 -0
  10. data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -0
  11. data/examples/v2/case-management/ArchiveCase.rb +14 -0
  12. data/examples/v2/case-management/AssignCase.rb +20 -0
  13. data/examples/v2/case-management/CreateCase.rb +33 -0
  14. data/examples/v2/case-management/CreateProject.rb +15 -0
  15. data/examples/v2/case-management/DeleteProject.rb +5 -0
  16. data/examples/v2/case-management/GetCase.rb +8 -0
  17. data/examples/v2/case-management/GetProject.rb +5 -0
  18. data/examples/v2/case-management/GetProjects.rb +5 -0
  19. data/examples/v2/case-management/SearchCases.rb +5 -0
  20. data/examples/v2/case-management/SearchCases_3433960044.rb +5 -0
  21. data/examples/v2/case-management/UnarchiveCase.rb +14 -0
  22. data/examples/v2/case-management/UnassignCase.rb +14 -0
  23. data/examples/v2/case-management/UpdatePriority.rb +17 -0
  24. data/examples/v2/case-management/UpdateStatus.rb +17 -0
  25. data/examples/v2/cloud-workload-security/CreateCSMThreatsAgentRule.rb +17 -0
  26. data/examples/v2/cloud-workload-security/DeleteCSMThreatsAgentRule.rb +8 -0
  27. data/examples/v2/cloud-workload-security/DownloadCSMThreatsPolicy.rb +5 -0
  28. data/examples/v2/cloud-workload-security/GetCSMThreatsAgentRule.rb +8 -0
  29. data/examples/v2/cloud-workload-security/ListCSMThreatsAgentRules.rb +5 -0
  30. data/examples/v2/cloud-workload-security/UpdateCSMThreatsAgentRule.rb +20 -0
  31. data/examples/v2/dora-metrics/CreateDORAIncident.rb +6 -3
  32. data/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.rb +18 -0
  33. data/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.rb +21 -0
  34. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination.rb +31 -0
  35. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1091442807.rb +31 -0
  36. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1288180912.rb +27 -0
  37. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_141236188.rb +32 -0
  38. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2184123765.rb +31 -0
  39. data/examples/v2/logs-custom-destinations/DeleteLogsCustomDestination.rb +8 -0
  40. data/examples/v2/logs-custom-destinations/GetLogsCustomDestination.rb +8 -0
  41. data/examples/v2/logs-custom-destinations/ListLogsCustomDestinations.rb +5 -0
  42. data/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.rb +18 -0
  43. data/examples/v2/metrics/ListMetricAssets.rb +5 -0
  44. data/lib/datadog_api_client/inflector.rb +112 -0
  45. data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -3
  46. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +5 -5
  47. data/lib/datadog_api_client/v1/models/gcp_account.rb +14 -1
  48. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +6 -0
  49. data/lib/datadog_api_client/v1/models/monitor_formula_and_function_events_data_source.rb +1 -0
  50. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +8 -0
  51. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +84 -4
  52. data/lib/datadog_api_client/v1/models/synthetics_api_step_subtype.rb +1 -0
  53. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
  54. data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +1 -1
  55. data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +2 -0
  56. data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +2 -0
  57. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +81 -1
  58. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +83 -3
  59. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +182 -102
  60. data/lib/datadog_api_client/v2/api/case_management_api.rb +942 -0
  61. data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +2 -2
  62. data/lib/datadog_api_client/v2/api/cloud_workload_security_api.rb +392 -0
  63. data/lib/datadog_api_client/v2/api/incident_services_api.rb +15 -0
  64. data/lib/datadog_api_client/v2/api/logs_custom_destinations_api.rb +355 -0
  65. data/lib/datadog_api_client/v2/api/metrics_api.rb +69 -1
  66. data/lib/datadog_api_client/v2/api/service_definition_api.rb +2 -1
  67. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +3 -3
  68. data/lib/datadog_api_client/v2/models/case.rb +150 -0
  69. data/lib/datadog_api_client/v2/models/case3rd_party_ticket_status.rb +28 -0
  70. data/lib/datadog_api_client/v2/models/case_assign.rb +119 -0
  71. data/lib/datadog_api_client/v2/models/case_assign_attributes.rb +98 -0
  72. data/lib/datadog_api_client/v2/models/case_assign_request.rb +98 -0
  73. data/lib/datadog_api_client/v2/models/case_attributes.rb +202 -0
  74. data/lib/datadog_api_client/v2/models/case_create.rb +129 -0
  75. data/lib/datadog_api_client/v2/models/case_create_attributes.rb +139 -0
  76. data/lib/datadog_api_client/v2/models/case_create_relationships.rb +116 -0
  77. data/lib/datadog_api_client/v2/models/case_create_request.rb +98 -0
  78. data/lib/datadog_api_client/v2/models/case_empty.rb +98 -0
  79. data/lib/datadog_api_client/v2/models/case_empty_request.rb +98 -0
  80. data/lib/datadog_api_client/v2/models/case_priority.rb +31 -0
  81. data/lib/datadog_api_client/v2/models/case_relationships.rb +120 -0
  82. data/lib/datadog_api_client/v2/models/case_resource_type.rb +26 -0
  83. data/lib/datadog_api_client/v2/models/case_response.rb +80 -0
  84. data/lib/datadog_api_client/v2/models/case_sortable_field.rb +28 -0
  85. data/lib/datadog_api_client/v2/models/case_status.rb +28 -0
  86. data/lib/datadog_api_client/v2/models/case_type.rb +26 -0
  87. data/lib/datadog_api_client/v2/models/case_update_priority.rb +119 -0
  88. data/lib/datadog_api_client/v2/models/case_update_priority_attributes.rb +98 -0
  89. data/lib/datadog_api_client/v2/models/case_update_priority_request.rb +98 -0
  90. data/lib/datadog_api_client/v2/models/case_update_status.rb +119 -0
  91. data/lib/datadog_api_client/v2/models/case_update_status_attributes.rb +98 -0
  92. data/lib/datadog_api_client/v2/models/case_update_status_request.rb +98 -0
  93. data/lib/datadog_api_client/v2/models/cases_response.rb +92 -0
  94. data/lib/datadog_api_client/v2/models/cases_response_meta.rb +80 -0
  95. data/lib/datadog_api_client/v2/models/cases_response_meta_pagination.rb +100 -0
  96. data/lib/datadog_api_client/v2/models/ci_app_aggregate_sort.rb +1 -1
  97. data/lib/datadog_api_client/v2/models/ci_app_pipelines_group_by.rb +1 -1
  98. data/lib/datadog_api_client/v2/models/ci_app_tests_group_by.rb +1 -1
  99. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +90 -0
  100. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +21 -1
  101. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_kill.rb +80 -0
  102. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_data.rb +11 -1
  103. data/lib/datadog_api_client/v2/models/custom_destination_attribute_tags_restriction_list_type.rb +31 -0
  104. data/lib/datadog_api_client/v2/models/custom_destination_create_request.rb +80 -0
  105. data/lib/datadog_api_client/v2/models/custom_destination_create_request_attributes.rb +193 -0
  106. data/lib/datadog_api_client/v2/models/custom_destination_create_request_definition.rb +119 -0
  107. data/lib/datadog_api_client/v2/models/custom_destination_elasticsearch_destination_auth.rb +119 -0
  108. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination.rb +64 -0
  109. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch.rb +181 -0
  110. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch_type.rb +26 -0
  111. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http.rb +141 -0
  112. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http_type.rb +26 -0
  113. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb +141 -0
  114. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk_type.rb +26 -0
  115. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth.rb +63 -0
  116. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic.rb +140 -0
  117. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic_type.rb +26 -0
  118. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header.rb +140 -0
  119. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header_type.rb +26 -0
  120. data/lib/datadog_api_client/v2/models/custom_destination_response.rb +80 -0
  121. data/lib/datadog_api_client/v2/models/custom_destination_response_attributes.rb +171 -0
  122. data/lib/datadog_api_client/v2/models/custom_destination_response_definition.rb +100 -0
  123. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination.rb +64 -0
  124. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch.rb +181 -0
  125. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch_type.rb +26 -0
  126. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http.rb +141 -0
  127. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http_type.rb +26 -0
  128. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb +120 -0
  129. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk_type.rb +26 -0
  130. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth.rb +63 -0
  131. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic.rb +98 -0
  132. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic_type.rb +26 -0
  133. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header.rb +119 -0
  134. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header_type.rb +26 -0
  135. data/lib/datadog_api_client/v2/models/custom_destination_type.rb +26 -0
  136. data/lib/datadog_api_client/v2/models/custom_destination_update_request.rb +80 -0
  137. data/lib/datadog_api_client/v2/models/custom_destination_update_request_attributes.rb +169 -0
  138. data/lib/datadog_api_client/v2/models/custom_destination_update_request_definition.rb +129 -0
  139. data/lib/datadog_api_client/v2/models/custom_destinations_response.rb +82 -0
  140. data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +21 -20
  141. data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +14 -1
  142. data/lib/datadog_api_client/v2/models/jira_issue.rb +90 -0
  143. data/lib/datadog_api_client/v2/models/jira_issue_result.rb +110 -0
  144. data/lib/datadog_api_client/v2/models/logs_archive_integration_gcs.rb +1 -12
  145. data/lib/datadog_api_client/v2/models/metric_asset_attributes.rb +80 -0
  146. data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationship.rb +90 -0
  147. data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationships.rb +82 -0
  148. data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationship.rb +90 -0
  149. data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationships.rb +82 -0
  150. data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationship.rb +90 -0
  151. data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationships.rb +82 -0
  152. data/lib/datadog_api_client/v2/models/metric_asset_response_data.rb +129 -0
  153. data/lib/datadog_api_client/v2/models/metric_asset_response_included.rb +65 -0
  154. data/lib/datadog_api_client/v2/models/metric_asset_response_relationships.rb +110 -0
  155. data/lib/datadog_api_client/v2/models/metric_asset_slo_relationship.rb +90 -0
  156. data/lib/datadog_api_client/v2/models/metric_asset_slo_relationships.rb +82 -0
  157. data/lib/datadog_api_client/v2/models/metric_assets_response.rb +92 -0
  158. data/lib/datadog_api_client/v2/models/metric_dashboard_asset.rb +129 -0
  159. data/lib/datadog_api_client/v2/models/metric_dashboard_attributes.rb +112 -0
  160. data/lib/datadog_api_client/v2/models/metric_dashboard_type.rb +26 -0
  161. data/lib/datadog_api_client/v2/models/metric_monitor_asset.rb +129 -0
  162. data/lib/datadog_api_client/v2/models/metric_monitor_type.rb +26 -0
  163. data/lib/datadog_api_client/v2/models/metric_notebook_asset.rb +129 -0
  164. data/lib/datadog_api_client/v2/models/metric_notebook_type.rb +26 -0
  165. data/lib/datadog_api_client/v2/models/metric_slo_asset.rb +129 -0
  166. data/lib/datadog_api_client/v2/models/metric_slo_type.rb +26 -0
  167. data/lib/datadog_api_client/v2/models/nullable_user_relationship.rb +88 -0
  168. data/lib/datadog_api_client/v2/models/nullable_user_relationship_data.rb +119 -0
  169. data/lib/datadog_api_client/v2/models/project.rb +150 -0
  170. data/lib/datadog_api_client/v2/models/project_attributes.rb +90 -0
  171. data/lib/datadog_api_client/v2/models/project_create.rb +119 -0
  172. data/lib/datadog_api_client/v2/models/project_create_attributes.rb +119 -0
  173. data/lib/datadog_api_client/v2/models/project_create_request.rb +98 -0
  174. data/lib/datadog_api_client/v2/models/project_relationship.rb +98 -0
  175. data/lib/datadog_api_client/v2/models/project_relationship_data.rb +119 -0
  176. data/lib/datadog_api_client/v2/models/project_relationships.rb +90 -0
  177. data/lib/datadog_api_client/v2/models/project_resource_type.rb +26 -0
  178. data/lib/datadog_api_client/v2/models/project_response.rb +80 -0
  179. data/lib/datadog_api_client/v2/models/projects_response.rb +82 -0
  180. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +1 -1
  181. data/lib/datadog_api_client/v2/models/service_now_ticket.rb +90 -0
  182. data/lib/datadog_api_client/v2/models/service_now_ticket_result.rb +80 -0
  183. data/lib/datadog_api_client/v2/models/user_relationship_data.rb +119 -0
  184. data/lib/datadog_api_client/v2/models/user_resource_type.rb +26 -0
  185. data/lib/datadog_api_client/v2/models/user_team_included.rb +62 -0
  186. data/lib/datadog_api_client/v2/models/user_team_response.rb +16 -4
  187. data/lib/datadog_api_client/v2/models/users_relationship.rb +100 -0
  188. data/lib/datadog_api_client/version.rb +1 -1
  189. metadata +147 -2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.21.0 / 2024-03-13
4
+
5
+ ### Fixed
6
+ * Move under common tag Case Management by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1728
7
+ * Include user data with team membership resource by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1724
8
+ * Disable additionalProperties for Downtime Schedule UpdateRequest oneOfs by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1733
9
+ * Fix ListServiceDefinitions pagination information by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1756
10
+ ### Added
11
+ * Case Management Public API documentation by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1708
12
+ * Make grpc steps available for synthetics api multisteps tests by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1727
13
+ * Add cloud run filter to GCP v1 and v2 spec by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1705
14
+ * add ASM serverless to usage metering API docs by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1736
15
+ * Add new products to usage API docs by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1739
16
+ * Adds support for `ListMetricAssets` endpoint by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1745
17
+ * Add support for new CRUD agent rules endpoints by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1751
18
+ * Add documentation for workflow usage attribution by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1757
19
+ * Add Custom Destinations Public API by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1761
20
+ ### Changed
21
+ * Update spec for DORA Metrics Incident endpoint by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1725
22
+ ### Deprecated
23
+ * Deprecate the pattern property for SDS Standard Pattern Attributes by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1752
24
+ * Deprecate Incident Services endpoints by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1763
25
+
26
+ ## New Contributors
27
+ * @antonio-ramadas-dd made their first contribution in https://github.com/DataDog/datadog-api-client-ruby/pull/1760
28
+
29
+ **Full Changelog**: https://github.com/DataDog/datadog-api-client-ruby/compare/v2.20.0...v2.21.0
30
+
3
31
  ## 2.20.0 / 2024-02-06
4
32
 
5
33
  ### Fixed
@@ -10,6 +10,9 @@ body = DatadogAPIClient::V1::GCPAccount.new({
10
10
  client_id: "163662907116366290710",
11
11
  client_x509_cert_url: "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
12
12
  host_filters: "key:value,filter:example",
13
+ cloud_run_revision_filters: [
14
+ "dr:dre",
15
+ ],
13
16
  is_cspm_enabled: true,
14
17
  is_security_command_center_enabled: true,
15
18
  private_key: "private_key",
@@ -0,0 +1,25 @@
1
+ # Update a GCP integration cloud run revision filters returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V1::GCPIntegrationAPI.new
5
+
6
+ body = DatadogAPIClient::V1::GCPAccount.new({
7
+ auth_provider_x509_cert_url: "https://www.googleapis.com/oauth2/v1/certs",
8
+ auth_uri: "https://accounts.google.com/o/oauth2/auth",
9
+ client_email: "252bf553ef04b351@example.com",
10
+ client_id: "163662907116366290710",
11
+ client_x509_cert_url: "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
12
+ host_filters: "key:value,filter:example",
13
+ cloud_run_revision_filters: [
14
+ "merp:derp",
15
+ ],
16
+ is_cspm_enabled: true,
17
+ is_security_command_center_enabled: true,
18
+ private_key: "private_key",
19
+ private_key_id: "123456789abcdefghi123456789abcdefghijklm",
20
+ project_id: "datadog-apitest",
21
+ resource_collection_enabled: true,
22
+ token_uri: "https://accounts.google.com/o/oauth2/token",
23
+ type: "service_account",
24
+ })
25
+ p api_instance.update_gcp_integration(body)
@@ -40,6 +40,7 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
40
40
  method: "GET",
41
41
  timeout: 10,
42
42
  url: "https://datadoghq.com",
43
+ http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP2,
43
44
  }),
44
45
  _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
45
46
  count: 5,
@@ -47,6 +48,34 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
47
48
  }),
48
49
  subtype: DatadogAPIClient::V1::SyntheticsAPIStepSubtype::HTTP,
49
50
  }),
51
+ DatadogAPIClient::V1::SyntheticsAPIStep.new({
52
+ name: "GRPC CALL",
53
+ subtype: DatadogAPIClient::V1::SyntheticsAPIStepSubtype::GRPC,
54
+ extracted_values: [],
55
+ allow_failure: false,
56
+ is_critical: true,
57
+ _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
58
+ count: 0,
59
+ interval: 300,
60
+ }),
61
+ assertions: [
62
+ DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
63
+ operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::LESS_THAN,
64
+ type: DatadogAPIClient::V1::SyntheticsAssertionType::RESPONSE_TIME,
65
+ target: 1000,
66
+ }),
67
+ ],
68
+ request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
69
+ host: "grpcbin.test.k6.io",
70
+ port: 9000,
71
+ service: "grpcbin.GRPCBin",
72
+ method: "Index",
73
+ message: "{}",
74
+ compressed_json_descriptor: "eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==",
75
+ metadata: {},
76
+ call_type: DatadogAPIClient::V1::SyntheticsTestCallType::UNARY,
77
+ }),
78
+ }),
50
79
  ],
51
80
  }),
52
81
  locations: [
@@ -26,6 +26,7 @@ body = DatadogAPIClient::V1::SyntheticsBrowserTest.new({
26
26
  key: DatadogAPIClient::V1::SyntheticsTestRequestCertificateItem.new({}),
27
27
  }),
28
28
  certificate_domains: [],
29
+ http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1,
29
30
  proxy: DatadogAPIClient::V1::SyntheticsTestRequestProxy.new({
30
31
  url: "https://example.com",
31
32
  }),
@@ -0,0 +1,14 @@
1
+ # Archive case returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "case" in the system
7
+ CASE_ID = ENV["CASE_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CaseEmptyRequest.new({
10
+ data: DatadogAPIClient::V2::CaseEmpty.new({
11
+ type: DatadogAPIClient::V2::CaseResourceType::CASE,
12
+ }),
13
+ })
14
+ p api_instance.archive_case(CASE_ID, body)
@@ -0,0 +1,20 @@
1
+ # Assign case returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "case" in the system
7
+ CASE_ID = ENV["CASE_ID"]
8
+
9
+ # there is a valid "user" in the system
10
+ USER_DATA_ID = ENV["USER_DATA_ID"]
11
+
12
+ body = DatadogAPIClient::V2::CaseAssignRequest.new({
13
+ data: DatadogAPIClient::V2::CaseAssign.new({
14
+ attributes: DatadogAPIClient::V2::CaseAssignAttributes.new({
15
+ assignee_id: USER_DATA_ID,
16
+ }),
17
+ type: DatadogAPIClient::V2::CaseResourceType::CASE,
18
+ }),
19
+ })
20
+ p api_instance.assign_case(CASE_ID, body)
@@ -0,0 +1,33 @@
1
+ # Create a case returns "CREATED" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "user" in the system
7
+ USER_DATA_ID = ENV["USER_DATA_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CaseCreateRequest.new({
10
+ data: DatadogAPIClient::V2::CaseCreate.new({
11
+ attributes: DatadogAPIClient::V2::CaseCreateAttributes.new({
12
+ priority: DatadogAPIClient::V2::CasePriority::NOT_DEFINED,
13
+ title: "Security breach investigation in 0cfbc5cbc676ee71",
14
+ type: DatadogAPIClient::V2::CaseType::STANDARD,
15
+ }),
16
+ relationships: DatadogAPIClient::V2::CaseCreateRelationships.new({
17
+ assignee: DatadogAPIClient::V2::NullableUserRelationship.new({
18
+ data: DatadogAPIClient::V2::NullableUserRelationshipData.new({
19
+ id: USER_DATA_ID,
20
+ type: DatadogAPIClient::V2::UserResourceType::USER,
21
+ }),
22
+ }),
23
+ project: DatadogAPIClient::V2::ProjectRelationship.new({
24
+ data: DatadogAPIClient::V2::ProjectRelationshipData.new({
25
+ id: "d4bbe1af-f36e-42f1-87c1-493ca35c320e",
26
+ type: DatadogAPIClient::V2::ProjectResourceType::PROJECT,
27
+ }),
28
+ }),
29
+ }),
30
+ type: DatadogAPIClient::V2::CaseResourceType::CASE,
31
+ }),
32
+ })
33
+ p api_instance.create_case(body)
@@ -0,0 +1,15 @@
1
+ # Create a project returns "CREATED" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ body = DatadogAPIClient::V2::ProjectCreateRequest.new({
7
+ data: DatadogAPIClient::V2::ProjectCreate.new({
8
+ attributes: DatadogAPIClient::V2::ProjectCreateAttributes.new({
9
+ key: "SEC",
10
+ name: "Security Investigation",
11
+ }),
12
+ type: DatadogAPIClient::V2::ProjectResourceType::PROJECT,
13
+ }),
14
+ })
15
+ p api_instance.create_project(body)
@@ -0,0 +1,5 @@
1
+ # Remove a project returns "No Content" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+ api_instance.delete_project("project_id")
@@ -0,0 +1,8 @@
1
+ # Get the details of a case returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "case" in the system
7
+ CASE_ID = ENV["CASE_ID"]
8
+ p api_instance.get_case(CASE_ID)
@@ -0,0 +1,5 @@
1
+ # Get the details of a project returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+ p api_instance.get_project("project_id")
@@ -0,0 +1,5 @@
1
+ # Get all projects returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+ p api_instance.get_projects()
@@ -0,0 +1,5 @@
1
+ # Search cases returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+ p api_instance.search_cases()
@@ -0,0 +1,5 @@
1
+ # Search cases returns "OK" response with pagination
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+ api_instance.search_cases_with_pagination() { |item| puts item }
@@ -0,0 +1,14 @@
1
+ # Unarchive case returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "case" in the system
7
+ CASE_ID = ENV["CASE_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CaseEmptyRequest.new({
10
+ data: DatadogAPIClient::V2::CaseEmpty.new({
11
+ type: DatadogAPIClient::V2::CaseResourceType::CASE,
12
+ }),
13
+ })
14
+ p api_instance.unarchive_case(CASE_ID, body)
@@ -0,0 +1,14 @@
1
+ # Unassign case returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "case" in the system
7
+ CASE_ID = ENV["CASE_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CaseEmptyRequest.new({
10
+ data: DatadogAPIClient::V2::CaseEmpty.new({
11
+ type: DatadogAPIClient::V2::CaseResourceType::CASE,
12
+ }),
13
+ })
14
+ p api_instance.unassign_case(CASE_ID, body)
@@ -0,0 +1,17 @@
1
+ # Update case priority returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "case" in the system
7
+ CASE_ID = ENV["CASE_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CaseUpdatePriorityRequest.new({
10
+ data: DatadogAPIClient::V2::CaseUpdatePriority.new({
11
+ attributes: DatadogAPIClient::V2::CaseUpdatePriorityAttributes.new({
12
+ priority: DatadogAPIClient::V2::CasePriority::P3,
13
+ }),
14
+ type: DatadogAPIClient::V2::CaseResourceType::CASE,
15
+ }),
16
+ })
17
+ p api_instance.update_priority(CASE_ID, body)
@@ -0,0 +1,17 @@
1
+ # Update case status returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "case" in the system
7
+ CASE_ID = ENV["CASE_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CaseUpdateStatusRequest.new({
10
+ data: DatadogAPIClient::V2::CaseUpdateStatus.new({
11
+ attributes: DatadogAPIClient::V2::CaseUpdateStatusAttributes.new({
12
+ status: DatadogAPIClient::V2::CaseStatus::IN_PROGRESS,
13
+ }),
14
+ type: DatadogAPIClient::V2::CaseResourceType::CASE,
15
+ }),
16
+ })
17
+ p api_instance.update_status(CASE_ID, body)
@@ -0,0 +1,17 @@
1
+ # Create a CSM Threats Agent rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new
5
+
6
+ body = DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateRequest.new({
7
+ data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateData.new({
8
+ attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateAttributes.new({
9
+ description: "My Agent rule",
10
+ enabled: true,
11
+ expression: 'exec.file.name == "sh"',
12
+ name: "my_agent_rule",
13
+ }),
14
+ type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE,
15
+ }),
16
+ })
17
+ p api_instance.create_csm_threats_agent_rule(body)
@@ -0,0 +1,8 @@
1
+ # Delete a CSM Threats Agent rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new
5
+
6
+ # there is a valid "agent_rule_rc" in the system
7
+ AGENT_RULE_DATA_ID = ENV["AGENT_RULE_DATA_ID"]
8
+ api_instance.delete_csm_threats_agent_rule(AGENT_RULE_DATA_ID)
@@ -0,0 +1,5 @@
1
+ # Get the latest CSM Threats policy returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new
5
+ p api_instance.download_csm_threats_policy()
@@ -0,0 +1,8 @@
1
+ # Get a CSM Threats Agent rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new
5
+
6
+ # there is a valid "agent_rule_rc" in the system
7
+ AGENT_RULE_DATA_ID = ENV["AGENT_RULE_DATA_ID"]
8
+ p api_instance.get_csm_threats_agent_rule(AGENT_RULE_DATA_ID)
@@ -0,0 +1,5 @@
1
+ # Get all CSM Threats Agent rules returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new
5
+ p api_instance.list_csm_threats_agent_rules()
@@ -0,0 +1,20 @@
1
+ # Update a CSM Threats Agent rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new
5
+
6
+ # there is a valid "agent_rule_rc" in the system
7
+ AGENT_RULE_DATA_ID = ENV["AGENT_RULE_DATA_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateRequest.new({
10
+ data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateData.new({
11
+ attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateAttributes.new({
12
+ description: "Test Agent rule",
13
+ enabled: true,
14
+ expression: 'exec.file.name == "sh"',
15
+ }),
16
+ type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE,
17
+ id: AGENT_RULE_DATA_ID,
18
+ }),
19
+ })
20
+ p api_instance.update_csm_threats_agent_rule(AGENT_RULE_DATA_ID, body)
@@ -9,15 +9,18 @@ api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new
9
9
  body = DatadogAPIClient::V2::DORAIncidentRequest.new({
10
10
  data: DatadogAPIClient::V2::DORAIncidentRequestData.new({
11
11
  attributes: DatadogAPIClient::V2::DORAIncidentRequestAttributes.new({
12
- finished_at: 1693491984000000000,
12
+ finished_at: 1707842944600000000,
13
13
  git: DatadogAPIClient::V2::DORAGitInfo.new({
14
14
  commit_sha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
15
15
  repository_url: "https://github.com/organization/example-repository",
16
16
  }),
17
17
  name: "Webserver is down failing all requests",
18
- service: "shopist",
18
+ services: [
19
+ "shopist",
20
+ ],
19
21
  severity: "High",
20
- started_at: 1693491974000000000,
22
+ started_at: 1707842944500000000,
23
+ team: "backend",
21
24
  version: "v1.12.07",
22
25
  }),
23
26
  }),
@@ -0,0 +1,18 @@
1
+ # Create a new entry for your service account with cloud run revision filters enabled returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::GCPIntegrationAPI.new
5
+
6
+ body = DatadogAPIClient::V2::GCPSTSServiceAccountCreateRequest.new({
7
+ data: DatadogAPIClient::V2::GCPSTSServiceAccountData.new({
8
+ attributes: DatadogAPIClient::V2::GCPSTSServiceAccountAttributes.new({
9
+ cloud_run_revision_filters: [
10
+ "meh:bleh",
11
+ ],
12
+ client_email: "252bf553ef04b351@test-project.iam.gserviceaccount.com",
13
+ host_filters: [],
14
+ }),
15
+ type: DatadogAPIClient::V2::GCPServiceAccountType::GCP_SERVICE_ACCOUNT,
16
+ }),
17
+ })
18
+ p api_instance.create_gcpsts_account(body)
@@ -0,0 +1,21 @@
1
+ # Update STS Service Account returns "OK" response with cloud run revision filters
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::GCPIntegrationAPI.new
5
+
6
+ # there is a valid "gcp_sts_account" in the system
7
+ GCP_STS_ACCOUNT_DATA_ID = ENV["GCP_STS_ACCOUNT_DATA_ID"]
8
+
9
+ body = DatadogAPIClient::V2::GCPSTSServiceAccountUpdateRequest.new({
10
+ data: DatadogAPIClient::V2::GCPSTSServiceAccountUpdateRequestData.new({
11
+ attributes: DatadogAPIClient::V2::GCPSTSServiceAccountAttributes.new({
12
+ client_email: "252bf553ef04b351@example.com",
13
+ cloud_run_revision_filters: [
14
+ "merp:derp",
15
+ ],
16
+ }),
17
+ id: GCP_STS_ACCOUNT_DATA_ID,
18
+ type: DatadogAPIClient::V2::GCPServiceAccountType::GCP_SERVICE_ACCOUNT,
19
+ }),
20
+ })
21
+ p api_instance.update_gcpsts_account(GCP_STS_ACCOUNT_DATA_ID, body)
@@ -0,0 +1,31 @@
1
+ # Create a custom destination returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::CustomDestinationCreateRequest.new({
7
+ data: DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition.new({
8
+ attributes: DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes.new({
9
+ enabled: true,
10
+ forward_tags: true,
11
+ forward_tags_restriction_list: [
12
+ "datacenter",
13
+ "host",
14
+ ],
15
+ forward_tags_restriction_list_type: DatadogAPIClient::V2::CustomDestinationAttributeTagsRestrictionListType::ALLOW_LIST,
16
+ forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationHttp.new({
17
+ auth: DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthBasic.new({
18
+ password: "datadog-custom-destination-password",
19
+ type: DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthBasicType::BASIC,
20
+ username: "datadog-custom-destination-username",
21
+ }),
22
+ endpoint: "https://example.com",
23
+ type: DatadogAPIClient::V2::CustomDestinationForwardDestinationHttpType::HTTP,
24
+ }),
25
+ name: "Nginx logs",
26
+ query: "source:nginx",
27
+ }),
28
+ type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION,
29
+ }),
30
+ })
31
+ p api_instance.create_logs_custom_destination(body)
@@ -0,0 +1,31 @@
1
+ # Create a Custom Header HTTP custom destination returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::CustomDestinationCreateRequest.new({
7
+ data: DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition.new({
8
+ attributes: DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes.new({
9
+ enabled: false,
10
+ forward_tags: false,
11
+ forward_tags_restriction_list: [
12
+ "datacenter",
13
+ "host",
14
+ ],
15
+ forward_tags_restriction_list_type: DatadogAPIClient::V2::CustomDestinationAttributeTagsRestrictionListType::ALLOW_LIST,
16
+ forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationHttp.new({
17
+ auth: DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthCustomHeader.new({
18
+ header_value: "my-secret",
19
+ type: DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthCustomHeaderType::CUSTOM_HEADER,
20
+ header_name: "MY-AUTHENTICATION-HEADER",
21
+ }),
22
+ endpoint: "https://example.com",
23
+ type: DatadogAPIClient::V2::CustomDestinationForwardDestinationHttpType::HTTP,
24
+ }),
25
+ name: "Nginx logs",
26
+ query: "source:nginx",
27
+ }),
28
+ type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION,
29
+ }),
30
+ })
31
+ p api_instance.create_logs_custom_destination(body)
@@ -0,0 +1,27 @@
1
+ # Create a Splunk custom destination returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::CustomDestinationCreateRequest.new({
7
+ data: DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition.new({
8
+ attributes: DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes.new({
9
+ enabled: false,
10
+ forward_tags: false,
11
+ forward_tags_restriction_list: [
12
+ "datacenter",
13
+ "host",
14
+ ],
15
+ forward_tags_restriction_list_type: DatadogAPIClient::V2::CustomDestinationAttributeTagsRestrictionListType::ALLOW_LIST,
16
+ forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunk.new({
17
+ access_token: "my-access-token",
18
+ endpoint: "https://example.com",
19
+ type: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunkType::SPLUNK_HEC,
20
+ }),
21
+ name: "Nginx logs",
22
+ query: "source:nginx",
23
+ }),
24
+ type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION,
25
+ }),
26
+ })
27
+ p api_instance.create_logs_custom_destination(body)
@@ -0,0 +1,32 @@
1
+ # Create an Elasticsearch custom destination returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::CustomDestinationCreateRequest.new({
7
+ data: DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition.new({
8
+ attributes: DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes.new({
9
+ enabled: false,
10
+ forward_tags: false,
11
+ forward_tags_restriction_list: [
12
+ "datacenter",
13
+ "host",
14
+ ],
15
+ forward_tags_restriction_list_type: DatadogAPIClient::V2::CustomDestinationAttributeTagsRestrictionListType::ALLOW_LIST,
16
+ forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationElasticsearch.new({
17
+ auth: DatadogAPIClient::V2::CustomDestinationElasticsearchDestinationAuth.new({
18
+ username: "my-username",
19
+ password: "my-password",
20
+ }),
21
+ index_name: "nginx-logs",
22
+ index_rotation: "yyyy-MM-dd",
23
+ endpoint: "https://example.com",
24
+ type: DatadogAPIClient::V2::CustomDestinationForwardDestinationElasticsearchType::ELASTICSEARCH,
25
+ }),
26
+ name: "Nginx logs",
27
+ query: "source:nginx",
28
+ }),
29
+ type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION,
30
+ }),
31
+ })
32
+ p api_instance.create_logs_custom_destination(body)
@@ -0,0 +1,31 @@
1
+ # Create a Basic HTTP custom destination returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::CustomDestinationCreateRequest.new({
7
+ data: DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition.new({
8
+ attributes: DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes.new({
9
+ enabled: false,
10
+ forward_tags: false,
11
+ forward_tags_restriction_list: [
12
+ "datacenter",
13
+ "host",
14
+ ],
15
+ forward_tags_restriction_list_type: DatadogAPIClient::V2::CustomDestinationAttributeTagsRestrictionListType::ALLOW_LIST,
16
+ forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationHttp.new({
17
+ auth: DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthBasic.new({
18
+ password: "datadog-custom-destination-password",
19
+ type: DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthBasicType::BASIC,
20
+ username: "datadog-custom-destination-username",
21
+ }),
22
+ endpoint: "https://example.com",
23
+ type: DatadogAPIClient::V2::CustomDestinationForwardDestinationHttpType::HTTP,
24
+ }),
25
+ name: "Nginx logs",
26
+ query: "source:nginx",
27
+ }),
28
+ type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION,
29
+ }),
30
+ })
31
+ p api_instance.create_logs_custom_destination(body)
@@ -0,0 +1,8 @@
1
+ # Delete a custom destination returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+
6
+ # there is a valid "custom_destination" in the system
7
+ CUSTOM_DESTINATION_DATA_ID = ENV["CUSTOM_DESTINATION_DATA_ID"]
8
+ api_instance.delete_logs_custom_destination(CUSTOM_DESTINATION_DATA_ID)
@@ -0,0 +1,8 @@
1
+ # Get a custom destination returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+
6
+ # there is a valid "custom_destination" in the system
7
+ CUSTOM_DESTINATION_DATA_ID = ENV["CUSTOM_DESTINATION_DATA_ID"]
8
+ p api_instance.get_logs_custom_destination(CUSTOM_DESTINATION_DATA_ID)