datadog_api_client 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/conftest.py +2 -1
- data/.generator/schemas/v1/openapi.yaml +2 -2
- data/.generator/src/generator/templates/example.j2 +5 -0
- data/CHANGELOG.md +9 -0
- data/examples/v1/pagerduty-integration/DeletePagerDutyIntegrationService.rb +2 -2
- data/examples/v2/audit/ListAuditLogs_1275402458.rb +8 -0
- data/examples/v2/audit/SearchAuditLogs_3215529662.rb +22 -0
- data/examples/v2/events/ListEvents_1527584014.rb +13 -0
- data/examples/v2/events/SearchEvents_3856995058.rb +25 -0
- data/examples/v2/incidents/ListIncidents_2665616954.rb +11 -0
- data/examples/v2/logs/ListLogsGet_738202670.rb +8 -0
- data/examples/v2/logs/ListLogs_3138392594.rb +25 -0
- data/examples/v2/processes/ListProcesses_797840471.rb +8 -0
- data/examples/v2/rum/ListRUMEvents_2680821282.rb +8 -0
- data/examples/v2/rum/SearchRUMEvents_574690310.rb +21 -0
- data/examples/v2/security-monitoring/ListSecurityMonitoringSignals_3960412991.rb +8 -0
- data/examples/v2/security-monitoring/SearchSecurityMonitoringSignals_1309350146.rb +20 -0
- data/lib/datadog_api_client/version.rb +1 -1
- data/lib/datadog_api_client.rb +2 -0
- metadata +14 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd5c2053dd7bb902ba13dd99e39a0df62c34f204110b88a999716ecfe4025bab
|
4
|
+
data.tar.gz: 5ac8f0b69a075a79f2610ff8ecd90834284f699283416a251e443d3d56ffe54a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9a6ee47bed49a46ffec9370428c7186946dd677861c3b8812033d9b683c2eb3852ae44e5d38e845e95f70e5648b4fc4483ddf5190596e482aa63b69aca62877
|
7
|
+
data.tar.gz: 6f984509a27848546eb2682a30da8056da8227053e1f1dcb734ef45a48254145280f71411fb000c0450de9a1320462ef013cf82ada3dff9c3a6c97afbd626548
|
data/.apigentools-info
CHANGED
@@ -4,13 +4,13 @@
|
|
4
4
|
"spec_versions": {
|
5
5
|
"v1": {
|
6
6
|
"apigentools_version": "1.6.2",
|
7
|
-
"regenerated": "2022-
|
8
|
-
"spec_repo_commit": "
|
7
|
+
"regenerated": "2022-08-02 14:16:13.272043",
|
8
|
+
"spec_repo_commit": "38d3cf07"
|
9
9
|
},
|
10
10
|
"v2": {
|
11
11
|
"apigentools_version": "1.6.2",
|
12
|
-
"regenerated": "2022-
|
13
|
-
"spec_repo_commit": "
|
12
|
+
"regenerated": "2022-08-02 14:16:13.283974",
|
13
|
+
"spec_repo_commit": "38d3cf07"
|
14
14
|
}
|
15
15
|
}
|
16
16
|
}
|
data/.generator/conftest.py
CHANGED
@@ -106,7 +106,7 @@ def pytest_bdd_after_scenario(request, feature, scenario):
|
|
106
106
|
|
107
107
|
def pytest_bdd_apply_tag(tag, function):
|
108
108
|
"""Register tags as custom markers and skip test for '@skip' ones."""
|
109
|
-
skip_tags = {
|
109
|
+
skip_tags = {}
|
110
110
|
if tag in skip_tags:
|
111
111
|
marker = pytest.mark.skip(reason=f"skipped because '{tag}' in {skip_tags}")
|
112
112
|
marker(function)
|
@@ -443,6 +443,7 @@ def execute_request(context, api_version):
|
|
443
443
|
@when("the request with pagination is sent")
|
444
444
|
def execute_request_with_pagination(context):
|
445
445
|
"""Execute the prepared request paginated."""
|
446
|
+
context["pagination"] = True
|
446
447
|
|
447
448
|
|
448
449
|
@then(parsers.parse("the response status is {status:d} {description}"))
|
@@ -20619,8 +20619,8 @@ paths:
|
|
20619
20619
|
schema:
|
20620
20620
|
type: string
|
20621
20621
|
responses:
|
20622
|
-
'
|
20623
|
-
description:
|
20622
|
+
'204':
|
20623
|
+
description: No Content
|
20624
20624
|
'403':
|
20625
20625
|
content:
|
20626
20626
|
application/json:
|
@@ -33,8 +33,13 @@ opts = {
|
|
33
33
|
{%- endfor %}
|
34
34
|
}
|
35
35
|
{%- endif %}
|
36
|
+
|
37
|
+
{%- if context.pagination %}
|
38
|
+
api_instance.{{ context.api_request.operation_id|snake_case }}_with_pagination({{ parameters }}) { |item| puts item }
|
39
|
+
{%- else %}
|
36
40
|
{%- if context.status_code != 204 %}
|
37
41
|
p api_instance.{{ context.api_request.operation_id|snake_case }}({{ parameters }})
|
38
42
|
{%- else %}
|
39
43
|
api_instance.{{ context.api_request.operation_id|snake_case }}({{ parameters }})
|
40
44
|
{%- endif %}
|
45
|
+
{%- endif %}
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2.0.2 / 2022-08-03
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
* Update Pagerduty operation `DeletePagerDutyIntegrationService` response status code by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1004
|
7
|
+
* Don't try to load model_base on eager_load by @skarimo in https://github.com/DataDog/datadog-api-client-ruby/pull/1018
|
8
|
+
|
9
|
+
|
10
|
+
**Full Changelog**: https://github.com/DataDog/datadog-api-client-ruby/compare/v2.0.1...v2.0.2
|
11
|
+
|
3
12
|
## 2.0.1 / 2022-08-02
|
4
13
|
|
5
14
|
### Fixed
|
@@ -1,5 +1,5 @@
|
|
1
|
-
# Delete a single service object returns "
|
1
|
+
# Delete a single service object returns "No Content" response
|
2
2
|
|
3
3
|
require "datadog_api_client"
|
4
4
|
api_instance = DatadogAPIClient::V1::PagerDutyIntegrationAPI.new
|
5
|
-
|
5
|
+
api_instance.delete_pager_duty_integration_service("service_name")
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Search Audit Logs events returns "OK" response with pagination
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::AuditAPI.new
|
5
|
+
|
6
|
+
body = DatadogAPIClient::V2::AuditLogsSearchEventsRequest.new({
|
7
|
+
filter: DatadogAPIClient::V2::AuditLogsQueryFilter.new({
|
8
|
+
from: "now-15m",
|
9
|
+
to: "now",
|
10
|
+
}),
|
11
|
+
options: DatadogAPIClient::V2::AuditLogsQueryOptions.new({
|
12
|
+
timezone: "GMT",
|
13
|
+
}),
|
14
|
+
page: DatadogAPIClient::V2::AuditLogsQueryPageOptions.new({
|
15
|
+
limit: 2,
|
16
|
+
}),
|
17
|
+
sort: DatadogAPIClient::V2::AuditLogsSort::TIMESTAMP_ASCENDING,
|
18
|
+
})
|
19
|
+
opts = {
|
20
|
+
body: body,
|
21
|
+
}
|
22
|
+
api_instance.search_audit_logs_with_pagination(opts) { |item| puts item }
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# Get a list of events returns "OK" response with pagination
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
DatadogAPIClient::V2.configure do |config|
|
5
|
+
config.unstable_operations["v2.list_events".to_sym] = true
|
6
|
+
end
|
7
|
+
api_instance = DatadogAPIClient::V2::EventsAPI.new
|
8
|
+
opts = {
|
9
|
+
filter_from: "now-15m",
|
10
|
+
filter_to: "now",
|
11
|
+
page_limit: 2,
|
12
|
+
}
|
13
|
+
api_instance.list_events_with_pagination(opts) { |item| puts item }
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Search events returns "OK" response with pagination
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
DatadogAPIClient::V2.configure do |config|
|
5
|
+
config.unstable_operations["v2.search_events".to_sym] = true
|
6
|
+
end
|
7
|
+
api_instance = DatadogAPIClient::V2::EventsAPI.new
|
8
|
+
|
9
|
+
body = DatadogAPIClient::V2::EventsListRequest.new({
|
10
|
+
filter: DatadogAPIClient::V2::EventsQueryFilter.new({
|
11
|
+
from: "now-15m",
|
12
|
+
to: "now",
|
13
|
+
}),
|
14
|
+
options: DatadogAPIClient::V2::EventsQueryOptions.new({
|
15
|
+
timezone: "GMT",
|
16
|
+
}),
|
17
|
+
page: DatadogAPIClient::V2::EventsRequestPage.new({
|
18
|
+
limit: 2,
|
19
|
+
}),
|
20
|
+
sort: DatadogAPIClient::V2::EventsSort::TIMESTAMP_ASCENDING,
|
21
|
+
})
|
22
|
+
opts = {
|
23
|
+
body: body,
|
24
|
+
}
|
25
|
+
api_instance.search_events_with_pagination(opts) { |item| puts item }
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Get a list of incidents returns "OK" response with pagination
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
DatadogAPIClient::V2.configure do |config|
|
5
|
+
config.unstable_operations["v2.list_incidents".to_sym] = true
|
6
|
+
end
|
7
|
+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
|
8
|
+
opts = {
|
9
|
+
page_size: 2,
|
10
|
+
}
|
11
|
+
api_instance.list_incidents_with_pagination(opts) { |item| puts item }
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Search logs returns "OK" response with pagination
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::LogsAPI.new
|
5
|
+
|
6
|
+
body = DatadogAPIClient::V2::LogsListRequest.new({
|
7
|
+
filter: DatadogAPIClient::V2::LogsQueryFilter.new({
|
8
|
+
from: "now-15m",
|
9
|
+
indexes: [
|
10
|
+
"main",
|
11
|
+
],
|
12
|
+
to: "now",
|
13
|
+
}),
|
14
|
+
options: DatadogAPIClient::V2::LogsQueryOptions.new({
|
15
|
+
timezone: "GMT",
|
16
|
+
}),
|
17
|
+
page: DatadogAPIClient::V2::LogsListRequestPage.new({
|
18
|
+
limit: 2,
|
19
|
+
}),
|
20
|
+
sort: DatadogAPIClient::V2::LogsSort::TIMESTAMP_ASCENDING,
|
21
|
+
})
|
22
|
+
opts = {
|
23
|
+
body: body,
|
24
|
+
}
|
25
|
+
api_instance.list_logs_with_pagination(opts) { |item| puts item }
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Search RUM events returns "OK" response with pagination
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::RUMAPI.new
|
5
|
+
|
6
|
+
body = DatadogAPIClient::V2::RUMSearchEventsRequest.new({
|
7
|
+
filter: DatadogAPIClient::V2::RUMQueryFilter.new({
|
8
|
+
from: "now-15m",
|
9
|
+
query: "@type:session AND @session.type:user",
|
10
|
+
to: "now",
|
11
|
+
}),
|
12
|
+
options: DatadogAPIClient::V2::RUMQueryOptions.new({
|
13
|
+
time_offset: 0,
|
14
|
+
timezone: "GMT",
|
15
|
+
}),
|
16
|
+
page: DatadogAPIClient::V2::RUMQueryPageOptions.new({
|
17
|
+
limit: 2,
|
18
|
+
}),
|
19
|
+
sort: DatadogAPIClient::V2::RUMSort::TIMESTAMP_ASCENDING,
|
20
|
+
})
|
21
|
+
api_instance.search_rum_events_with_pagination(body) { |item| puts item }
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Get a quick list of security signals returns "OK" response with pagination
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
|
5
|
+
opts = {
|
6
|
+
page_limit: 2,
|
7
|
+
}
|
8
|
+
api_instance.list_security_monitoring_signals_with_pagination(opts) { |item| puts item }
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Get a list of security signals returns "OK" response with pagination
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
|
5
|
+
|
6
|
+
body = DatadogAPIClient::V2::SecurityMonitoringSignalListRequest.new({
|
7
|
+
filter: DatadogAPIClient::V2::SecurityMonitoringSignalListRequestFilter.new({
|
8
|
+
from: (Time.now + -15 * 60),
|
9
|
+
query: "security:attack status:high",
|
10
|
+
to: Time.now,
|
11
|
+
}),
|
12
|
+
page: DatadogAPIClient::V2::SecurityMonitoringSignalListRequestPage.new({
|
13
|
+
limit: 2,
|
14
|
+
}),
|
15
|
+
sort: DatadogAPIClient::V2::SecurityMonitoringSignalsSort::TIMESTAMP_ASCENDING,
|
16
|
+
})
|
17
|
+
opts = {
|
18
|
+
body: body,
|
19
|
+
}
|
20
|
+
api_instance.search_security_monitoring_signals_with_pagination(opts) { |item| puts item }
|
data/lib/datadog_api_client.rb
CHANGED
@@ -7,5 +7,7 @@ loader.collapse("#{__dir__}/datadog_api_client/*/models/")
|
|
7
7
|
loader.collapse("#{__dir__}/datadog_api_client/*/api/")
|
8
8
|
loader.push_dir("#{__dir__}/datadog_api_client/v1", namespace: DatadogAPIClient::V1)
|
9
9
|
loader.push_dir("#{__dir__}/datadog_api_client/v2", namespace: DatadogAPIClient::V2)
|
10
|
+
# Ignore model_base.rb from being loaded in by zeitwerk as it is loaded in by default
|
11
|
+
loader.ignore("#{__dir__}/datadog_api_client/*/model_base.rb")
|
10
12
|
loader.inflector = DatadogAPIClient::DatadogAPIClientInflector.new
|
11
13
|
loader.setup
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datadog_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Datadog, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -443,7 +443,9 @@ files:
|
|
443
443
|
- examples/v1/webhooks-integration/UpdateWebhooksIntegration.rb
|
444
444
|
- examples/v1/webhooks-integration/UpdateWebhooksIntegrationCustomVariable.rb
|
445
445
|
- examples/v2/audit/ListAuditLogs.rb
|
446
|
+
- examples/v2/audit/ListAuditLogs_1275402458.rb
|
446
447
|
- examples/v2/audit/SearchAuditLogs.rb
|
448
|
+
- examples/v2/audit/SearchAuditLogs_3215529662.rb
|
447
449
|
- examples/v2/authn-mappings/CreateAuthNMapping.rb
|
448
450
|
- examples/v2/authn-mappings/DeleteAuthNMapping.rb
|
449
451
|
- examples/v2/authn-mappings/GetAuthNMapping.rb
|
@@ -464,8 +466,10 @@ files:
|
|
464
466
|
- examples/v2/dashboard-lists/GetDashboardListItems.rb
|
465
467
|
- examples/v2/dashboard-lists/UpdateDashboardListItems.rb
|
466
468
|
- examples/v2/events/ListEvents.rb
|
469
|
+
- examples/v2/events/ListEvents_1527584014.rb
|
467
470
|
- examples/v2/events/ListEvents_2663715109.rb
|
468
471
|
- examples/v2/events/SearchEvents.rb
|
472
|
+
- examples/v2/events/SearchEvents_3856995058.rb
|
469
473
|
- examples/v2/incident-services/CreateIncidentService.rb
|
470
474
|
- examples/v2/incident-services/DeleteIncidentService.rb
|
471
475
|
- examples/v2/incident-services/GetIncidentService.rb
|
@@ -480,6 +484,7 @@ files:
|
|
480
484
|
- examples/v2/incidents/DeleteIncident.rb
|
481
485
|
- examples/v2/incidents/GetIncident.rb
|
482
486
|
- examples/v2/incidents/ListIncidents.rb
|
487
|
+
- examples/v2/incidents/ListIncidents_2665616954.rb
|
483
488
|
- examples/v2/incidents/UpdateIncident.rb
|
484
489
|
- examples/v2/incidents/UpdateIncident_1009194038.rb
|
485
490
|
- examples/v2/incidents/UpdateIncident_3369341440.rb
|
@@ -525,6 +530,8 @@ files:
|
|
525
530
|
- examples/v2/logs/ListLogs.rb
|
526
531
|
- examples/v2/logs/ListLogsGet.rb
|
527
532
|
- examples/v2/logs/ListLogsGet_2034110533.rb
|
533
|
+
- examples/v2/logs/ListLogsGet_738202670.rb
|
534
|
+
- examples/v2/logs/ListLogs_3138392594.rb
|
528
535
|
- examples/v2/logs/SubmitLog.rb
|
529
536
|
- examples/v2/logs/SubmitLog_3496222707.rb
|
530
537
|
- examples/v2/logs/SubmitLog_904601870.rb
|
@@ -547,6 +554,7 @@ files:
|
|
547
554
|
- examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
|
548
555
|
- examples/v2/organizations/UploadIdPMetadata.rb
|
549
556
|
- examples/v2/processes/ListProcesses.rb
|
557
|
+
- examples/v2/processes/ListProcesses_797840471.rb
|
550
558
|
- examples/v2/roles/AddPermissionToRole.rb
|
551
559
|
- examples/v2/roles/AddUserToRole.rb
|
552
560
|
- examples/v2/roles/CloneRole.rb
|
@@ -562,7 +570,9 @@ files:
|
|
562
570
|
- examples/v2/roles/UpdateRole.rb
|
563
571
|
- examples/v2/rum/AggregateRUMEvents.rb
|
564
572
|
- examples/v2/rum/ListRUMEvents.rb
|
573
|
+
- examples/v2/rum/ListRUMEvents_2680821282.rb
|
565
574
|
- examples/v2/rum/SearchRUMEvents.rb
|
575
|
+
- examples/v2/rum/SearchRUMEvents_574690310.rb
|
566
576
|
- examples/v2/security-monitoring/CreateSecurityFilter.rb
|
567
577
|
- examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb
|
568
578
|
- examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.rb
|
@@ -578,7 +588,9 @@ files:
|
|
578
588
|
- examples/v2/security-monitoring/ListSecurityFilters.rb
|
579
589
|
- examples/v2/security-monitoring/ListSecurityMonitoringRules.rb
|
580
590
|
- examples/v2/security-monitoring/ListSecurityMonitoringSignals.rb
|
591
|
+
- examples/v2/security-monitoring/ListSecurityMonitoringSignals_3960412991.rb
|
581
592
|
- examples/v2/security-monitoring/SearchSecurityMonitoringSignals.rb
|
593
|
+
- examples/v2/security-monitoring/SearchSecurityMonitoringSignals_1309350146.rb
|
582
594
|
- examples/v2/security-monitoring/UpdateSecurityFilter.rb
|
583
595
|
- examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb
|
584
596
|
- examples/v2/service-accounts/CreateServiceAccountApplicationKey.rb
|