Class: DatadogAPIClient::V2::DeploymentGatesAPI
- Inherits:
-
Object
- Object
- DatadogAPIClient::V2::DeploymentGatesAPI
- Defined in:
- lib/datadog_api_client/v2/api/deployment_gates_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_deployment_gate(body, opts = {}) ⇒ Object
Create deployment gate.
-
#create_deployment_gate_with_http_info(body, opts = {}) ⇒ Array<(DeploymentGateResponse, Integer, Hash)>
Create deployment gate.
-
#create_deployment_rule(gate_id, body, opts = {}) ⇒ Object
Create deployment rule.
-
#create_deployment_rule_with_http_info(gate_id, body, opts = {}) ⇒ Array<(DeploymentRuleResponse, Integer, Hash)>
Create deployment rule.
-
#delete_deployment_gate(id, opts = {}) ⇒ Object
Delete deployment gate.
-
#delete_deployment_gate_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete deployment gate.
-
#delete_deployment_rule(gate_id, id, opts = {}) ⇒ Object
Delete deployment rule.
-
#delete_deployment_rule_with_http_info(gate_id, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete deployment rule.
-
#get_deployment_gate(id, opts = {}) ⇒ Object
Get deployment gate.
-
#get_deployment_gate_rules(gate_id, opts = {}) ⇒ Object
Get rules for a deployment gate.
-
#get_deployment_gate_rules_with_http_info(gate_id, opts = {}) ⇒ Array<(DeploymentGateRulesResponse, Integer, Hash)>
Get rules for a deployment gate.
-
#get_deployment_gate_with_http_info(id, opts = {}) ⇒ Array<(DeploymentGateResponse, Integer, Hash)>
Get deployment gate.
-
#get_deployment_gates_evaluation_result(id, opts = {}) ⇒ Object
Get a deployment gate evaluation result.
-
#get_deployment_gates_evaluation_result_with_http_info(id, opts = {}) ⇒ Array<(DeploymentGatesEvaluationResultResponse, Integer, Hash)>
Get a deployment gate evaluation result.
-
#get_deployment_rule(gate_id, id, opts = {}) ⇒ Object
Get deployment rule.
-
#get_deployment_rule_with_http_info(gate_id, id, opts = {}) ⇒ Array<(DeploymentRuleResponse, Integer, Hash)>
Get deployment rule.
-
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ DeploymentGatesAPI
constructor
A new instance of DeploymentGatesAPI.
-
#list_deployment_gate_evaluations(opts = {}) ⇒ Object
List deployment gate evaluations.
-
#list_deployment_gate_evaluations_with_http_info(opts = {}) ⇒ Array<(DeploymentGateEvaluationsResponse, Integer, Hash)>
List deployment gate evaluations.
-
#list_deployment_gate_evaluations_with_pagination(opts = {}) {|DeploymentGateEvaluationData| ... } ⇒ Object
List deployment gate evaluations.
-
#list_deployment_gates(opts = {}) ⇒ Object
Get all deployment gates.
-
#list_deployment_gates_with_http_info(opts = {}) ⇒ Array<(DeploymentGatesListResponse, Integer, Hash)>
Get all deployment gates.
-
#list_deployment_rule_evaluations(opts = {}) ⇒ Object
List deployment gate rule evaluations.
-
#list_deployment_rule_evaluations_with_http_info(opts = {}) ⇒ Array<(DeploymentGateRuleEvaluationsResponse, Integer, Hash)>
List deployment gate rule evaluations.
-
#list_deployment_rule_evaluations_with_pagination(opts = {}) {|DeploymentGateRuleEvaluationData| ... } ⇒ Object
List deployment gate rule evaluations.
-
#trigger_deployment_gates_evaluation(body, opts = {}) ⇒ Object
Trigger a deployment gate evaluation.
-
#trigger_deployment_gates_evaluation_with_http_info(body, opts = {}) ⇒ Array<(DeploymentGatesEvaluationResponse, Integer, Hash)>
Trigger a deployment gate evaluation.
-
#update_deployment_gate(id, body, opts = {}) ⇒ Object
Update deployment gate.
-
#update_deployment_gate_with_http_info(id, body, opts = {}) ⇒ Array<(DeploymentGateResponse, Integer, Hash)>
Update deployment gate.
-
#update_deployment_rule(gate_id, id, body, opts = {}) ⇒ Object
Update deployment rule.
-
#update_deployment_rule_with_http_info(gate_id, id, body, opts = {}) ⇒ Array<(DeploymentRuleResponse, Integer, Hash)>
Update deployment rule.
Constructor Details
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ DeploymentGatesAPI
Returns a new instance of DeploymentGatesAPI.
22 23 24 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 22 def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
20 21 22 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 20 def api_client @api_client end |
Instance Method Details
#create_deployment_gate(body, opts = {}) ⇒ Object
Create deployment gate.
29 30 31 32 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 29 def create_deployment_gate(body, opts = {}) data, _status_code, _headers = create_deployment_gate_with_http_info(body, opts) data end |
#create_deployment_gate_with_http_info(body, opts = {}) ⇒ Array<(DeploymentGateResponse, Integer, Hash)>
Create deployment gate.
Endpoint to create a deployment gate.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 41 def create_deployment_gate_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.create_deployment_gate".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_deployment_gate") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_deployment_gate")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.create_deployment_gate ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling DeploymentGatesAPI.create_deployment_gate" end # resource path local_var_path = '/api/v2/deployment_gates' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'DeploymentGateResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_deployment_gate, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DeploymentGatesAPI#create_deployment_gate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_deployment_rule(gate_id, body, opts = {}) ⇒ Object
Create deployment rule.
102 103 104 105 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 102 def create_deployment_rule(gate_id, body, opts = {}) data, _status_code, _headers = create_deployment_rule_with_http_info(gate_id, body, opts) data end |
#create_deployment_rule_with_http_info(gate_id, body, opts = {}) ⇒ Array<(DeploymentRuleResponse, Integer, Hash)>
Create deployment rule.
Endpoint to create a deployment rule. A gate for the rule must already exist.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 115 def create_deployment_rule_with_http_info(gate_id, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.create_deployment_rule".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_deployment_rule") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_deployment_rule")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.create_deployment_rule ...' end # verify the required parameter 'gate_id' is set if @api_client.config.client_side_validation && gate_id.nil? fail ArgumentError, "Missing the required parameter 'gate_id' when calling DeploymentGatesAPI.create_deployment_rule" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling DeploymentGatesAPI.create_deployment_rule" end # resource path local_var_path = '/api/v2/deployment_gates/{gate_id}/rules'.sub('{gate_id}', CGI.escape(gate_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'DeploymentRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_deployment_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DeploymentGatesAPI#create_deployment_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_deployment_gate(id, opts = {}) ⇒ Object
Delete deployment gate.
180 181 182 183 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 180 def delete_deployment_gate(id, opts = {}) delete_deployment_gate_with_http_info(id, opts) nil end |
#delete_deployment_gate_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete deployment gate.
Endpoint to delete a deployment gate. Rules associated with the gate are also deleted.
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 192 def delete_deployment_gate_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.delete_deployment_gate".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_deployment_gate") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_deployment_gate")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.delete_deployment_gate ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DeploymentGatesAPI.delete_deployment_gate" end # resource path local_var_path = '/api/v2/deployment_gates/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :delete_deployment_gate, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DeploymentGatesAPI#delete_deployment_gate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_deployment_rule(gate_id, id, opts = {}) ⇒ Object
Delete deployment rule.
251 252 253 254 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 251 def delete_deployment_rule(gate_id, id, opts = {}) delete_deployment_rule_with_http_info(gate_id, id, opts) nil end |
#delete_deployment_rule_with_http_info(gate_id, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete deployment rule.
Endpoint to delete a deployment rule.
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 264 def delete_deployment_rule_with_http_info(gate_id, id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.delete_deployment_rule".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_deployment_rule") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_deployment_rule")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.delete_deployment_rule ...' end # verify the required parameter 'gate_id' is set if @api_client.config.client_side_validation && gate_id.nil? fail ArgumentError, "Missing the required parameter 'gate_id' when calling DeploymentGatesAPI.delete_deployment_rule" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DeploymentGatesAPI.delete_deployment_rule" end # resource path local_var_path = '/api/v2/deployment_gates/{gate_id}/rules/{id}'.sub('{gate_id}', CGI.escape(gate_id.to_s).gsub('%2F', '/')).sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :delete_deployment_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DeploymentGatesAPI#delete_deployment_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_deployment_gate(id, opts = {}) ⇒ Object
Get deployment gate.
327 328 329 330 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 327 def get_deployment_gate(id, opts = {}) data, _status_code, _headers = get_deployment_gate_with_http_info(id, opts) data end |
#get_deployment_gate_rules(gate_id, opts = {}) ⇒ Object
Get rules for a deployment gate.
398 399 400 401 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 398 def get_deployment_gate_rules(gate_id, opts = {}) data, _status_code, _headers = get_deployment_gate_rules_with_http_info(gate_id, opts) data end |
#get_deployment_gate_rules_with_http_info(gate_id, opts = {}) ⇒ Array<(DeploymentGateRulesResponse, Integer, Hash)>
Get rules for a deployment gate.
Endpoint to get rules for a deployment gate.
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 410 def get_deployment_gate_rules_with_http_info(gate_id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_deployment_gate_rules".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_deployment_gate_rules") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_deployment_gate_rules")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.get_deployment_gate_rules ...' end # verify the required parameter 'gate_id' is set if @api_client.config.client_side_validation && gate_id.nil? fail ArgumentError, "Missing the required parameter 'gate_id' when calling DeploymentGatesAPI.get_deployment_gate_rules" end # resource path local_var_path = '/api/v2/deployment_gates/{gate_id}/rules'.sub('{gate_id}', CGI.escape(gate_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeploymentGateRulesResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_deployment_gate_rules, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DeploymentGatesAPI#get_deployment_gate_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_deployment_gate_with_http_info(id, opts = {}) ⇒ Array<(DeploymentGateResponse, Integer, Hash)>
Get deployment gate.
Endpoint to get a deployment gate.
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 339 def get_deployment_gate_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_deployment_gate".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_deployment_gate") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_deployment_gate")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.get_deployment_gate ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DeploymentGatesAPI.get_deployment_gate" end # resource path local_var_path = '/api/v2/deployment_gates/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeploymentGateResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_deployment_gate, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DeploymentGatesAPI#get_deployment_gate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_deployment_gates_evaluation_result(id, opts = {}) ⇒ Object
Get a deployment gate evaluation result.
469 470 471 472 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 469 def get_deployment_gates_evaluation_result(id, opts = {}) data, _status_code, _headers = get_deployment_gates_evaluation_result_with_http_info(id, opts) data end |
#get_deployment_gates_evaluation_result_with_http_info(id, opts = {}) ⇒ Array<(DeploymentGatesEvaluationResultResponse, Integer, Hash)>
Get a deployment gate evaluation result.
Retrieves the result of a deployment gate evaluation by its evaluation ID.
If the evaluation is still in progress, data.attributes.gate_status will be in_progress;
continue polling until it returns pass or fail.
Polling every 10-20 seconds is recommended.
The endpoint may return a 404 if called too soon after triggering; retry after a few seconds.
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 485 def get_deployment_gates_evaluation_result_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_deployment_gates_evaluation_result".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_deployment_gates_evaluation_result") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_deployment_gates_evaluation_result")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.get_deployment_gates_evaluation_result ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DeploymentGatesAPI.get_deployment_gates_evaluation_result" end # resource path local_var_path = '/api/v2/deployments/gates/evaluation/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeploymentGatesEvaluationResultResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_deployment_gates_evaluation_result, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DeploymentGatesAPI#get_deployment_gates_evaluation_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_deployment_rule(gate_id, id, opts = {}) ⇒ Object
Get deployment rule.
544 545 546 547 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 544 def get_deployment_rule(gate_id, id, opts = {}) data, _status_code, _headers = get_deployment_rule_with_http_info(gate_id, id, opts) data end |
#get_deployment_rule_with_http_info(gate_id, id, opts = {}) ⇒ Array<(DeploymentRuleResponse, Integer, Hash)>
Get deployment rule.
Endpoint to get a deployment rule.
557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 557 def get_deployment_rule_with_http_info(gate_id, id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.get_deployment_rule".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_deployment_rule") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_deployment_rule")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.get_deployment_rule ...' end # verify the required parameter 'gate_id' is set if @api_client.config.client_side_validation && gate_id.nil? fail ArgumentError, "Missing the required parameter 'gate_id' when calling DeploymentGatesAPI.get_deployment_rule" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DeploymentGatesAPI.get_deployment_rule" end # resource path local_var_path = '/api/v2/deployment_gates/{gate_id}/rules/{id}'.sub('{gate_id}', CGI.escape(gate_id.to_s).gsub('%2F', '/')).sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeploymentRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_deployment_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DeploymentGatesAPI#get_deployment_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_deployment_gate_evaluations(opts = {}) ⇒ Object
List deployment gate evaluations.
620 621 622 623 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 620 def list_deployment_gate_evaluations(opts = {}) data, _status_code, _headers = list_deployment_gate_evaluations_with_http_info(opts) data end |
#list_deployment_gate_evaluations_with_http_info(opts = {}) ⇒ Array<(DeploymentGateEvaluationsResponse, Integer, Hash)>
List deployment gate evaluations.
Returns deployment gate evaluations started in a maximum 30-day window (the default is the previous 24 hours). Results are ordered by start time, newest first. In-progress state is near-real-time and mutable. Finished state is eventually consistent.
645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 645 def list_deployment_gate_evaluations_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_deployment_gate_evaluations".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_deployment_gate_evaluations") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_deployment_gate_evaluations")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.list_deployment_gate_evaluations ...' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling DeploymentGatesAPI.list_deployment_gate_evaluations, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling DeploymentGatesAPI.list_deployment_gate_evaluations, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v2/deployment_gates/evaluations' # query parameters query_params = opts[:query_params] || {} query_params[:'filter[from]'] = opts[:'filter_from'] if !opts[:'filter_from'].nil? query_params[:'filter[to]'] = opts[:'filter_to'] if !opts[:'filter_to'].nil? query_params[:'filter[service]'] = @api_client.build_collection_param(opts[:'filter_service'], :multi) if !opts[:'filter_service'].nil? query_params[:'filter[env]'] = @api_client.build_collection_param(opts[:'filter_env'], :multi) if !opts[:'filter_env'].nil? query_params[:'filter[identifier]'] = @api_client.build_collection_param(opts[:'filter_identifier'], :multi) if !opts[:'filter_identifier'].nil? query_params[:'filter[status]'] = @api_client.build_collection_param(opts[:'filter_status'], :multi) if !opts[:'filter_status'].nil? query_params[:'filter[dry_run]'] = opts[:'filter_dry_run'] if !opts[:'filter_dry_run'].nil? query_params[:'filter[evaluation_id]'] = opts[:'filter_evaluation_id'] if !opts[:'filter_evaluation_id'].nil? query_params[:'filter[gate_id]'] = opts[:'filter_gate_id'] if !opts[:'filter_gate_id'].nil? query_params[:'filter[version]'] = @api_client.build_collection_param(opts[:'filter_version'], :multi) if !opts[:'filter_version'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeploymentGateEvaluationsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_deployment_gate_evaluations, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) [:query_string_normalizer] = HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DeploymentGatesAPI#list_deployment_gate_evaluations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_deployment_gate_evaluations_with_pagination(opts = {}) {|DeploymentGateEvaluationData| ... } ⇒ Object
List deployment gate evaluations.
Provide a paginated version of #list_deployment_gate_evaluations, returning all items.
To use it you need to use a block: list_deployment_gate_evaluations_with_pagination { |item| p item }
723 724 725 726 727 728 729 730 731 732 733 734 735 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 723 def list_deployment_gate_evaluations_with_pagination(opts = {}) api_version = "V2" page_size = @api_client.get_attribute_from_path(opts, "page_size", 20) @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) while true do response = list_deployment_gate_evaluations(opts) @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } if @api_client.get_attribute_from_path(response, "data").length == 0 break end @api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.next_cursor")) end end |
#list_deployment_gates(opts = {}) ⇒ Object
Get all deployment gates.
740 741 742 743 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 740 def list_deployment_gates(opts = {}) data, _status_code, _headers = list_deployment_gates_with_http_info(opts) data end |
#list_deployment_gates_with_http_info(opts = {}) ⇒ Array<(DeploymentGatesListResponse, Integer, Hash)>
Get all deployment gates.
Returns a paginated list of all deployment gates for the organization.
Use page[cursor] and page[size] query parameters to paginate through results.
758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 758 def list_deployment_gates_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_deployment_gates".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_deployment_gates") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_deployment_gates")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.list_deployment_gates ...' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling DeploymentGatesAPI.list_deployment_gates, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling DeploymentGatesAPI.list_deployment_gates, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v2/deployment_gates' # query parameters query_params = opts[:query_params] || {} query_params[:'filter[service]'] = opts[:'filter_service'] if !opts[:'filter_service'].nil? query_params[:'filter[env]'] = opts[:'filter_env'] if !opts[:'filter_env'].nil? query_params[:'filter[identifier]'] = opts[:'filter_identifier'] if !opts[:'filter_identifier'].nil? query_params[:'filter[dry_run]'] = opts[:'filter_dry_run'] if !opts[:'filter_dry_run'].nil? query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeploymentGatesListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_deployment_gates, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DeploymentGatesAPI#list_deployment_gates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_deployment_rule_evaluations(opts = {}) ⇒ Object
List deployment gate rule evaluations.
825 826 827 828 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 825 def list_deployment_rule_evaluations(opts = {}) data, _status_code, _headers = list_deployment_rule_evaluations_with_http_info(opts) data end |
#list_deployment_rule_evaluations_with_http_info(opts = {}) ⇒ Array<(DeploymentGateRuleEvaluationsResponse, Integer, Hash)>
List deployment gate rule evaluations.
Returns rule evaluations whose gate evaluation started in a maximum 30-day window (the default is the previous 24 hours). Filter by gate, rule, gate evaluation, or rule evaluation ID; omit IDs for cross-evaluation searches. Results are ordered by start time, newest first. In-progress state is near-real-time and mutable. Finished state is eventually consistent. Gate-level and rule-level dry-run states are independent. Pagination is deterministic but not snapshot isolated; clients should deduplicate by rule evaluation ID.
858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 858 def list_deployment_rule_evaluations_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_deployment_rule_evaluations".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_deployment_rule_evaluations") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_deployment_rule_evaluations")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.list_deployment_rule_evaluations ...' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling DeploymentGatesAPI.list_deployment_rule_evaluations, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling DeploymentGatesAPI.list_deployment_rule_evaluations, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v2/deployment_gates/evaluations/rules' # query parameters query_params = opts[:query_params] || {} query_params[:'filter[from]'] = opts[:'filter_from'] if !opts[:'filter_from'].nil? query_params[:'filter[to]'] = opts[:'filter_to'] if !opts[:'filter_to'].nil? query_params[:'filter[gate_evaluation_id]'] = opts[:'filter_gate_evaluation_id'] if !opts[:'filter_gate_evaluation_id'].nil? query_params[:'filter[evaluation_id]'] = opts[:'filter_evaluation_id'] if !opts[:'filter_evaluation_id'].nil? query_params[:'filter[gate_id]'] = opts[:'filter_gate_id'] if !opts[:'filter_gate_id'].nil? query_params[:'filter[rule_id]'] = opts[:'filter_rule_id'] if !opts[:'filter_rule_id'].nil? query_params[:'filter[service]'] = @api_client.build_collection_param(opts[:'filter_service'], :multi) if !opts[:'filter_service'].nil? query_params[:'filter[env]'] = @api_client.build_collection_param(opts[:'filter_env'], :multi) if !opts[:'filter_env'].nil? query_params[:'filter[identifier]'] = @api_client.build_collection_param(opts[:'filter_identifier'], :multi) if !opts[:'filter_identifier'].nil? query_params[:'filter[version]'] = @api_client.build_collection_param(opts[:'filter_version'], :multi) if !opts[:'filter_version'].nil? query_params[:'filter[status]'] = @api_client.build_collection_param(opts[:'filter_status'], :multi) if !opts[:'filter_status'].nil? query_params[:'filter[type]'] = @api_client.build_collection_param(opts[:'filter_type'], :multi) if !opts[:'filter_type'].nil? query_params[:'filter[dry_run]'] = opts[:'filter_dry_run'] if !opts[:'filter_dry_run'].nil? query_params[:'filter[gate_dry_run]'] = opts[:'filter_gate_dry_run'] if !opts[:'filter_gate_dry_run'].nil? query_params[:'filter[name]'] = @api_client.build_collection_param(opts[:'filter_name'], :multi) if !opts[:'filter_name'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeploymentGateRuleEvaluationsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_deployment_rule_evaluations, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) [:query_string_normalizer] = HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DeploymentGatesAPI#list_deployment_rule_evaluations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_deployment_rule_evaluations_with_pagination(opts = {}) {|DeploymentGateRuleEvaluationData| ... } ⇒ Object
List deployment gate rule evaluations.
Provide a paginated version of #list_deployment_rule_evaluations, returning all items.
To use it you need to use a block: list_deployment_rule_evaluations_with_pagination { |item| p item }
941 942 943 944 945 946 947 948 949 950 951 952 953 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 941 def list_deployment_rule_evaluations_with_pagination(opts = {}) api_version = "V2" page_size = @api_client.get_attribute_from_path(opts, "page_size", 50) @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) while true do response = list_deployment_rule_evaluations(opts) @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } if @api_client.get_attribute_from_path(response, "data").length == 0 break end @api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.next_cursor")) end end |
#trigger_deployment_gates_evaluation(body, opts = {}) ⇒ Object
Trigger a deployment gate evaluation.
958 959 960 961 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 958 def trigger_deployment_gates_evaluation(body, opts = {}) data, _status_code, _headers = trigger_deployment_gates_evaluation_with_http_info(body, opts) data end |
#trigger_deployment_gates_evaluation_with_http_info(body, opts = {}) ⇒ Array<(DeploymentGatesEvaluationResponse, Integer, Hash)>
Trigger a deployment gate evaluation.
Triggers an asynchronous deployment gate evaluation for the given service and environment.
Returns an evaluation ID that can be used to poll for the result via the
GET /api/v2/deployments/gates/evaluation/{id} endpoint.
When the configuration attribute is provided, rules are evaluated inline from that configuration
and no pre-configured gate is required. When configuration is omitted, rules are resolved from the
gate pre-configured for the given service and environment through the Datadog UI, API, or Terraform.
976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 976 def trigger_deployment_gates_evaluation_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.trigger_deployment_gates_evaluation".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.trigger_deployment_gates_evaluation") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.trigger_deployment_gates_evaluation")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.trigger_deployment_gates_evaluation ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling DeploymentGatesAPI.trigger_deployment_gates_evaluation" end # resource path local_var_path = '/api/v2/deployments/gates/evaluation' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'DeploymentGatesEvaluationResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :trigger_deployment_gates_evaluation, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DeploymentGatesAPI#trigger_deployment_gates_evaluation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_deployment_gate(id, body, opts = {}) ⇒ Object
Update deployment gate.
1037 1038 1039 1040 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 1037 def update_deployment_gate(id, body, opts = {}) data, _status_code, _headers = update_deployment_gate_with_http_info(id, body, opts) data end |
#update_deployment_gate_with_http_info(id, body, opts = {}) ⇒ Array<(DeploymentGateResponse, Integer, Hash)>
Update deployment gate.
Endpoint to update a deployment gate.
1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 1050 def update_deployment_gate_with_http_info(id, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_deployment_gate".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_deployment_gate") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_deployment_gate")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.update_deployment_gate ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DeploymentGatesAPI.update_deployment_gate" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling DeploymentGatesAPI.update_deployment_gate" end # resource path local_var_path = '/api/v2/deployment_gates/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'DeploymentGateResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_deployment_gate, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DeploymentGatesAPI#update_deployment_gate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_deployment_rule(gate_id, id, body, opts = {}) ⇒ Object
Update deployment rule.
1115 1116 1117 1118 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 1115 def update_deployment_rule(gate_id, id, body, opts = {}) data, _status_code, _headers = update_deployment_rule_with_http_info(gate_id, id, body, opts) data end |
#update_deployment_rule_with_http_info(gate_id, id, body, opts = {}) ⇒ Array<(DeploymentRuleResponse, Integer, Hash)>
Update deployment rule.
Endpoint to update a deployment rule.
1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 |
# File 'lib/datadog_api_client/v2/api/deployment_gates_api.rb', line 1129 def update_deployment_rule_with_http_info(gate_id, id, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_deployment_rule".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_deployment_rule") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_deployment_rule")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.update_deployment_rule ...' end # verify the required parameter 'gate_id' is set if @api_client.config.client_side_validation && gate_id.nil? fail ArgumentError, "Missing the required parameter 'gate_id' when calling DeploymentGatesAPI.update_deployment_rule" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DeploymentGatesAPI.update_deployment_rule" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling DeploymentGatesAPI.update_deployment_rule" end # resource path local_var_path = '/api/v2/deployment_gates/{gate_id}/rules/{id}'.sub('{gate_id}', CGI.escape(gate_id.to_s).gsub('%2F', '/')).sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'DeploymentRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_deployment_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: DeploymentGatesAPI#update_deployment_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |