datadog_api_client 2.21.0 → 2.23.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 +308 -695
- data/.generator/schemas/v2/openapi.yaml +664 -185
- data/.github/workflows/prepare_release.yml +2 -2
- data/.github/workflows/publish.yml +2 -2
- data/.github/workflows/release.yml +2 -2
- data/.github/workflows/test.yml +1 -1
- data/CHANGELOG.md +41 -0
- data/Gemfile +1 -1
- data/examples/v1/aws-integration/CreateAWSAccount.rb +1 -1
- data/examples/v1/aws-integration/CreateNewAWSExternalID.rb +1 -0
- data/examples/v1/aws-integration/UpdateAWSAccount.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1241981394.rb +118 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +9 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_960766374.rb +8 -0
- data/examples/v1/synthetics/UpdateAPITest.rb +8 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +3 -0
- data/examples/v2/apm-retention-filters/UpdateApmRetentionFilter.rb +2 -2
- data/examples/v2/authn-mappings/CreateAuthNMapping.rb +1 -1
- data/examples/v2/authn-mappings/UpdateAuthNMapping.rb +1 -1
- data/examples/v2/{cloud-workload-security → csm-threats}/CreateCSMThreatsAgentRule.rb +2 -2
- data/examples/v2/{cloud-workload-security → csm-threats}/CreateCloudWorkloadSecurityAgentRule.rb +2 -2
- data/examples/v2/{cloud-workload-security → csm-threats}/DeleteCSMThreatsAgentRule.rb +1 -1
- data/examples/v2/{cloud-workload-security → csm-threats}/DeleteCloudWorkloadSecurityAgentRule.rb +1 -1
- data/examples/v2/{cloud-workload-security → csm-threats}/DownloadCSMThreatsPolicy.rb +1 -1
- data/examples/v2/{cloud-workload-security → csm-threats}/DownloadCloudWorkloadPolicyFile.rb +1 -1
- data/examples/v2/{cloud-workload-security → csm-threats}/GetCSMThreatsAgentRule.rb +1 -1
- data/examples/v2/{cloud-workload-security → csm-threats}/GetCloudWorkloadSecurityAgentRule.rb +1 -1
- data/examples/v2/{cloud-workload-security → csm-threats}/ListCSMThreatsAgentRules.rb +1 -1
- data/examples/v2/{cloud-workload-security → csm-threats}/ListCloudWorkloadSecurityAgentRules.rb +1 -1
- data/examples/v2/{cloud-workload-security → csm-threats}/UpdateCSMThreatsAgentRule.rb +1 -1
- data/examples/v2/{cloud-workload-security → csm-threats}/UpdateCloudWorkloadSecurityAgentRule.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_109518525.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.rb +1 -1
- data/examples/v2/gcp-integration/UpdateGCPSTSAccount.rb +1 -1
- data/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.rb +1 -1
- data/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb +1 -1
- data/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.rb +4 -0
- data/examples/v2/metrics/QueryScalarData_3112571352.rb +2 -2
- data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +3 -3
- data/examples/v2/roles/CreateRole.rb +14 -2
- data/examples/v2/roles/CreateRole_3862893229.rb +27 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.rb +1 -1
- data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.rb +19 -0
- data/examples/v2/security-monitoring/ValidateSecurityMonitoringRule.rb +42 -0
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +4 -0
- data/examples/v2/service-level-objectives/CreateSLOReportJob.rb +20 -0
- data/examples/v2/service-level-objectives/GetSLOReport.rb +8 -0
- data/examples/v2/service-level-objectives/GetSLOReportJobStatus.rb +11 -0
- data/lib/datadog_api_client/configuration.rb +3 -0
- data/lib/datadog_api_client/inflector.rb +26 -8
- data/lib/datadog_api_client/v1/api/authentication_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/aws_integration_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/logs_indexes_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/logs_pipelines_api.rb +3 -3
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +112 -135
- data/lib/datadog_api_client/v1/api/users_api.rb +1 -1
- data/lib/datadog_api_client/v1/models/aws_account.rb +12 -2
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +3 -0
- data/lib/datadog_api_client/v1/models/monitor_options.rb +4 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +6 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +61 -1
- data/lib/datadog_api_client/v1/models/series.rb +1 -1
- data/lib/datadog_api_client/v1/models/service_level_objective.rb +2 -1
- data/lib/datadog_api_client/v1/models/service_level_objective_request.rb +2 -1
- data/lib/datadog_api_client/v1/models/slo_history_monitor.rb +7 -1
- data/lib/datadog_api_client/v1/models/slo_history_sli_data.rb +8 -1
- data/lib/datadog_api_client/v1/models/slo_overall_statuses.rb +2 -1
- data/lib/datadog_api_client/v1/models/slo_response_data.rb +2 -1
- data/lib/datadog_api_client/v1/models/slo_threshold.rb +2 -1
- data/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb +14 -2
- data/lib/datadog_api_client/v1/models/slo_time_slice_interval.rb +29 -0
- data/lib/datadog_api_client/v1/models/slo_time_slice_spec.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_timeframe.rb +2 -1
- data/lib/datadog_api_client/v1/models/synthetics_api_test_config.rb +14 -4
- data/lib/datadog_api_client/v1/models/synthetics_assertion.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_assertion_json_schema_meta_schema.rb +27 -0
- data/lib/datadog_api_client/v1/models/synthetics_assertion_json_schema_operator.rb +26 -0
- data/lib/datadog_api_client/v1/models/synthetics_assertion_json_schema_target.rb +129 -0
- data/lib/datadog_api_client/v1/models/{usage_attribution_metadata.rb → synthetics_assertion_json_schema_target_target.rb} +19 -21
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +13 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request_body_file.rb +175 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_request_body_type.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_billable_summary_keys.rb +11 -1
- data/lib/datadog_api_client/v2/api/apm_retention_filters_api.rb +8 -2
- data/lib/datadog_api_client/v2/api/authn_mappings_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/case_management_api.rb +17 -16
- data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +10 -10
- data/lib/datadog_api_client/v2/api/{cloud_workload_security_api.rb → csm_threats_api.rb} +35 -35
- data/lib/datadog_api_client/v2/api/events_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/ip_allowlist_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/logs_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/logs_archives_api.rb +4 -4
- data/lib/datadog_api_client/v2/api/logs_metrics_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/metrics_api.rb +4 -4
- data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +69 -1
- data/lib/datadog_api_client/v2/api/service_level_objectives_api.rb +245 -0
- data/lib/datadog_api_client/v2/api/spans_api.rb +3 -3
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +22 -4
- data/lib/datadog_api_client/v2/models/authn_mapping_create_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/authn_mapping_create_relationships.rb +37 -54
- data/lib/datadog_api_client/v2/models/authn_mapping_included.rb +2 -1
- data/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_role.rb +98 -0
- data/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_team.rb +98 -0
- data/lib/datadog_api_client/v2/models/authn_mapping_relationships.rb +14 -4
- data/lib/datadog_api_client/v2/models/authn_mapping_team.rb +100 -0
- data/lib/datadog_api_client/v2/models/authn_mapping_team_attributes.rb +212 -0
- data/lib/datadog_api_client/v2/models/authn_mapping_update_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/authn_mapping_update_relationships.rb +37 -54
- data/lib/datadog_api_client/v2/models/custom_destination_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_query_filter.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_storage_tier.rb +2 -1
- data/lib/datadog_api_client/v2/models/metric_series.rb +1 -1
- data/lib/datadog_api_client/v2/models/relationship_to_team.rb +80 -0
- data/lib/datadog_api_client/{v1/models/usage_attribution_response.rb → v2/models/relationship_to_team_data.rb} +21 -23
- data/lib/datadog_api_client/v2/models/retention_filter_create_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/retention_filter_response.rb +1 -1
- data/lib/datadog_api_client/v2/models/retention_filter_update_attributes.rb +183 -0
- data/lib/datadog_api_client/v2/models/retention_filter_update_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +14 -2
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +13 -14
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +13 -1
- data/lib/datadog_api_client/v2/models/slo_report_create_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/slo_report_create_request_attributes.rb +160 -0
- data/lib/datadog_api_client/{v1/models/usage_attribution_pagination.rb → v2/models/slo_report_create_request_data.rb} +29 -51
- data/lib/datadog_api_client/v2/models/slo_report_interval.rb +27 -0
- data/lib/datadog_api_client/v2/models/slo_report_post_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/slo_report_post_response_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/slo_report_status.rb +29 -0
- data/lib/datadog_api_client/v2/models/slo_report_status_get_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/slo_report_status_get_response_attributes.rb +80 -0
- data/lib/datadog_api_client/v2/models/slo_report_status_get_response_data.rb +100 -0
- data/lib/datadog_api_client/v2/models/timeseries_response_series.rb +8 -0
- data/lib/datadog_api_client/v2/models/user_team_included.rb +2 -1
- data/lib/datadog_api_client/v2/models/user_teams_response.rb +13 -1
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +70 -46
- data/examples/v1/usage-metering/GetUsageAttribution.rb +0 -9
- data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +0 -152
- data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +0 -63
- data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +0 -74
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +0 -590
|
@@ -1665,7 +1665,8 @@ module DatadogAPIClient::V2
|
|
|
1665
1665
|
#
|
|
1666
1666
|
# Update an existing rule. When updating `cases`, `queries` or `options`, the whole field
|
|
1667
1667
|
# must be included. For example, when modifying a query all queries must be included.
|
|
1668
|
-
# Default rules can only be updated to be enabled
|
|
1668
|
+
# Default rules can only be updated to be enabled, to change notifications, or to update
|
|
1669
|
+
# the tags (default tags cannot be removed).
|
|
1669
1670
|
#
|
|
1670
1671
|
# @param rule_id [String] The ID of the rule.
|
|
1671
1672
|
# @param body [SecurityMonitoringRuleUpdatePayload]
|
|
@@ -1798,5 +1799,72 @@ module DatadogAPIClient::V2
|
|
|
1798
1799
|
end
|
|
1799
1800
|
return data, status_code, headers
|
|
1800
1801
|
end
|
|
1802
|
+
|
|
1803
|
+
# Validate a detection rule.
|
|
1804
|
+
#
|
|
1805
|
+
# @see #validate_security_monitoring_rule_with_http_info
|
|
1806
|
+
def validate_security_monitoring_rule(body, opts = {})
|
|
1807
|
+
validate_security_monitoring_rule_with_http_info(body, opts)
|
|
1808
|
+
nil
|
|
1809
|
+
end
|
|
1810
|
+
|
|
1811
|
+
# Validate a detection rule.
|
|
1812
|
+
#
|
|
1813
|
+
# Validate a detection rule.
|
|
1814
|
+
#
|
|
1815
|
+
# @param body [SecurityMonitoringRuleCreatePayload]
|
|
1816
|
+
# @param opts [Hash] the optional parameters
|
|
1817
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1818
|
+
def validate_security_monitoring_rule_with_http_info(body, opts = {})
|
|
1819
|
+
|
|
1820
|
+
if @api_client.config.debugging
|
|
1821
|
+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.validate_security_monitoring_rule ...'
|
|
1822
|
+
end
|
|
1823
|
+
# verify the required parameter 'body' is set
|
|
1824
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
1825
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.validate_security_monitoring_rule"
|
|
1826
|
+
end
|
|
1827
|
+
# resource path
|
|
1828
|
+
local_var_path = '/api/v2/security_monitoring/rules/validation'
|
|
1829
|
+
|
|
1830
|
+
# query parameters
|
|
1831
|
+
query_params = opts[:query_params] || {}
|
|
1832
|
+
|
|
1833
|
+
# header parameters
|
|
1834
|
+
header_params = opts[:header_params] || {}
|
|
1835
|
+
# HTTP header 'Accept' (if needed)
|
|
1836
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
1837
|
+
# HTTP header 'Content-Type'
|
|
1838
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1839
|
+
|
|
1840
|
+
# form parameters
|
|
1841
|
+
form_params = opts[:form_params] || {}
|
|
1842
|
+
|
|
1843
|
+
# http body (model)
|
|
1844
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
1845
|
+
|
|
1846
|
+
# return_type
|
|
1847
|
+
return_type = opts[:debug_return_type]
|
|
1848
|
+
|
|
1849
|
+
# auth_names
|
|
1850
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
1851
|
+
|
|
1852
|
+
new_options = opts.merge(
|
|
1853
|
+
:operation => :validate_security_monitoring_rule,
|
|
1854
|
+
:header_params => header_params,
|
|
1855
|
+
:query_params => query_params,
|
|
1856
|
+
:form_params => form_params,
|
|
1857
|
+
:body => post_body,
|
|
1858
|
+
:auth_names => auth_names,
|
|
1859
|
+
:return_type => return_type,
|
|
1860
|
+
:api_version => "V2"
|
|
1861
|
+
)
|
|
1862
|
+
|
|
1863
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
1864
|
+
if @api_client.config.debugging
|
|
1865
|
+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#validate_security_monitoring_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1866
|
+
end
|
|
1867
|
+
return data, status_code, headers
|
|
1868
|
+
end
|
|
1801
1869
|
end
|
|
1802
1870
|
end
|
|
@@ -0,0 +1,245 @@
|
|
|
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 'cgi'
|
|
17
|
+
|
|
18
|
+
module DatadogAPIClient::V2
|
|
19
|
+
class ServiceLevelObjectivesAPI
|
|
20
|
+
attr_accessor :api_client
|
|
21
|
+
|
|
22
|
+
def initialize(api_client = DatadogAPIClient::APIClient.default)
|
|
23
|
+
@api_client = api_client
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Create a new SLO report.
|
|
27
|
+
#
|
|
28
|
+
# @see #create_slo_report_job_with_http_info
|
|
29
|
+
def create_slo_report_job(body, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_slo_report_job_with_http_info(body, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Create a new SLO report.
|
|
35
|
+
#
|
|
36
|
+
# Create a job to generate an SLO report. The report job is processed asynchronously and eventually results in a CSV report being available for download.
|
|
37
|
+
#
|
|
38
|
+
# Check the status of the job and download the CSV report using the returned `report_id`.
|
|
39
|
+
#
|
|
40
|
+
# @param body [SloReportCreateRequest] Create SLO report job request body.
|
|
41
|
+
# @param opts [Hash] the optional parameters
|
|
42
|
+
# @return [Array<(SLOReportPostResponse, Integer, Hash)>] SLOReportPostResponse data, response status code and response headers
|
|
43
|
+
def create_slo_report_job_with_http_info(body, opts = {})
|
|
44
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.create_slo_report_job".to_sym]
|
|
45
|
+
if unstable_enabled
|
|
46
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_slo_report_job")
|
|
47
|
+
else
|
|
48
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_slo_report_job"))
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
if @api_client.config.debugging
|
|
52
|
+
@api_client.config.logger.debug 'Calling API: ServiceLevelObjectivesAPI.create_slo_report_job ...'
|
|
53
|
+
end
|
|
54
|
+
# verify the required parameter 'body' is set
|
|
55
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
56
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ServiceLevelObjectivesAPI.create_slo_report_job"
|
|
57
|
+
end
|
|
58
|
+
# resource path
|
|
59
|
+
local_var_path = '/api/v2/slo/report'
|
|
60
|
+
|
|
61
|
+
# query parameters
|
|
62
|
+
query_params = opts[:query_params] || {}
|
|
63
|
+
|
|
64
|
+
# header parameters
|
|
65
|
+
header_params = opts[:header_params] || {}
|
|
66
|
+
# HTTP header 'Accept' (if needed)
|
|
67
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
68
|
+
# HTTP header 'Content-Type'
|
|
69
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
70
|
+
|
|
71
|
+
# form parameters
|
|
72
|
+
form_params = opts[:form_params] || {}
|
|
73
|
+
|
|
74
|
+
# http body (model)
|
|
75
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
76
|
+
|
|
77
|
+
# return_type
|
|
78
|
+
return_type = opts[:debug_return_type] || 'SLOReportPostResponse'
|
|
79
|
+
|
|
80
|
+
# auth_names
|
|
81
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
82
|
+
|
|
83
|
+
new_options = opts.merge(
|
|
84
|
+
:operation => :create_slo_report_job,
|
|
85
|
+
:header_params => header_params,
|
|
86
|
+
:query_params => query_params,
|
|
87
|
+
:form_params => form_params,
|
|
88
|
+
:body => post_body,
|
|
89
|
+
:auth_names => auth_names,
|
|
90
|
+
:return_type => return_type,
|
|
91
|
+
:api_version => "V2"
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
95
|
+
if @api_client.config.debugging
|
|
96
|
+
@api_client.config.logger.debug "API called: ServiceLevelObjectivesAPI#create_slo_report_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
97
|
+
end
|
|
98
|
+
return data, status_code, headers
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Get SLO report.
|
|
102
|
+
#
|
|
103
|
+
# @see #get_slo_report_with_http_info
|
|
104
|
+
def get_slo_report(report_id, opts = {})
|
|
105
|
+
data, _status_code, _headers = get_slo_report_with_http_info(report_id, opts)
|
|
106
|
+
data
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Get SLO report.
|
|
110
|
+
#
|
|
111
|
+
# Download an SLO report. This can only be performed after the report job has completed.
|
|
112
|
+
#
|
|
113
|
+
# Reports are not guaranteed to exist indefinitely. Datadog recommends that you download the report as soon as it is available.
|
|
114
|
+
#
|
|
115
|
+
# @param report_id [String] The ID of the report job.
|
|
116
|
+
# @param opts [Hash] the optional parameters
|
|
117
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
118
|
+
def get_slo_report_with_http_info(report_id, opts = {})
|
|
119
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.get_slo_report".to_sym]
|
|
120
|
+
if unstable_enabled
|
|
121
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_slo_report")
|
|
122
|
+
else
|
|
123
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_slo_report"))
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if @api_client.config.debugging
|
|
127
|
+
@api_client.config.logger.debug 'Calling API: ServiceLevelObjectivesAPI.get_slo_report ...'
|
|
128
|
+
end
|
|
129
|
+
# verify the required parameter 'report_id' is set
|
|
130
|
+
if @api_client.config.client_side_validation && report_id.nil?
|
|
131
|
+
fail ArgumentError, "Missing the required parameter 'report_id' when calling ServiceLevelObjectivesAPI.get_slo_report"
|
|
132
|
+
end
|
|
133
|
+
# resource path
|
|
134
|
+
local_var_path = '/api/v2/slo/report/{report_id}/download'.sub('{report_id}', CGI.escape(report_id.to_s).gsub('%2F', '/'))
|
|
135
|
+
|
|
136
|
+
# query parameters
|
|
137
|
+
query_params = opts[:query_params] || {}
|
|
138
|
+
|
|
139
|
+
# header parameters
|
|
140
|
+
header_params = opts[:header_params] || {}
|
|
141
|
+
# HTTP header 'Accept' (if needed)
|
|
142
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/csv', 'application/json'])
|
|
143
|
+
|
|
144
|
+
# form parameters
|
|
145
|
+
form_params = opts[:form_params] || {}
|
|
146
|
+
|
|
147
|
+
# http body (model)
|
|
148
|
+
post_body = opts[:debug_body]
|
|
149
|
+
|
|
150
|
+
# return_type
|
|
151
|
+
return_type = opts[:debug_return_type] || 'String'
|
|
152
|
+
|
|
153
|
+
# auth_names
|
|
154
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
155
|
+
|
|
156
|
+
new_options = opts.merge(
|
|
157
|
+
:operation => :get_slo_report,
|
|
158
|
+
:header_params => header_params,
|
|
159
|
+
:query_params => query_params,
|
|
160
|
+
:form_params => form_params,
|
|
161
|
+
:body => post_body,
|
|
162
|
+
:auth_names => auth_names,
|
|
163
|
+
:return_type => return_type,
|
|
164
|
+
:api_version => "V2"
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
168
|
+
if @api_client.config.debugging
|
|
169
|
+
@api_client.config.logger.debug "API called: ServiceLevelObjectivesAPI#get_slo_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
170
|
+
end
|
|
171
|
+
return data, status_code, headers
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Get SLO report status.
|
|
175
|
+
#
|
|
176
|
+
# @see #get_slo_report_job_status_with_http_info
|
|
177
|
+
def get_slo_report_job_status(report_id, opts = {})
|
|
178
|
+
data, _status_code, _headers = get_slo_report_job_status_with_http_info(report_id, opts)
|
|
179
|
+
data
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Get SLO report status.
|
|
183
|
+
#
|
|
184
|
+
# Get the status of the SLO report job.
|
|
185
|
+
#
|
|
186
|
+
# @param report_id [String] The ID of the report job.
|
|
187
|
+
# @param opts [Hash] the optional parameters
|
|
188
|
+
# @return [Array<(SLOReportStatusGetResponse, Integer, Hash)>] SLOReportStatusGetResponse data, response status code and response headers
|
|
189
|
+
def get_slo_report_job_status_with_http_info(report_id, opts = {})
|
|
190
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.get_slo_report_job_status".to_sym]
|
|
191
|
+
if unstable_enabled
|
|
192
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_slo_report_job_status")
|
|
193
|
+
else
|
|
194
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_slo_report_job_status"))
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
if @api_client.config.debugging
|
|
198
|
+
@api_client.config.logger.debug 'Calling API: ServiceLevelObjectivesAPI.get_slo_report_job_status ...'
|
|
199
|
+
end
|
|
200
|
+
# verify the required parameter 'report_id' is set
|
|
201
|
+
if @api_client.config.client_side_validation && report_id.nil?
|
|
202
|
+
fail ArgumentError, "Missing the required parameter 'report_id' when calling ServiceLevelObjectivesAPI.get_slo_report_job_status"
|
|
203
|
+
end
|
|
204
|
+
# resource path
|
|
205
|
+
local_var_path = '/api/v2/slo/report/{report_id}/status'.sub('{report_id}', CGI.escape(report_id.to_s).gsub('%2F', '/'))
|
|
206
|
+
|
|
207
|
+
# query parameters
|
|
208
|
+
query_params = opts[:query_params] || {}
|
|
209
|
+
|
|
210
|
+
# header parameters
|
|
211
|
+
header_params = opts[:header_params] || {}
|
|
212
|
+
# HTTP header 'Accept' (if needed)
|
|
213
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
214
|
+
|
|
215
|
+
# form parameters
|
|
216
|
+
form_params = opts[:form_params] || {}
|
|
217
|
+
|
|
218
|
+
# http body (model)
|
|
219
|
+
post_body = opts[:debug_body]
|
|
220
|
+
|
|
221
|
+
# return_type
|
|
222
|
+
return_type = opts[:debug_return_type] || 'SLOReportStatusGetResponse'
|
|
223
|
+
|
|
224
|
+
# auth_names
|
|
225
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
226
|
+
|
|
227
|
+
new_options = opts.merge(
|
|
228
|
+
:operation => :get_slo_report_job_status,
|
|
229
|
+
:header_params => header_params,
|
|
230
|
+
:query_params => query_params,
|
|
231
|
+
:form_params => form_params,
|
|
232
|
+
:body => post_body,
|
|
233
|
+
:auth_names => auth_names,
|
|
234
|
+
:return_type => return_type,
|
|
235
|
+
:api_version => "V2"
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
239
|
+
if @api_client.config.debugging
|
|
240
|
+
@api_client.config.logger.debug "API called: ServiceLevelObjectivesAPI#get_slo_report_job_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
241
|
+
end
|
|
242
|
+
return data, status_code, headers
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
end
|
|
@@ -71,7 +71,7 @@ module DatadogAPIClient::V2
|
|
|
71
71
|
return_type = opts[:debug_return_type] || 'SpansAggregateResponse'
|
|
72
72
|
|
|
73
73
|
# auth_names
|
|
74
|
-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
74
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
75
75
|
|
|
76
76
|
new_options = opts.merge(
|
|
77
77
|
:operation => :aggregate_spans,
|
|
@@ -144,7 +144,7 @@ module DatadogAPIClient::V2
|
|
|
144
144
|
return_type = opts[:debug_return_type] || 'SpansListResponse'
|
|
145
145
|
|
|
146
146
|
# auth_names
|
|
147
|
-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
147
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
148
148
|
|
|
149
149
|
new_options = opts.merge(
|
|
150
150
|
:operation => :list_spans,
|
|
@@ -250,7 +250,7 @@ module DatadogAPIClient::V2
|
|
|
250
250
|
return_type = opts[:debug_return_type] || 'SpansListResponse'
|
|
251
251
|
|
|
252
252
|
# auth_names
|
|
253
|
-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
253
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
254
254
|
|
|
255
255
|
new_options = opts.merge(
|
|
256
256
|
:operation => :list_spans_get,
|
|
@@ -105,6 +105,8 @@ module DatadogAPIClient::V2
|
|
|
105
105
|
# [`/historical_cost`](https://docs.datadoghq.com/api/latest/usage-metering/#get-historical-cost-across-your-account)
|
|
106
106
|
# instead.
|
|
107
107
|
#
|
|
108
|
+
# This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
|
|
109
|
+
#
|
|
108
110
|
# @deprecated This API is deprecated.
|
|
109
111
|
#
|
|
110
112
|
# @param start_month [Time] Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning this month.
|
|
@@ -179,6 +181,8 @@ module DatadogAPIClient::V2
|
|
|
179
181
|
# and is delayed by up to 72 hours from when it was incurred.
|
|
180
182
|
# To access historical costs prior to this, use the `/historical_cost` endpoint.
|
|
181
183
|
#
|
|
184
|
+
# This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
|
|
185
|
+
#
|
|
182
186
|
# @param opts [Hash] the optional parameters
|
|
183
187
|
# @option opts [String] :view String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults to `summary`.
|
|
184
188
|
# @option opts [Time] :start_month Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning this month. Either start_month or start_date should be specified, but not both. (start_month cannot go beyond two months in the past). Provide an `end_month` to view month-over-month cost.
|
|
@@ -250,6 +254,8 @@ module DatadogAPIClient::V2
|
|
|
250
254
|
# Get historical cost across multi-org and single root-org accounts.
|
|
251
255
|
# Cost data for a given month becomes available no later than the 16th of the following month.
|
|
252
256
|
#
|
|
257
|
+
# This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
|
|
258
|
+
#
|
|
253
259
|
# @param start_month [Time] Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning this month.
|
|
254
260
|
# @param opts [Hash] the optional parameters
|
|
255
261
|
# @option opts [String] :view String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults to `summary`.
|
|
@@ -423,6 +429,8 @@ module DatadogAPIClient::V2
|
|
|
423
429
|
# END
|
|
424
430
|
# ```
|
|
425
431
|
#
|
|
432
|
+
# This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
|
|
433
|
+
#
|
|
426
434
|
# @param start_month [Time] Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning in this month.
|
|
427
435
|
# @param end_month [Time] Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month.
|
|
428
436
|
# @param fields [String] Comma-separated list specifying cost types (e.g., `<billing_dimension>_on_demand_cost`, `<billing_dimension>_committed_cost`, `<billing_dimension>_total_cost`) and the proportions (`<billing_dimension>_percentage_in_org`, `<billing_dimension>_percentage_in_account`). Use `*` to retrieve all fields. Example: `infra_host_on_demand_cost,infra_host_percentage_in_account` To obtain the complete list of active billing dimensions that can be used to replace `<billing_dimension>` in the field names, make a request to the [Get active billing dimensions API](https://docs.datadoghq.com/api/latest/usage-metering/#get-active-billing-dimensions-for-cost-attribution).
|
|
@@ -521,7 +529,8 @@ module DatadogAPIClient::V2
|
|
|
521
529
|
#
|
|
522
530
|
# Get projected cost across multi-org and single root-org accounts.
|
|
523
531
|
# Projected cost data is only available for the current month and becomes available around the 12th of the month.
|
|
524
|
-
#
|
|
532
|
+
#
|
|
533
|
+
# This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
|
|
525
534
|
#
|
|
526
535
|
# @param opts [Hash] the optional parameters
|
|
527
536
|
# @option opts [String] :view String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults to `summary`.
|
|
@@ -584,13 +593,16 @@ module DatadogAPIClient::V2
|
|
|
584
593
|
# Get hourly usage for application security.
|
|
585
594
|
#
|
|
586
595
|
# Get hourly usage for application security .
|
|
587
|
-
# **Note:**
|
|
596
|
+
# **Note:** This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family)
|
|
597
|
+
#
|
|
598
|
+
# @deprecated This API is deprecated.
|
|
588
599
|
#
|
|
589
600
|
# @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
|
|
590
601
|
# @param opts [Hash] the optional parameters
|
|
591
602
|
# @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.
|
|
592
603
|
# @return [Array<(UsageApplicationSecurityMonitoringResponse, Integer, Hash)>] UsageApplicationSecurityMonitoringResponse data, response status code and response headers
|
|
593
604
|
def get_usage_application_security_monitoring_with_http_info(start_hr, opts = {})
|
|
605
|
+
warn "[DEPRECATION] `GetUsageApplicationSecurityMonitoring` is deprecated."
|
|
594
606
|
|
|
595
607
|
if @api_client.config.debugging
|
|
596
608
|
@api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_application_security_monitoring ...'
|
|
@@ -653,13 +665,16 @@ module DatadogAPIClient::V2
|
|
|
653
665
|
# Get hourly usage for Lambda traced invocations.
|
|
654
666
|
#
|
|
655
667
|
# Get hourly usage for Lambda traced invocations.
|
|
656
|
-
# **Note:**
|
|
668
|
+
# **Note:** This endpoint has been deprecated.. Hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family)
|
|
669
|
+
#
|
|
670
|
+
# @deprecated This API is deprecated.
|
|
657
671
|
#
|
|
658
672
|
# @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
|
|
659
673
|
# @param opts [Hash] the optional parameters
|
|
660
674
|
# @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.
|
|
661
675
|
# @return [Array<(UsageLambdaTracedInvocationsResponse, Integer, Hash)>] UsageLambdaTracedInvocationsResponse data, response status code and response headers
|
|
662
676
|
def get_usage_lambda_traced_invocations_with_http_info(start_hr, opts = {})
|
|
677
|
+
warn "[DEPRECATION] `GetUsageLambdaTracedInvocations` is deprecated."
|
|
663
678
|
|
|
664
679
|
if @api_client.config.debugging
|
|
665
680
|
@api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_lambda_traced_invocations ...'
|
|
@@ -722,13 +737,16 @@ module DatadogAPIClient::V2
|
|
|
722
737
|
# Get hourly usage for observability pipelines.
|
|
723
738
|
#
|
|
724
739
|
# Get hourly usage for observability pipelines.
|
|
725
|
-
# **Note:**
|
|
740
|
+
# **Note:** This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family)
|
|
741
|
+
#
|
|
742
|
+
# @deprecated This API is deprecated.
|
|
726
743
|
#
|
|
727
744
|
# @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
|
|
728
745
|
# @param opts [Hash] the optional parameters
|
|
729
746
|
# @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.
|
|
730
747
|
# @return [Array<(UsageObservabilityPipelinesResponse, Integer, Hash)>] UsageObservabilityPipelinesResponse data, response status code and response headers
|
|
731
748
|
def get_usage_observability_pipelines_with_http_info(start_hr, opts = {})
|
|
749
|
+
warn "[DEPRECATION] `GetUsageObservabilityPipelines` is deprecated."
|
|
732
750
|
|
|
733
751
|
if @api_client.config.debugging
|
|
734
752
|
@api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_observability_pipelines ...'
|
|
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
|
|
|
24
24
|
# Key/Value pair of attributes used for create request.
|
|
25
25
|
attr_accessor :attributes
|
|
26
26
|
|
|
27
|
-
# Relationship of AuthN Mapping create object to Role.
|
|
27
|
+
# Relationship of AuthN Mapping create object to a Role or Team.
|
|
28
28
|
attr_accessor :relationships
|
|
29
29
|
|
|
30
30
|
# AuthN Mappings resource type.
|
|
@@ -17,64 +17,47 @@ require 'date'
|
|
|
17
17
|
require 'time'
|
|
18
18
|
|
|
19
19
|
module DatadogAPIClient::V2
|
|
20
|
-
# Relationship of AuthN Mapping create object to Role.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# Attribute type mapping.
|
|
36
|
-
# @!visibility private
|
|
37
|
-
def self.openapi_types
|
|
38
|
-
{
|
|
39
|
-
:'role' => :'RelationshipToRole'
|
|
40
|
-
}
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
# Initializes the object
|
|
44
|
-
# @param attributes [Hash] Model attributes in the form of hash
|
|
45
|
-
# @!visibility private
|
|
46
|
-
def initialize(attributes = {})
|
|
47
|
-
if (!attributes.is_a?(Hash))
|
|
48
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingCreateRelationships` initialize method"
|
|
20
|
+
# Relationship of AuthN Mapping create object to a Role or Team.
|
|
21
|
+
module AuthNMappingCreateRelationships
|
|
22
|
+
class << self
|
|
23
|
+
include BaseOneOfModel
|
|
24
|
+
include BaseOneOfModelNoDiscriminator
|
|
25
|
+
|
|
26
|
+
# List of class defined in oneOf (OpenAPI v3)
|
|
27
|
+
def openapi_one_of
|
|
28
|
+
[
|
|
29
|
+
:'AuthNMappingRelationshipToRole',
|
|
30
|
+
:'AuthNMappingRelationshipToTeam'
|
|
31
|
+
]
|
|
49
32
|
end
|
|
50
|
-
|
|
51
|
-
#
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
33
|
+
# Builds the object
|
|
34
|
+
# @param data [Mixed] Data to be matched against the list of oneOf items
|
|
35
|
+
# @return [Object] Returns the model or the data itself
|
|
36
|
+
def build(data)
|
|
37
|
+
# Go through the list of oneOf items and attempt to identify the appropriate one.
|
|
38
|
+
# Note:
|
|
39
|
+
# - We do not attempt to check whether exactly one item matches.
|
|
40
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
41
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
42
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
43
|
+
# - TODO: logging when debugging is set.
|
|
44
|
+
openapi_one_of.each do |klass|
|
|
45
|
+
begin
|
|
46
|
+
next if klass == :AnyType # "nullable: true"
|
|
47
|
+
typed_data = find_and_cast_into_type(klass, data)
|
|
48
|
+
next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
|
|
49
|
+
return typed_data if typed_data
|
|
50
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
51
|
+
end
|
|
55
52
|
end
|
|
56
|
-
h[k.to_sym] = v
|
|
57
|
-
}
|
|
58
53
|
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
if openapi_one_of.include?(:AnyType)
|
|
55
|
+
data
|
|
56
|
+
else
|
|
57
|
+
self._unparsed = true
|
|
58
|
+
DatadogAPIClient::UnparsedObject.new(data)
|
|
59
|
+
end
|
|
61
60
|
end
|
|
62
61
|
end
|
|
63
|
-
|
|
64
|
-
# Checks equality by comparing each attribute.
|
|
65
|
-
# @param o [Object] Object to be compared
|
|
66
|
-
# @!visibility private
|
|
67
|
-
def ==(o)
|
|
68
|
-
return true if self.equal?(o)
|
|
69
|
-
self.class == o.class &&
|
|
70
|
-
role == o.role
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
# Calculates hash code according to all attributes.
|
|
74
|
-
# @return [Integer] Hash code
|
|
75
|
-
# @!visibility private
|
|
76
|
-
def hash
|
|
77
|
-
[role].hash
|
|
78
|
-
end
|
|
79
62
|
end
|
|
80
63
|
end
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V2
|
|
20
|
+
# Relationship of AuthN Mapping to a Role.
|
|
21
|
+
class AuthNMappingRelationshipToRole
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Relationship to role.
|
|
25
|
+
attr_reader :role
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
# @!visibility private
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'role' => :'role'
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Attribute type mapping.
|
|
36
|
+
# @!visibility private
|
|
37
|
+
def self.openapi_types
|
|
38
|
+
{
|
|
39
|
+
:'role' => :'RelationshipToRole'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Initializes the object
|
|
44
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
45
|
+
# @!visibility private
|
|
46
|
+
def initialize(attributes = {})
|
|
47
|
+
if (!attributes.is_a?(Hash))
|
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingRelationshipToRole` initialize method"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
53
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingRelationshipToRole`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
55
|
+
end
|
|
56
|
+
h[k.to_sym] = v
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if attributes.key?(:'role')
|
|
60
|
+
self.role = attributes[:'role']
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Check to see if the all the properties in the model are valid
|
|
65
|
+
# @return true if the model is valid
|
|
66
|
+
# @!visibility private
|
|
67
|
+
def valid?
|
|
68
|
+
return false if @role.nil?
|
|
69
|
+
true
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Custom attribute writer method with validation
|
|
73
|
+
# @param role [Object] Object to be assigned
|
|
74
|
+
# @!visibility private
|
|
75
|
+
def role=(role)
|
|
76
|
+
if role.nil?
|
|
77
|
+
fail ArgumentError, 'invalid value for "role", role cannot be nil.'
|
|
78
|
+
end
|
|
79
|
+
@role = role
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Checks equality by comparing each attribute.
|
|
83
|
+
# @param o [Object] Object to be compared
|
|
84
|
+
# @!visibility private
|
|
85
|
+
def ==(o)
|
|
86
|
+
return true if self.equal?(o)
|
|
87
|
+
self.class == o.class &&
|
|
88
|
+
role == o.role
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Calculates hash code according to all attributes.
|
|
92
|
+
# @return [Integer] Hash code
|
|
93
|
+
# @!visibility private
|
|
94
|
+
def hash
|
|
95
|
+
[role].hash
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|