datadog_api_client 2.34.0 → 2.35.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/.apigentools-info +4 -4
- data/.generator/schemas/v1/openapi.yaml +59 -3
- data/.generator/schemas/v2/openapi.yaml +738 -69
- data/.generator/src/generator/formatter.py +2 -2
- data/.generator/src/generator/openapi.py +1 -1
- data/.github/workflows/release.yml +1 -1
- data/CHANGELOG.md +19 -0
- data/Gemfile +1 -0
- data/examples/v1/monitors/CreateMonitor_1539578087.rb +1 -0
- data/examples/v1/monitors/CreateMonitor_440013737.rb +1 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +142 -0
- data/examples/v2/csm-threats/CreateCSMThreatsAgentRule_1295653933.rb +32 -0
- data/examples/v2/dora-metrics/CreateDORADeployment.rb +0 -3
- data/examples/v2/dora-metrics/CreateDORAFailure.rb +30 -0
- data/examples/v2/dora-metrics/CreateDORAIncident.rb +11 -9
- data/examples/v2/dora-metrics/CreateDORAIncident_1768887482.rb +25 -0
- data/examples/v2/on-call/GetTeamOnCallUsers.rb +11 -0
- data/examples/v2/security-monitoring/ListFindings_2932019633.rb +11 -0
- data/examples/v2/software-catalog/DeleteCatalogKind.rb +5 -0
- data/examples/v2/software-catalog/ListCatalogKind.rb +5 -0
- data/examples/v2/software-catalog/ListCatalogKind_3806205775.rb +5 -0
- data/examples/v2/software-catalog/UpsertCatalogKind.rb +9 -0
- data/lib/datadog_api_client/configuration.rb +0 -2
- data/lib/datadog_api_client/inflector.rb +34 -6
- data/lib/datadog_api_client/v1/api/snapshots_api.rb +2 -1
- data/lib/datadog_api_client/v1/models/monitor.rb +17 -1
- data/lib/datadog_api_client/v1/models/monitor_draft_status.rb +32 -0
- data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
- data/lib/datadog_api_client/v1/models/monitor_update_request.rb +17 -1
- data/lib/datadog_api_client/v1/models/synthetics_api_test_step_subtype.rb +6 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +32 -2
- data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +79 -15
- data/lib/datadog_api_client/v2/api/on_call_api.rb +67 -0
- data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +5 -3
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +13 -0
- data/lib/datadog_api_client/v2/api/software_catalog_api.rb +221 -0
- data/lib/datadog_api_client/v2/models/action_query_spec_inputs.rb +1 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +23 -3
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_metadata.rb +125 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_set.rb +165 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +37 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_attributes.rb +57 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_attributes.rb +57 -1
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +21 -1
- data/lib/datadog_api_client/v2/models/{dora_incident_request.rb → dora_failure_request.rb} +4 -4
- data/lib/datadog_api_client/v2/models/{dora_incident_request_attributes.rb → dora_failure_request_attributes.rb} +31 -11
- data/lib/datadog_api_client/v2/models/{dora_incident_request_data.rb → dora_failure_request_data.rb} +4 -4
- data/lib/datadog_api_client/v2/models/{dora_incident_response.rb → dora_failure_response.rb} +5 -5
- data/lib/datadog_api_client/v2/models/{dora_incident_response_data.rb → dora_failure_response_data.rb} +6 -6
- data/lib/datadog_api_client/v2/models/{dora_incident_type.rb → dora_failure_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/escalation.rb +143 -0
- data/lib/datadog_api_client/v2/models/escalation_relationships.rb +105 -0
- data/lib/datadog_api_client/v2/models/escalation_relationships_responders.rb +107 -0
- data/lib/datadog_api_client/v2/models/escalation_relationships_responders_data_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/escalation_relationships_responders_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/escalation_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/finding_attributes.rb +31 -1
- data/lib/datadog_api_client/v2/models/kind_attributes.rb +143 -0
- data/lib/datadog_api_client/v2/models/kind_data.rb +153 -0
- data/lib/datadog_api_client/v2/models/kind_metadata.rb +115 -0
- data/lib/datadog_api_client/v2/models/kind_obj.rb +143 -0
- data/lib/datadog_api_client/v2/models/kind_response_meta.rb +105 -0
- data/lib/datadog_api_client/v2/models/list_kind_catalog_response.rb +117 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders.rb +117 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships.rb +115 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations.rb +107 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations_data_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders.rb +107 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders_data_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_included.rb +63 -0
- data/lib/datadog_api_client/v2/models/upsert_catalog_kind_request.rb +63 -0
- data/lib/datadog_api_client/v2/models/upsert_catalog_kind_response.rb +117 -0
- data/lib/datadog_api_client/version.rb +1 -1
- data/repository.datadog.yaml +8 -0
- metadata +44 -7
@@ -308,13 +308,13 @@ def format_data_with_schema_dict(
|
|
308
308
|
)
|
309
309
|
parameters += f"{escape_reserved_keyword(snake_case(k))}: {value},\n"
|
310
310
|
|
311
|
-
if schema.get("additionalProperties"):
|
311
|
+
if (additionalProperties := schema.get("additionalProperties", {})) and additionalProperties != False:
|
312
312
|
for k, v in data.items():
|
313
313
|
if has_properties and k in schema["properties"]:
|
314
314
|
continue
|
315
315
|
value = format_data_with_schema(
|
316
316
|
v,
|
317
|
-
|
317
|
+
additionalProperties,
|
318
318
|
name_prefix=name_prefix,
|
319
319
|
replace_values=replace_values,
|
320
320
|
)
|
@@ -33,7 +33,7 @@ def type_to_ruby(schema, alternative_name=None):
|
|
33
33
|
if "enum" in schema:
|
34
34
|
return name
|
35
35
|
if (
|
36
|
-
not (schema.get("additionalProperties") and not schema.get("properties"))
|
36
|
+
not (schema.get("additionalProperties") not in (None, False) and not schema.get("properties"))
|
37
37
|
and schema.get("type", "object") == "object"
|
38
38
|
):
|
39
39
|
return name
|
@@ -74,7 +74,7 @@ jobs:
|
|
74
74
|
# TODO: Implement this
|
75
75
|
# changelog_content=$(git diff $BASE_REF...$HEAD_REF -- $package/CHANGELOG.md | grep -A 1000 "^+##" | grep -v "^+++" | sed 's/^+//')
|
76
76
|
|
77
|
-
is_prerelease=$(echo $package | grep -
|
77
|
+
is_prerelease=$(echo "${versions[$package]}" | grep -qvE '^[0-9]+\.[0-9]+\.[0-9]+$' && echo true || echo false)
|
78
78
|
# Create the tag
|
79
79
|
gh api repos/{owner}/{repo}/git/refs \
|
80
80
|
-f ref="refs/tags/$tag_name" \
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2.35.0/2025-06-16
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
* Fix generation for additionalProperties containers [#2469](https://github.com/DataDog/datadog-api-client-ruby/pull/2469)
|
7
|
+
|
8
|
+
### Changed
|
9
|
+
* Add billing read permission [#2456](https://github.com/DataDog/datadog-api-client-ruby/pull/2456)
|
10
|
+
* Update DORA endpoints [#2434](https://github.com/DataDog/datadog-api-client-ruby/pull/2434)
|
11
|
+
|
12
|
+
### Added
|
13
|
+
* Add `form` field for `multipart/form-data` HTTP API tests [#2452](https://github.com/DataDog/datadog-api-client-ruby/pull/2452)
|
14
|
+
* Add new endpoint to upsert/list/delete custom kinds [#2445](https://github.com/DataDog/datadog-api-client-ruby/pull/2445)
|
15
|
+
* Add spec for team on-call endpoint [#2443](https://github.com/DataDog/datadog-api-client-ruby/pull/2443)
|
16
|
+
* Add support for all subtypes in multistep steps [#2415](https://github.com/DataDog/datadog-api-client-ruby/pull/2415)
|
17
|
+
* Added new optional field definition to include more detail in findings for '/api/v2/posture_management/findings' [#2413](https://github.com/DataDog/datadog-api-client-ruby/pull/2413)
|
18
|
+
* Exposing set action on Terraform V2 [#2412](https://github.com/DataDog/datadog-api-client-ruby/pull/2412)
|
19
|
+
* Add monitor draft status field [#2410](https://github.com/DataDog/datadog-api-client-ruby/pull/2410)
|
20
|
+
* Add rum application to restriction policy [#2292](https://github.com/DataDog/datadog-api-client-ruby/pull/2292)
|
21
|
+
|
3
22
|
## 2.34.0/2025-05-28
|
4
23
|
|
5
24
|
### Fixed
|
data/Gemfile
CHANGED
@@ -83,6 +83,148 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
|
|
83
83
|
call_type: DatadogAPIClient::V1::SyntheticsTestCallType::UNARY,
|
84
84
|
}),
|
85
85
|
}),
|
86
|
+
DatadogAPIClient::V1::SyntheticsAPITestStep.new({
|
87
|
+
name: "SSL step",
|
88
|
+
subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::SSL,
|
89
|
+
allow_failure: false,
|
90
|
+
is_critical: true,
|
91
|
+
_retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
|
92
|
+
count: 0,
|
93
|
+
interval: 300,
|
94
|
+
}),
|
95
|
+
assertions: [
|
96
|
+
DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
|
97
|
+
operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS_IN_MORE_DAYS_THAN,
|
98
|
+
type: DatadogAPIClient::V1::SyntheticsAssertionType::CERTIFICATE,
|
99
|
+
target: 10,
|
100
|
+
}),
|
101
|
+
],
|
102
|
+
request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
|
103
|
+
check_certificate_revocation: true,
|
104
|
+
host: "example.org",
|
105
|
+
port: 443,
|
106
|
+
}),
|
107
|
+
}),
|
108
|
+
DatadogAPIClient::V1::SyntheticsAPITestStep.new({
|
109
|
+
name: "DNS step",
|
110
|
+
subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::DNS,
|
111
|
+
allow_failure: false,
|
112
|
+
is_critical: true,
|
113
|
+
_retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
|
114
|
+
count: 0,
|
115
|
+
interval: 300,
|
116
|
+
}),
|
117
|
+
assertions: [
|
118
|
+
DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
|
119
|
+
operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::LESS_THAN,
|
120
|
+
type: DatadogAPIClient::V1::SyntheticsAssertionType::RESPONSE_TIME,
|
121
|
+
target: 1000,
|
122
|
+
}),
|
123
|
+
],
|
124
|
+
request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
|
125
|
+
host: "troisdizaines.com",
|
126
|
+
dns_server: "8.8.8.8",
|
127
|
+
dns_server_port: "53",
|
128
|
+
}),
|
129
|
+
}),
|
130
|
+
DatadogAPIClient::V1::SyntheticsAPITestStep.new({
|
131
|
+
name: "TCP step",
|
132
|
+
subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::TCP,
|
133
|
+
allow_failure: false,
|
134
|
+
is_critical: true,
|
135
|
+
_retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
|
136
|
+
count: 0,
|
137
|
+
interval: 300,
|
138
|
+
}),
|
139
|
+
assertions: [
|
140
|
+
DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
|
141
|
+
operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::LESS_THAN,
|
142
|
+
type: DatadogAPIClient::V1::SyntheticsAssertionType::RESPONSE_TIME,
|
143
|
+
target: 1000,
|
144
|
+
}),
|
145
|
+
],
|
146
|
+
request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
|
147
|
+
host: "34.95.79.70",
|
148
|
+
port: 80,
|
149
|
+
should_track_hops: true,
|
150
|
+
timeout: 32,
|
151
|
+
}),
|
152
|
+
}),
|
153
|
+
DatadogAPIClient::V1::SyntheticsAPITestStep.new({
|
154
|
+
name: "ICMP step",
|
155
|
+
subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::ICMP,
|
156
|
+
allow_failure: false,
|
157
|
+
is_critical: true,
|
158
|
+
_retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
|
159
|
+
count: 0,
|
160
|
+
interval: 300,
|
161
|
+
}),
|
162
|
+
assertions: [
|
163
|
+
DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
|
164
|
+
operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
|
165
|
+
target: 0,
|
166
|
+
type: DatadogAPIClient::V1::SyntheticsAssertionType::PACKET_LOSS_PERCENTAGE,
|
167
|
+
}),
|
168
|
+
],
|
169
|
+
request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
|
170
|
+
host: "34.95.79.70",
|
171
|
+
number_of_packets: 4,
|
172
|
+
should_track_hops: true,
|
173
|
+
timeout: 38,
|
174
|
+
}),
|
175
|
+
}),
|
176
|
+
DatadogAPIClient::V1::SyntheticsAPITestStep.new({
|
177
|
+
name: "Websocket step",
|
178
|
+
subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::WEBSOCKET,
|
179
|
+
allow_failure: false,
|
180
|
+
is_critical: true,
|
181
|
+
_retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
|
182
|
+
count: 0,
|
183
|
+
interval: 300,
|
184
|
+
}),
|
185
|
+
assertions: [
|
186
|
+
DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
|
187
|
+
operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::LESS_THAN,
|
188
|
+
type: DatadogAPIClient::V1::SyntheticsAssertionType::RESPONSE_TIME,
|
189
|
+
target: 1000,
|
190
|
+
}),
|
191
|
+
],
|
192
|
+
request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
|
193
|
+
url: "ws://34.95.79.70/web-socket",
|
194
|
+
message: "My message",
|
195
|
+
is_message_base64_encoded: true,
|
196
|
+
headers: {
|
197
|
+
f: "g",
|
198
|
+
},
|
199
|
+
basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthWeb.new({
|
200
|
+
type: DatadogAPIClient::V1::SyntheticsBasicAuthWebType::WEB,
|
201
|
+
username: "user",
|
202
|
+
password: "password",
|
203
|
+
}),
|
204
|
+
}),
|
205
|
+
}),
|
206
|
+
DatadogAPIClient::V1::SyntheticsAPITestStep.new({
|
207
|
+
name: "UDP step",
|
208
|
+
subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::UDP,
|
209
|
+
allow_failure: false,
|
210
|
+
is_critical: true,
|
211
|
+
_retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
|
212
|
+
count: 0,
|
213
|
+
interval: 300,
|
214
|
+
}),
|
215
|
+
assertions: [
|
216
|
+
DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
|
217
|
+
operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::LESS_THAN,
|
218
|
+
type: DatadogAPIClient::V1::SyntheticsAssertionType::RESPONSE_TIME,
|
219
|
+
target: 1000,
|
220
|
+
}),
|
221
|
+
],
|
222
|
+
request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
|
223
|
+
host: "8.8.8.8",
|
224
|
+
port: 53,
|
225
|
+
message: "A image.google.com",
|
226
|
+
}),
|
227
|
+
}),
|
86
228
|
],
|
87
229
|
}),
|
88
230
|
locations: [
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Create a Workload Protection agent rule with set action returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
|
5
|
+
|
6
|
+
# there is a valid "policy_rc" in the system
|
7
|
+
POLICY_DATA_ID = ENV["POLICY_DATA_ID"]
|
8
|
+
|
9
|
+
body = DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateRequest.new({
|
10
|
+
data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateData.new({
|
11
|
+
attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateAttributes.new({
|
12
|
+
description: "My Agent rule with set action",
|
13
|
+
enabled: true,
|
14
|
+
expression: 'exec.file.name == "sh"',
|
15
|
+
filters: [],
|
16
|
+
name: "examplecsmthreat",
|
17
|
+
policy_id: POLICY_DATA_ID,
|
18
|
+
product_tags: [],
|
19
|
+
actions: [
|
20
|
+
DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleAction.new({
|
21
|
+
set: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleActionSet.new({
|
22
|
+
name: "test_set",
|
23
|
+
value: "test_value",
|
24
|
+
scope: "process",
|
25
|
+
}),
|
26
|
+
}),
|
27
|
+
],
|
28
|
+
}),
|
29
|
+
type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE,
|
30
|
+
}),
|
31
|
+
})
|
32
|
+
p api_instance.create_csm_threats_agent_rule(body)
|
@@ -1,9 +1,6 @@
|
|
1
1
|
# Send a deployment event for DORA Metrics returns "OK" response
|
2
2
|
|
3
3
|
require "datadog_api_client"
|
4
|
-
DatadogAPIClient.configure do |config|
|
5
|
-
config.unstable_operations["v2.create_dora_deployment".to_sym] = true
|
6
|
-
end
|
7
4
|
api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new
|
8
5
|
|
9
6
|
body = DatadogAPIClient::V2::DORADeploymentRequest.new({
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Send a failure event for DORA Metrics returns "OK - but delayed due to incident" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new
|
5
|
+
|
6
|
+
body = DatadogAPIClient::V2::DORAFailureRequest.new({
|
7
|
+
data: DatadogAPIClient::V2::DORAFailureRequestData.new({
|
8
|
+
attributes: DatadogAPIClient::V2::DORAFailureRequestAttributes.new({
|
9
|
+
custom_tags: [
|
10
|
+
"language:java",
|
11
|
+
"department:engineering",
|
12
|
+
],
|
13
|
+
env: "staging",
|
14
|
+
finished_at: 1693491984000000000,
|
15
|
+
git: DatadogAPIClient::V2::DORAGitInfo.new({
|
16
|
+
commit_sha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
|
17
|
+
repository_url: "https://github.com/organization/example-repository",
|
18
|
+
}),
|
19
|
+
name: "Webserver is down failing all requests.",
|
20
|
+
services: [
|
21
|
+
"shopist",
|
22
|
+
],
|
23
|
+
severity: "High",
|
24
|
+
started_at: 1693491974000000000,
|
25
|
+
team: "backend",
|
26
|
+
version: "v1.12.07",
|
27
|
+
}),
|
28
|
+
}),
|
29
|
+
})
|
30
|
+
p api_instance.create_dora_failure(body)
|
@@ -1,25 +1,27 @@
|
|
1
1
|
# Send an incident event for DORA Metrics returns "OK" response
|
2
2
|
|
3
3
|
require "datadog_api_client"
|
4
|
-
DatadogAPIClient.configure do |config|
|
5
|
-
config.unstable_operations["v2.create_dora_incident".to_sym] = true
|
6
|
-
end
|
7
4
|
api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new
|
8
5
|
|
9
|
-
body = DatadogAPIClient::V2::
|
10
|
-
data: DatadogAPIClient::V2::
|
11
|
-
attributes: DatadogAPIClient::V2::
|
12
|
-
|
6
|
+
body = DatadogAPIClient::V2::DORAFailureRequest.new({
|
7
|
+
data: DatadogAPIClient::V2::DORAFailureRequestData.new({
|
8
|
+
attributes: DatadogAPIClient::V2::DORAFailureRequestAttributes.new({
|
9
|
+
custom_tags: [
|
10
|
+
"language:java",
|
11
|
+
"department:engineering",
|
12
|
+
],
|
13
|
+
env: "staging",
|
14
|
+
finished_at: 1693491984000000000,
|
13
15
|
git: DatadogAPIClient::V2::DORAGitInfo.new({
|
14
16
|
commit_sha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
|
15
17
|
repository_url: "https://github.com/organization/example-repository",
|
16
18
|
}),
|
17
|
-
name: "Webserver is down failing all requests",
|
19
|
+
name: "Webserver is down failing all requests.",
|
18
20
|
services: [
|
19
21
|
"shopist",
|
20
22
|
],
|
21
23
|
severity: "High",
|
22
|
-
started_at:
|
24
|
+
started_at: 1693491974000000000,
|
23
25
|
team: "backend",
|
24
26
|
version: "v1.12.07",
|
25
27
|
}),
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Send a failure event for DORA Metrics returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new
|
5
|
+
|
6
|
+
body = DatadogAPIClient::V2::DORAFailureRequest.new({
|
7
|
+
data: DatadogAPIClient::V2::DORAFailureRequestData.new({
|
8
|
+
attributes: DatadogAPIClient::V2::DORAFailureRequestAttributes.new({
|
9
|
+
finished_at: 1707842944600000000,
|
10
|
+
git: DatadogAPIClient::V2::DORAGitInfo.new({
|
11
|
+
commit_sha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
|
12
|
+
repository_url: "https://github.com/organization/example-repository",
|
13
|
+
}),
|
14
|
+
name: "Webserver is down failing all requests",
|
15
|
+
services: [
|
16
|
+
"shopist",
|
17
|
+
],
|
18
|
+
severity: "High",
|
19
|
+
started_at: 1707842944500000000,
|
20
|
+
team: "backend",
|
21
|
+
version: "v1.12.07",
|
22
|
+
}),
|
23
|
+
}),
|
24
|
+
})
|
25
|
+
p api_instance.create_dora_incident(body)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Get team on-call users returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::OnCallAPI.new
|
5
|
+
|
6
|
+
# there are valid "routing_rules" in the system
|
7
|
+
ROUTING_RULES_DATA_ID = ENV["ROUTING_RULES_DATA_ID"]
|
8
|
+
opts = {
|
9
|
+
include: "responders,escalations.responders",
|
10
|
+
}
|
11
|
+
p api_instance.get_team_on_call_users(ROUTING_RULES_DATA_ID, opts)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# List findings returns "OK" response with details
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
DatadogAPIClient.configure do |config|
|
5
|
+
config.unstable_operations["v2.list_findings".to_sym] = true
|
6
|
+
end
|
7
|
+
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
|
8
|
+
opts = {
|
9
|
+
detailed_findings: true,
|
10
|
+
}
|
11
|
+
p api_instance.list_findings(opts)
|
@@ -210,8 +210,6 @@ module DatadogAPIClient
|
|
210
210
|
"v2.cancel_data_deletion_request": false,
|
211
211
|
"v2.create_data_deletion_request": false,
|
212
212
|
"v2.get_data_deletion_requests": false,
|
213
|
-
"v2.create_dora_deployment": false,
|
214
|
-
"v2.create_dora_incident": false,
|
215
213
|
"v2.create_incident": false,
|
216
214
|
"v2.create_incident_integration": false,
|
217
215
|
"v2.create_incident_todo": false,
|
@@ -295,6 +295,7 @@ module DatadogAPIClient
|
|
295
295
|
"v1.metrics_query_unit" => "MetricsQueryUnit",
|
296
296
|
"v1.monitor" => "Monitor",
|
297
297
|
"v1.monitor_device_id" => "MonitorDeviceID",
|
298
|
+
"v1.monitor_draft_status" => "MonitorDraftStatus",
|
298
299
|
"v1.monitor_formula_and_function_cost_aggregator" => "MonitorFormulaAndFunctionCostAggregator",
|
299
300
|
"v1.monitor_formula_and_function_cost_data_source" => "MonitorFormulaAndFunctionCostDataSource",
|
300
301
|
"v1.monitor_formula_and_function_cost_query_definition" => "MonitorFormulaAndFunctionCostQueryDefinition",
|
@@ -1339,6 +1340,8 @@ module DatadogAPIClient
|
|
1339
1340
|
"v2.cloud_workload_security_agent_policy_updater_attributes" => "CloudWorkloadSecurityAgentPolicyUpdaterAttributes",
|
1340
1341
|
"v2.cloud_workload_security_agent_policy_update_request" => "CloudWorkloadSecurityAgentPolicyUpdateRequest",
|
1341
1342
|
"v2.cloud_workload_security_agent_rule_action" => "CloudWorkloadSecurityAgentRuleAction",
|
1343
|
+
"v2.cloud_workload_security_agent_rule_action_metadata" => "CloudWorkloadSecurityAgentRuleActionMetadata",
|
1344
|
+
"v2.cloud_workload_security_agent_rule_action_set" => "CloudWorkloadSecurityAgentRuleActionSet",
|
1342
1345
|
"v2.cloud_workload_security_agent_rule_attributes" => "CloudWorkloadSecurityAgentRuleAttributes",
|
1343
1346
|
"v2.cloud_workload_security_agent_rule_create_attributes" => "CloudWorkloadSecurityAgentRuleCreateAttributes",
|
1344
1347
|
"v2.cloud_workload_security_agent_rule_create_data" => "CloudWorkloadSecurityAgentRuleCreateData",
|
@@ -1601,14 +1604,14 @@ module DatadogAPIClient
|
|
1601
1604
|
"v2.dora_deployment_response_data" => "DORADeploymentResponseData",
|
1602
1605
|
"v2.dora_deployment_type" => "DORADeploymentType",
|
1603
1606
|
"v2.dora_event" => "DORAEvent",
|
1607
|
+
"v2.dora_failure_request" => "DORAFailureRequest",
|
1608
|
+
"v2.dora_failure_request_attributes" => "DORAFailureRequestAttributes",
|
1609
|
+
"v2.dora_failure_request_data" => "DORAFailureRequestData",
|
1610
|
+
"v2.dora_failure_response" => "DORAFailureResponse",
|
1611
|
+
"v2.dora_failure_response_data" => "DORAFailureResponseData",
|
1612
|
+
"v2.dora_failure_type" => "DORAFailureType",
|
1604
1613
|
"v2.dora_fetch_response" => "DORAFetchResponse",
|
1605
1614
|
"v2.dora_git_info" => "DORAGitInfo",
|
1606
|
-
"v2.dora_incident_request" => "DORAIncidentRequest",
|
1607
|
-
"v2.dora_incident_request_attributes" => "DORAIncidentRequestAttributes",
|
1608
|
-
"v2.dora_incident_request_data" => "DORAIncidentRequestData",
|
1609
|
-
"v2.dora_incident_response" => "DORAIncidentResponse",
|
1610
|
-
"v2.dora_incident_response_data" => "DORAIncidentResponseData",
|
1611
|
-
"v2.dora_incident_type" => "DORAIncidentType",
|
1612
1615
|
"v2.dora_list_deployments_request" => "DORAListDeploymentsRequest",
|
1613
1616
|
"v2.dora_list_deployments_request_attributes" => "DORAListDeploymentsRequestAttributes",
|
1614
1617
|
"v2.dora_list_deployments_request_data" => "DORAListDeploymentsRequestData",
|
@@ -1721,6 +1724,7 @@ module DatadogAPIClient
|
|
1721
1724
|
"v2.entity_v3_system_spec" => "EntityV3SystemSpec",
|
1722
1725
|
"v2.epss" => "EPSS",
|
1723
1726
|
"v2.error_handler" => "ErrorHandler",
|
1727
|
+
"v2.escalation" => "Escalation",
|
1724
1728
|
"v2.escalation_policy" => "EscalationPolicy",
|
1725
1729
|
"v2.escalation_policy_create_request" => "EscalationPolicyCreateRequest",
|
1726
1730
|
"v2.escalation_policy_create_request_data" => "EscalationPolicyCreateRequestData",
|
@@ -1752,8 +1756,13 @@ module DatadogAPIClient
|
|
1752
1756
|
"v2.escalation_policy_user" => "EscalationPolicyUser",
|
1753
1757
|
"v2.escalation_policy_user_attributes" => "EscalationPolicyUserAttributes",
|
1754
1758
|
"v2.escalation_policy_user_type" => "EscalationPolicyUserType",
|
1759
|
+
"v2.escalation_relationships" => "EscalationRelationships",
|
1760
|
+
"v2.escalation_relationships_responders" => "EscalationRelationshipsResponders",
|
1761
|
+
"v2.escalation_relationships_responders_data_items" => "EscalationRelationshipsRespondersDataItems",
|
1762
|
+
"v2.escalation_relationships_responders_data_items_type" => "EscalationRelationshipsRespondersDataItemsType",
|
1755
1763
|
"v2.escalation_target" => "EscalationTarget",
|
1756
1764
|
"v2.escalation_targets" => "EscalationTargets",
|
1765
|
+
"v2.escalation_type" => "EscalationType",
|
1757
1766
|
"v2.event" => "Event",
|
1758
1767
|
"v2.event_attributes" => "EventAttributes",
|
1759
1768
|
"v2.event_category" => "EventCategory",
|
@@ -2055,6 +2064,11 @@ module DatadogAPIClient
|
|
2055
2064
|
"v2.jsonapi_error_item" => "JSONAPIErrorItem",
|
2056
2065
|
"v2.jsonapi_error_item_source" => "JSONAPIErrorItemSource",
|
2057
2066
|
"v2.jsonapi_error_response" => "JSONAPIErrorResponse",
|
2067
|
+
"v2.kind_attributes" => "KindAttributes",
|
2068
|
+
"v2.kind_data" => "KindData",
|
2069
|
+
"v2.kind_metadata" => "KindMetadata",
|
2070
|
+
"v2.kind_obj" => "KindObj",
|
2071
|
+
"v2.kind_response_meta" => "KindResponseMeta",
|
2058
2072
|
"v2.layer" => "Layer",
|
2059
2073
|
"v2.layer_attributes" => "LayerAttributes",
|
2060
2074
|
"v2.layer_attributes_interval" => "LayerAttributesInterval",
|
@@ -2091,6 +2105,7 @@ module DatadogAPIClient
|
|
2091
2105
|
"v2.list_findings_page" => "ListFindingsPage",
|
2092
2106
|
"v2.list_findings_response" => "ListFindingsResponse",
|
2093
2107
|
"v2.list_historical_jobs_response" => "ListHistoricalJobsResponse",
|
2108
|
+
"v2.list_kind_catalog_response" => "ListKindCatalogResponse",
|
2094
2109
|
"v2.list_pipelines_response" => "ListPipelinesResponse",
|
2095
2110
|
"v2.list_pipelines_response_meta" => "ListPipelinesResponseMeta",
|
2096
2111
|
"v2.list_powerpacks_response" => "ListPowerpacksResponse",
|
@@ -3264,6 +3279,17 @@ module DatadogAPIClient
|
|
3264
3279
|
"v2.team_link_response" => "TeamLinkResponse",
|
3265
3280
|
"v2.team_links_response" => "TeamLinksResponse",
|
3266
3281
|
"v2.team_link_type" => "TeamLinkType",
|
3282
|
+
"v2.team_on_call_responders" => "TeamOnCallResponders",
|
3283
|
+
"v2.team_on_call_responders_data" => "TeamOnCallRespondersData",
|
3284
|
+
"v2.team_on_call_responders_data_relationships" => "TeamOnCallRespondersDataRelationships",
|
3285
|
+
"v2.team_on_call_responders_data_relationships_escalations" => "TeamOnCallRespondersDataRelationshipsEscalations",
|
3286
|
+
"v2.team_on_call_responders_data_relationships_escalations_data_items" => "TeamOnCallRespondersDataRelationshipsEscalationsDataItems",
|
3287
|
+
"v2.team_on_call_responders_data_relationships_escalations_data_items_type" => "TeamOnCallRespondersDataRelationshipsEscalationsDataItemsType",
|
3288
|
+
"v2.team_on_call_responders_data_relationships_responders" => "TeamOnCallRespondersDataRelationshipsResponders",
|
3289
|
+
"v2.team_on_call_responders_data_relationships_responders_data_items" => "TeamOnCallRespondersDataRelationshipsRespondersDataItems",
|
3290
|
+
"v2.team_on_call_responders_data_relationships_responders_data_items_type" => "TeamOnCallRespondersDataRelationshipsRespondersDataItemsType",
|
3291
|
+
"v2.team_on_call_responders_data_type" => "TeamOnCallRespondersDataType",
|
3292
|
+
"v2.team_on_call_responders_included" => "TeamOnCallRespondersIncluded",
|
3267
3293
|
"v2.team_permission_setting" => "TeamPermissionSetting",
|
3268
3294
|
"v2.team_permission_setting_attributes" => "TeamPermissionSettingAttributes",
|
3269
3295
|
"v2.team_permission_setting_response" => "TeamPermissionSettingResponse",
|
@@ -3349,6 +3375,8 @@ module DatadogAPIClient
|
|
3349
3375
|
"v2.upsert_catalog_entity_request" => "UpsertCatalogEntityRequest",
|
3350
3376
|
"v2.upsert_catalog_entity_response" => "UpsertCatalogEntityResponse",
|
3351
3377
|
"v2.upsert_catalog_entity_response_included_item" => "UpsertCatalogEntityResponseIncludedItem",
|
3378
|
+
"v2.upsert_catalog_kind_request" => "UpsertCatalogKindRequest",
|
3379
|
+
"v2.upsert_catalog_kind_response" => "UpsertCatalogKindResponse",
|
3352
3380
|
"v2.urgency" => "Urgency",
|
3353
3381
|
"v2.url_param" => "UrlParam",
|
3354
3382
|
"v2.url_param_update" => "UrlParamUpdate",
|
@@ -33,7 +33,8 @@ module DatadogAPIClient::V1
|
|
33
33
|
|
34
34
|
# Take graph snapshots.
|
35
35
|
#
|
36
|
-
# Take graph snapshots.
|
36
|
+
# Take graph snapshots. Snapshots are PNG images generated by rendering a specified widget in a web page and capturing it once the data is available. The image is then uploaded to cloud storage.
|
37
|
+
#
|
37
38
|
# **Note**: When a snapshot is created, there is some delay before it is available.
|
38
39
|
#
|
39
40
|
# @param start [Integer] The POSIX timestamp of the start of the query in seconds.
|
@@ -30,6 +30,15 @@ module DatadogAPIClient::V1
|
|
30
30
|
# Whether or not the monitor is deleted. (Always `null`)
|
31
31
|
attr_accessor :deleted
|
32
32
|
|
33
|
+
# Indicates whether the monitor is in a draft or published state.
|
34
|
+
#
|
35
|
+
# `draft`: The monitor appears as Draft and does not send notifications.
|
36
|
+
# `published`: The monitor is active and evaluates conditions and notify as configured.
|
37
|
+
#
|
38
|
+
# This field is in preview. The draft value is only available to customers with the feature enabled.
|
39
|
+
#
|
40
|
+
attr_accessor :draft_status
|
41
|
+
|
33
42
|
# ID of this monitor.
|
34
43
|
attr_accessor :id
|
35
44
|
|
@@ -81,6 +90,7 @@ module DatadogAPIClient::V1
|
|
81
90
|
:'created' => :'created',
|
82
91
|
:'creator' => :'creator',
|
83
92
|
:'deleted' => :'deleted',
|
93
|
+
:'draft_status' => :'draft_status',
|
84
94
|
:'id' => :'id',
|
85
95
|
:'matching_downtimes' => :'matching_downtimes',
|
86
96
|
:'message' => :'message',
|
@@ -105,6 +115,7 @@ module DatadogAPIClient::V1
|
|
105
115
|
:'created' => :'Time',
|
106
116
|
:'creator' => :'Creator',
|
107
117
|
:'deleted' => :'Time',
|
118
|
+
:'draft_status' => :'MonitorDraftStatus',
|
108
119
|
:'id' => :'Integer',
|
109
120
|
:'matching_downtimes' => :'Array<MatchingDowntime>',
|
110
121
|
:'message' => :'String',
|
@@ -162,6 +173,10 @@ module DatadogAPIClient::V1
|
|
162
173
|
self.deleted = attributes[:'deleted']
|
163
174
|
end
|
164
175
|
|
176
|
+
if attributes.key?(:'draft_status')
|
177
|
+
self.draft_status = attributes[:'draft_status']
|
178
|
+
end
|
179
|
+
|
165
180
|
if attributes.key?(:'id')
|
166
181
|
self.id = attributes[:'id']
|
167
182
|
end
|
@@ -283,6 +298,7 @@ module DatadogAPIClient::V1
|
|
283
298
|
created == o.created &&
|
284
299
|
creator == o.creator &&
|
285
300
|
deleted == o.deleted &&
|
301
|
+
draft_status == o.draft_status &&
|
286
302
|
id == o.id &&
|
287
303
|
matching_downtimes == o.matching_downtimes &&
|
288
304
|
message == o.message &&
|
@@ -304,7 +320,7 @@ module DatadogAPIClient::V1
|
|
304
320
|
# @return [Integer] Hash code
|
305
321
|
# @!visibility private
|
306
322
|
def hash
|
307
|
-
[created, creator, deleted, id, matching_downtimes, message, modified, multi, name, options, overall_state, priority, query, restricted_roles, state, tags, type, additional_properties].hash
|
323
|
+
[created, creator, deleted, draft_status, id, matching_downtimes, message, modified, multi, name, options, overall_state, priority, query, restricted_roles, state, tags, type, additional_properties].hash
|
308
324
|
end
|
309
325
|
end
|
310
326
|
end
|
@@ -0,0 +1,32 @@
|
|
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
|
+
# Indicates whether the monitor is in a draft or published state.
|
21
|
+
#
|
22
|
+
# `draft`: The monitor appears as Draft and does not send notifications.
|
23
|
+
# `published`: The monitor is active and evaluates conditions and notify as configured.
|
24
|
+
#
|
25
|
+
# This field is in preview. The draft value is only available to customers with the feature enabled.
|
26
|
+
class MonitorDraftStatus
|
27
|
+
include BaseEnumModel
|
28
|
+
|
29
|
+
DRAFT = "draft".freeze
|
30
|
+
PUBLISHED = "published".freeze
|
31
|
+
end
|
32
|
+
end
|