datadog_api_client 2.18.0 → 2.19.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.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/conftest.py +1 -1
  4. data/.generator/poetry.lock +69 -69
  5. data/.generator/schemas/v1/openapi.yaml +189 -11
  6. data/.generator/schemas/v2/openapi.yaml +1321 -188
  7. data/.generator/src/generator/templates/model_generic.j2 +2 -2
  8. data/CHANGELOG.md +18 -0
  9. data/examples/v1/azure-integration/CreateAzureIntegration.rb +4 -4
  10. data/examples/v1/azure-integration/DeleteAzureIntegration.rb +2 -15
  11. data/examples/v1/azure-integration/UpdateAzureIntegration.rb +4 -4
  12. data/examples/v1/gcp-integration/CreateGCPIntegration.rb +4 -5
  13. data/examples/v1/gcp-integration/DeleteGCPIntegration.rb +2 -14
  14. data/examples/v1/gcp-integration/UpdateGCPIntegration.rb +4 -5
  15. data/examples/v1/service-level-objectives/CreateSLO_3765703239.rb +46 -0
  16. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +0 -3
  17. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +0 -3
  18. data/examples/v2/cloud-cost-management/CreateCostAWSCURConfig.rb +18 -0
  19. data/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.rb +29 -0
  20. data/examples/v2/cloud-cost-management/DeleteCostAWSCURConfig.rb +5 -0
  21. data/examples/v2/cloud-cost-management/DeleteCostAzureUCConfig.rb +5 -0
  22. data/examples/v2/cloud-cost-management/GetCloudCostActivity.rb +5 -0
  23. data/examples/v2/cloud-cost-management/ListAWSRelatedAccounts.rb +5 -0
  24. data/examples/v2/cloud-cost-management/ListCostAWSCURConfigs.rb +5 -0
  25. data/examples/v2/cloud-cost-management/ListCostAzureUCConfigs.rb +5 -0
  26. data/examples/v2/cloud-cost-management/UpdateCostAWSCURConfig.rb +14 -0
  27. data/examples/v2/cloud-cost-management/UpdateCostAzureUCConfigs.rb +14 -0
  28. data/examples/v2/cloudflare-integration/CreateCloudflareAccount.rb +1 -1
  29. data/examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb +4 -1
  30. data/examples/v2/downtimes/ListMonitorDowntimes_3316718253.rb +5 -0
  31. data/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.rb +16 -0
  32. data/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.rb +16 -0
  33. data/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.rb +17 -0
  34. data/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb +19 -0
  35. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_3367706049.rb +46 -0
  36. data/examples/v2/sensitive-data-scanner/CreateScanningRule.rb +7 -0
  37. data/examples/v2/sensitive-data-scanner/UpdateScanningRule.rb +7 -10
  38. data/examples/v2/teams/CreateTeamMembership.rb +6 -0
  39. data/lib/datadog_api_client/configuration.rb +0 -1
  40. data/lib/datadog_api_client/inflector.rb +52 -0
  41. data/lib/datadog_api_client/v1/api/downtimes_api.rb +28 -7
  42. data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -1
  43. data/lib/datadog_api_client/v1/models/gcp_account.rb +22 -2
  44. data/lib/datadog_api_client/v1/models/organization.rb +1 -1
  45. data/lib/datadog_api_client/v1/models/service_level_objective.rb +11 -1
  46. data/lib/datadog_api_client/v1/models/service_level_objective_request.rb +11 -1
  47. data/lib/datadog_api_client/v1/models/slo_data_source_query_definition.rb +62 -0
  48. data/lib/datadog_api_client/v1/models/slo_formula.rb +98 -0
  49. data/lib/datadog_api_client/v1/models/slo_response_data.rb +11 -1
  50. data/lib/datadog_api_client/v1/models/slo_sli_spec.rb +62 -0
  51. data/lib/datadog_api_client/v1/models/slo_time_slice_comparator.rb +29 -0
  52. data/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb +141 -0
  53. data/lib/datadog_api_client/v1/models/slo_time_slice_query.rb +131 -0
  54. data/lib/datadog_api_client/v1/models/slo_time_slice_spec.rb +99 -0
  55. data/lib/datadog_api_client/v1/models/slo_type.rb +1 -0
  56. data/lib/datadog_api_client/v1/models/slo_type_numeric.rb +1 -0
  57. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +11 -1
  58. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +11 -1
  59. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +11 -1
  60. data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +0 -6
  61. data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +680 -0
  62. data/lib/datadog_api_client/v2/api/downtimes_api.rb +25 -0
  63. data/lib/datadog_api_client/v2/api/metrics_api.rb +3 -2
  64. data/lib/datadog_api_client/v2/models/aws_cur_config.rb +129 -0
  65. data/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb +305 -0
  66. data/lib/datadog_api_client/v2/models/aws_cur_config_patch_data.rb +119 -0
  67. data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request.rb +98 -0
  68. data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_attributes.rb +98 -0
  69. data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_type.rb +26 -0
  70. data/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb +119 -0
  71. data/lib/datadog_api_client/v2/models/aws_cur_config_post_request.rb +98 -0
  72. data/lib/datadog_api_client/v2/models/aws_cur_config_post_request_attributes.rb +202 -0
  73. data/lib/datadog_api_client/v2/models/aws_cur_config_post_request_type.rb +26 -0
  74. data/lib/datadog_api_client/v2/models/aws_cur_config_response.rb +80 -0
  75. data/lib/datadog_api_client/v2/models/aws_cur_config_type.rb +26 -0
  76. data/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb +82 -0
  77. data/lib/datadog_api_client/v2/models/aws_related_account.rb +129 -0
  78. data/lib/datadog_api_client/v2/models/aws_related_account_attributes.rb +90 -0
  79. data/lib/datadog_api_client/v2/models/aws_related_account_type.rb +26 -0
  80. data/lib/datadog_api_client/v2/models/aws_related_accounts_response.rb +82 -0
  81. data/lib/datadog_api_client/v2/models/azure_uc_config.rb +378 -0
  82. data/lib/datadog_api_client/v2/models/azure_uc_config_pair.rb +129 -0
  83. data/lib/datadog_api_client/v2/models/azure_uc_config_pair_attributes.rb +110 -0
  84. data/lib/datadog_api_client/v2/models/azure_uc_config_pair_type.rb +26 -0
  85. data/lib/datadog_api_client/v2/models/azure_uc_config_pairs_response.rb +80 -0
  86. data/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb +119 -0
  87. data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request.rb +98 -0
  88. data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_attributes.rb +98 -0
  89. data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_type.rb +26 -0
  90. data/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb +119 -0
  91. data/lib/datadog_api_client/v2/models/azure_uc_config_post_request.rb +98 -0
  92. data/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb +192 -0
  93. data/lib/datadog_api_client/v2/models/azure_uc_config_post_request_type.rb +26 -0
  94. data/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb +82 -0
  95. data/lib/datadog_api_client/v2/models/bill_config.rb +161 -0
  96. data/lib/datadog_api_client/v2/models/ci_app_git_info.rb +2 -2
  97. data/lib/datadog_api_client/v2/models/cloud_cost_activity.rb +119 -0
  98. data/lib/datadog_api_client/v2/models/cloud_cost_activity_attributes.rb +98 -0
  99. data/lib/datadog_api_client/v2/models/cloud_cost_activity_response.rb +80 -0
  100. data/lib/datadog_api_client/v2/models/cloud_cost_activity_type.rb +26 -0
  101. data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb +28 -4
  102. data/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb +28 -4
  103. data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb +28 -4
  104. data/lib/datadog_api_client/v2/models/dora_git_info.rb +2 -2
  105. data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +25 -5
  106. data/lib/datadog_api_client/v2/models/relationship_to_user_team_team.rb +98 -0
  107. data/lib/datadog_api_client/v2/models/relationship_to_user_team_team_data.rb +119 -0
  108. data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +14 -4
  109. data/lib/datadog_api_client/v2/models/security_monitoring_rule_third_party_options.rb +114 -0
  110. data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +13 -1
  111. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +13 -1
  112. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +13 -1
  113. data/lib/datadog_api_client/v2/models/security_monitoring_third_party_root_query.rb +92 -0
  114. data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case.rb +112 -0
  115. data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case_create.rb +130 -0
  116. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb +134 -0
  117. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb +46 -1
  118. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +33 -1
  119. data/lib/datadog_api_client/v2/models/user_team_attributes.rb +24 -1
  120. data/lib/datadog_api_client/v2/models/user_team_relationships.rb +11 -1
  121. data/lib/datadog_api_client/v2/models/user_team_team_type.rb +26 -0
  122. data/lib/datadog_api_client/version.rb +1 -1
  123. metadata +71 -2
@@ -0,0 +1,680 @@
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 CloudCostManagementAPI
20
+ attr_accessor :api_client
21
+
22
+ def initialize(api_client = DatadogAPIClient::APIClient.default)
23
+ @api_client = api_client
24
+ end
25
+
26
+ # Create Cloud Cost Management AWS CUR config.
27
+ #
28
+ # @see #create_cost_awscur_config_with_http_info
29
+ def create_cost_awscur_config(body, opts = {})
30
+ data, _status_code, _headers = create_cost_awscur_config_with_http_info(body, opts)
31
+ data
32
+ end
33
+
34
+ # Create Cloud Cost Management AWS CUR config.
35
+ #
36
+ # Create a Cloud Cost Management account for an AWS CUR config.
37
+ #
38
+ # @param body [AwsCURConfigPostRequest]
39
+ # @param opts [Hash] the optional parameters
40
+ # @return [Array<(AwsCURConfigResponse, Integer, Hash)>] AwsCURConfigResponse data, response status code and response headers
41
+ def create_cost_awscur_config_with_http_info(body, opts = {})
42
+
43
+ if @api_client.config.debugging
44
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.create_cost_awscur_config ...'
45
+ end
46
+ # verify the required parameter 'body' is set
47
+ if @api_client.config.client_side_validation && body.nil?
48
+ fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.create_cost_awscur_config"
49
+ end
50
+ # resource path
51
+ local_var_path = '/api/v2/cost/aws_cur_config'
52
+
53
+ # query parameters
54
+ query_params = opts[:query_params] || {}
55
+
56
+ # header parameters
57
+ header_params = opts[:header_params] || {}
58
+ # HTTP header 'Accept' (if needed)
59
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
60
+ # HTTP header 'Content-Type'
61
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
62
+
63
+ # form parameters
64
+ form_params = opts[:form_params] || {}
65
+
66
+ # http body (model)
67
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
68
+
69
+ # return_type
70
+ return_type = opts[:debug_return_type] || 'AwsCURConfigResponse'
71
+
72
+ # auth_names
73
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
74
+
75
+ new_options = opts.merge(
76
+ :operation => :create_cost_awscur_config,
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => return_type,
83
+ :api_version => "V2"
84
+ )
85
+
86
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#create_cost_awscur_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
89
+ end
90
+ return data, status_code, headers
91
+ end
92
+
93
+ # Create Cloud Cost Management Azure configs.
94
+ #
95
+ # @see #create_cost_azure_uc_configs_with_http_info
96
+ def create_cost_azure_uc_configs(body, opts = {})
97
+ data, _status_code, _headers = create_cost_azure_uc_configs_with_http_info(body, opts)
98
+ data
99
+ end
100
+
101
+ # Create Cloud Cost Management Azure configs.
102
+ #
103
+ # Create a Cloud Cost Management account for an Azure config.
104
+ #
105
+ # @param body [AzureUCConfigPostRequest]
106
+ # @param opts [Hash] the optional parameters
107
+ # @return [Array<(AzureUCConfigPairsResponse, Integer, Hash)>] AzureUCConfigPairsResponse data, response status code and response headers
108
+ def create_cost_azure_uc_configs_with_http_info(body, opts = {})
109
+
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.create_cost_azure_uc_configs ...'
112
+ end
113
+ # verify the required parameter 'body' is set
114
+ if @api_client.config.client_side_validation && body.nil?
115
+ fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.create_cost_azure_uc_configs"
116
+ end
117
+ # resource path
118
+ local_var_path = '/api/v2/cost/azure_uc_config'
119
+
120
+ # query parameters
121
+ query_params = opts[:query_params] || {}
122
+
123
+ # header parameters
124
+ header_params = opts[:header_params] || {}
125
+ # HTTP header 'Accept' (if needed)
126
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
127
+ # HTTP header 'Content-Type'
128
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
129
+
130
+ # form parameters
131
+ form_params = opts[:form_params] || {}
132
+
133
+ # http body (model)
134
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
135
+
136
+ # return_type
137
+ return_type = opts[:debug_return_type] || 'AzureUCConfigPairsResponse'
138
+
139
+ # auth_names
140
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
141
+
142
+ new_options = opts.merge(
143
+ :operation => :create_cost_azure_uc_configs,
144
+ :header_params => header_params,
145
+ :query_params => query_params,
146
+ :form_params => form_params,
147
+ :body => post_body,
148
+ :auth_names => auth_names,
149
+ :return_type => return_type,
150
+ :api_version => "V2"
151
+ )
152
+
153
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
154
+ if @api_client.config.debugging
155
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#create_cost_azure_uc_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
156
+ end
157
+ return data, status_code, headers
158
+ end
159
+
160
+ # Delete Cloud Cost Management AWS CUR config.
161
+ #
162
+ # @see #delete_cost_awscur_config_with_http_info
163
+ def delete_cost_awscur_config(cloud_account_id, opts = {})
164
+ delete_cost_awscur_config_with_http_info(cloud_account_id, opts)
165
+ nil
166
+ end
167
+
168
+ # Delete Cloud Cost Management AWS CUR config.
169
+ #
170
+ # Archive a Cloud Cost Management Account.
171
+ #
172
+ # @param cloud_account_id [String] Cloud Account id.
173
+ # @param opts [Hash] the optional parameters
174
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
175
+ def delete_cost_awscur_config_with_http_info(cloud_account_id, opts = {})
176
+
177
+ if @api_client.config.debugging
178
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.delete_cost_awscur_config ...'
179
+ end
180
+ # verify the required parameter 'cloud_account_id' is set
181
+ if @api_client.config.client_side_validation && cloud_account_id.nil?
182
+ fail ArgumentError, "Missing the required parameter 'cloud_account_id' when calling CloudCostManagementAPI.delete_cost_awscur_config"
183
+ end
184
+ # resource path
185
+ local_var_path = '/api/v2/cost/aws_cur_config/{cloud_account_id}'.sub('{cloud_account_id}', CGI.escape(cloud_account_id.to_s).gsub('%2F', '/'))
186
+
187
+ # query parameters
188
+ query_params = opts[:query_params] || {}
189
+
190
+ # header parameters
191
+ header_params = opts[:header_params] || {}
192
+ # HTTP header 'Accept' (if needed)
193
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
194
+
195
+ # form parameters
196
+ form_params = opts[:form_params] || {}
197
+
198
+ # http body (model)
199
+ post_body = opts[:debug_body]
200
+
201
+ # return_type
202
+ return_type = opts[:debug_return_type]
203
+
204
+ # auth_names
205
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
206
+
207
+ new_options = opts.merge(
208
+ :operation => :delete_cost_awscur_config,
209
+ :header_params => header_params,
210
+ :query_params => query_params,
211
+ :form_params => form_params,
212
+ :body => post_body,
213
+ :auth_names => auth_names,
214
+ :return_type => return_type,
215
+ :api_version => "V2"
216
+ )
217
+
218
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#delete_cost_awscur_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
221
+ end
222
+ return data, status_code, headers
223
+ end
224
+
225
+ # Delete Cloud Cost Management Azure config.
226
+ #
227
+ # @see #delete_cost_azure_uc_config_with_http_info
228
+ def delete_cost_azure_uc_config(cloud_account_id, opts = {})
229
+ delete_cost_azure_uc_config_with_http_info(cloud_account_id, opts)
230
+ nil
231
+ end
232
+
233
+ # Delete Cloud Cost Management Azure config.
234
+ #
235
+ # Archive a Cloud Cost Management Account.
236
+ #
237
+ # @param cloud_account_id [String] Cloud Account id.
238
+ # @param opts [Hash] the optional parameters
239
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
240
+ def delete_cost_azure_uc_config_with_http_info(cloud_account_id, opts = {})
241
+
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.delete_cost_azure_uc_config ...'
244
+ end
245
+ # verify the required parameter 'cloud_account_id' is set
246
+ if @api_client.config.client_side_validation && cloud_account_id.nil?
247
+ fail ArgumentError, "Missing the required parameter 'cloud_account_id' when calling CloudCostManagementAPI.delete_cost_azure_uc_config"
248
+ end
249
+ # resource path
250
+ local_var_path = '/api/v2/cost/azure_uc_config/{cloud_account_id}'.sub('{cloud_account_id}', CGI.escape(cloud_account_id.to_s).gsub('%2F', '/'))
251
+
252
+ # query parameters
253
+ query_params = opts[:query_params] || {}
254
+
255
+ # header parameters
256
+ header_params = opts[:header_params] || {}
257
+ # HTTP header 'Accept' (if needed)
258
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
259
+
260
+ # form parameters
261
+ form_params = opts[:form_params] || {}
262
+
263
+ # http body (model)
264
+ post_body = opts[:debug_body]
265
+
266
+ # return_type
267
+ return_type = opts[:debug_return_type]
268
+
269
+ # auth_names
270
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
271
+
272
+ new_options = opts.merge(
273
+ :operation => :delete_cost_azure_uc_config,
274
+ :header_params => header_params,
275
+ :query_params => query_params,
276
+ :form_params => form_params,
277
+ :body => post_body,
278
+ :auth_names => auth_names,
279
+ :return_type => return_type,
280
+ :api_version => "V2"
281
+ )
282
+
283
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
284
+ if @api_client.config.debugging
285
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#delete_cost_azure_uc_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
286
+ end
287
+ return data, status_code, headers
288
+ end
289
+
290
+ # Cloud Cost Enabled.
291
+ #
292
+ # @see #get_cloud_cost_activity_with_http_info
293
+ def get_cloud_cost_activity(opts = {})
294
+ data, _status_code, _headers = get_cloud_cost_activity_with_http_info(opts)
295
+ data
296
+ end
297
+
298
+ # Cloud Cost Enabled.
299
+ #
300
+ # Get the Cloud Cost Management activity.
301
+ #
302
+ # @param opts [Hash] the optional parameters
303
+ # @return [Array<(CloudCostActivityResponse, Integer, Hash)>] CloudCostActivityResponse data, response status code and response headers
304
+ def get_cloud_cost_activity_with_http_info(opts = {})
305
+
306
+ if @api_client.config.debugging
307
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_cloud_cost_activity ...'
308
+ end
309
+ # resource path
310
+ local_var_path = '/api/v2/cost/enabled'
311
+
312
+ # query parameters
313
+ query_params = opts[:query_params] || {}
314
+
315
+ # header parameters
316
+ header_params = opts[:header_params] || {}
317
+ # HTTP header 'Accept' (if needed)
318
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
319
+
320
+ # form parameters
321
+ form_params = opts[:form_params] || {}
322
+
323
+ # http body (model)
324
+ post_body = opts[:debug_body]
325
+
326
+ # return_type
327
+ return_type = opts[:debug_return_type] || 'CloudCostActivityResponse'
328
+
329
+ # auth_names
330
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
331
+
332
+ new_options = opts.merge(
333
+ :operation => :get_cloud_cost_activity,
334
+ :header_params => header_params,
335
+ :query_params => query_params,
336
+ :form_params => form_params,
337
+ :body => post_body,
338
+ :auth_names => auth_names,
339
+ :return_type => return_type,
340
+ :api_version => "V2"
341
+ )
342
+
343
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
344
+ if @api_client.config.debugging
345
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_cloud_cost_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
346
+ end
347
+ return data, status_code, headers
348
+ end
349
+
350
+ # List related AWS accounts.
351
+ #
352
+ # @see #list_aws_related_accounts_with_http_info
353
+ def list_aws_related_accounts(filter_management_account_id, opts = {})
354
+ data, _status_code, _headers = list_aws_related_accounts_with_http_info(filter_management_account_id, opts)
355
+ data
356
+ end
357
+
358
+ # List related AWS accounts.
359
+ #
360
+ # List the AWS accounts in an organization by calling 'organizations:ListAccounts' from the specified management account.
361
+ #
362
+ # @param filter_management_account_id [String] The ID of the management account to filter by.
363
+ # @param opts [Hash] the optional parameters
364
+ # @return [Array<(AWSRelatedAccountsResponse, Integer, Hash)>] AWSRelatedAccountsResponse data, response status code and response headers
365
+ def list_aws_related_accounts_with_http_info(filter_management_account_id, opts = {})
366
+
367
+ if @api_client.config.debugging
368
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_aws_related_accounts ...'
369
+ end
370
+ # verify the required parameter 'filter_management_account_id' is set
371
+ if @api_client.config.client_side_validation && filter_management_account_id.nil?
372
+ fail ArgumentError, "Missing the required parameter 'filter_management_account_id' when calling CloudCostManagementAPI.list_aws_related_accounts"
373
+ end
374
+ # resource path
375
+ local_var_path = '/api/v2/cost/aws_related_accounts'
376
+
377
+ # query parameters
378
+ query_params = opts[:query_params] || {}
379
+ query_params[:'filter[management_account_id]'] = filter_management_account_id
380
+
381
+ # header parameters
382
+ header_params = opts[:header_params] || {}
383
+ # HTTP header 'Accept' (if needed)
384
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
385
+
386
+ # form parameters
387
+ form_params = opts[:form_params] || {}
388
+
389
+ # http body (model)
390
+ post_body = opts[:debug_body]
391
+
392
+ # return_type
393
+ return_type = opts[:debug_return_type] || 'AWSRelatedAccountsResponse'
394
+
395
+ # auth_names
396
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
397
+
398
+ new_options = opts.merge(
399
+ :operation => :list_aws_related_accounts,
400
+ :header_params => header_params,
401
+ :query_params => query_params,
402
+ :form_params => form_params,
403
+ :body => post_body,
404
+ :auth_names => auth_names,
405
+ :return_type => return_type,
406
+ :api_version => "V2"
407
+ )
408
+
409
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
410
+ if @api_client.config.debugging
411
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_aws_related_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
412
+ end
413
+ return data, status_code, headers
414
+ end
415
+
416
+ # List Cloud Cost Management AWS CUR configs.
417
+ #
418
+ # @see #list_cost_awscur_configs_with_http_info
419
+ def list_cost_awscur_configs(opts = {})
420
+ data, _status_code, _headers = list_cost_awscur_configs_with_http_info(opts)
421
+ data
422
+ end
423
+
424
+ # List Cloud Cost Management AWS CUR configs.
425
+ #
426
+ # List the AWS CUR configs.
427
+ #
428
+ # @param opts [Hash] the optional parameters
429
+ # @return [Array<(AwsCURConfigsResponse, Integer, Hash)>] AwsCURConfigsResponse data, response status code and response headers
430
+ def list_cost_awscur_configs_with_http_info(opts = {})
431
+
432
+ if @api_client.config.debugging
433
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_awscur_configs ...'
434
+ end
435
+ # resource path
436
+ local_var_path = '/api/v2/cost/aws_cur_config'
437
+
438
+ # query parameters
439
+ query_params = opts[:query_params] || {}
440
+
441
+ # header parameters
442
+ header_params = opts[:header_params] || {}
443
+ # HTTP header 'Accept' (if needed)
444
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
445
+
446
+ # form parameters
447
+ form_params = opts[:form_params] || {}
448
+
449
+ # http body (model)
450
+ post_body = opts[:debug_body]
451
+
452
+ # return_type
453
+ return_type = opts[:debug_return_type] || 'AwsCURConfigsResponse'
454
+
455
+ # auth_names
456
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
457
+
458
+ new_options = opts.merge(
459
+ :operation => :list_cost_awscur_configs,
460
+ :header_params => header_params,
461
+ :query_params => query_params,
462
+ :form_params => form_params,
463
+ :body => post_body,
464
+ :auth_names => auth_names,
465
+ :return_type => return_type,
466
+ :api_version => "V2"
467
+ )
468
+
469
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
470
+ if @api_client.config.debugging
471
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_cost_awscur_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
472
+ end
473
+ return data, status_code, headers
474
+ end
475
+
476
+ # List Cloud Cost Management Azure configs.
477
+ #
478
+ # @see #list_cost_azure_uc_configs_with_http_info
479
+ def list_cost_azure_uc_configs(opts = {})
480
+ data, _status_code, _headers = list_cost_azure_uc_configs_with_http_info(opts)
481
+ data
482
+ end
483
+
484
+ # List Cloud Cost Management Azure configs.
485
+ #
486
+ # List the Azure configs.
487
+ #
488
+ # @param opts [Hash] the optional parameters
489
+ # @return [Array<(AzureUCConfigsResponse, Integer, Hash)>] AzureUCConfigsResponse data, response status code and response headers
490
+ def list_cost_azure_uc_configs_with_http_info(opts = {})
491
+
492
+ if @api_client.config.debugging
493
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_azure_uc_configs ...'
494
+ end
495
+ # resource path
496
+ local_var_path = '/api/v2/cost/azure_uc_config'
497
+
498
+ # query parameters
499
+ query_params = opts[:query_params] || {}
500
+
501
+ # header parameters
502
+ header_params = opts[:header_params] || {}
503
+ # HTTP header 'Accept' (if needed)
504
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
505
+
506
+ # form parameters
507
+ form_params = opts[:form_params] || {}
508
+
509
+ # http body (model)
510
+ post_body = opts[:debug_body]
511
+
512
+ # return_type
513
+ return_type = opts[:debug_return_type] || 'AzureUCConfigsResponse'
514
+
515
+ # auth_names
516
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
517
+
518
+ new_options = opts.merge(
519
+ :operation => :list_cost_azure_uc_configs,
520
+ :header_params => header_params,
521
+ :query_params => query_params,
522
+ :form_params => form_params,
523
+ :body => post_body,
524
+ :auth_names => auth_names,
525
+ :return_type => return_type,
526
+ :api_version => "V2"
527
+ )
528
+
529
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
530
+ if @api_client.config.debugging
531
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_cost_azure_uc_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
532
+ end
533
+ return data, status_code, headers
534
+ end
535
+
536
+ # Update Cloud Cost Management AWS CUR config.
537
+ #
538
+ # @see #update_cost_awscur_config_with_http_info
539
+ def update_cost_awscur_config(cloud_account_id, body, opts = {})
540
+ data, _status_code, _headers = update_cost_awscur_config_with_http_info(cloud_account_id, body, opts)
541
+ data
542
+ end
543
+
544
+ # Update Cloud Cost Management AWS CUR config.
545
+ #
546
+ # Update the status of an AWS CUR config (active/archived).
547
+ #
548
+ # @param cloud_account_id [String] Cloud Account id.
549
+ # @param body [AwsCURConfigPatchRequest]
550
+ # @param opts [Hash] the optional parameters
551
+ # @return [Array<(AwsCURConfigsResponse, Integer, Hash)>] AwsCURConfigsResponse data, response status code and response headers
552
+ def update_cost_awscur_config_with_http_info(cloud_account_id, body, opts = {})
553
+
554
+ if @api_client.config.debugging
555
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.update_cost_awscur_config ...'
556
+ end
557
+ # verify the required parameter 'cloud_account_id' is set
558
+ if @api_client.config.client_side_validation && cloud_account_id.nil?
559
+ fail ArgumentError, "Missing the required parameter 'cloud_account_id' when calling CloudCostManagementAPI.update_cost_awscur_config"
560
+ end
561
+ # verify the required parameter 'body' is set
562
+ if @api_client.config.client_side_validation && body.nil?
563
+ fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.update_cost_awscur_config"
564
+ end
565
+ # resource path
566
+ local_var_path = '/api/v2/cost/aws_cur_config/{cloud_account_id}'.sub('{cloud_account_id}', CGI.escape(cloud_account_id.to_s).gsub('%2F', '/'))
567
+
568
+ # query parameters
569
+ query_params = opts[:query_params] || {}
570
+
571
+ # header parameters
572
+ header_params = opts[:header_params] || {}
573
+ # HTTP header 'Accept' (if needed)
574
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
575
+ # HTTP header 'Content-Type'
576
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
577
+
578
+ # form parameters
579
+ form_params = opts[:form_params] || {}
580
+
581
+ # http body (model)
582
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
583
+
584
+ # return_type
585
+ return_type = opts[:debug_return_type] || 'AwsCURConfigsResponse'
586
+
587
+ # auth_names
588
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
589
+
590
+ new_options = opts.merge(
591
+ :operation => :update_cost_awscur_config,
592
+ :header_params => header_params,
593
+ :query_params => query_params,
594
+ :form_params => form_params,
595
+ :body => post_body,
596
+ :auth_names => auth_names,
597
+ :return_type => return_type,
598
+ :api_version => "V2"
599
+ )
600
+
601
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
602
+ if @api_client.config.debugging
603
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#update_cost_awscur_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
604
+ end
605
+ return data, status_code, headers
606
+ end
607
+
608
+ # Update Cloud Cost Management Azure config.
609
+ #
610
+ # @see #update_cost_azure_uc_configs_with_http_info
611
+ def update_cost_azure_uc_configs(cloud_account_id, body, opts = {})
612
+ data, _status_code, _headers = update_cost_azure_uc_configs_with_http_info(cloud_account_id, body, opts)
613
+ data
614
+ end
615
+
616
+ # Update Cloud Cost Management Azure config.
617
+ #
618
+ # Update the status of an Azure config (active/archived).
619
+ #
620
+ # @param cloud_account_id [String] Cloud Account id.
621
+ # @param body [AzureUCConfigPatchRequest]
622
+ # @param opts [Hash] the optional parameters
623
+ # @return [Array<(AzureUCConfigPairsResponse, Integer, Hash)>] AzureUCConfigPairsResponse data, response status code and response headers
624
+ def update_cost_azure_uc_configs_with_http_info(cloud_account_id, body, opts = {})
625
+
626
+ if @api_client.config.debugging
627
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.update_cost_azure_uc_configs ...'
628
+ end
629
+ # verify the required parameter 'cloud_account_id' is set
630
+ if @api_client.config.client_side_validation && cloud_account_id.nil?
631
+ fail ArgumentError, "Missing the required parameter 'cloud_account_id' when calling CloudCostManagementAPI.update_cost_azure_uc_configs"
632
+ end
633
+ # verify the required parameter 'body' is set
634
+ if @api_client.config.client_side_validation && body.nil?
635
+ fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.update_cost_azure_uc_configs"
636
+ end
637
+ # resource path
638
+ local_var_path = '/api/v2/cost/azure_uc_config/{cloud_account_id}'.sub('{cloud_account_id}', CGI.escape(cloud_account_id.to_s).gsub('%2F', '/'))
639
+
640
+ # query parameters
641
+ query_params = opts[:query_params] || {}
642
+
643
+ # header parameters
644
+ header_params = opts[:header_params] || {}
645
+ # HTTP header 'Accept' (if needed)
646
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
647
+ # HTTP header 'Content-Type'
648
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
649
+
650
+ # form parameters
651
+ form_params = opts[:form_params] || {}
652
+
653
+ # http body (model)
654
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
655
+
656
+ # return_type
657
+ return_type = opts[:debug_return_type] || 'AzureUCConfigPairsResponse'
658
+
659
+ # auth_names
660
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
661
+
662
+ new_options = opts.merge(
663
+ :operation => :update_cost_azure_uc_configs,
664
+ :header_params => header_params,
665
+ :query_params => query_params,
666
+ :form_params => form_params,
667
+ :body => post_body,
668
+ :auth_names => auth_names,
669
+ :return_type => return_type,
670
+ :api_version => "V2"
671
+ )
672
+
673
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
674
+ if @api_client.config.debugging
675
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#update_cost_azure_uc_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
676
+ end
677
+ return data, status_code, headers
678
+ end
679
+ end
680
+ end