datadog_api_client 2.18.0 → 2.19.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 +4 -4
- data/.generator/conftest.py +1 -1
- data/.generator/poetry.lock +69 -69
- data/.generator/schemas/v1/openapi.yaml +189 -11
- data/.generator/schemas/v2/openapi.yaml +1321 -188
- data/.generator/src/generator/templates/model_generic.j2 +2 -2
- data/CHANGELOG.md +18 -0
- data/examples/v1/azure-integration/CreateAzureIntegration.rb +4 -4
- data/examples/v1/azure-integration/DeleteAzureIntegration.rb +2 -15
- data/examples/v1/azure-integration/UpdateAzureIntegration.rb +4 -4
- data/examples/v1/gcp-integration/CreateGCPIntegration.rb +4 -5
- data/examples/v1/gcp-integration/DeleteGCPIntegration.rb +2 -14
- data/examples/v1/gcp-integration/UpdateGCPIntegration.rb +4 -5
- data/examples/v1/service-level-objectives/CreateSLO_3765703239.rb +46 -0
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +0 -3
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +0 -3
- data/examples/v2/cloud-cost-management/CreateCostAWSCURConfig.rb +18 -0
- data/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.rb +29 -0
- data/examples/v2/cloud-cost-management/DeleteCostAWSCURConfig.rb +5 -0
- data/examples/v2/cloud-cost-management/DeleteCostAzureUCConfig.rb +5 -0
- data/examples/v2/cloud-cost-management/GetCloudCostActivity.rb +5 -0
- data/examples/v2/cloud-cost-management/ListAWSRelatedAccounts.rb +5 -0
- data/examples/v2/cloud-cost-management/ListCostAWSCURConfigs.rb +5 -0
- data/examples/v2/cloud-cost-management/ListCostAzureUCConfigs.rb +5 -0
- data/examples/v2/cloud-cost-management/UpdateCostAWSCURConfig.rb +14 -0
- data/examples/v2/cloud-cost-management/UpdateCostAzureUCConfigs.rb +14 -0
- data/examples/v2/cloudflare-integration/CreateCloudflareAccount.rb +1 -1
- data/examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb +4 -1
- data/examples/v2/downtimes/ListMonitorDowntimes_3316718253.rb +5 -0
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.rb +16 -0
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.rb +16 -0
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.rb +17 -0
- data/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb +19 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_3367706049.rb +46 -0
- data/examples/v2/sensitive-data-scanner/CreateScanningRule.rb +7 -0
- data/examples/v2/sensitive-data-scanner/UpdateScanningRule.rb +7 -10
- data/examples/v2/teams/CreateTeamMembership.rb +6 -0
- data/lib/datadog_api_client/configuration.rb +0 -1
- data/lib/datadog_api_client/inflector.rb +52 -0
- data/lib/datadog_api_client/v1/api/downtimes_api.rb +28 -7
- data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -1
- data/lib/datadog_api_client/v1/models/gcp_account.rb +22 -2
- data/lib/datadog_api_client/v1/models/organization.rb +1 -1
- data/lib/datadog_api_client/v1/models/service_level_objective.rb +11 -1
- data/lib/datadog_api_client/v1/models/service_level_objective_request.rb +11 -1
- data/lib/datadog_api_client/v1/models/slo_data_source_query_definition.rb +62 -0
- data/lib/datadog_api_client/v1/models/slo_formula.rb +98 -0
- data/lib/datadog_api_client/v1/models/slo_response_data.rb +11 -1
- data/lib/datadog_api_client/v1/models/slo_sli_spec.rb +62 -0
- data/lib/datadog_api_client/v1/models/slo_time_slice_comparator.rb +29 -0
- data/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb +141 -0
- data/lib/datadog_api_client/v1/models/slo_time_slice_query.rb +131 -0
- data/lib/datadog_api_client/v1/models/slo_time_slice_spec.rb +99 -0
- data/lib/datadog_api_client/v1/models/slo_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/slo_type_numeric.rb +1 -0
- 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 +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +11 -1
- data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +0 -6
- data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +680 -0
- data/lib/datadog_api_client/v2/api/downtimes_api.rb +25 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +3 -2
- data/lib/datadog_api_client/v2/models/aws_cur_config.rb +129 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb +305 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_patch_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_post_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_post_request_attributes.rb +202 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_post_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/aws_related_account.rb +129 -0
- data/lib/datadog_api_client/v2/models/aws_related_account_attributes.rb +90 -0
- data/lib/datadog_api_client/v2/models/aws_related_account_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_related_accounts_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config.rb +378 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_pair.rb +129 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_pair_attributes.rb +110 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_pair_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_pairs_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_post_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb +192 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_post_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/bill_config.rb +161 -0
- data/lib/datadog_api_client/v2/models/ci_app_git_info.rb +2 -2
- data/lib/datadog_api_client/v2/models/cloud_cost_activity.rb +119 -0
- data/lib/datadog_api_client/v2/models/cloud_cost_activity_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/cloud_cost_activity_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/cloud_cost_activity_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb +28 -4
- data/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb +28 -4
- data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb +28 -4
- data/lib/datadog_api_client/v2/models/dora_git_info.rb +2 -2
- data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +25 -5
- data/lib/datadog_api_client/v2/models/relationship_to_user_team_team.rb +98 -0
- data/lib/datadog_api_client/v2/models/relationship_to_user_team_team_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +14 -4
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_third_party_options.rb +114 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_third_party_root_query.rb +92 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case.rb +112 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case_create.rb +130 -0
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb +134 -0
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb +46 -1
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +33 -1
- data/lib/datadog_api_client/v2/models/user_team_attributes.rb +24 -1
- data/lib/datadog_api_client/v2/models/user_team_relationships.rb +11 -1
- data/lib/datadog_api_client/v2/models/user_team_team_type.rb +26 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +71 -2
@@ -325,6 +325,8 @@ module DatadogAPIClient::V2
|
|
325
325
|
#
|
326
326
|
# @param monitor_id [Integer] The id of the monitor.
|
327
327
|
# @param opts [Hash] the optional parameters
|
328
|
+
# @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page.
|
329
|
+
# @option opts [Integer] :page_limit Maximum number of downtimes in the response.
|
328
330
|
# @return [Array<(MonitorDowntimeMatchResponse, Integer, Hash)>] MonitorDowntimeMatchResponse data, response status code and response headers
|
329
331
|
def list_monitor_downtimes_with_http_info(monitor_id, opts = {})
|
330
332
|
|
@@ -340,6 +342,8 @@ module DatadogAPIClient::V2
|
|
340
342
|
|
341
343
|
# query parameters
|
342
344
|
query_params = opts[:query_params] || {}
|
345
|
+
query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil?
|
346
|
+
query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
|
343
347
|
|
344
348
|
# header parameters
|
345
349
|
header_params = opts[:header_params] || {}
|
@@ -376,6 +380,27 @@ module DatadogAPIClient::V2
|
|
376
380
|
return data, status_code, headers
|
377
381
|
end
|
378
382
|
|
383
|
+
# Get active downtimes for a monitor.
|
384
|
+
#
|
385
|
+
# Provide a paginated version of {#list_monitor_downtimes}, returning all items.
|
386
|
+
#
|
387
|
+
# To use it you need to use a block: list_monitor_downtimes_with_pagination { |item| p item }
|
388
|
+
#
|
389
|
+
# @yield [MonitorDowntimeMatchResponseData] Paginated items
|
390
|
+
def list_monitor_downtimes_with_pagination(monitor_id, opts = {})
|
391
|
+
api_version = "V2"
|
392
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_limit", 30)
|
393
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
|
394
|
+
while true do
|
395
|
+
response = list_monitor_downtimes(monitor_id, opts)
|
396
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
397
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
398
|
+
break
|
399
|
+
end
|
400
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size)
|
401
|
+
end
|
402
|
+
end
|
403
|
+
|
379
404
|
# Update a downtime.
|
380
405
|
#
|
381
406
|
# @see #update_downtime_with_http_info
|
@@ -541,7 +541,7 @@ module DatadogAPIClient::V2
|
|
541
541
|
# @option opts [String] :filter_tags_configured Filter tag configurations by configured tags.
|
542
542
|
# @option opts [MetricTagConfigurationMetricTypes] :filter_metric_type Filter metrics by metric type.
|
543
543
|
# @option opts [Boolean] :filter_include_percentiles Filter distributions with additional percentile aggregations enabled or disabled.
|
544
|
-
# @option opts [Boolean] :filter_queried Filter custom metrics that have or have not been queried in the specified window[seconds]. If no window is provided or the window is less than 2 hours, a default of 2 hours will be applied.
|
544
|
+
# @option opts [Boolean] :filter_queried (Beta) Filter custom metrics that have or have not been queried in the specified window[seconds]. If no window is provided or the window is less than 2 hours, a default of 2 hours will be applied.
|
545
545
|
# @option opts [String] :filter_tags Filter metrics that have been submitted with the given tags. Supports boolean and wildcard expressions. Can only be combined with the filter[queried] filter.
|
546
546
|
# @option opts [Integer] :window_seconds The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query. Default value is 3600 (1 hour), maximum value is 2,592,000 (30 days).
|
547
547
|
# @return [Array<(MetricsAndMetricTagConfigurationsResponse, Integer, Hash)>] MetricsAndMetricTagConfigurationsResponse data, response status code and response headers
|
@@ -980,7 +980,8 @@ module DatadogAPIClient::V2
|
|
980
980
|
# Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations
|
981
981
|
# of a count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed
|
982
982
|
# from an allow-list to a deny-list, and tags in the defined list will not be queryable.
|
983
|
-
# Can only be used with application keys from users with the `Manage Tags for Metrics` permission.
|
983
|
+
# Can only be used with application keys from users with the `Manage Tags for Metrics` permission. This endpoint requires
|
984
|
+
# a tag configuration to be created first.
|
984
985
|
#
|
985
986
|
# @param metric_name [String] The name of the metric.
|
986
987
|
# @param body [MetricTagConfigurationUpdateRequest]
|
@@ -0,0 +1,129 @@
|
|
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
|
+
# AWS CUR config.
|
21
|
+
class AwsCURConfig
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Attributes for An AWS CUR config.
|
25
|
+
attr_reader :attributes
|
26
|
+
|
27
|
+
# The ID of the AWS CUR config.
|
28
|
+
attr_accessor :id
|
29
|
+
|
30
|
+
# Type of AWS CUR config.
|
31
|
+
attr_reader :type
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
# @!visibility private
|
35
|
+
def self.attribute_map
|
36
|
+
{
|
37
|
+
:'attributes' => :'attributes',
|
38
|
+
:'id' => :'id',
|
39
|
+
:'type' => :'type'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
# @!visibility private
|
45
|
+
def self.openapi_types
|
46
|
+
{
|
47
|
+
:'attributes' => :'AwsCURConfigAttributes',
|
48
|
+
:'id' => :'Integer',
|
49
|
+
:'type' => :'AwsCURConfigType'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
55
|
+
# @!visibility private
|
56
|
+
def initialize(attributes = {})
|
57
|
+
if (!attributes.is_a?(Hash))
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AwsCURConfig` initialize method"
|
59
|
+
end
|
60
|
+
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
63
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AwsCURConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
65
|
+
end
|
66
|
+
h[k.to_sym] = v
|
67
|
+
}
|
68
|
+
|
69
|
+
if attributes.key?(:'attributes')
|
70
|
+
self.attributes = attributes[:'attributes']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'id')
|
74
|
+
self.id = attributes[:'id']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'type')
|
78
|
+
self.type = attributes[:'type']
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
# @!visibility private
|
85
|
+
def valid?
|
86
|
+
return false if @attributes.nil?
|
87
|
+
return false if @type.nil?
|
88
|
+
true
|
89
|
+
end
|
90
|
+
|
91
|
+
# Custom attribute writer method with validation
|
92
|
+
# @param attributes [Object] Object to be assigned
|
93
|
+
# @!visibility private
|
94
|
+
def attributes=(attributes)
|
95
|
+
if attributes.nil?
|
96
|
+
fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
|
97
|
+
end
|
98
|
+
@attributes = attributes
|
99
|
+
end
|
100
|
+
|
101
|
+
# Custom attribute writer method with validation
|
102
|
+
# @param type [Object] Object to be assigned
|
103
|
+
# @!visibility private
|
104
|
+
def type=(type)
|
105
|
+
if type.nil?
|
106
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
107
|
+
end
|
108
|
+
@type = type
|
109
|
+
end
|
110
|
+
|
111
|
+
# Checks equality by comparing each attribute.
|
112
|
+
# @param o [Object] Object to be compared
|
113
|
+
# @!visibility private
|
114
|
+
def ==(o)
|
115
|
+
return true if self.equal?(o)
|
116
|
+
self.class == o.class &&
|
117
|
+
attributes == o.attributes &&
|
118
|
+
id == o.id &&
|
119
|
+
type == o.type
|
120
|
+
end
|
121
|
+
|
122
|
+
# Calculates hash code according to all attributes.
|
123
|
+
# @return [Integer] Hash code
|
124
|
+
# @!visibility private
|
125
|
+
def hash
|
126
|
+
[attributes, id, type].hash
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
@@ -0,0 +1,305 @@
|
|
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
|
+
# Attributes for An AWS CUR config.
|
21
|
+
class AwsCURConfigAttributes
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The AWS account ID.
|
25
|
+
attr_reader :account_id
|
26
|
+
|
27
|
+
# The AWS bucket name used to store the Cost and Usage Report.
|
28
|
+
attr_reader :bucket_name
|
29
|
+
|
30
|
+
# The region the bucket is located in.
|
31
|
+
attr_reader :bucket_region
|
32
|
+
|
33
|
+
# The timestamp when the AWS CUR config was created.
|
34
|
+
attr_reader :created_at
|
35
|
+
|
36
|
+
# The error messages for the AWS CUR config.
|
37
|
+
attr_accessor :error_messages
|
38
|
+
|
39
|
+
# The number of months the report has been backfilled.
|
40
|
+
attr_reader :months
|
41
|
+
|
42
|
+
# The name of the Cost and Usage Report.
|
43
|
+
attr_reader :report_name
|
44
|
+
|
45
|
+
# The report prefix used for the Cost and Usage Report.
|
46
|
+
attr_reader :report_prefix
|
47
|
+
|
48
|
+
# The status of the AWS CUR.
|
49
|
+
attr_reader :status
|
50
|
+
|
51
|
+
# The timestamp when the AWS CUR config status was updated.
|
52
|
+
attr_reader :status_updated_at
|
53
|
+
|
54
|
+
# The timestamp when the AWS CUR config status was updated.
|
55
|
+
attr_reader :updated_at
|
56
|
+
|
57
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
58
|
+
# @!visibility private
|
59
|
+
def self.attribute_map
|
60
|
+
{
|
61
|
+
:'account_id' => :'account_id',
|
62
|
+
:'bucket_name' => :'bucket_name',
|
63
|
+
:'bucket_region' => :'bucket_region',
|
64
|
+
:'created_at' => :'created_at',
|
65
|
+
:'error_messages' => :'error_messages',
|
66
|
+
:'months' => :'months',
|
67
|
+
:'report_name' => :'report_name',
|
68
|
+
:'report_prefix' => :'report_prefix',
|
69
|
+
:'status' => :'status',
|
70
|
+
:'status_updated_at' => :'status_updated_at',
|
71
|
+
:'updated_at' => :'updated_at'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# Attribute type mapping.
|
76
|
+
# @!visibility private
|
77
|
+
def self.openapi_types
|
78
|
+
{
|
79
|
+
:'account_id' => :'String',
|
80
|
+
:'bucket_name' => :'String',
|
81
|
+
:'bucket_region' => :'String',
|
82
|
+
:'created_at' => :'String',
|
83
|
+
:'error_messages' => :'Array<String>',
|
84
|
+
:'months' => :'Integer',
|
85
|
+
:'report_name' => :'String',
|
86
|
+
:'report_prefix' => :'String',
|
87
|
+
:'status' => :'String',
|
88
|
+
:'status_updated_at' => :'String',
|
89
|
+
:'updated_at' => :'String'
|
90
|
+
}
|
91
|
+
end
|
92
|
+
|
93
|
+
# Initializes the object
|
94
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
95
|
+
# @!visibility private
|
96
|
+
def initialize(attributes = {})
|
97
|
+
if (!attributes.is_a?(Hash))
|
98
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AwsCURConfigAttributes` initialize method"
|
99
|
+
end
|
100
|
+
|
101
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
102
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
103
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
104
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AwsCURConfigAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
105
|
+
end
|
106
|
+
h[k.to_sym] = v
|
107
|
+
}
|
108
|
+
|
109
|
+
if attributes.key?(:'account_id')
|
110
|
+
self.account_id = attributes[:'account_id']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'bucket_name')
|
114
|
+
self.bucket_name = attributes[:'bucket_name']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'bucket_region')
|
118
|
+
self.bucket_region = attributes[:'bucket_region']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'created_at')
|
122
|
+
self.created_at = attributes[:'created_at']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'error_messages')
|
126
|
+
if (value = attributes[:'error_messages']).is_a?(Array)
|
127
|
+
self.error_messages = value
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.key?(:'months')
|
132
|
+
self.months = attributes[:'months']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.key?(:'report_name')
|
136
|
+
self.report_name = attributes[:'report_name']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.key?(:'report_prefix')
|
140
|
+
self.report_prefix = attributes[:'report_prefix']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.key?(:'status')
|
144
|
+
self.status = attributes[:'status']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.key?(:'status_updated_at')
|
148
|
+
self.status_updated_at = attributes[:'status_updated_at']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.key?(:'updated_at')
|
152
|
+
self.updated_at = attributes[:'updated_at']
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
# Check to see if the all the properties in the model are valid
|
157
|
+
# @return true if the model is valid
|
158
|
+
# @!visibility private
|
159
|
+
def valid?
|
160
|
+
return false if @account_id.nil?
|
161
|
+
return false if @bucket_name.nil?
|
162
|
+
return false if @bucket_region.nil?
|
163
|
+
pattern = Regexp.new(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$/)
|
164
|
+
return false if !@created_at.nil? && @created_at !~ pattern
|
165
|
+
return false if !@months.nil? && @months > 36
|
166
|
+
return false if @report_name.nil?
|
167
|
+
return false if @report_prefix.nil?
|
168
|
+
return false if @status.nil?
|
169
|
+
pattern = Regexp.new(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$/)
|
170
|
+
return false if !@status_updated_at.nil? && @status_updated_at !~ pattern
|
171
|
+
pattern = Regexp.new(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$/)
|
172
|
+
return false if !@updated_at.nil? && @updated_at !~ pattern
|
173
|
+
true
|
174
|
+
end
|
175
|
+
|
176
|
+
# Custom attribute writer method with validation
|
177
|
+
# @param account_id [Object] Object to be assigned
|
178
|
+
# @!visibility private
|
179
|
+
def account_id=(account_id)
|
180
|
+
if account_id.nil?
|
181
|
+
fail ArgumentError, 'invalid value for "account_id", account_id cannot be nil.'
|
182
|
+
end
|
183
|
+
@account_id = account_id
|
184
|
+
end
|
185
|
+
|
186
|
+
# Custom attribute writer method with validation
|
187
|
+
# @param bucket_name [Object] Object to be assigned
|
188
|
+
# @!visibility private
|
189
|
+
def bucket_name=(bucket_name)
|
190
|
+
if bucket_name.nil?
|
191
|
+
fail ArgumentError, 'invalid value for "bucket_name", bucket_name cannot be nil.'
|
192
|
+
end
|
193
|
+
@bucket_name = bucket_name
|
194
|
+
end
|
195
|
+
|
196
|
+
# Custom attribute writer method with validation
|
197
|
+
# @param bucket_region [Object] Object to be assigned
|
198
|
+
# @!visibility private
|
199
|
+
def bucket_region=(bucket_region)
|
200
|
+
if bucket_region.nil?
|
201
|
+
fail ArgumentError, 'invalid value for "bucket_region", bucket_region cannot be nil.'
|
202
|
+
end
|
203
|
+
@bucket_region = bucket_region
|
204
|
+
end
|
205
|
+
|
206
|
+
# Custom attribute writer method with validation
|
207
|
+
# @param created_at [Object] Object to be assigned
|
208
|
+
# @!visibility private
|
209
|
+
def created_at=(created_at)
|
210
|
+
pattern = Regexp.new(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$/)
|
211
|
+
if !created_at.nil? && created_at !~ pattern
|
212
|
+
fail ArgumentError, "invalid value for \"created_at\", must conform to the pattern #{pattern}."
|
213
|
+
end
|
214
|
+
@created_at = created_at
|
215
|
+
end
|
216
|
+
|
217
|
+
# Custom attribute writer method with validation
|
218
|
+
# @param months [Object] Object to be assigned
|
219
|
+
# @!visibility private
|
220
|
+
def months=(months)
|
221
|
+
if !months.nil? && months > 36
|
222
|
+
fail ArgumentError, 'invalid value for "months", must be smaller than or equal to 36.'
|
223
|
+
end
|
224
|
+
@months = months
|
225
|
+
end
|
226
|
+
|
227
|
+
# Custom attribute writer method with validation
|
228
|
+
# @param report_name [Object] Object to be assigned
|
229
|
+
# @!visibility private
|
230
|
+
def report_name=(report_name)
|
231
|
+
if report_name.nil?
|
232
|
+
fail ArgumentError, 'invalid value for "report_name", report_name cannot be nil.'
|
233
|
+
end
|
234
|
+
@report_name = report_name
|
235
|
+
end
|
236
|
+
|
237
|
+
# Custom attribute writer method with validation
|
238
|
+
# @param report_prefix [Object] Object to be assigned
|
239
|
+
# @!visibility private
|
240
|
+
def report_prefix=(report_prefix)
|
241
|
+
if report_prefix.nil?
|
242
|
+
fail ArgumentError, 'invalid value for "report_prefix", report_prefix cannot be nil.'
|
243
|
+
end
|
244
|
+
@report_prefix = report_prefix
|
245
|
+
end
|
246
|
+
|
247
|
+
# Custom attribute writer method with validation
|
248
|
+
# @param status [Object] Object to be assigned
|
249
|
+
# @!visibility private
|
250
|
+
def status=(status)
|
251
|
+
if status.nil?
|
252
|
+
fail ArgumentError, 'invalid value for "status", status cannot be nil.'
|
253
|
+
end
|
254
|
+
@status = status
|
255
|
+
end
|
256
|
+
|
257
|
+
# Custom attribute writer method with validation
|
258
|
+
# @param status_updated_at [Object] Object to be assigned
|
259
|
+
# @!visibility private
|
260
|
+
def status_updated_at=(status_updated_at)
|
261
|
+
pattern = Regexp.new(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$/)
|
262
|
+
if !status_updated_at.nil? && status_updated_at !~ pattern
|
263
|
+
fail ArgumentError, "invalid value for \"status_updated_at\", must conform to the pattern #{pattern}."
|
264
|
+
end
|
265
|
+
@status_updated_at = status_updated_at
|
266
|
+
end
|
267
|
+
|
268
|
+
# Custom attribute writer method with validation
|
269
|
+
# @param updated_at [Object] Object to be assigned
|
270
|
+
# @!visibility private
|
271
|
+
def updated_at=(updated_at)
|
272
|
+
pattern = Regexp.new(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$/)
|
273
|
+
if !updated_at.nil? && updated_at !~ pattern
|
274
|
+
fail ArgumentError, "invalid value for \"updated_at\", must conform to the pattern #{pattern}."
|
275
|
+
end
|
276
|
+
@updated_at = updated_at
|
277
|
+
end
|
278
|
+
|
279
|
+
# Checks equality by comparing each attribute.
|
280
|
+
# @param o [Object] Object to be compared
|
281
|
+
# @!visibility private
|
282
|
+
def ==(o)
|
283
|
+
return true if self.equal?(o)
|
284
|
+
self.class == o.class &&
|
285
|
+
account_id == o.account_id &&
|
286
|
+
bucket_name == o.bucket_name &&
|
287
|
+
bucket_region == o.bucket_region &&
|
288
|
+
created_at == o.created_at &&
|
289
|
+
error_messages == o.error_messages &&
|
290
|
+
months == o.months &&
|
291
|
+
report_name == o.report_name &&
|
292
|
+
report_prefix == o.report_prefix &&
|
293
|
+
status == o.status &&
|
294
|
+
status_updated_at == o.status_updated_at &&
|
295
|
+
updated_at == o.updated_at
|
296
|
+
end
|
297
|
+
|
298
|
+
# Calculates hash code according to all attributes.
|
299
|
+
# @return [Integer] Hash code
|
300
|
+
# @!visibility private
|
301
|
+
def hash
|
302
|
+
[account_id, bucket_name, bucket_region, created_at, error_messages, months, report_name, report_prefix, status, status_updated_at, updated_at].hash
|
303
|
+
end
|
304
|
+
end
|
305
|
+
end
|
@@ -0,0 +1,119 @@
|
|
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
|
+
# AWS CUR config Patch data.
|
21
|
+
class AwsCURConfigPatchData
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Attributes for AWS CUR config Patch Request.
|
25
|
+
attr_reader :attributes
|
26
|
+
|
27
|
+
# Type of AWS CUR config Patch Request.
|
28
|
+
attr_reader :type
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
# @!visibility private
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'attributes' => :'attributes',
|
35
|
+
:'type' => :'type'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
# @!visibility private
|
41
|
+
def self.openapi_types
|
42
|
+
{
|
43
|
+
:'attributes' => :'AwsCURConfigPatchRequestAttributes',
|
44
|
+
:'type' => :'AwsCURConfigPatchRequestType'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Initializes the object
|
49
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
50
|
+
# @!visibility private
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AwsCURConfigPatchData` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AwsCURConfigPatchData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'attributes')
|
65
|
+
self.attributes = attributes[:'attributes']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'type')
|
69
|
+
self.type = attributes[:'type']
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Check to see if the all the properties in the model are valid
|
74
|
+
# @return true if the model is valid
|
75
|
+
# @!visibility private
|
76
|
+
def valid?
|
77
|
+
return false if @attributes.nil?
|
78
|
+
return false if @type.nil?
|
79
|
+
true
|
80
|
+
end
|
81
|
+
|
82
|
+
# Custom attribute writer method with validation
|
83
|
+
# @param attributes [Object] Object to be assigned
|
84
|
+
# @!visibility private
|
85
|
+
def attributes=(attributes)
|
86
|
+
if attributes.nil?
|
87
|
+
fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
|
88
|
+
end
|
89
|
+
@attributes = attributes
|
90
|
+
end
|
91
|
+
|
92
|
+
# Custom attribute writer method with validation
|
93
|
+
# @param type [Object] Object to be assigned
|
94
|
+
# @!visibility private
|
95
|
+
def type=(type)
|
96
|
+
if type.nil?
|
97
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
98
|
+
end
|
99
|
+
@type = type
|
100
|
+
end
|
101
|
+
|
102
|
+
# Checks equality by comparing each attribute.
|
103
|
+
# @param o [Object] Object to be compared
|
104
|
+
# @!visibility private
|
105
|
+
def ==(o)
|
106
|
+
return true if self.equal?(o)
|
107
|
+
self.class == o.class &&
|
108
|
+
attributes == o.attributes &&
|
109
|
+
type == o.type
|
110
|
+
end
|
111
|
+
|
112
|
+
# Calculates hash code according to all attributes.
|
113
|
+
# @return [Integer] Hash code
|
114
|
+
# @!visibility private
|
115
|
+
def hash
|
116
|
+
[attributes, type].hash
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|