datadog_api_client 2.21.0 → 2.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +308 -695
  4. data/.generator/schemas/v2/openapi.yaml +664 -185
  5. data/.github/workflows/prepare_release.yml +2 -2
  6. data/.github/workflows/publish.yml +2 -2
  7. data/.github/workflows/release.yml +2 -2
  8. data/.github/workflows/test.yml +1 -1
  9. data/CHANGELOG.md +41 -0
  10. data/Gemfile +1 -1
  11. data/examples/v1/aws-integration/CreateAWSAccount.rb +1 -1
  12. data/examples/v1/aws-integration/CreateNewAWSExternalID.rb +1 -0
  13. data/examples/v1/aws-integration/UpdateAWSAccount.rb +1 -1
  14. data/examples/v1/synthetics/CreateSyntheticsAPITest_1241981394.rb +118 -0
  15. data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +9 -0
  16. data/examples/v1/synthetics/CreateSyntheticsAPITest_960766374.rb +8 -0
  17. data/examples/v1/synthetics/UpdateAPITest.rb +8 -0
  18. data/examples/v1/synthetics/UpdateBrowserTest.rb +3 -0
  19. data/examples/v2/apm-retention-filters/UpdateApmRetentionFilter.rb +2 -2
  20. data/examples/v2/authn-mappings/CreateAuthNMapping.rb +1 -1
  21. data/examples/v2/authn-mappings/UpdateAuthNMapping.rb +1 -1
  22. data/examples/v2/{cloud-workload-security → csm-threats}/CreateCSMThreatsAgentRule.rb +2 -2
  23. data/examples/v2/{cloud-workload-security → csm-threats}/CreateCloudWorkloadSecurityAgentRule.rb +2 -2
  24. data/examples/v2/{cloud-workload-security → csm-threats}/DeleteCSMThreatsAgentRule.rb +1 -1
  25. data/examples/v2/{cloud-workload-security → csm-threats}/DeleteCloudWorkloadSecurityAgentRule.rb +1 -1
  26. data/examples/v2/{cloud-workload-security → csm-threats}/DownloadCSMThreatsPolicy.rb +1 -1
  27. data/examples/v2/{cloud-workload-security → csm-threats}/DownloadCloudWorkloadPolicyFile.rb +1 -1
  28. data/examples/v2/{cloud-workload-security → csm-threats}/GetCSMThreatsAgentRule.rb +1 -1
  29. data/examples/v2/{cloud-workload-security → csm-threats}/GetCloudWorkloadSecurityAgentRule.rb +1 -1
  30. data/examples/v2/{cloud-workload-security → csm-threats}/ListCSMThreatsAgentRules.rb +1 -1
  31. data/examples/v2/{cloud-workload-security → csm-threats}/ListCloudWorkloadSecurityAgentRules.rb +1 -1
  32. data/examples/v2/{cloud-workload-security → csm-threats}/UpdateCSMThreatsAgentRule.rb +1 -1
  33. data/examples/v2/{cloud-workload-security → csm-threats}/UpdateCloudWorkloadSecurityAgentRule.rb +1 -1
  34. data/examples/v2/gcp-integration/CreateGCPSTSAccount.rb +1 -1
  35. data/examples/v2/gcp-integration/CreateGCPSTSAccount_109518525.rb +1 -1
  36. data/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.rb +1 -1
  37. data/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.rb +1 -1
  38. data/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.rb +1 -1
  39. data/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.rb +1 -1
  40. data/examples/v2/gcp-integration/UpdateGCPSTSAccount.rb +1 -1
  41. data/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.rb +1 -1
  42. data/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb +1 -1
  43. data/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.rb +4 -0
  44. data/examples/v2/metrics/QueryScalarData_3112571352.rb +2 -2
  45. data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +3 -3
  46. data/examples/v2/roles/CreateRole.rb +14 -2
  47. data/examples/v2/roles/CreateRole_3862893229.rb +27 -0
  48. data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.rb +1 -1
  49. data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.rb +19 -0
  50. data/examples/v2/security-monitoring/ValidateSecurityMonitoringRule.rb +42 -0
  51. data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +4 -0
  52. data/examples/v2/service-level-objectives/CreateSLOReportJob.rb +20 -0
  53. data/examples/v2/service-level-objectives/GetSLOReport.rb +8 -0
  54. data/examples/v2/service-level-objectives/GetSLOReportJobStatus.rb +11 -0
  55. data/lib/datadog_api_client/configuration.rb +3 -0
  56. data/lib/datadog_api_client/inflector.rb +26 -8
  57. data/lib/datadog_api_client/v1/api/authentication_api.rb +1 -1
  58. data/lib/datadog_api_client/v1/api/aws_integration_api.rb +1 -1
  59. data/lib/datadog_api_client/v1/api/logs_indexes_api.rb +1 -1
  60. data/lib/datadog_api_client/v1/api/logs_pipelines_api.rb +3 -3
  61. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +112 -135
  62. data/lib/datadog_api_client/v1/api/users_api.rb +1 -1
  63. data/lib/datadog_api_client/v1/models/aws_account.rb +12 -2
  64. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +3 -0
  65. data/lib/datadog_api_client/v1/models/monitor_options.rb +4 -1
  66. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +6 -0
  67. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +61 -1
  68. data/lib/datadog_api_client/v1/models/series.rb +1 -1
  69. data/lib/datadog_api_client/v1/models/service_level_objective.rb +2 -1
  70. data/lib/datadog_api_client/v1/models/service_level_objective_request.rb +2 -1
  71. data/lib/datadog_api_client/v1/models/slo_history_monitor.rb +7 -1
  72. data/lib/datadog_api_client/v1/models/slo_history_sli_data.rb +8 -1
  73. data/lib/datadog_api_client/v1/models/slo_overall_statuses.rb +2 -1
  74. data/lib/datadog_api_client/v1/models/slo_response_data.rb +2 -1
  75. data/lib/datadog_api_client/v1/models/slo_threshold.rb +2 -1
  76. data/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb +14 -2
  77. data/lib/datadog_api_client/v1/models/slo_time_slice_interval.rb +29 -0
  78. data/lib/datadog_api_client/v1/models/slo_time_slice_spec.rb +1 -1
  79. data/lib/datadog_api_client/v1/models/slo_timeframe.rb +2 -1
  80. data/lib/datadog_api_client/v1/models/synthetics_api_test_config.rb +14 -4
  81. data/lib/datadog_api_client/v1/models/synthetics_assertion.rb +1 -0
  82. data/lib/datadog_api_client/v1/models/synthetics_assertion_json_schema_meta_schema.rb +27 -0
  83. data/lib/datadog_api_client/v1/models/synthetics_assertion_json_schema_operator.rb +26 -0
  84. data/lib/datadog_api_client/v1/models/synthetics_assertion_json_schema_target.rb +129 -0
  85. data/lib/datadog_api_client/v1/models/{usage_attribution_metadata.rb → synthetics_assertion_json_schema_target_target.rb} +19 -21
  86. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +13 -1
  87. data/lib/datadog_api_client/v1/models/synthetics_test_request_body_file.rb +175 -0
  88. data/lib/datadog_api_client/v1/models/synthetics_test_request_body_type.rb +2 -0
  89. data/lib/datadog_api_client/v1/models/usage_billable_summary_keys.rb +11 -1
  90. data/lib/datadog_api_client/v2/api/apm_retention_filters_api.rb +8 -2
  91. data/lib/datadog_api_client/v2/api/authn_mappings_api.rb +2 -2
  92. data/lib/datadog_api_client/v2/api/case_management_api.rb +17 -16
  93. data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +10 -10
  94. data/lib/datadog_api_client/v2/api/{cloud_workload_security_api.rb → csm_threats_api.rb} +35 -35
  95. data/lib/datadog_api_client/v2/api/events_api.rb +1 -1
  96. data/lib/datadog_api_client/v2/api/ip_allowlist_api.rb +2 -2
  97. data/lib/datadog_api_client/v2/api/logs_api.rb +1 -1
  98. data/lib/datadog_api_client/v2/api/logs_archives_api.rb +4 -4
  99. data/lib/datadog_api_client/v2/api/logs_metrics_api.rb +2 -2
  100. data/lib/datadog_api_client/v2/api/metrics_api.rb +4 -4
  101. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +2 -2
  102. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +69 -1
  103. data/lib/datadog_api_client/v2/api/service_level_objectives_api.rb +245 -0
  104. data/lib/datadog_api_client/v2/api/spans_api.rb +3 -3
  105. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +22 -4
  106. data/lib/datadog_api_client/v2/models/authn_mapping_create_data.rb +1 -1
  107. data/lib/datadog_api_client/v2/models/authn_mapping_create_relationships.rb +37 -54
  108. data/lib/datadog_api_client/v2/models/authn_mapping_included.rb +2 -1
  109. data/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_role.rb +98 -0
  110. data/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_team.rb +98 -0
  111. data/lib/datadog_api_client/v2/models/authn_mapping_relationships.rb +14 -4
  112. data/lib/datadog_api_client/v2/models/authn_mapping_team.rb +100 -0
  113. data/lib/datadog_api_client/v2/models/authn_mapping_team_attributes.rb +212 -0
  114. data/lib/datadog_api_client/v2/models/authn_mapping_update_data.rb +1 -1
  115. data/lib/datadog_api_client/v2/models/authn_mapping_update_relationships.rb +37 -54
  116. data/lib/datadog_api_client/v2/models/custom_destination_type.rb +1 -1
  117. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +1 -1
  118. data/lib/datadog_api_client/v2/models/logs_query_filter.rb +1 -1
  119. data/lib/datadog_api_client/v2/models/logs_storage_tier.rb +2 -1
  120. data/lib/datadog_api_client/v2/models/metric_series.rb +1 -1
  121. data/lib/datadog_api_client/v2/models/relationship_to_team.rb +80 -0
  122. data/lib/datadog_api_client/{v1/models/usage_attribution_response.rb → v2/models/relationship_to_team_data.rb} +21 -23
  123. data/lib/datadog_api_client/v2/models/retention_filter_create_response.rb +80 -0
  124. data/lib/datadog_api_client/v2/models/retention_filter_response.rb +1 -1
  125. data/lib/datadog_api_client/v2/models/retention_filter_update_attributes.rb +183 -0
  126. data/lib/datadog_api_client/v2/models/retention_filter_update_data.rb +1 -1
  127. data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +1 -1
  128. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +1 -1
  129. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +1 -1
  130. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +1 -1
  131. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +14 -2
  132. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +11 -1
  133. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +13 -14
  134. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +11 -1
  135. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +13 -1
  136. data/lib/datadog_api_client/v2/models/slo_report_create_request.rb +98 -0
  137. data/lib/datadog_api_client/v2/models/slo_report_create_request_attributes.rb +160 -0
  138. data/lib/datadog_api_client/{v1/models/usage_attribution_pagination.rb → v2/models/slo_report_create_request_data.rb} +29 -51
  139. data/lib/datadog_api_client/v2/models/slo_report_interval.rb +27 -0
  140. data/lib/datadog_api_client/v2/models/slo_report_post_response.rb +80 -0
  141. data/lib/datadog_api_client/v2/models/slo_report_post_response_data.rb +90 -0
  142. data/lib/datadog_api_client/v2/models/slo_report_status.rb +29 -0
  143. data/lib/datadog_api_client/v2/models/slo_report_status_get_response.rb +80 -0
  144. data/lib/datadog_api_client/v2/models/slo_report_status_get_response_attributes.rb +80 -0
  145. data/lib/datadog_api_client/v2/models/slo_report_status_get_response_data.rb +100 -0
  146. data/lib/datadog_api_client/v2/models/timeseries_response_series.rb +8 -0
  147. data/lib/datadog_api_client/v2/models/user_team_included.rb +2 -1
  148. data/lib/datadog_api_client/v2/models/user_teams_response.rb +13 -1
  149. data/lib/datadog_api_client/version.rb +1 -1
  150. metadata +70 -46
  151. data/examples/v1/usage-metering/GetUsageAttribution.rb +0 -9
  152. data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +0 -152
  153. data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +0 -63
  154. data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +0 -74
  155. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +0 -590
@@ -0,0 +1,80 @@
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 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Relationship to team.
21
+ class RelationshipToTeam
22
+ include BaseGenericModel
23
+
24
+ # Relationship to Team object.
25
+ attr_accessor :data
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'data' => :'data'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'data' => :'RelationshipToTeamData'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToTeam` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToTeam`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'data')
60
+ self.data = attributes[:'data']
61
+ end
62
+ end
63
+
64
+ # Checks equality by comparing each attribute.
65
+ # @param o [Object] Object to be compared
66
+ # @!visibility private
67
+ def ==(o)
68
+ return true if self.equal?(o)
69
+ self.class == o.class &&
70
+ data == o.data
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Integer] Hash code
75
+ # @!visibility private
76
+ def hash
77
+ [data].hash
78
+ end
79
+ end
80
+ end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #Datadog API V1 Collection
2
+ #Datadog API V2 Collection
3
3
 
4
4
  #Collection of all Datadog Public endpoints.
5
5
 
@@ -16,23 +16,23 @@ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.ge
16
16
  require 'date'
17
17
  require 'time'
18
18
 
19
- module DatadogAPIClient::V1
20
- # Response containing the Usage Summary by tag(s).
21
- class UsageAttributionResponse
19
+ module DatadogAPIClient::V2
20
+ # Relationship to Team object.
21
+ class RelationshipToTeamData
22
22
  include BaseGenericModel
23
23
 
24
- # The object containing document metadata.
25
- attr_accessor :metadata
24
+ # The unique identifier of the team.
25
+ attr_accessor :id
26
26
 
27
- # Get usage summary by tag(s).
28
- attr_accessor :usage
27
+ # Team type
28
+ attr_accessor :type
29
29
 
30
30
  # Attribute mapping from ruby-style variable name to JSON key.
31
31
  # @!visibility private
32
32
  def self.attribute_map
33
33
  {
34
- :'metadata' => :'metadata',
35
- :'usage' => :'usage'
34
+ :'id' => :'id',
35
+ :'type' => :'type'
36
36
  }
37
37
  end
38
38
 
@@ -40,8 +40,8 @@ module DatadogAPIClient::V1
40
40
  # @!visibility private
41
41
  def self.openapi_types
42
42
  {
43
- :'metadata' => :'UsageAttributionMetadata',
44
- :'usage' => :'Array<UsageAttributionBody>'
43
+ :'id' => :'String',
44
+ :'type' => :'TeamType'
45
45
  }
46
46
  end
47
47
 
@@ -50,25 +50,23 @@ module DatadogAPIClient::V1
50
50
  # @!visibility private
51
51
  def initialize(attributes = {})
52
52
  if (!attributes.is_a?(Hash))
53
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageAttributionResponse` initialize method"
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToTeamData` initialize method"
54
54
  end
55
55
 
56
56
  # check to see if the attribute exists and convert string to symbol for hash key
57
57
  attributes = attributes.each_with_object({}) { |(k, v), h|
58
58
  if (!self.class.attribute_map.key?(k.to_sym))
59
- fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageAttributionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToTeamData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
60
  end
61
61
  h[k.to_sym] = v
62
62
  }
63
63
 
64
- if attributes.key?(:'metadata')
65
- self.metadata = attributes[:'metadata']
64
+ if attributes.key?(:'id')
65
+ self.id = attributes[:'id']
66
66
  end
67
67
 
68
- if attributes.key?(:'usage')
69
- if (value = attributes[:'usage']).is_a?(Array)
70
- self.usage = value
71
- end
68
+ if attributes.key?(:'type')
69
+ self.type = attributes[:'type']
72
70
  end
73
71
  end
74
72
 
@@ -78,15 +76,15 @@ module DatadogAPIClient::V1
78
76
  def ==(o)
79
77
  return true if self.equal?(o)
80
78
  self.class == o.class &&
81
- metadata == o.metadata &&
82
- usage == o.usage
79
+ id == o.id &&
80
+ type == o.type
83
81
  end
84
82
 
85
83
  # Calculates hash code according to all attributes.
86
84
  # @return [Integer] Hash code
87
85
  # @!visibility private
88
86
  def hash
89
- [metadata, usage].hash
87
+ [id, type].hash
90
88
  end
91
89
  end
92
90
  end
@@ -0,0 +1,80 @@
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 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # The retention filters definition.
21
+ class RetentionFilterCreateResponse
22
+ include BaseGenericModel
23
+
24
+ # The definition of the retention filter.
25
+ attr_accessor :data
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'data' => :'data'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'data' => :'RetentionFilter'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterCreateResponse` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'data')
60
+ self.data = attributes[:'data']
61
+ end
62
+ end
63
+
64
+ # Checks equality by comparing each attribute.
65
+ # @param o [Object] Object to be compared
66
+ # @!visibility private
67
+ def ==(o)
68
+ return true if self.equal?(o)
69
+ self.class == o.class &&
70
+ data == o.data
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Integer] Hash code
75
+ # @!visibility private
76
+ def hash
77
+ [data].hash
78
+ end
79
+ end
80
+ end
@@ -36,7 +36,7 @@ module DatadogAPIClient::V2
36
36
  # @!visibility private
37
37
  def self.openapi_types
38
38
  {
39
- :'data' => :'RetentionFilter'
39
+ :'data' => :'RetentionFilterAll'
40
40
  }
41
41
  end
42
42
 
@@ -0,0 +1,183 @@
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 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # The object describing the configuration of the retention filter to create/update.
21
+ class RetentionFilterUpdateAttributes
22
+ include BaseGenericModel
23
+
24
+ # Enable/Disable the retention filter.
25
+ attr_reader :enabled
26
+
27
+ # The spans filter. Spans matching this filter will be indexed and stored.
28
+ attr_reader :filter
29
+
30
+ # The type of retention filter.
31
+ attr_reader :filter_type
32
+
33
+ # The name of the retention filter.
34
+ attr_reader :name
35
+
36
+ # Sample rate to apply to spans going through this retention filter,
37
+ # a value of 1.0 keeps all spans matching the query.
38
+ attr_reader :rate
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ # @!visibility private
42
+ def self.attribute_map
43
+ {
44
+ :'enabled' => :'enabled',
45
+ :'filter' => :'filter',
46
+ :'filter_type' => :'filter_type',
47
+ :'name' => :'name',
48
+ :'rate' => :'rate'
49
+ }
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ # @!visibility private
54
+ def self.openapi_types
55
+ {
56
+ :'enabled' => :'Boolean',
57
+ :'filter' => :'SpansFilterCreate',
58
+ :'filter_type' => :'RetentionFilterAllType',
59
+ :'name' => :'String',
60
+ :'rate' => :'Float'
61
+ }
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param attributes [Hash] Model attributes in the form of hash
66
+ # @!visibility private
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterUpdateAttributes` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'enabled')
81
+ self.enabled = attributes[:'enabled']
82
+ end
83
+
84
+ if attributes.key?(:'filter')
85
+ self.filter = attributes[:'filter']
86
+ end
87
+
88
+ if attributes.key?(:'filter_type')
89
+ self.filter_type = attributes[:'filter_type']
90
+ end
91
+
92
+ if attributes.key?(:'name')
93
+ self.name = attributes[:'name']
94
+ end
95
+
96
+ if attributes.key?(:'rate')
97
+ self.rate = attributes[:'rate']
98
+ end
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ # @!visibility private
104
+ def valid?
105
+ return false if @enabled.nil?
106
+ return false if @filter.nil?
107
+ return false if @filter_type.nil?
108
+ return false if @name.nil?
109
+ return false if @rate.nil?
110
+ true
111
+ end
112
+
113
+ # Custom attribute writer method with validation
114
+ # @param enabled [Object] Object to be assigned
115
+ # @!visibility private
116
+ def enabled=(enabled)
117
+ if enabled.nil?
118
+ fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.'
119
+ end
120
+ @enabled = enabled
121
+ end
122
+
123
+ # Custom attribute writer method with validation
124
+ # @param filter [Object] Object to be assigned
125
+ # @!visibility private
126
+ def filter=(filter)
127
+ if filter.nil?
128
+ fail ArgumentError, 'invalid value for "filter", filter cannot be nil.'
129
+ end
130
+ @filter = filter
131
+ end
132
+
133
+ # Custom attribute writer method with validation
134
+ # @param filter_type [Object] Object to be assigned
135
+ # @!visibility private
136
+ def filter_type=(filter_type)
137
+ if filter_type.nil?
138
+ fail ArgumentError, 'invalid value for "filter_type", filter_type cannot be nil.'
139
+ end
140
+ @filter_type = filter_type
141
+ end
142
+
143
+ # Custom attribute writer method with validation
144
+ # @param name [Object] Object to be assigned
145
+ # @!visibility private
146
+ def name=(name)
147
+ if name.nil?
148
+ fail ArgumentError, 'invalid value for "name", name cannot be nil.'
149
+ end
150
+ @name = name
151
+ end
152
+
153
+ # Custom attribute writer method with validation
154
+ # @param rate [Object] Object to be assigned
155
+ # @!visibility private
156
+ def rate=(rate)
157
+ if rate.nil?
158
+ fail ArgumentError, 'invalid value for "rate", rate cannot be nil.'
159
+ end
160
+ @rate = rate
161
+ end
162
+
163
+ # Checks equality by comparing each attribute.
164
+ # @param o [Object] Object to be compared
165
+ # @!visibility private
166
+ def ==(o)
167
+ return true if self.equal?(o)
168
+ self.class == o.class &&
169
+ enabled == o.enabled &&
170
+ filter == o.filter &&
171
+ filter_type == o.filter_type &&
172
+ name == o.name &&
173
+ rate == o.rate
174
+ end
175
+
176
+ # Calculates hash code according to all attributes.
177
+ # @return [Integer] Hash code
178
+ # @!visibility private
179
+ def hash
180
+ [enabled, filter, filter_type, name, rate].hash
181
+ end
182
+ end
183
+ end
@@ -44,7 +44,7 @@ module DatadogAPIClient::V2
44
44
  # @!visibility private
45
45
  def self.openapi_types
46
46
  {
47
- :'attributes' => :'RetentionFilterCreateAttributes',
47
+ :'attributes' => :'RetentionFilterUpdateAttributes',
48
48
  :'id' => :'String',
49
49
  :'type' => :'ApmRetentionFilterType'
50
50
  }
@@ -27,7 +27,7 @@ module DatadogAPIClient::V2
27
27
  # How to generate compliance signals. Useful for cloud_configuration rules only.
28
28
  attr_accessor :compliance_signal_options
29
29
 
30
- # Additional queries to filter matched events before they are processed.
30
+ # Additional queries to filter matched events before they are processed. This field is deprecated for log detection, signal correlation, and workload security rules.
31
31
  attr_accessor :filters
32
32
 
33
33
  # Whether the notifications include the triggering group-by values in their title.
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
24
24
  # Cases for generating signals.
25
25
  attr_reader :cases
26
26
 
27
- # Additional queries to filter matched events before they are processed.
27
+ # Additional queries to filter matched events before they are processed. This field is deprecated for log detection, signal correlation, and workload security rules.
28
28
  attr_accessor :filters
29
29
 
30
30
  # Whether the notifications include the triggering group-by values in their title.
@@ -33,7 +33,7 @@ module DatadogAPIClient::V2
33
33
  # When the rule will be deprecated, timestamp in milliseconds.
34
34
  attr_accessor :deprecation_date
35
35
 
36
- # Additional queries to filter matched events before they are processed.
36
+ # Additional queries to filter matched events before they are processed. This field is deprecated for log detection, signal correlation, and workload security rules.
37
37
  attr_accessor :filters
38
38
 
39
39
  # Whether the notifications include the triggering group-by values in their title.
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
24
24
  # Cases for generating signals.
25
25
  attr_reader :cases
26
26
 
27
- # Additional queries to filter matched events before they are processed.
27
+ # Additional queries to filter matched events before they are processed. This field is deprecated for log detection, signal correlation, and workload security rules.
28
28
  attr_accessor :filters
29
29
 
30
30
  # Whether the notifications include the triggering group-by values in their title.
@@ -33,10 +33,13 @@ module DatadogAPIClient::V2
33
33
  # User ID of the user who created the rule.
34
34
  attr_accessor :creation_author_id
35
35
 
36
+ # Default Tags for default rules (included in tags)
37
+ attr_accessor :default_tags
38
+
36
39
  # When the rule will be deprecated, timestamp in milliseconds.
37
40
  attr_accessor :deprecation_date
38
41
 
39
- # Additional queries to filter matched events before they are processed.
42
+ # Additional queries to filter matched events before they are processed. This field is deprecated for log detection, signal correlation, and workload security rules.
40
43
  attr_accessor :filters
41
44
 
42
45
  # Whether the notifications include the triggering group-by values in their title.
@@ -89,6 +92,7 @@ module DatadogAPIClient::V2
89
92
  :'compliance_signal_options' => :'complianceSignalOptions',
90
93
  :'created_at' => :'createdAt',
91
94
  :'creation_author_id' => :'creationAuthorId',
95
+ :'default_tags' => :'defaultTags',
92
96
  :'deprecation_date' => :'deprecationDate',
93
97
  :'filters' => :'filters',
94
98
  :'has_extended_title' => :'hasExtendedTitle',
@@ -116,6 +120,7 @@ module DatadogAPIClient::V2
116
120
  :'compliance_signal_options' => :'CloudConfigurationRuleComplianceSignalOptions',
117
121
  :'created_at' => :'Integer',
118
122
  :'creation_author_id' => :'Integer',
123
+ :'default_tags' => :'Array<String>',
119
124
  :'deprecation_date' => :'Integer',
120
125
  :'filters' => :'Array<SecurityMonitoringFilter>',
121
126
  :'has_extended_title' => :'Boolean',
@@ -169,6 +174,12 @@ module DatadogAPIClient::V2
169
174
  self.creation_author_id = attributes[:'creation_author_id']
170
175
  end
171
176
 
177
+ if attributes.key?(:'default_tags')
178
+ if (value = attributes[:'default_tags']).is_a?(Array)
179
+ self.default_tags = value
180
+ end
181
+ end
182
+
172
183
  if attributes.key?(:'deprecation_date')
173
184
  self.deprecation_date = attributes[:'deprecation_date']
174
185
  end
@@ -252,6 +263,7 @@ module DatadogAPIClient::V2
252
263
  compliance_signal_options == o.compliance_signal_options &&
253
264
  created_at == o.created_at &&
254
265
  creation_author_id == o.creation_author_id &&
266
+ default_tags == o.default_tags &&
255
267
  deprecation_date == o.deprecation_date &&
256
268
  filters == o.filters &&
257
269
  has_extended_title == o.has_extended_title &&
@@ -274,7 +286,7 @@ module DatadogAPIClient::V2
274
286
  # @return [Integer] Hash code
275
287
  # @!visibility private
276
288
  def hash
277
- [cases, compliance_signal_options, created_at, creation_author_id, deprecation_date, filters, has_extended_title, id, is_default, is_deleted, is_enabled, message, name, options, queries, tags, third_party_cases, type, update_author_id, version].hash
289
+ [cases, compliance_signal_options, created_at, creation_author_id, default_tags, deprecation_date, filters, has_extended_title, id, is_default, is_deleted, is_enabled, message, name, options, queries, tags, third_party_cases, type, update_author_id, version].hash
278
290
  end
279
291
  end
280
292
  end
@@ -27,6 +27,9 @@ module DatadogAPIClient::V2
27
27
  # A user.
28
28
  attr_accessor :creator
29
29
 
30
+ # An exclusion query on the input data of the security rules, which could be logs, Agent events, or other types of data based on the security rule. Events matching this query are ignored by any detection rules referenced in the suppression rule.
31
+ attr_accessor :data_exclusion_query
32
+
30
33
  # A description for the suppression rule.
31
34
  attr_accessor :description
32
35
 
@@ -60,6 +63,7 @@ module DatadogAPIClient::V2
60
63
  {
61
64
  :'creation_date' => :'creation_date',
62
65
  :'creator' => :'creator',
66
+ :'data_exclusion_query' => :'data_exclusion_query',
63
67
  :'description' => :'description',
64
68
  :'enabled' => :'enabled',
65
69
  :'expiration_date' => :'expiration_date',
@@ -78,6 +82,7 @@ module DatadogAPIClient::V2
78
82
  {
79
83
  :'creation_date' => :'Integer',
80
84
  :'creator' => :'SecurityMonitoringUser',
85
+ :'data_exclusion_query' => :'String',
81
86
  :'description' => :'String',
82
87
  :'enabled' => :'Boolean',
83
88
  :'expiration_date' => :'Integer',
@@ -114,6 +119,10 @@ module DatadogAPIClient::V2
114
119
  self.creator = attributes[:'creator']
115
120
  end
116
121
 
122
+ if attributes.key?(:'data_exclusion_query')
123
+ self.data_exclusion_query = attributes[:'data_exclusion_query']
124
+ end
125
+
117
126
  if attributes.key?(:'description')
118
127
  self.description = attributes[:'description']
119
128
  end
@@ -177,6 +186,7 @@ module DatadogAPIClient::V2
177
186
  self.class == o.class &&
178
187
  creation_date == o.creation_date &&
179
188
  creator == o.creator &&
189
+ data_exclusion_query == o.data_exclusion_query &&
180
190
  description == o.description &&
181
191
  enabled == o.enabled &&
182
192
  expiration_date == o.expiration_date &&
@@ -192,7 +202,7 @@ module DatadogAPIClient::V2
192
202
  # @return [Integer] Hash code
193
203
  # @!visibility private
194
204
  def hash
195
- [creation_date, creator, description, enabled, expiration_date, name, rule_query, suppression_query, update_date, updater, version].hash
205
+ [creation_date, creator, data_exclusion_query, description, enabled, expiration_date, name, rule_query, suppression_query, update_date, updater, version].hash
196
206
  end
197
207
  end
198
208
  end