datadog_api_client 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.apigentools-info +6 -6
- data/.generator/conftest.py +2 -1
- data/.generator/schemas/v1/openapi.yaml +284 -902
- data/.generator/schemas/v2/openapi.yaml +343 -672
- data/.generator/src/generator/formatter.py +1 -1
- data/.generator/src/generator/templates/example.j2 +5 -0
- data/.github/workflows/test.yml +1 -1
- data/.github/workflows/test_integration.yml +5 -0
- data/CHANGELOG.md +42 -0
- data/README.md +13 -13
- data/examples/v1/dashboards/CreateDashboard_1094917386.rb +37 -0
- data/examples/v1/dashboards/CreateDashboard_1307120899.rb +61 -0
- data/examples/v1/monitors/ValidateExistingMonitor.rb +1 -0
- data/examples/v1/monitors/ValidateMonitor.rb +1 -0
- data/examples/v1/monitors/ValidateMonitor_4247196452.rb +38 -0
- data/examples/v1/pagerduty-integration/DeletePagerDutyIntegrationService.rb +2 -2
- data/examples/v1/synthetics/CreateGlobalVariable.rb +1 -0
- data/examples/v1/synthetics/CreateGlobalVariable_1068962881.rb +23 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +10 -0
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +6 -0
- data/examples/v1/synthetics/EditGlobalVariable.rb +1 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -0
- data/examples/v1/usage-metering/GetDailyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetMonthlyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetUsageAttribution.rb +0 -3
- 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/metrics/SubmitMetrics_1762007427.rb +23 -0
- data/examples/v2/processes/ListProcesses_797840471.rb +8 -0
- data/examples/v2/roles/UpdateRole.rb +13 -0
- data/examples/v2/rum/CreateRUMApplication.rb +15 -0
- data/examples/v2/rum/DeleteRUMApplication.rb +8 -0
- data/examples/v2/rum/GetRUMApplication.rb +8 -0
- data/examples/v2/rum/GetRUMApplications.rb +5 -0
- data/examples/v2/rum/ListRUMEvents_2680821282.rb +8 -0
- data/examples/v2/rum/SearchRUMEvents_574690310.rb +21 -0
- data/examples/v2/rum/UpdateRUMApplication.rb +16 -0
- data/examples/v2/security-monitoring/ListSecurityMonitoringSignals_3960412991.rb +8 -0
- data/examples/v2/security-monitoring/SearchSecurityMonitoringSignals_1309350146.rb +20 -0
- data/examples/v2/usage-metering/GetHourlyUsage.rb +5 -0
- data/lib/datadog_api_client/configuration.rb +0 -5
- data/lib/datadog_api_client/inflector.rb +16 -0
- data/lib/datadog_api_client/v1/api/metrics_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +42 -62
- data/lib/datadog_api_client/v1/models/formula_and_function_events_data_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/list_stream_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/metric_content_encoding.rb +1 -0
- data/lib/datadog_api_client/v1/models/monitor_options.rb +28 -1
- data/lib/datadog_api_client/v1/models/monitor_summary_widget_definition.rb +13 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +21 -1
- data/lib/datadog_api_client/v1/models/on_missing_data_option.rb +33 -0
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth.rb +2 -1
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest.rb +155 -0
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options.rb +11 -12
- data/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +31 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_process_status.rb +0 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +15 -1
- data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +21 -1
- data/lib/datadog_api_client/v1/models/usage_billable_summary_hour.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_hour.rb +12 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +21 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +11 -1
- data/lib/datadog_api_client/v1/models/widget_monitor_summary_sort.rb +2 -0
- data/lib/datadog_api_client/v2/api/events_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/logs_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/metrics_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/rum_api.rb +329 -0
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +3 -3
- data/lib/datadog_api_client/v2/models/content_encoding.rb +1 -0
- data/lib/datadog_api_client/v2/models/metric_content_encoding.rb +2 -0
- data/lib/datadog_api_client/v2/models/role_update_data.rb +11 -1
- data/lib/datadog_api_client/v2/models/rum_application.rb +166 -0
- data/lib/datadog_api_client/v2/models/rum_application_attributes.rb +279 -0
- data/lib/datadog_api_client/v2/models/rum_application_create.rb +145 -0
- data/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb +132 -0
- data/lib/datadog_api_client/v2/models/rum_application_create_request.rb +122 -0
- data/lib/datadog_api_client/v2/models/rum_application_create_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rum_application_response.rb +111 -0
- data/lib/datadog_api_client/v2/models/rum_application_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rum_application_update.rb +155 -0
- data/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb +121 -0
- data/lib/datadog_api_client/v2/models/rum_application_update_request.rb +122 -0
- data/lib/datadog_api_client/v2/models/rum_application_update_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rum_applications_response.rb +113 -0
- data/lib/datadog_api_client/version.rb +1 -1
- data/lib/datadog_api_client.rb +6 -4
- metadata +41 -3
- data/lib/datadog_api_client/v2.rb +0 -595
@@ -7,6 +7,9 @@ api_instance = DatadogAPIClient::V2::RolesAPI.new
|
|
7
7
|
ROLE_DATA_ATTRIBUTES_NAME = ENV["ROLE_DATA_ATTRIBUTES_NAME"]
|
8
8
|
ROLE_DATA_ID = ENV["ROLE_DATA_ID"]
|
9
9
|
|
10
|
+
# there is a valid "permission" in the system
|
11
|
+
PERMISSION_ID = ENV["PERMISSION_ID"]
|
12
|
+
|
10
13
|
body = DatadogAPIClient::V2::RoleUpdateRequest.new({
|
11
14
|
data: DatadogAPIClient::V2::RoleUpdateData.new({
|
12
15
|
id: ROLE_DATA_ID,
|
@@ -14,6 +17,16 @@ body = DatadogAPIClient::V2::RoleUpdateRequest.new({
|
|
14
17
|
attributes: DatadogAPIClient::V2::RoleUpdateAttributes.new({
|
15
18
|
name: "developers-updated",
|
16
19
|
}),
|
20
|
+
relationships: DatadogAPIClient::V2::RoleRelationships.new({
|
21
|
+
permissions: DatadogAPIClient::V2::RelationshipToPermissions.new({
|
22
|
+
data: [
|
23
|
+
DatadogAPIClient::V2::RelationshipToPermissionData.new({
|
24
|
+
id: PERMISSION_ID,
|
25
|
+
type: DatadogAPIClient::V2::PermissionsType::PERMISSIONS,
|
26
|
+
}),
|
27
|
+
],
|
28
|
+
}),
|
29
|
+
}),
|
17
30
|
}),
|
18
31
|
})
|
19
32
|
p api_instance.update_role(ROLE_DATA_ID, body)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Create a new RUM application returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::RUMAPI.new
|
5
|
+
|
6
|
+
body = DatadogAPIClient::V2::RUMApplicationCreateRequest.new({
|
7
|
+
data: DatadogAPIClient::V2::RUMApplicationCreate.new({
|
8
|
+
attributes: DatadogAPIClient::V2::RUMApplicationCreateAttributes.new({
|
9
|
+
name: "my_new_rum_application",
|
10
|
+
type: "ios",
|
11
|
+
}),
|
12
|
+
type: DatadogAPIClient::V2::RUMApplicationCreateType::RUM_APPLICATION_CREATE,
|
13
|
+
}),
|
14
|
+
})
|
15
|
+
p api_instance.create_rum_application(body)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Delete a RUM application returns "No Content" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::RUMAPI.new
|
5
|
+
|
6
|
+
# there is a valid "rum_application" in the system
|
7
|
+
RUM_APPLICATION_DATA_ID = ENV["RUM_APPLICATION_DATA_ID"]
|
8
|
+
api_instance.delete_rum_application(RUM_APPLICATION_DATA_ID)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Get a RUM application returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::RUMAPI.new
|
5
|
+
|
6
|
+
# there is a valid "rum_application" in the system
|
7
|
+
RUM_APPLICATION_DATA_ID = ENV["RUM_APPLICATION_DATA_ID"]
|
8
|
+
p api_instance.get_rum_application(RUM_APPLICATION_DATA_ID)
|
@@ -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,16 @@
|
|
1
|
+
# Update a RUM application returns "OK" response
|
2
|
+
|
3
|
+
require "datadog_api_client"
|
4
|
+
api_instance = DatadogAPIClient::V2::RUMAPI.new
|
5
|
+
|
6
|
+
body = DatadogAPIClient::V2::RUMApplicationUpdateRequest.new({
|
7
|
+
data: DatadogAPIClient::V2::RUMApplicationUpdate.new({
|
8
|
+
attributes: DatadogAPIClient::V2::RUMApplicationUpdateAttributes.new({
|
9
|
+
name: "updated_name_for_my_existing_rum_application",
|
10
|
+
type: "browser",
|
11
|
+
}),
|
12
|
+
id: "abcd1234-0000-0000-abcd-1234abcd5678",
|
13
|
+
type: DatadogAPIClient::V2::RUMApplicationUpdateType::RUM_APPLICATION_UPDATE,
|
14
|
+
}),
|
15
|
+
})
|
16
|
+
p api_instance.update_rum_application("id", body)
|
@@ -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 }
|
@@ -158,11 +158,6 @@ module DatadogAPIClient
|
|
158
158
|
@compress = true
|
159
159
|
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
160
160
|
@unstable_operations = {
|
161
|
-
"v1.get_daily_custom_reports": false,
|
162
|
-
"v1.get_monthly_custom_reports": false,
|
163
|
-
"v1.get_specified_daily_custom_reports": false,
|
164
|
-
"v1.get_specified_monthly_custom_reports": false,
|
165
|
-
"v1.get_usage_attribution": false,
|
166
161
|
"v1.get_slo_history": false,
|
167
162
|
"v1.search_slo": false,
|
168
163
|
"v2.list_events": false,
|
@@ -340,6 +340,7 @@ module DatadogAPIClient
|
|
340
340
|
"v1.notebook_update_request" => "NotebookUpdateRequest",
|
341
341
|
"v1.note_widget_definition" => "NoteWidgetDefinition",
|
342
342
|
"v1.note_widget_definition_type" => "NoteWidgetDefinitionType",
|
343
|
+
"v1.on_missing_data_option" => "OnMissingDataOption",
|
343
344
|
"v1.organization" => "Organization",
|
344
345
|
"v1.organization_billing" => "OrganizationBilling",
|
345
346
|
"v1.organization_create_body" => "OrganizationCreateBody",
|
@@ -464,6 +465,8 @@ module DatadogAPIClient
|
|
464
465
|
"v1.synthetics_assertion_target" => "SyntheticsAssertionTarget",
|
465
466
|
"v1.synthetics_assertion_type" => "SyntheticsAssertionType",
|
466
467
|
"v1.synthetics_basic_auth" => "SyntheticsBasicAuth",
|
468
|
+
"v1.synthetics_basic_auth_digest" => "SyntheticsBasicAuthDigest",
|
469
|
+
"v1.synthetics_basic_auth_digest_type" => "SyntheticsBasicAuthDigestType",
|
467
470
|
"v1.synthetics_basic_auth_ntlm" => "SyntheticsBasicAuthNTLM",
|
468
471
|
"v1.synthetics_basic_auth_ntlm_type" => "SyntheticsBasicAuthNTLMType",
|
469
472
|
"v1.synthetics_basic_auth_sigv4" => "SyntheticsBasicAuthSigv4",
|
@@ -1109,6 +1112,19 @@ module DatadogAPIClient
|
|
1109
1112
|
"v2.rum_aggregation_buckets_response" => "RUMAggregationBucketsResponse",
|
1110
1113
|
"v2.rum_aggregation_function" => "RUMAggregationFunction",
|
1111
1114
|
"v2.rum_analytics_aggregate_response" => "RUMAnalyticsAggregateResponse",
|
1115
|
+
"v2.rum_application" => "RUMApplication",
|
1116
|
+
"v2.rum_application_attributes" => "RUMApplicationAttributes",
|
1117
|
+
"v2.rum_application_create" => "RUMApplicationCreate",
|
1118
|
+
"v2.rum_application_create_attributes" => "RUMApplicationCreateAttributes",
|
1119
|
+
"v2.rum_application_create_request" => "RUMApplicationCreateRequest",
|
1120
|
+
"v2.rum_application_create_type" => "RUMApplicationCreateType",
|
1121
|
+
"v2.rum_application_response" => "RUMApplicationResponse",
|
1122
|
+
"v2.rum_applications_response" => "RUMApplicationsResponse",
|
1123
|
+
"v2.rum_application_type" => "RUMApplicationType",
|
1124
|
+
"v2.rum_application_update" => "RUMApplicationUpdate",
|
1125
|
+
"v2.rum_application_update_attributes" => "RUMApplicationUpdateAttributes",
|
1126
|
+
"v2.rum_application_update_request" => "RUMApplicationUpdateRequest",
|
1127
|
+
"v2.rum_application_update_type" => "RUMApplicationUpdateType",
|
1112
1128
|
"v2.rum_bucket_response" => "RUMBucketResponse",
|
1113
1129
|
"v2.rum_compute" => "RUMCompute",
|
1114
1130
|
"v2.rum_compute_type" => "RUMComputeType",
|
@@ -406,7 +406,7 @@ module DatadogAPIClient::V1
|
|
406
406
|
if @api_client.config.debugging
|
407
407
|
@api_client.config.logger.debug 'Calling API: MetricsAPI.submit_metrics ...'
|
408
408
|
end
|
409
|
-
allowable_values = ['deflate']
|
409
|
+
allowable_values = ['deflate', 'gzip']
|
410
410
|
if @api_client.config.client_side_validation && opts[:'content_encoding'] && !allowable_values.include?(opts[:'content_encoding'])
|
411
411
|
fail ArgumentError, "invalid value for \"content_encoding\", must be one of #{allowable_values}"
|
412
412
|
end
|