datadog_api_client 2.19.0 → 2.20.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 (80) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +97 -44
  4. data/.generator/schemas/v2/openapi.yaml +704 -42
  5. data/.generator/src/generator/templates/api.j2 +5 -5
  6. data/CHANGELOG.md +20 -0
  7. data/examples/v1/logs-indexes/CreateLogsIndex.rb +5 -0
  8. data/examples/v1/logs-indexes/UpdateLogsIndex.rb +5 -0
  9. data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +1 -1
  10. data/examples/v1/synthetics/CreateSyntheticsBrowserTest.rb +1 -1
  11. data/examples/v1/synthetics/TriggerCITests.rb +1 -1
  12. data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -1
  13. data/examples/v1/usage-metering/GetUsageLambda.rb +5 -2
  14. data/examples/v2/api-management/CreateOpenAPI.rb +11 -0
  15. data/examples/v2/api-management/DeleteOpenAPI.rb +11 -0
  16. data/examples/v2/api-management/GetOpenAPI.rb +11 -0
  17. data/examples/v2/api-management/UpdateOpenAPI.rb +14 -0
  18. data/examples/v2/okta-integration/CreateOktaAccount.rb +1 -1
  19. data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.rb +19 -0
  20. data/examples/v2/security-monitoring/DeleteSecurityMonitoringSuppression.rb +8 -0
  21. data/examples/v2/security-monitoring/GetSecurityMonitoringSuppression.rb +8 -0
  22. data/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions.rb +5 -0
  23. data/examples/v2/security-monitoring/UpdateSecurityMonitoringSuppression.rb +17 -0
  24. data/examples/v2/teams/GetTeamMemberships_3799131168.rb +8 -0
  25. data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.rb +1 -1
  26. data/lib/datadog_api_client/configuration.rb +4 -0
  27. data/lib/datadog_api_client/inflector.rb +22 -0
  28. data/lib/datadog_api_client/v1/api/organizations_api.rb +1 -1
  29. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  30. data/lib/datadog_api_client/v1/models/dashboard.rb +5 -1
  31. data/lib/datadog_api_client/v1/models/dashboard_summary_definition.rb +2 -0
  32. data/lib/datadog_api_client/v1/models/log.rb +1 -1
  33. data/lib/datadog_api_client/v1/models/logs_daily_limit_reset.rb +90 -0
  34. data/lib/datadog_api_client/v1/models/logs_index.rb +36 -1
  35. data/lib/datadog_api_client/v1/models/logs_index_update_request.rb +36 -1
  36. data/lib/datadog_api_client/v1/models/metrics_payload.rb +1 -1
  37. data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +1 -1
  38. data/lib/datadog_api_client/v1/models/slo_correction_create_request_attributes.rb +1 -1
  39. data/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb +1 -1
  40. data/lib/datadog_api_client/v1/models/slo_correction_update_request_attributes.rb +1 -1
  41. data/lib/datadog_api_client/v1/models/slo_history_metrics.rb +2 -2
  42. data/lib/datadog_api_client/v1/models/slo_history_metrics_series.rb +1 -1
  43. data/lib/datadog_api_client/v1/models/slo_history_monitor.rb +1 -1
  44. data/lib/datadog_api_client/v1/models/slo_history_sli_data.rb +1 -1
  45. data/lib/datadog_api_client/v1/models/split_config.rb +6 -6
  46. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
  47. data/lib/datadog_api_client/v1/models/usage_lambda_hour.rb +1 -1
  48. data/lib/datadog_api_client/v1/models/usage_lambda_response.rb +1 -1
  49. data/lib/datadog_api_client/v2/api/api_management_api.rb +319 -0
  50. data/lib/datadog_api_client/v2/api/organizations_api.rb +1 -1
  51. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +329 -0
  52. data/lib/datadog_api_client/v2/api/teams_api.rb +22 -0
  53. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +3 -3
  54. data/lib/datadog_api_client/v2/models/create_open_api_response.rb +80 -0
  55. data/lib/datadog_api_client/v2/models/create_open_api_response_attributes.rb +82 -0
  56. data/lib/datadog_api_client/v2/models/create_open_api_response_data.rb +90 -0
  57. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +11 -1
  58. data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +11 -1
  59. data/lib/datadog_api_client/v2/models/metric_payload.rb +1 -1
  60. data/lib/datadog_api_client/v2/models/open_api_endpoint.rb +90 -0
  61. data/lib/datadog_api_client/v2/models/open_api_file.rb +80 -0
  62. data/lib/datadog_api_client/v2/models/security_monitoring_suppression.rb +100 -0
  63. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +198 -0
  64. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +181 -0
  65. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_data.rb +119 -0
  66. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_request.rb +98 -0
  67. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_response.rb +80 -0
  68. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_type.rb +26 -0
  69. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +166 -0
  70. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_data.rb +119 -0
  71. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_request.rb +98 -0
  72. data/lib/datadog_api_client/v2/models/security_monitoring_suppressions_response.rb +82 -0
  73. data/lib/datadog_api_client/v2/models/security_monitoring_user.rb +98 -0
  74. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb +1 -1
  75. data/lib/datadog_api_client/v2/models/update_open_api_response.rb +80 -0
  76. data/lib/datadog_api_client/v2/models/update_open_api_response_attributes.rb +82 -0
  77. data/lib/datadog_api_client/v2/models/update_open_api_response_data.rb +90 -0
  78. data/lib/datadog_api_client/version.rb +1 -1
  79. metadata +34 -3
  80. data/examples/v1/usage-metering/GetUsageLambda_3132428705.rb +0 -8
@@ -182,13 +182,13 @@ module {{ module_name }}::{{ version|upper }}
182
182
  {%- endfor %}
183
183
 
184
184
  # http body (model)
185
- post_body = opts[:debug_body]{% if operation.requestBody %} || @api_client.object_to_http_body(
186
- {%- if operation.requestBody.required -%}
187
- {{ operation.get("x-codegen-request-body-name", "body") }}
185
+ post_body = opts[:debug_body]{% for name, parameter in operation|parameters if name == "body" %} || @api_client.object_to_http_body(
186
+ {%- if parameter.required -%}
187
+ body
188
188
  {%- else -%}
189
- opts[:'{{ operation.get("x-codegen-request-body-name", "body") }}']
189
+ opts[:'body']
190
190
  {%- endif -%}
191
- ){% endif %}
191
+ ){% endfor %}
192
192
 
193
193
  # return_type
194
194
  return_type = opts[:debug_return_type]{% if returnType %} || '{{ returnType }}'{% endif %}
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.20.0 / 2024-02-06
4
+
5
+ ### Fixed
6
+ * Add test support for file parameters by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1700
7
+ * Security Monitoring Suppressions - Make expiration date nullable in update payload by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1709
8
+ ### Added
9
+ * Security Monitoring - Add API support for suppression rules by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1696
10
+ * Document support for BYDAY in SLO corrections by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1701
11
+ * Add missing optional field env in DORA API endpoints by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1702
12
+ * Add compressedProtoFile field to SyntheticsTestRequest by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1699
13
+ * Add daily limit reset options to logs indexes api by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1703
14
+ * Add support for API management API by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1698
15
+ * Add pagination helper for team memberships by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1712
16
+ * Increase limit on allowed number of graphs in split graph widget by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1717
17
+ ### Deprecated
18
+ * Mark dashboard 'is_read_only' and 'restricted_roles' properties as deprecated by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1688
19
+
20
+
21
+ **Full Changelog**: https://github.com/DataDog/datadog-api-client-ruby/compare/v2.19.0...v2.20.0
22
+
3
23
  ## 2.19.0 / 2024-01-10
4
24
 
5
25
  ### Added
@@ -5,6 +5,11 @@ api_instance = DatadogAPIClient::V1::LogsIndexesAPI.new
5
5
 
6
6
  body = DatadogAPIClient::V1::LogsIndex.new({
7
7
  daily_limit: 300000000,
8
+ daily_limit_reset: DatadogAPIClient::V1::LogsDailyLimitReset.new({
9
+ reset_time: "14:00",
10
+ reset_utc_offset: "+02:00",
11
+ }),
12
+ daily_limit_warning_threshold_percentage: 70,
8
13
  exclusion_filters: [
9
14
  DatadogAPIClient::V1::LogsExclusion.new({
10
15
  filter: DatadogAPIClient::V1::LogsExclusionFilter.new({
@@ -5,6 +5,11 @@ api_instance = DatadogAPIClient::V1::LogsIndexesAPI.new
5
5
 
6
6
  body = DatadogAPIClient::V1::LogsIndexUpdateRequest.new({
7
7
  daily_limit: 300000000,
8
+ daily_limit_reset: DatadogAPIClient::V1::LogsDailyLimitReset.new({
9
+ reset_time: "14:00",
10
+ reset_utc_offset: "+02:00",
11
+ }),
12
+ daily_limit_warning_threshold_percentage: 70,
8
13
  disable_daily_limit: false,
9
14
  exclusion_filters: [
10
15
  DatadogAPIClient::V1::LogsExclusion.new({
@@ -27,7 +27,7 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
27
27
  execution_rule: DatadogAPIClient::V1::SyntheticsTestExecutionRule::BLOCKING,
28
28
  }),
29
29
  device_ids: [
30
- DatadogAPIClient::V1::SyntheticsDeviceID::LAPTOP_LARGE,
30
+ DatadogAPIClient::V1::SyntheticsDeviceID::CHROME_LAPTOP_LARGE,
31
31
  ],
32
32
  http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1,
33
33
  monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({}),
@@ -39,7 +39,7 @@ body = DatadogAPIClient::V1::SyntheticsBrowserTest.new({
39
39
  accept_self_signed: false,
40
40
  allow_insecure: true,
41
41
  device_ids: [
42
- DatadogAPIClient::V1::SyntheticsDeviceID::TABLET,
42
+ DatadogAPIClient::V1::SyntheticsDeviceID::CHROME_LAPTOP_LARGE,
43
43
  ],
44
44
  disable_cors: true,
45
45
  follow_redirects: true,
@@ -12,7 +12,7 @@ body = DatadogAPIClient::V1::SyntheticsCITestBody.new({
12
12
  username: "my_username",
13
13
  }),
14
14
  device_ids: [
15
- DatadogAPIClient::V1::SyntheticsDeviceID::LAPTOP_LARGE,
15
+ DatadogAPIClient::V1::SyntheticsDeviceID::CHROME_LAPTOP_LARGE,
16
16
  ],
17
17
  locations: [
18
18
  "aws:eu-west-3",
@@ -49,7 +49,7 @@ body = DatadogAPIClient::V1::SyntheticsBrowserTest.new({
49
49
  execution_rule: DatadogAPIClient::V1::SyntheticsTestExecutionRule::BLOCKING,
50
50
  }),
51
51
  device_ids: [
52
- DatadogAPIClient::V1::SyntheticsDeviceID::LAPTOP_LARGE,
52
+ DatadogAPIClient::V1::SyntheticsDeviceID::CHROME_LAPTOP_LARGE,
53
53
  ],
54
54
  http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1,
55
55
  monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({}),
@@ -1,5 +1,8 @@
1
- # Get hourly usage for lambda returns "OK" response
1
+ # Get hourly usage for Lambda returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new
5
- p api_instance.get_usage_lambda("2021-11-11T11:11:11.111+00:00")
5
+ opts = {
6
+ end_hr: (Time.now + -3 * 86400),
7
+ }
8
+ p api_instance.get_usage_lambda((Time.now + -5 * 86400), opts)
@@ -0,0 +1,11 @@
1
+ # Create a new API returns "API created successfully" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.create_open_api".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::APIManagementAPI.new
8
+ opts = {
9
+ openapi_spec_file: File.open("openapi-spec.yaml", "r"),
10
+ }
11
+ p api_instance.create_open_api(opts)
@@ -0,0 +1,11 @@
1
+ # Delete an API returns "API deleted successfully" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.delete_open_api".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::APIManagementAPI.new
8
+
9
+ # there is a valid "managed_api" in the system
10
+ MANAGED_API_DATA_ID = ENV["MANAGED_API_DATA_ID"]
11
+ api_instance.delete_open_api(MANAGED_API_DATA_ID)
@@ -0,0 +1,11 @@
1
+ # Get an API returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.get_open_api".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::APIManagementAPI.new
8
+
9
+ # there is a valid "managed_api" in the system
10
+ MANAGED_API_DATA_ID = ENV["MANAGED_API_DATA_ID"]
11
+ p api_instance.get_open_api(MANAGED_API_DATA_ID)
@@ -0,0 +1,14 @@
1
+ # Update an API returns "API updated successfully" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.update_open_api".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::APIManagementAPI.new
8
+
9
+ # there is a valid "managed_api" in the system
10
+ MANAGED_API_DATA_ID = ENV["MANAGED_API_DATA_ID"]
11
+ opts = {
12
+ openapi_spec_file: File.open("openapi-spec.yaml", "r"),
13
+ }
14
+ p api_instance.update_open_api(MANAGED_API_DATA_ID, opts)
@@ -8,7 +8,7 @@ body = DatadogAPIClient::V2::OktaAccountRequest.new({
8
8
  attributes: DatadogAPIClient::V2::OktaAccountAttributes.new({
9
9
  auth_method: "oauth",
10
10
  domain: "https://example.okta.com/",
11
- name: "Okta_Prod",
11
+ name: "exampleoktaintegration",
12
12
  client_id: "client_id",
13
13
  client_secret: "client_secret",
14
14
  }),
@@ -0,0 +1,19 @@
1
+ # Create a suppression rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
5
+
6
+ body = DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateRequest.new({
7
+ data: DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateData.new({
8
+ attributes: DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateAttributes.new({
9
+ description: "This rule suppresses low-severity signals in staging environments.",
10
+ enabled: true,
11
+ expiration_date: 1703187336000,
12
+ name: "Example-Security-Monitoring",
13
+ rule_query: "type:log_detection source:cloudtrail",
14
+ suppression_query: "env:staging status:low",
15
+ }),
16
+ type: DatadogAPIClient::V2::SecurityMonitoringSuppressionType::SUPPRESSIONS,
17
+ }),
18
+ })
19
+ p api_instance.create_security_monitoring_suppression(body)
@@ -0,0 +1,8 @@
1
+ # Delete a suppression rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
5
+
6
+ # there is a valid "suppression" in the system
7
+ SUPPRESSION_DATA_ID = ENV["SUPPRESSION_DATA_ID"]
8
+ api_instance.delete_security_monitoring_suppression(SUPPRESSION_DATA_ID)
@@ -0,0 +1,8 @@
1
+ # Get a suppression rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
5
+
6
+ # there is a valid "suppression" in the system
7
+ SUPPRESSION_DATA_ID = ENV["SUPPRESSION_DATA_ID"]
8
+ p api_instance.get_security_monitoring_suppression(SUPPRESSION_DATA_ID)
@@ -0,0 +1,5 @@
1
+ # Get all suppression rules returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
5
+ p api_instance.list_security_monitoring_suppressions()
@@ -0,0 +1,17 @@
1
+ # Update a suppression rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
5
+
6
+ # there is a valid "suppression" in the system
7
+ SUPPRESSION_DATA_ID = ENV["SUPPRESSION_DATA_ID"]
8
+
9
+ body = DatadogAPIClient::V2::SecurityMonitoringSuppressionUpdateRequest.new({
10
+ data: DatadogAPIClient::V2::SecurityMonitoringSuppressionUpdateData.new({
11
+ attributes: DatadogAPIClient::V2::SecurityMonitoringSuppressionUpdateAttributes.new({
12
+ suppression_query: "env:staging status:low",
13
+ }),
14
+ type: DatadogAPIClient::V2::SecurityMonitoringSuppressionType::SUPPRESSIONS,
15
+ }),
16
+ })
17
+ p api_instance.update_security_monitoring_suppression(SUPPRESSION_DATA_ID, body)
@@ -0,0 +1,8 @@
1
+ # Get team memberships returns "Represents a user's association to a team" response with pagination
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::TeamsAPI.new
5
+ opts = {
6
+ page_size: 2,
7
+ }
8
+ api_instance.get_team_memberships_with_pagination("2e06bf2c-193b-41d4-b3c2-afccc080458f", opts) { |item| puts item }
@@ -1,4 +1,4 @@
1
- # Get hourly usage for lambda traced invocations returns "OK" response
1
+ # Get hourly usage for Lambda traced invocations returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V2::UsageMeteringAPI.new
@@ -189,6 +189,10 @@ module DatadogAPIClient
189
189
  @http_proxypass = nil
190
190
  @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
191
191
  @unstable_operations = {
192
+ "v2.create_open_api": false,
193
+ "v2.delete_open_api": false,
194
+ "v2.get_open_api": false,
195
+ "v2.update_open_api": false,
192
196
  "v2.get_active_billing_dimensions": false,
193
197
  "v2.get_monthly_cost_attribution": false,
194
198
  "v2.create_dora_deployment": false,
@@ -234,6 +234,7 @@ module DatadogAPIClient
234
234
  "v1.logs_category_processor" => "LogsCategoryProcessor",
235
235
  "v1.logs_category_processor_category" => "LogsCategoryProcessorCategory",
236
236
  "v1.logs_category_processor_type" => "LogsCategoryProcessorType",
237
+ "v1.logs_daily_limit_reset" => "LogsDailyLimitReset",
237
238
  "v1.logs_date_remapper" => "LogsDateRemapper",
238
239
  "v1.logs_date_remapper_type" => "LogsDateRemapperType",
239
240
  "v1.logs_exclusion" => "LogsExclusion",
@@ -1114,6 +1115,9 @@ module DatadogAPIClient
1114
1115
  "v2.cost_by_org_attributes" => "CostByOrgAttributes",
1115
1116
  "v2.cost_by_org_response" => "CostByOrgResponse",
1116
1117
  "v2.cost_by_org_type" => "CostByOrgType",
1118
+ "v2.create_open_api_response" => "CreateOpenAPIResponse",
1119
+ "v2.create_open_api_response_attributes" => "CreateOpenAPIResponseAttributes",
1120
+ "v2.create_open_api_response_data" => "CreateOpenAPIResponseData",
1117
1121
  "v2.create_rule_request" => "CreateRuleRequest",
1118
1122
  "v2.create_rule_request_data" => "CreateRuleRequestData",
1119
1123
  "v2.create_rule_response" => "CreateRuleResponse",
@@ -1591,6 +1595,8 @@ module DatadogAPIClient
1591
1595
  "v2.on_demand_concurrency_cap_attributes" => "OnDemandConcurrencyCapAttributes",
1592
1596
  "v2.on_demand_concurrency_cap_response" => "OnDemandConcurrencyCapResponse",
1593
1597
  "v2.on_demand_concurrency_cap_type" => "OnDemandConcurrencyCapType",
1598
+ "v2.open_api_endpoint" => "OpenAPIEndpoint",
1599
+ "v2.open_api_file" => "OpenAPIFile",
1594
1600
  "v2.opsgenie_service_create_attributes" => "OpsgenieServiceCreateAttributes",
1595
1601
  "v2.opsgenie_service_create_data" => "OpsgenieServiceCreateData",
1596
1602
  "v2.opsgenie_service_create_request" => "OpsgenieServiceCreateRequest",
@@ -1880,10 +1886,22 @@ module DatadogAPIClient
1880
1886
  "v2.security_monitoring_standard_rule_create_payload" => "SecurityMonitoringStandardRuleCreatePayload",
1881
1887
  "v2.security_monitoring_standard_rule_query" => "SecurityMonitoringStandardRuleQuery",
1882
1888
  "v2.security_monitoring_standard_rule_response" => "SecurityMonitoringStandardRuleResponse",
1889
+ "v2.security_monitoring_suppression" => "SecurityMonitoringSuppression",
1890
+ "v2.security_monitoring_suppression_attributes" => "SecurityMonitoringSuppressionAttributes",
1891
+ "v2.security_monitoring_suppression_create_attributes" => "SecurityMonitoringSuppressionCreateAttributes",
1892
+ "v2.security_monitoring_suppression_create_data" => "SecurityMonitoringSuppressionCreateData",
1893
+ "v2.security_monitoring_suppression_create_request" => "SecurityMonitoringSuppressionCreateRequest",
1894
+ "v2.security_monitoring_suppression_response" => "SecurityMonitoringSuppressionResponse",
1895
+ "v2.security_monitoring_suppressions_response" => "SecurityMonitoringSuppressionsResponse",
1896
+ "v2.security_monitoring_suppression_type" => "SecurityMonitoringSuppressionType",
1897
+ "v2.security_monitoring_suppression_update_attributes" => "SecurityMonitoringSuppressionUpdateAttributes",
1898
+ "v2.security_monitoring_suppression_update_data" => "SecurityMonitoringSuppressionUpdateData",
1899
+ "v2.security_monitoring_suppression_update_request" => "SecurityMonitoringSuppressionUpdateRequest",
1883
1900
  "v2.security_monitoring_third_party_root_query" => "SecurityMonitoringThirdPartyRootQuery",
1884
1901
  "v2.security_monitoring_third_party_rule_case" => "SecurityMonitoringThirdPartyRuleCase",
1885
1902
  "v2.security_monitoring_third_party_rule_case_create" => "SecurityMonitoringThirdPartyRuleCaseCreate",
1886
1903
  "v2.security_monitoring_triage_user" => "SecurityMonitoringTriageUser",
1904
+ "v2.security_monitoring_user" => "SecurityMonitoringUser",
1887
1905
  "v2.sensitive_data_scanner_config_request" => "SensitiveDataScannerConfigRequest",
1888
1906
  "v2.sensitive_data_scanner_configuration" => "SensitiveDataScannerConfiguration",
1889
1907
  "v2.sensitive_data_scanner_configuration_data" => "SensitiveDataScannerConfigurationData",
@@ -2111,6 +2129,9 @@ module DatadogAPIClient
2111
2129
  "v2.timeseries_response_attributes" => "TimeseriesResponseAttributes",
2112
2130
  "v2.timeseries_response_series" => "TimeseriesResponseSeries",
2113
2131
  "v2.unit" => "Unit",
2132
+ "v2.update_open_api_response" => "UpdateOpenAPIResponse",
2133
+ "v2.update_open_api_response_attributes" => "UpdateOpenAPIResponseAttributes",
2134
+ "v2.update_open_api_response_data" => "UpdateOpenAPIResponseData",
2114
2135
  "v2.usage_application_security_monitoring_response" => "UsageApplicationSecurityMonitoringResponse",
2115
2136
  "v2.usage_attributes_object" => "UsageAttributesObject",
2116
2137
  "v2.usage_data_object" => "UsageDataObject",
@@ -2189,6 +2210,7 @@ module DatadogAPIClient
2189
2210
  "v1.usage_metering_api" => "UsageMeteringAPI",
2190
2211
  "v1.users_api" => "UsersAPI",
2191
2212
  "v1.webhooks_integration_api" => "WebhooksIntegrationAPI",
2213
+ "v2.api_management_api" => "APIManagementAPI",
2192
2214
  "v2.apm_retention_filters_api" => "APMRetentionFiltersAPI",
2193
2215
  "v2.audit_api" => "AuditAPI",
2194
2216
  "v2.authn_mappings_api" => "AuthNMappingsAPI",
@@ -413,7 +413,7 @@ module DatadogAPIClient::V1
413
413
  form_params['idp_file'] = idp_file
414
414
 
415
415
  # http body (model)
416
- post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
416
+ post_body = opts[:debug_body]
417
417
 
418
418
  # return_type
419
419
  return_type = opts[:debug_return_type] || 'IdpResponse'
@@ -1530,7 +1530,7 @@ module DatadogAPIClient::V1
1530
1530
  return data, status_code, headers
1531
1531
  end
1532
1532
 
1533
- # Get hourly usage for lambda.
1533
+ # Get hourly usage for Lambda.
1534
1534
  #
1535
1535
  # @see #get_usage_lambda_with_http_info
1536
1536
  def get_usage_lambda(start_hr, opts = {})
@@ -1538,9 +1538,9 @@ module DatadogAPIClient::V1
1538
1538
  data
1539
1539
  end
1540
1540
 
1541
- # Get hourly usage for lambda.
1541
+ # Get hourly usage for Lambda.
1542
1542
  #
1543
- # Get hourly usage for lambda.
1543
+ # Get hourly usage for Lambda.
1544
1544
  # **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](https://docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
1545
1545
  #
1546
1546
  # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
@@ -37,7 +37,9 @@ module DatadogAPIClient::V1
37
37
  # ID of the dashboard.
38
38
  attr_accessor :id
39
39
 
40
- # Whether this dashboard is read-only. If True, only the author and admins can make changes to it. Prefer using `restricted_roles` to manage write authorization.
40
+ # Whether this dashboard is read-only. If True, only the author and admins can make changes to it.
41
+ #
42
+ # This property is deprecated; please use the [Restriction Policies API](https://docs.datadoghq.com/api/latest/restriction-policies/) instead to manage write authorization for individual dashboards.
41
43
  attr_accessor :is_read_only
42
44
 
43
45
  # Layout type of the dashboard.
@@ -55,6 +57,8 @@ module DatadogAPIClient::V1
55
57
  attr_accessor :reflow_type
56
58
 
57
59
  # A list of role identifiers. Only the author and users associated with at least one of these roles can edit this dashboard.
60
+ #
61
+ # This property is deprecated; please use the [Restriction Policies API](https://docs.datadoghq.com/api/latest/restriction-policies/) instead to manage write authorization for individual dashboards.
58
62
  attr_accessor :restricted_roles
59
63
 
60
64
  # List of team names representing ownership of a dashboard.
@@ -34,6 +34,8 @@ module DatadogAPIClient::V1
34
34
  attr_accessor :id
35
35
 
36
36
  # Whether this dashboard is read-only. If True, only the author and admins can make changes to it.
37
+ #
38
+ # This property is deprecated; please use the [Restriction Policies API](https://docs.datadoghq.com/api/latest/restriction-policies/) instead to manage write authorization for individual dashboards.
37
39
  attr_accessor :is_read_only
38
40
 
39
41
  # Layout type of the dashboard.
@@ -24,7 +24,7 @@ module DatadogAPIClient::V1
24
24
  # JSON object containing all log attributes and their associated values.
25
25
  attr_accessor :content
26
26
 
27
- # Unique ID of the Log.
27
+ # ID of the Log.
28
28
  attr_accessor :id
29
29
 
30
30
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -0,0 +1,90 @@
1
+ =begin
2
+ #Datadog API V1 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V1
20
+ # Object containing options to override the default daily limit reset time.
21
+ class LogsDailyLimitReset
22
+ include BaseGenericModel
23
+
24
+ # String in `HH:00` format representing the time of day the daily limit should be reset. The hours must be between 00 and 23 (inclusive).
25
+ attr_accessor :reset_time
26
+
27
+ # String in `(-|+)HH:00` format representing the UTC offset to apply to the given reset time. The hours must be between -12 and +14 (inclusive).
28
+ attr_accessor :reset_utc_offset
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'reset_time' => :'reset_time',
35
+ :'reset_utc_offset' => :'reset_utc_offset'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'reset_time' => :'String',
44
+ :'reset_utc_offset' => :'String'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param attributes [Hash] Model attributes in the form of hash
50
+ # @!visibility private
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsDailyLimitReset` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsDailyLimitReset`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'reset_time')
65
+ self.reset_time = attributes[:'reset_time']
66
+ end
67
+
68
+ if attributes.key?(:'reset_utc_offset')
69
+ self.reset_utc_offset = attributes[:'reset_utc_offset']
70
+ end
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param o [Object] Object to be compared
75
+ # @!visibility private
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ reset_time == o.reset_time &&
80
+ reset_utc_offset == o.reset_utc_offset
81
+ end
82
+
83
+ # Calculates hash code according to all attributes.
84
+ # @return [Integer] Hash code
85
+ # @!visibility private
86
+ def hash
87
+ [reset_time, reset_utc_offset].hash
88
+ end
89
+ end
90
+ end
@@ -24,6 +24,12 @@ module DatadogAPIClient::V1
24
24
  # The number of log events you can send in this index per day before you are rate-limited.
25
25
  attr_accessor :daily_limit
26
26
 
27
+ # Object containing options to override the default daily limit reset time.
28
+ attr_accessor :daily_limit_reset
29
+
30
+ # A percentage threshold of the daily quota at which a Datadog warning event is generated.
31
+ attr_reader :daily_limit_warning_threshold_percentage
32
+
27
33
  # An array of exclusion objects. The logs are tested against the query of each filter,
28
34
  # following the order of the array. Only the first matching active exclusion matters,
29
35
  # others (if any) are ignored.
@@ -48,6 +54,8 @@ module DatadogAPIClient::V1
48
54
  def self.attribute_map
49
55
  {
50
56
  :'daily_limit' => :'daily_limit',
57
+ :'daily_limit_reset' => :'daily_limit_reset',
58
+ :'daily_limit_warning_threshold_percentage' => :'daily_limit_warning_threshold_percentage',
51
59
  :'exclusion_filters' => :'exclusion_filters',
52
60
  :'filter' => :'filter',
53
61
  :'is_rate_limited' => :'is_rate_limited',
@@ -61,6 +69,8 @@ module DatadogAPIClient::V1
61
69
  def self.openapi_types
62
70
  {
63
71
  :'daily_limit' => :'Integer',
72
+ :'daily_limit_reset' => :'LogsDailyLimitReset',
73
+ :'daily_limit_warning_threshold_percentage' => :'Float',
64
74
  :'exclusion_filters' => :'Array<LogsExclusion>',
65
75
  :'filter' => :'LogsFilter',
66
76
  :'is_rate_limited' => :'Boolean',
@@ -89,6 +99,14 @@ module DatadogAPIClient::V1
89
99
  self.daily_limit = attributes[:'daily_limit']
90
100
  end
91
101
 
102
+ if attributes.key?(:'daily_limit_reset')
103
+ self.daily_limit_reset = attributes[:'daily_limit_reset']
104
+ end
105
+
106
+ if attributes.key?(:'daily_limit_warning_threshold_percentage')
107
+ self.daily_limit_warning_threshold_percentage = attributes[:'daily_limit_warning_threshold_percentage']
108
+ end
109
+
92
110
  if attributes.key?(:'exclusion_filters')
93
111
  if (value = attributes[:'exclusion_filters']).is_a?(Array)
94
112
  self.exclusion_filters = value
@@ -116,11 +134,26 @@ module DatadogAPIClient::V1
116
134
  # @return true if the model is valid
117
135
  # @!visibility private
118
136
  def valid?
137
+ return false if !@daily_limit_warning_threshold_percentage.nil? && @daily_limit_warning_threshold_percentage > 99.99
138
+ return false if !@daily_limit_warning_threshold_percentage.nil? && @daily_limit_warning_threshold_percentage < 50
119
139
  return false if @filter.nil?
120
140
  return false if @name.nil?
121
141
  true
122
142
  end
123
143
 
144
+ # Custom attribute writer method with validation
145
+ # @param daily_limit_warning_threshold_percentage [Object] Object to be assigned
146
+ # @!visibility private
147
+ def daily_limit_warning_threshold_percentage=(daily_limit_warning_threshold_percentage)
148
+ if !daily_limit_warning_threshold_percentage.nil? && daily_limit_warning_threshold_percentage > 99.99
149
+ fail ArgumentError, 'invalid value for "daily_limit_warning_threshold_percentage", must be smaller than or equal to 99.99.'
150
+ end
151
+ if !daily_limit_warning_threshold_percentage.nil? && daily_limit_warning_threshold_percentage < 50
152
+ fail ArgumentError, 'invalid value for "daily_limit_warning_threshold_percentage", must be greater than or equal to 50.'
153
+ end
154
+ @daily_limit_warning_threshold_percentage = daily_limit_warning_threshold_percentage
155
+ end
156
+
124
157
  # Custom attribute writer method with validation
125
158
  # @param filter [Object] Object to be assigned
126
159
  # @!visibility private
@@ -148,6 +181,8 @@ module DatadogAPIClient::V1
148
181
  return true if self.equal?(o)
149
182
  self.class == o.class &&
150
183
  daily_limit == o.daily_limit &&
184
+ daily_limit_reset == o.daily_limit_reset &&
185
+ daily_limit_warning_threshold_percentage == o.daily_limit_warning_threshold_percentage &&
151
186
  exclusion_filters == o.exclusion_filters &&
152
187
  filter == o.filter &&
153
188
  is_rate_limited == o.is_rate_limited &&
@@ -159,7 +194,7 @@ module DatadogAPIClient::V1
159
194
  # @return [Integer] Hash code
160
195
  # @!visibility private
161
196
  def hash
162
- [daily_limit, exclusion_filters, filter, is_rate_limited, name, num_retention_days].hash
197
+ [daily_limit, daily_limit_reset, daily_limit_warning_threshold_percentage, exclusion_filters, filter, is_rate_limited, name, num_retention_days].hash
163
198
  end
164
199
  end
165
200
  end