datadog_api_client 2.37.0 → 2.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.generated-info +4 -0
- data/.generator/schemas/v1/openapi.yaml +513 -14
- data/.generator/schemas/v2/openapi.yaml +2101 -107
- data/.github/workflows/approved_status.yml +1 -0
- data/.github/workflows/test.yml +1 -1
- data/CHANGELOG.md +36 -0
- data/examples/v1/dashboards/CreateDashboard_1751391372.rb +41 -0
- data/examples/v1/dashboards/CreatePublicDashboard_1668947073.rb +28 -0
- data/examples/v1/dashboards/UpdatePublicDashboard_1708268778.rb +27 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_1248402480.rb +25 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_1267211320.rb +27 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_1271012410.rb +25 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_3314493032.rb +26 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_3934594739.rb +26 -0
- data/examples/v1/synthetics/SearchTests.rb +5 -0
- data/examples/v1/synthetics/SearchTests_195957771.rb +13 -0
- data/examples/v2/action-connection/GetAppKeyRegistration.rb +5 -0
- data/examples/v2/action-connection/ListAppKeyRegistrations.rb +5 -0
- data/examples/v2/action-connection/RegisterAppKey.rb +5 -0
- data/examples/v2/action-connection/UnregisterAppKey.rb +5 -0
- data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissions.rb +5 -0
- data/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.rb +19 -0
- data/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.rb +5 -0
- data/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.rb +5 -0
- data/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.rb +14 -0
- data/examples/v2/datasets/CreateDataset.rb +27 -0
- data/examples/v2/datasets/DeleteDataset.rb +5 -0
- data/examples/v2/datasets/GetAllDatasets.rb +5 -0
- data/examples/v2/datasets/GetDataset.rb +5 -0
- data/examples/v2/events/CreateEvent.rb +4 -2
- data/examples/v2/monitors/CreateMonitorNotificationRule.rb +0 -3
- data/examples/v2/monitors/CreateMonitorUserTemplate.rb +37 -0
- data/examples/v2/monitors/DeleteMonitorNotificationRule.rb +0 -3
- data/examples/v2/monitors/DeleteMonitorUserTemplate.rb +8 -0
- data/examples/v2/monitors/GetMonitorNotificationRule.rb +0 -3
- data/examples/v2/monitors/GetMonitorNotificationRules.rb +0 -3
- data/examples/v2/monitors/GetMonitorUserTemplate.rb +11 -0
- data/examples/v2/monitors/ListMonitorUserTemplates.rb +8 -0
- data/examples/v2/monitors/UpdateMonitorNotificationRule.rb +0 -3
- data/examples/v2/monitors/UpdateMonitorUserTemplate.rb +41 -0
- data/examples/v2/monitors/ValidateExistingMonitorUserTemplate.rb +41 -0
- data/examples/v2/monitors/ValidateMonitorUserTemplate.rb +37 -0
- data/examples/v2/on-call/UpdateOnCallSchedule.rb +1 -1
- data/examples/v2/security-monitoring/ListAssetsSBOMs.rb +12 -0
- data/lib/datadog_api_client/configuration.rb +60 -5
- data/lib/datadog_api_client/inflector.rb +70 -0
- data/lib/datadog_api_client/v1/api/hosts_api.rb +1 -0
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +72 -0
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +6 -6
- data/lib/datadog_api_client/v1/models/dashboard_template_variable.rb +14 -3
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_body.rb +1 -0
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +9 -1
- data/lib/datadog_api_client/v1/models/logs_array_processor.rb +168 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation.rb +64 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_append.rb +175 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_append_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_length.rb +165 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_length_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_select.rb +207 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_select_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/logs_processor.rb +2 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_body.rb +1 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +14 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +142 -1
- data/lib/datadog_api_client/v1/models/selectable_template_variable_items.rb +12 -1
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test.rb +12 -1
- data/lib/datadog_api_client/v1/models/synthetics_step_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request_dns_server_port.rb +63 -0
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +81 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +81 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +81 -1
- data/lib/datadog_api_client/v2/api/action_connection_api.rb +263 -4
- data/lib/datadog_api_client/v2/api/app_builder_api.rb +8 -8
- data/lib/datadog_api_client/v2/api/aws_integration_api.rb +60 -0
- data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +264 -0
- data/lib/datadog_api_client/v2/api/datasets_api.rb +283 -0
- data/lib/datadog_api_client/v2/api/events_api.rb +10 -4
- data/lib/datadog_api_client/v2/api/monitors_api.rb +512 -30
- data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +7 -3
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +111 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/workflow_automation_api.rb +8 -8
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items.rb +152 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items_category.rb +28 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_priority.rb +30 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_status.rb +28 -0
- data/lib/datadog_api_client/v2/models/app_key_registration_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/app_key_registration_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/asset_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response.rb +123 -0
- data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes.rb +19 -33
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_author.rb +10 -31
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource.rb +15 -32
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items.rb +15 -32
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/dataset.rb +154 -0
- data/lib/datadog_api_client/v2/models/dataset_attributes.rb +197 -0
- data/lib/datadog_api_client/v2/models/dataset_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/dataset_response_multi.rb +125 -0
- data/lib/datadog_api_client/v2/models/dataset_response_single.rb +123 -0
- data/lib/datadog_api_client/v2/models/event_category.rb +2 -1
- data/lib/datadog_api_client/v2/models/event_create_request.rb +32 -3
- data/lib/datadog_api_client/v2/models/event_create_request_payload.rb +20 -2
- data/lib/datadog_api_client/v2/models/event_create_response.rb +3 -3
- data/lib/datadog_api_client/v2/models/event_create_response_attributes.rb +2 -2
- data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes_evt.rb +14 -4
- data/lib/datadog_api_client/v2/models/event_create_response_payload.rb +15 -5
- data/lib/datadog_api_client/v2/models/event_create_response_payload_links.rb +105 -0
- data/lib/datadog_api_client/v2/models/event_payload.rb +48 -36
- data/lib/datadog_api_client/v2/models/event_payload_attributes.rb +3 -2
- data/lib/datadog_api_client/v2/models/event_payload_integration_id.rb +26 -0
- data/lib/datadog_api_client/v2/models/filters_per_product.rb +150 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config.rb +154 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_attributes.rb +369 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_attributes.rb +217 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_configs_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/get_app_key_registration_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/incident_create_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/job_definition_from_rule.rb +1 -26
- data/lib/datadog_api_client/v2/models/layer_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/layer_attributes_interval.rb +1 -1
- data/lib/datadog_api_client/v2/models/list_app_key_registrations_response.rb +117 -0
- data/lib/datadog_api_client/v2/models/list_app_key_registrations_response_meta.rb +115 -0
- data/lib/datadog_api_client/v2/models/list_assets_sbo_ms_response.rb +145 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template.rb +200 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_list_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_request_attributes.rb +172 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_attributes.rb +188 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_data_with_versions.rb +125 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_template_variables_items.rb +132 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_update_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_update_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/register_app_key_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/sbom_attributes.rb +24 -1
- data/lib/datadog_api_client/v2/models/sbom_component.rb +46 -1
- data/lib/datadog_api_client/v2/models/sbom_component_dependency.rb +117 -0
- data/lib/datadog_api_client/v2/models/sbom_component_license.rb +123 -0
- data/lib/datadog_api_client/v2/models/sbom_component_license_license.rb +123 -0
- data/lib/datadog_api_client/v2/models/sbom_component_license_type.rb +33 -0
- data/lib/datadog_api_client/v2/models/sbom_component_property.rb +144 -0
- data/lib/datadog_api_client/v2/models/sbom_component_supplier.rb +123 -0
- data/lib/datadog_api_client/v2/models/sbom_metadata.rb +25 -3
- data/lib/datadog_api_client/v2/models/sbom_metadata_author.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items.rb +1 -1
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items.rb +1 -1
- data/lib/datadog_api_client/v2/models/simple_monitor_user_template.rb +188 -0
- data/lib/datadog_api_client/v2/models/vulnerability_attributes.rb +24 -1
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +103 -2
- data/.apigentools-info +0 -16
@@ -21,16 +21,20 @@ module DatadogAPIClient::V2
|
|
21
21
|
class EventCreateResponseAttributesAttributesEvt
|
22
22
|
include BaseGenericModel
|
23
23
|
|
24
|
-
# Event
|
24
|
+
# Event identifier. This field is deprecated and will be removed in a future version. Use the `uid` field instead.
|
25
25
|
attr_accessor :id
|
26
26
|
|
27
|
+
# A unique identifier for the event. You can use this identifier to query or reference the event.
|
28
|
+
attr_accessor :uid
|
29
|
+
|
27
30
|
attr_accessor :additional_properties
|
28
31
|
|
29
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
33
|
# @!visibility private
|
31
34
|
def self.attribute_map
|
32
35
|
{
|
33
|
-
:'id' => :'id'
|
36
|
+
:'id' => :'id',
|
37
|
+
:'uid' => :'uid'
|
34
38
|
}
|
35
39
|
end
|
36
40
|
|
@@ -38,7 +42,8 @@ module DatadogAPIClient::V2
|
|
38
42
|
# @!visibility private
|
39
43
|
def self.openapi_types
|
40
44
|
{
|
41
|
-
:'id' => :'String'
|
45
|
+
:'id' => :'String',
|
46
|
+
:'uid' => :'String'
|
42
47
|
}
|
43
48
|
end
|
44
49
|
|
@@ -63,6 +68,10 @@ module DatadogAPIClient::V2
|
|
63
68
|
if attributes.key?(:'id')
|
64
69
|
self.id = attributes[:'id']
|
65
70
|
end
|
71
|
+
|
72
|
+
if attributes.key?(:'uid')
|
73
|
+
self.uid = attributes[:'uid']
|
74
|
+
end
|
66
75
|
end
|
67
76
|
|
68
77
|
# Returns the object in the form of hash, with additionalProperties support.
|
@@ -92,6 +101,7 @@ module DatadogAPIClient::V2
|
|
92
101
|
return true if self.equal?(o)
|
93
102
|
self.class == o.class &&
|
94
103
|
id == o.id &&
|
104
|
+
uid == o.uid &&
|
95
105
|
additional_properties == o.additional_properties
|
96
106
|
end
|
97
107
|
|
@@ -99,7 +109,7 @@ module DatadogAPIClient::V2
|
|
99
109
|
# @return [Integer] Hash code
|
100
110
|
# @!visibility private
|
101
111
|
def hash
|
102
|
-
[id, additional_properties].hash
|
112
|
+
[id, uid, additional_properties].hash
|
103
113
|
end
|
104
114
|
end
|
105
115
|
end
|
@@ -17,20 +17,24 @@ require 'date'
|
|
17
17
|
require 'time'
|
18
18
|
|
19
19
|
module DatadogAPIClient::V2
|
20
|
-
#
|
20
|
+
# Event creation response.
|
21
21
|
class EventCreateResponsePayload
|
22
22
|
include BaseGenericModel
|
23
23
|
|
24
|
-
#
|
24
|
+
# Event object.
|
25
25
|
attr_accessor :data
|
26
26
|
|
27
|
+
# Links to the event.
|
28
|
+
attr_accessor :links
|
29
|
+
|
27
30
|
attr_accessor :additional_properties
|
28
31
|
|
29
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
33
|
# @!visibility private
|
31
34
|
def self.attribute_map
|
32
35
|
{
|
33
|
-
:'data' => :'data'
|
36
|
+
:'data' => :'data',
|
37
|
+
:'links' => :'links'
|
34
38
|
}
|
35
39
|
end
|
36
40
|
|
@@ -38,7 +42,8 @@ module DatadogAPIClient::V2
|
|
38
42
|
# @!visibility private
|
39
43
|
def self.openapi_types
|
40
44
|
{
|
41
|
-
:'data' => :'EventCreateResponse'
|
45
|
+
:'data' => :'EventCreateResponse',
|
46
|
+
:'links' => :'EventCreateResponsePayloadLinks'
|
42
47
|
}
|
43
48
|
end
|
44
49
|
|
@@ -63,6 +68,10 @@ module DatadogAPIClient::V2
|
|
63
68
|
if attributes.key?(:'data')
|
64
69
|
self.data = attributes[:'data']
|
65
70
|
end
|
71
|
+
|
72
|
+
if attributes.key?(:'links')
|
73
|
+
self.links = attributes[:'links']
|
74
|
+
end
|
66
75
|
end
|
67
76
|
|
68
77
|
# Returns the object in the form of hash, with additionalProperties support.
|
@@ -92,6 +101,7 @@ module DatadogAPIClient::V2
|
|
92
101
|
return true if self.equal?(o)
|
93
102
|
self.class == o.class &&
|
94
103
|
data == o.data &&
|
104
|
+
links == o.links &&
|
95
105
|
additional_properties == o.additional_properties
|
96
106
|
end
|
97
107
|
|
@@ -99,7 +109,7 @@ module DatadogAPIClient::V2
|
|
99
109
|
# @return [Integer] Hash code
|
100
110
|
# @!visibility private
|
101
111
|
def hash
|
102
|
-
[data, additional_properties].hash
|
112
|
+
[data, links, additional_properties].hash
|
103
113
|
end
|
104
114
|
end
|
105
115
|
end
|
@@ -0,0 +1,105 @@
|
|
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
|
+
# Links to the event.
|
21
|
+
class EventCreateResponsePayloadLinks
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The URL of the event. This link is only functional when using the default subdomain.
|
25
|
+
attr_accessor :_self
|
26
|
+
|
27
|
+
attr_accessor :additional_properties
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
# @!visibility private
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'_self' => :'self'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
# @!visibility private
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'_self' => :'String'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
47
|
+
# @!visibility private
|
48
|
+
def initialize(attributes = {})
|
49
|
+
if (!attributes.is_a?(Hash))
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventCreateResponsePayloadLinks` initialize method"
|
51
|
+
end
|
52
|
+
|
53
|
+
self.additional_properties = {}
|
54
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
+
self.additional_properties[k.to_sym] = v
|
58
|
+
else
|
59
|
+
h[k.to_sym] = v
|
60
|
+
end
|
61
|
+
}
|
62
|
+
|
63
|
+
if attributes.key?(:'_self')
|
64
|
+
self._self = attributes[:'_self']
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
69
|
+
# @return [Hash] Returns the object in the form of hash
|
70
|
+
# @!visibility private
|
71
|
+
def to_hash
|
72
|
+
hash = {}
|
73
|
+
self.class.attribute_map.each_pair do |attr, param|
|
74
|
+
value = self.send(attr)
|
75
|
+
if value.nil?
|
76
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
77
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
78
|
+
end
|
79
|
+
|
80
|
+
hash[param] = _to_hash(value)
|
81
|
+
end
|
82
|
+
self.additional_properties.each_pair do |attr, value|
|
83
|
+
hash[attr] = value
|
84
|
+
end
|
85
|
+
hash
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param o [Object] Object to be compared
|
90
|
+
# @!visibility private
|
91
|
+
def ==(o)
|
92
|
+
return true if self.equal?(o)
|
93
|
+
self.class == o.class &&
|
94
|
+
_self == o._self &&
|
95
|
+
additional_properties == o.additional_properties
|
96
|
+
end
|
97
|
+
|
98
|
+
# Calculates hash code according to all attributes.
|
99
|
+
# @return [Integer] Hash code
|
100
|
+
# @!visibility private
|
101
|
+
def hash
|
102
|
+
[_self, additional_properties].hash
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
@@ -21,32 +21,33 @@ module DatadogAPIClient::V2
|
|
21
21
|
class EventPayload
|
22
22
|
include BaseGenericModel
|
23
23
|
|
24
|
-
#
|
24
|
+
# A string used for aggregation when [correlating](https://docs.datadoghq.com/service_management/events/correlation/) events. If you specify a key, events are deduplicated to alerts based on this key. Limited to 100 characters.
|
25
25
|
attr_reader :aggregation_key
|
26
26
|
|
27
|
-
# JSON object for
|
27
|
+
# JSON object for category-specific attributes. Schema is different per event category.
|
28
28
|
attr_reader :attributes
|
29
29
|
|
30
|
-
# Event category
|
30
|
+
# Event category identifying the type of event.
|
31
31
|
attr_reader :category
|
32
32
|
|
33
|
-
#
|
33
|
+
# Integration ID sourced from integration manifests.
|
34
|
+
attr_accessor :integration_id
|
35
|
+
|
36
|
+
# Free formed text associated with the event. It's suggested to use `data.attributes.attributes.custom` for well-structured attributes. Limited to 4000 characters.
|
34
37
|
attr_reader :message
|
35
38
|
|
36
|
-
# A list of tags
|
39
|
+
# A list of tags associated with the event. Maximum of 100 tags allowed.
|
37
40
|
# Refer to [Tags docs](https://docs.datadoghq.com/getting_started/tagging/).
|
38
|
-
|
41
|
+
attr_reader :tags
|
39
42
|
|
40
43
|
# Timestamp when the event occurred. Must follow [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
41
44
|
# For example `"2017-01-15T01:30:15.010000Z"`.
|
42
45
|
# Defaults to the timestamp of receipt. Limited to values no older than 18 hours.
|
43
46
|
attr_accessor :timestamp
|
44
47
|
|
45
|
-
# The event
|
48
|
+
# The title of the event. Limited to 500 characters.
|
46
49
|
attr_reader :title
|
47
50
|
|
48
|
-
attr_accessor :additional_properties
|
49
|
-
|
50
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
51
52
|
# @!visibility private
|
52
53
|
def self.attribute_map
|
@@ -54,6 +55,7 @@ module DatadogAPIClient::V2
|
|
54
55
|
:'aggregation_key' => :'aggregation_key',
|
55
56
|
:'attributes' => :'attributes',
|
56
57
|
:'category' => :'category',
|
58
|
+
:'integration_id' => :'integration_id',
|
57
59
|
:'message' => :'message',
|
58
60
|
:'tags' => :'tags',
|
59
61
|
:'timestamp' => :'timestamp',
|
@@ -68,6 +70,7 @@ module DatadogAPIClient::V2
|
|
68
70
|
:'aggregation_key' => :'String',
|
69
71
|
:'attributes' => :'EventPayloadAttributes',
|
70
72
|
:'category' => :'EventCategory',
|
73
|
+
:'integration_id' => :'EventPayloadIntegrationId',
|
71
74
|
:'message' => :'String',
|
72
75
|
:'tags' => :'Array<String>',
|
73
76
|
:'timestamp' => :'String',
|
@@ -83,14 +86,12 @@ module DatadogAPIClient::V2
|
|
83
86
|
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventPayload` initialize method"
|
84
87
|
end
|
85
88
|
|
86
|
-
self.additional_properties = {}
|
87
89
|
# check to see if the attribute exists and convert string to symbol for hash key
|
88
90
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
89
91
|
if (!self.class.attribute_map.key?(k.to_sym))
|
90
|
-
|
91
|
-
else
|
92
|
-
h[k.to_sym] = v
|
92
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
93
93
|
end
|
94
|
+
h[k.to_sym] = v
|
94
95
|
}
|
95
96
|
|
96
97
|
if attributes.key?(:'aggregation_key')
|
@@ -105,6 +106,10 @@ module DatadogAPIClient::V2
|
|
105
106
|
self.category = attributes[:'category']
|
106
107
|
end
|
107
108
|
|
109
|
+
if attributes.key?(:'integration_id')
|
110
|
+
self.integration_id = attributes[:'integration_id']
|
111
|
+
end
|
112
|
+
|
108
113
|
if attributes.key?(:'message')
|
109
114
|
self.message = attributes[:'message']
|
110
115
|
end
|
@@ -129,11 +134,16 @@ module DatadogAPIClient::V2
|
|
129
134
|
# @!visibility private
|
130
135
|
def valid?
|
131
136
|
return false if !@aggregation_key.nil? && @aggregation_key.to_s.length > 100
|
137
|
+
return false if !@aggregation_key.nil? && @aggregation_key.to_s.length < 1
|
132
138
|
return false if @attributes.nil?
|
133
139
|
return false if @category.nil?
|
134
140
|
return false if !@message.nil? && @message.to_s.length > 4000
|
141
|
+
return false if !@message.nil? && @message.to_s.length < 1
|
142
|
+
return false if !@tags.nil? && @tags.length > 100
|
143
|
+
return false if !@tags.nil? && @tags.length < 1
|
135
144
|
return false if @title.nil?
|
136
145
|
return false if @title.to_s.length > 500
|
146
|
+
return false if @title.to_s.length < 1
|
137
147
|
true
|
138
148
|
end
|
139
149
|
|
@@ -144,6 +154,9 @@ module DatadogAPIClient::V2
|
|
144
154
|
if !aggregation_key.nil? && aggregation_key.to_s.length > 100
|
145
155
|
fail ArgumentError, 'invalid value for "aggregation_key", the character length must be smaller than or equal to 100.'
|
146
156
|
end
|
157
|
+
if !aggregation_key.nil? && aggregation_key.to_s.length < 1
|
158
|
+
fail ArgumentError, 'invalid value for "aggregation_key", the character length must be great than or equal to 1.'
|
159
|
+
end
|
147
160
|
@aggregation_key = aggregation_key
|
148
161
|
end
|
149
162
|
|
@@ -174,9 +187,25 @@ module DatadogAPIClient::V2
|
|
174
187
|
if !message.nil? && message.to_s.length > 4000
|
175
188
|
fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 4000.'
|
176
189
|
end
|
190
|
+
if !message.nil? && message.to_s.length < 1
|
191
|
+
fail ArgumentError, 'invalid value for "message", the character length must be great than or equal to 1.'
|
192
|
+
end
|
177
193
|
@message = message
|
178
194
|
end
|
179
195
|
|
196
|
+
# Custom attribute writer method with validation
|
197
|
+
# @param tags [Object] Object to be assigned
|
198
|
+
# @!visibility private
|
199
|
+
def tags=(tags)
|
200
|
+
if !tags.nil? && tags.length > 100
|
201
|
+
fail ArgumentError, 'invalid value for "tags", number of items must be less than or equal to 100.'
|
202
|
+
end
|
203
|
+
if !tags.nil? && tags.length < 1
|
204
|
+
fail ArgumentError, 'invalid value for "tags", number of items must be greater than or equal to 1.'
|
205
|
+
end
|
206
|
+
@tags = tags
|
207
|
+
end
|
208
|
+
|
180
209
|
# Custom attribute writer method with validation
|
181
210
|
# @param title [Object] Object to be assigned
|
182
211
|
# @!visibility private
|
@@ -187,27 +216,10 @@ module DatadogAPIClient::V2
|
|
187
216
|
if title.to_s.length > 500
|
188
217
|
fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 500.'
|
189
218
|
end
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
# Returns the object in the form of hash, with additionalProperties support.
|
194
|
-
# @return [Hash] Returns the object in the form of hash
|
195
|
-
# @!visibility private
|
196
|
-
def to_hash
|
197
|
-
hash = {}
|
198
|
-
self.class.attribute_map.each_pair do |attr, param|
|
199
|
-
value = self.send(attr)
|
200
|
-
if value.nil?
|
201
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
202
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
203
|
-
end
|
204
|
-
|
205
|
-
hash[param] = _to_hash(value)
|
206
|
-
end
|
207
|
-
self.additional_properties.each_pair do |attr, value|
|
208
|
-
hash[attr] = value
|
219
|
+
if title.to_s.length < 1
|
220
|
+
fail ArgumentError, 'invalid value for "title", the character length must be great than or equal to 1.'
|
209
221
|
end
|
210
|
-
|
222
|
+
@title = title
|
211
223
|
end
|
212
224
|
|
213
225
|
# Checks equality by comparing each attribute.
|
@@ -219,18 +231,18 @@ module DatadogAPIClient::V2
|
|
219
231
|
aggregation_key == o.aggregation_key &&
|
220
232
|
attributes == o.attributes &&
|
221
233
|
category == o.category &&
|
234
|
+
integration_id == o.integration_id &&
|
222
235
|
message == o.message &&
|
223
236
|
tags == o.tags &&
|
224
237
|
timestamp == o.timestamp &&
|
225
|
-
title == o.title
|
226
|
-
additional_properties == o.additional_properties
|
238
|
+
title == o.title
|
227
239
|
end
|
228
240
|
|
229
241
|
# Calculates hash code according to all attributes.
|
230
242
|
# @return [Integer] Hash code
|
231
243
|
# @!visibility private
|
232
244
|
def hash
|
233
|
-
[aggregation_key, attributes, category, message, tags, timestamp, title
|
245
|
+
[aggregation_key, attributes, category, integration_id, message, tags, timestamp, title].hash
|
234
246
|
end
|
235
247
|
end
|
236
248
|
end
|
@@ -17,7 +17,7 @@ require 'date'
|
|
17
17
|
require 'time'
|
18
18
|
|
19
19
|
module DatadogAPIClient::V2
|
20
|
-
# JSON object for
|
20
|
+
# JSON object for category-specific attributes. Schema is different per event category.
|
21
21
|
module EventPayloadAttributes
|
22
22
|
class << self
|
23
23
|
include BaseOneOfModel
|
@@ -26,7 +26,8 @@ module DatadogAPIClient::V2
|
|
26
26
|
# List of class defined in oneOf (OpenAPI v3)
|
27
27
|
def openapi_one_of
|
28
28
|
[
|
29
|
-
:'ChangeEventCustomAttributes'
|
29
|
+
:'ChangeEventCustomAttributes',
|
30
|
+
:'AlertEventCustomAttributes'
|
30
31
|
]
|
31
32
|
end
|
32
33
|
# Builds the object
|
@@ -0,0 +1,26 @@
|
|
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
|
+
# Integration ID sourced from integration manifests.
|
21
|
+
class EventPayloadIntegrationId
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
CUSTOM_EVENTS = "custom-events".freeze
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,150 @@
|
|
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
|
+
# Product-specific filters for the dataset.
|
21
|
+
class FiltersPerProduct
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Defines the list of tag-based filters used to restrict access to telemetry data for a specific product.
|
25
|
+
# These filters act as access control rules. Each filter must follow the tag query syntax used by
|
26
|
+
# Datadog (such as `@tag.key:value`), and only one tag or attribute may be used to define the access strategy
|
27
|
+
# per telemetry type.
|
28
|
+
attr_reader :filters
|
29
|
+
|
30
|
+
# Name of the product the dataset is for. Possible values are 'apm', 'rum', 'synthetics',
|
31
|
+
# 'metrics', 'logs', 'sd_repoinfo', 'error_tracking', 'cloud_cost', and 'ml_obs'.
|
32
|
+
attr_reader :product
|
33
|
+
|
34
|
+
attr_accessor :additional_properties
|
35
|
+
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
37
|
+
# @!visibility private
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'filters' => :'filters',
|
41
|
+
:'product' => :'product'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
# @!visibility private
|
47
|
+
def self.openapi_types
|
48
|
+
{
|
49
|
+
:'filters' => :'Array<String>',
|
50
|
+
:'product' => :'String'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Initializes the object
|
55
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
56
|
+
# @!visibility private
|
57
|
+
def initialize(attributes = {})
|
58
|
+
if (!attributes.is_a?(Hash))
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FiltersPerProduct` initialize method"
|
60
|
+
end
|
61
|
+
|
62
|
+
self.additional_properties = {}
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
+
self.additional_properties[k.to_sym] = v
|
67
|
+
else
|
68
|
+
h[k.to_sym] = v
|
69
|
+
end
|
70
|
+
}
|
71
|
+
|
72
|
+
if attributes.key?(:'filters')
|
73
|
+
if (value = attributes[:'filters']).is_a?(Array)
|
74
|
+
self.filters = value
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'product')
|
79
|
+
self.product = attributes[:'product']
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# Check to see if the all the properties in the model are valid
|
84
|
+
# @return true if the model is valid
|
85
|
+
# @!visibility private
|
86
|
+
def valid?
|
87
|
+
return false if @filters.nil?
|
88
|
+
return false if @product.nil?
|
89
|
+
true
|
90
|
+
end
|
91
|
+
|
92
|
+
# Custom attribute writer method with validation
|
93
|
+
# @param filters [Object] Object to be assigned
|
94
|
+
# @!visibility private
|
95
|
+
def filters=(filters)
|
96
|
+
if filters.nil?
|
97
|
+
fail ArgumentError, 'invalid value for "filters", filters cannot be nil.'
|
98
|
+
end
|
99
|
+
@filters = filters
|
100
|
+
end
|
101
|
+
|
102
|
+
# Custom attribute writer method with validation
|
103
|
+
# @param product [Object] Object to be assigned
|
104
|
+
# @!visibility private
|
105
|
+
def product=(product)
|
106
|
+
if product.nil?
|
107
|
+
fail ArgumentError, 'invalid value for "product", product cannot be nil.'
|
108
|
+
end
|
109
|
+
@product = product
|
110
|
+
end
|
111
|
+
|
112
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
113
|
+
# @return [Hash] Returns the object in the form of hash
|
114
|
+
# @!visibility private
|
115
|
+
def to_hash
|
116
|
+
hash = {}
|
117
|
+
self.class.attribute_map.each_pair do |attr, param|
|
118
|
+
value = self.send(attr)
|
119
|
+
if value.nil?
|
120
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
121
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
122
|
+
end
|
123
|
+
|
124
|
+
hash[param] = _to_hash(value)
|
125
|
+
end
|
126
|
+
self.additional_properties.each_pair do |attr, value|
|
127
|
+
hash[attr] = value
|
128
|
+
end
|
129
|
+
hash
|
130
|
+
end
|
131
|
+
|
132
|
+
# Checks equality by comparing each attribute.
|
133
|
+
# @param o [Object] Object to be compared
|
134
|
+
# @!visibility private
|
135
|
+
def ==(o)
|
136
|
+
return true if self.equal?(o)
|
137
|
+
self.class == o.class &&
|
138
|
+
filters == o.filters &&
|
139
|
+
product == o.product &&
|
140
|
+
additional_properties == o.additional_properties
|
141
|
+
end
|
142
|
+
|
143
|
+
# Calculates hash code according to all attributes.
|
144
|
+
# @return [Integer] Hash code
|
145
|
+
# @!visibility private
|
146
|
+
def hash
|
147
|
+
[filters, product, additional_properties].hash
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|