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
@@ -0,0 +1,80 @@
|
|
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
|
+
# Response for Cloud Cost activity.
|
21
|
+
class CloudCostActivityResponse
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Cloud Cost Activity.
|
25
|
+
attr_accessor :data
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
# @!visibility private
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'data' => :'data'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
# @!visibility private
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'data' => :'CloudCostActivity'
|
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::CloudCostActivityResponse` 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::CloudCostActivityResponse`. 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?(:'data')
|
60
|
+
self.data = attributes[:'data']
|
61
|
+
end
|
62
|
+
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
|
+
data == o.data
|
71
|
+
end
|
72
|
+
|
73
|
+
# Calculates hash code according to all attributes.
|
74
|
+
# @return [Integer] Hash code
|
75
|
+
# @!visibility private
|
76
|
+
def hash
|
77
|
+
[data].hash
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,26 @@
|
|
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
|
+
# Type of Cloud Cost Activity.
|
21
|
+
class CloudCostActivityType
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
CLOUD_COST_ACTIVITY = "cloud_cost_activity".freeze
|
25
|
+
end
|
26
|
+
end
|
@@ -30,13 +30,21 @@ module DatadogAPIClient::V2
|
|
30
30
|
# The name of the Cloudflare account.
|
31
31
|
attr_reader :name
|
32
32
|
|
33
|
+
# An allowlist of resources to restrict pulling metrics for.
|
34
|
+
attr_accessor :resources
|
35
|
+
|
36
|
+
# An allowlist of zones to restrict pulling metrics for.
|
37
|
+
attr_accessor :zones
|
38
|
+
|
33
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
34
40
|
# @!visibility private
|
35
41
|
def self.attribute_map
|
36
42
|
{
|
37
43
|
:'api_key' => :'api_key',
|
38
44
|
:'email' => :'email',
|
39
|
-
:'name' => :'name'
|
45
|
+
:'name' => :'name',
|
46
|
+
:'resources' => :'resources',
|
47
|
+
:'zones' => :'zones'
|
40
48
|
}
|
41
49
|
end
|
42
50
|
|
@@ -46,7 +54,9 @@ module DatadogAPIClient::V2
|
|
46
54
|
{
|
47
55
|
:'api_key' => :'String',
|
48
56
|
:'email' => :'String',
|
49
|
-
:'name' => :'String'
|
57
|
+
:'name' => :'String',
|
58
|
+
:'resources' => :'Array<String>',
|
59
|
+
:'zones' => :'Array<String>'
|
50
60
|
}
|
51
61
|
end
|
52
62
|
|
@@ -77,6 +87,18 @@ module DatadogAPIClient::V2
|
|
77
87
|
if attributes.key?(:'name')
|
78
88
|
self.name = attributes[:'name']
|
79
89
|
end
|
90
|
+
|
91
|
+
if attributes.key?(:'resources')
|
92
|
+
if (value = attributes[:'resources']).is_a?(Array)
|
93
|
+
self.resources = value
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'zones')
|
98
|
+
if (value = attributes[:'zones']).is_a?(Array)
|
99
|
+
self.zones = value
|
100
|
+
end
|
101
|
+
end
|
80
102
|
end
|
81
103
|
|
82
104
|
# Check to see if the all the properties in the model are valid
|
@@ -116,14 +138,16 @@ module DatadogAPIClient::V2
|
|
116
138
|
self.class == o.class &&
|
117
139
|
api_key == o.api_key &&
|
118
140
|
email == o.email &&
|
119
|
-
name == o.name
|
141
|
+
name == o.name &&
|
142
|
+
resources == o.resources &&
|
143
|
+
zones == o.zones
|
120
144
|
end
|
121
145
|
|
122
146
|
# Calculates hash code according to all attributes.
|
123
147
|
# @return [Integer] Hash code
|
124
148
|
# @!visibility private
|
125
149
|
def hash
|
126
|
-
[api_key, email, name].hash
|
150
|
+
[api_key, email, name, resources, zones].hash
|
127
151
|
end
|
128
152
|
end
|
129
153
|
end
|
@@ -27,12 +27,20 @@ module DatadogAPIClient::V2
|
|
27
27
|
# The name of the Cloudflare account.
|
28
28
|
attr_reader :name
|
29
29
|
|
30
|
+
# An allowlist of resources to restrict pulling metrics for.
|
31
|
+
attr_accessor :resources
|
32
|
+
|
33
|
+
# An allowlist of zones to restrict pulling metrics for.
|
34
|
+
attr_accessor :zones
|
35
|
+
|
30
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
37
|
# @!visibility private
|
32
38
|
def self.attribute_map
|
33
39
|
{
|
34
40
|
:'email' => :'email',
|
35
|
-
:'name' => :'name'
|
41
|
+
:'name' => :'name',
|
42
|
+
:'resources' => :'resources',
|
43
|
+
:'zones' => :'zones'
|
36
44
|
}
|
37
45
|
end
|
38
46
|
|
@@ -41,7 +49,9 @@ module DatadogAPIClient::V2
|
|
41
49
|
def self.openapi_types
|
42
50
|
{
|
43
51
|
:'email' => :'String',
|
44
|
-
:'name' => :'String'
|
52
|
+
:'name' => :'String',
|
53
|
+
:'resources' => :'Array<String>',
|
54
|
+
:'zones' => :'Array<String>'
|
45
55
|
}
|
46
56
|
end
|
47
57
|
|
@@ -68,6 +78,18 @@ module DatadogAPIClient::V2
|
|
68
78
|
if attributes.key?(:'name')
|
69
79
|
self.name = attributes[:'name']
|
70
80
|
end
|
81
|
+
|
82
|
+
if attributes.key?(:'resources')
|
83
|
+
if (value = attributes[:'resources']).is_a?(Array)
|
84
|
+
self.resources = value
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'zones')
|
89
|
+
if (value = attributes[:'zones']).is_a?(Array)
|
90
|
+
self.zones = value
|
91
|
+
end
|
92
|
+
end
|
71
93
|
end
|
72
94
|
|
73
95
|
# Check to see if the all the properties in the model are valid
|
@@ -95,14 +117,16 @@ module DatadogAPIClient::V2
|
|
95
117
|
return true if self.equal?(o)
|
96
118
|
self.class == o.class &&
|
97
119
|
email == o.email &&
|
98
|
-
name == o.name
|
120
|
+
name == o.name &&
|
121
|
+
resources == o.resources &&
|
122
|
+
zones == o.zones
|
99
123
|
end
|
100
124
|
|
101
125
|
# Calculates hash code according to all attributes.
|
102
126
|
# @return [Integer] Hash code
|
103
127
|
# @!visibility private
|
104
128
|
def hash
|
105
|
-
[email, name].hash
|
129
|
+
[email, name, resources, zones].hash
|
106
130
|
end
|
107
131
|
end
|
108
132
|
end
|
@@ -27,12 +27,20 @@ module DatadogAPIClient::V2
|
|
27
27
|
# The email associated with the Cloudflare account. If an API key is provided (and not a token), this field is also required.
|
28
28
|
attr_accessor :email
|
29
29
|
|
30
|
+
# An allowlist of resources to restrict pulling metrics for.
|
31
|
+
attr_accessor :resources
|
32
|
+
|
33
|
+
# An allowlist of zones to restrict pulling metrics for.
|
34
|
+
attr_accessor :zones
|
35
|
+
|
30
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
37
|
# @!visibility private
|
32
38
|
def self.attribute_map
|
33
39
|
{
|
34
40
|
:'api_key' => :'api_key',
|
35
|
-
:'email' => :'email'
|
41
|
+
:'email' => :'email',
|
42
|
+
:'resources' => :'resources',
|
43
|
+
:'zones' => :'zones'
|
36
44
|
}
|
37
45
|
end
|
38
46
|
|
@@ -41,7 +49,9 @@ module DatadogAPIClient::V2
|
|
41
49
|
def self.openapi_types
|
42
50
|
{
|
43
51
|
:'api_key' => :'String',
|
44
|
-
:'email' => :'String'
|
52
|
+
:'email' => :'String',
|
53
|
+
:'resources' => :'Array<String>',
|
54
|
+
:'zones' => :'Array<String>'
|
45
55
|
}
|
46
56
|
end
|
47
57
|
|
@@ -68,6 +78,18 @@ module DatadogAPIClient::V2
|
|
68
78
|
if attributes.key?(:'email')
|
69
79
|
self.email = attributes[:'email']
|
70
80
|
end
|
81
|
+
|
82
|
+
if attributes.key?(:'resources')
|
83
|
+
if (value = attributes[:'resources']).is_a?(Array)
|
84
|
+
self.resources = value
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'zones')
|
89
|
+
if (value = attributes[:'zones']).is_a?(Array)
|
90
|
+
self.zones = value
|
91
|
+
end
|
92
|
+
end
|
71
93
|
end
|
72
94
|
|
73
95
|
# Check to see if the all the properties in the model are valid
|
@@ -95,14 +117,16 @@ module DatadogAPIClient::V2
|
|
95
117
|
return true if self.equal?(o)
|
96
118
|
self.class == o.class &&
|
97
119
|
api_key == o.api_key &&
|
98
|
-
email == o.email
|
120
|
+
email == o.email &&
|
121
|
+
resources == o.resources &&
|
122
|
+
zones == o.zones
|
99
123
|
end
|
100
124
|
|
101
125
|
# Calculates hash code according to all attributes.
|
102
126
|
# @return [Integer] Hash code
|
103
127
|
# @!visibility private
|
104
128
|
def hash
|
105
|
-
[api_key, email].hash
|
129
|
+
[api_key, email, resources, zones].hash
|
106
130
|
end
|
107
131
|
end
|
108
132
|
end
|
@@ -75,7 +75,7 @@ module DatadogAPIClient::V2
|
|
75
75
|
# @!visibility private
|
76
76
|
def valid?
|
77
77
|
return false if @commit_sha.nil?
|
78
|
-
pattern = Regexp.new(
|
78
|
+
pattern = Regexp.new(/^[a-fA-F0-9]{40,}$/)
|
79
79
|
return false if @commit_sha !~ pattern
|
80
80
|
return false if @repository_url.nil?
|
81
81
|
true
|
@@ -88,7 +88,7 @@ module DatadogAPIClient::V2
|
|
88
88
|
if commit_sha.nil?
|
89
89
|
fail ArgumentError, 'invalid value for "commit_sha", commit_sha cannot be nil.'
|
90
90
|
end
|
91
|
-
pattern = Regexp.new(
|
91
|
+
pattern = Regexp.new(/^[a-fA-F0-9]{40,}$/)
|
92
92
|
if commit_sha !~ pattern
|
93
93
|
fail ArgumentError, "invalid value for \"commit_sha\", must conform to the pattern #{pattern}."
|
94
94
|
end
|
@@ -33,9 +33,15 @@ module DatadogAPIClient::V2
|
|
33
33
|
# Your Host Filters.
|
34
34
|
attr_accessor :host_filters
|
35
35
|
|
36
|
-
# When enabled, Datadog
|
36
|
+
# When enabled, Datadog will activate the Cloud Security Monitoring product for this service account. Note: This requires resource_collection_enabled to be set to true.
|
37
37
|
attr_accessor :is_cspm_enabled
|
38
38
|
|
39
|
+
# When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account.
|
40
|
+
attr_accessor :is_security_command_center_enabled
|
41
|
+
|
42
|
+
# When enabled, Datadog scans for all resources in your GCP environment.
|
43
|
+
attr_accessor :resource_collection_enabled
|
44
|
+
|
39
45
|
# Attribute mapping from ruby-style variable name to JSON key.
|
40
46
|
# @!visibility private
|
41
47
|
def self.attribute_map
|
@@ -44,7 +50,9 @@ module DatadogAPIClient::V2
|
|
44
50
|
:'automute' => :'automute',
|
45
51
|
:'client_email' => :'client_email',
|
46
52
|
:'host_filters' => :'host_filters',
|
47
|
-
:'is_cspm_enabled' => :'is_cspm_enabled'
|
53
|
+
:'is_cspm_enabled' => :'is_cspm_enabled',
|
54
|
+
:'is_security_command_center_enabled' => :'is_security_command_center_enabled',
|
55
|
+
:'resource_collection_enabled' => :'resource_collection_enabled'
|
48
56
|
}
|
49
57
|
end
|
50
58
|
|
@@ -56,7 +64,9 @@ module DatadogAPIClient::V2
|
|
56
64
|
:'automute' => :'Boolean',
|
57
65
|
:'client_email' => :'String',
|
58
66
|
:'host_filters' => :'Array<String>',
|
59
|
-
:'is_cspm_enabled' => :'Boolean'
|
67
|
+
:'is_cspm_enabled' => :'Boolean',
|
68
|
+
:'is_security_command_center_enabled' => :'Boolean',
|
69
|
+
:'resource_collection_enabled' => :'Boolean'
|
60
70
|
}
|
61
71
|
end
|
62
72
|
|
@@ -99,6 +109,14 @@ module DatadogAPIClient::V2
|
|
99
109
|
if attributes.key?(:'is_cspm_enabled')
|
100
110
|
self.is_cspm_enabled = attributes[:'is_cspm_enabled']
|
101
111
|
end
|
112
|
+
|
113
|
+
if attributes.key?(:'is_security_command_center_enabled')
|
114
|
+
self.is_security_command_center_enabled = attributes[:'is_security_command_center_enabled']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'resource_collection_enabled')
|
118
|
+
self.resource_collection_enabled = attributes[:'resource_collection_enabled']
|
119
|
+
end
|
102
120
|
end
|
103
121
|
|
104
122
|
# Checks equality by comparing each attribute.
|
@@ -111,14 +129,16 @@ module DatadogAPIClient::V2
|
|
111
129
|
automute == o.automute &&
|
112
130
|
client_email == o.client_email &&
|
113
131
|
host_filters == o.host_filters &&
|
114
|
-
is_cspm_enabled == o.is_cspm_enabled
|
132
|
+
is_cspm_enabled == o.is_cspm_enabled &&
|
133
|
+
is_security_command_center_enabled == o.is_security_command_center_enabled &&
|
134
|
+
resource_collection_enabled == o.resource_collection_enabled
|
115
135
|
end
|
116
136
|
|
117
137
|
# Calculates hash code according to all attributes.
|
118
138
|
# @return [Integer] Hash code
|
119
139
|
# @!visibility private
|
120
140
|
def hash
|
121
|
-
[account_tags, automute, client_email, host_filters, is_cspm_enabled].hash
|
141
|
+
[account_tags, automute, client_email, host_filters, is_cspm_enabled, is_security_command_center_enabled, resource_collection_enabled].hash
|
122
142
|
end
|
123
143
|
end
|
124
144
|
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 between team membership and team
|
21
|
+
class RelationshipToUserTeamTeam
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The team associated with the membership
|
25
|
+
attr_reader :data
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
# @!visibility private
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'data' => :'data'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
# @!visibility private
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'data' => :'RelationshipToUserTeamTeamData'
|
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::RelationshipToUserTeamTeam` 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::RelationshipToUserTeamTeam`. 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?(:'data')
|
60
|
+
self.data = attributes[:'data']
|
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 @data.nil?
|
69
|
+
true
|
70
|
+
end
|
71
|
+
|
72
|
+
# Custom attribute writer method with validation
|
73
|
+
# @param data [Object] Object to be assigned
|
74
|
+
# @!visibility private
|
75
|
+
def data=(data)
|
76
|
+
if data.nil?
|
77
|
+
fail ArgumentError, 'invalid value for "data", data cannot be nil.'
|
78
|
+
end
|
79
|
+
@data = data
|
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
|
+
data == o.data
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Integer] Hash code
|
93
|
+
# @!visibility private
|
94
|
+
def hash
|
95
|
+
[data].hash
|
96
|
+
end
|
97
|
+
end
|
98
|
+
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
|
+
# The team associated with the membership
|
21
|
+
class RelationshipToUserTeamTeamData
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The ID of the team associated with the membership
|
25
|
+
attr_reader :id
|
26
|
+
|
27
|
+
# User team team type
|
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
|
+
:'id' => :'id',
|
35
|
+
:'type' => :'type'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
# @!visibility private
|
41
|
+
def self.openapi_types
|
42
|
+
{
|
43
|
+
:'id' => :'String',
|
44
|
+
:'type' => :'UserTeamTeamType'
|
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::RelationshipToUserTeamTeamData` 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::RelationshipToUserTeamTeamData`. 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?(:'id')
|
65
|
+
self.id = attributes[:'id']
|
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 @id.nil?
|
78
|
+
return false if @type.nil?
|
79
|
+
true
|
80
|
+
end
|
81
|
+
|
82
|
+
# Custom attribute writer method with validation
|
83
|
+
# @param id [Object] Object to be assigned
|
84
|
+
# @!visibility private
|
85
|
+
def id=(id)
|
86
|
+
if id.nil?
|
87
|
+
fail ArgumentError, 'invalid value for "id", id cannot be nil.'
|
88
|
+
end
|
89
|
+
@id = id
|
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
|
+
id == o.id &&
|
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
|
+
[id, type].hash
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
@@ -55,6 +55,9 @@ module DatadogAPIClient::V2
|
|
55
55
|
# Options on new value rules.
|
56
56
|
attr_accessor :new_value_options
|
57
57
|
|
58
|
+
# Options on third party rules.
|
59
|
+
attr_accessor :third_party_rule_options
|
60
|
+
|
58
61
|
# Attribute mapping from ruby-style variable name to JSON key.
|
59
62
|
# @!visibility private
|
60
63
|
def self.attribute_map
|
@@ -67,7 +70,8 @@ module DatadogAPIClient::V2
|
|
67
70
|
:'impossible_travel_options' => :'impossibleTravelOptions',
|
68
71
|
:'keep_alive' => :'keepAlive',
|
69
72
|
:'max_signal_duration' => :'maxSignalDuration',
|
70
|
-
:'new_value_options' => :'newValueOptions'
|
73
|
+
:'new_value_options' => :'newValueOptions',
|
74
|
+
:'third_party_rule_options' => :'thirdPartyRuleOptions'
|
71
75
|
}
|
72
76
|
end
|
73
77
|
|
@@ -83,7 +87,8 @@ module DatadogAPIClient::V2
|
|
83
87
|
:'impossible_travel_options' => :'SecurityMonitoringRuleImpossibleTravelOptions',
|
84
88
|
:'keep_alive' => :'SecurityMonitoringRuleKeepAlive',
|
85
89
|
:'max_signal_duration' => :'SecurityMonitoringRuleMaxSignalDuration',
|
86
|
-
:'new_value_options' => :'SecurityMonitoringRuleNewValueOptions'
|
90
|
+
:'new_value_options' => :'SecurityMonitoringRuleNewValueOptions',
|
91
|
+
:'third_party_rule_options' => :'SecurityMonitoringRuleThirdPartyOptions'
|
87
92
|
}
|
88
93
|
end
|
89
94
|
|
@@ -138,6 +143,10 @@ module DatadogAPIClient::V2
|
|
138
143
|
if attributes.key?(:'new_value_options')
|
139
144
|
self.new_value_options = attributes[:'new_value_options']
|
140
145
|
end
|
146
|
+
|
147
|
+
if attributes.key?(:'third_party_rule_options')
|
148
|
+
self.third_party_rule_options = attributes[:'third_party_rule_options']
|
149
|
+
end
|
141
150
|
end
|
142
151
|
|
143
152
|
# Checks equality by comparing each attribute.
|
@@ -154,14 +163,15 @@ module DatadogAPIClient::V2
|
|
154
163
|
impossible_travel_options == o.impossible_travel_options &&
|
155
164
|
keep_alive == o.keep_alive &&
|
156
165
|
max_signal_duration == o.max_signal_duration &&
|
157
|
-
new_value_options == o.new_value_options
|
166
|
+
new_value_options == o.new_value_options &&
|
167
|
+
third_party_rule_options == o.third_party_rule_options
|
158
168
|
end
|
159
169
|
|
160
170
|
# Calculates hash code according to all attributes.
|
161
171
|
# @return [Integer] Hash code
|
162
172
|
# @!visibility private
|
163
173
|
def hash
|
164
|
-
[compliance_rule_options, decrease_criticality_based_on_env, detection_method, evaluation_window, hardcoded_evaluator_type, impossible_travel_options, keep_alive, max_signal_duration, new_value_options].hash
|
174
|
+
[compliance_rule_options, decrease_criticality_based_on_env, detection_method, evaluation_window, hardcoded_evaluator_type, impossible_travel_options, keep_alive, max_signal_duration, new_value_options, third_party_rule_options].hash
|
165
175
|
end
|
166
176
|
end
|
167
177
|
end
|