@@ -392,6 +392,77 @@ def get_deployment_gate_with_http_info(id, opts = {})
392392 return data , status_code , headers
393393 end
394394
395+ # Get rules for a deployment gate.
396+ #
397+ # @see #get_deployment_gate_rules_with_http_info
398+ def get_deployment_gate_rules ( gate_id , opts = { } )
399+ data , _status_code , _headers = get_deployment_gate_rules_with_http_info ( gate_id , opts )
400+ data
401+ end
402+
403+ # Get rules for a deployment gate.
404+ #
405+ # Endpoint to get rules for a deployment gate.
406+ #
407+ # @param gate_id [String] The ID of the deployment gate.
408+ # @param opts [Hash] the optional parameters
409+ # @return [Array<(DeploymentGateRulesResponse, Integer, Hash)>] DeploymentGateRulesResponse data, response status code and response headers
410+ def get_deployment_gate_rules_with_http_info ( gate_id , opts = { } )
411+ unstable_enabled = @api_client . config . unstable_operations [ "v2.get_deployment_gate_rules" . to_sym ]
412+ if unstable_enabled
413+ @api_client . config . logger . warn format ( "Using unstable operation '%s'" , "v2.get_deployment_gate_rules" )
414+ else
415+ raise DatadogAPIClient ::APIError . new ( message : format ( "Unstable operation '%s' is disabled" , "v2.get_deployment_gate_rules" ) )
416+ end
417+
418+ if @api_client . config . debugging
419+ @api_client . config . logger . debug 'Calling API: DeploymentGatesAPI.get_deployment_gate_rules ...'
420+ end
421+ # verify the required parameter 'gate_id' is set
422+ if @api_client . config . client_side_validation && gate_id . nil?
423+ fail ArgumentError , "Missing the required parameter 'gate_id' when calling DeploymentGatesAPI.get_deployment_gate_rules"
424+ end
425+ # resource path
426+ local_var_path = '/api/v2/deployment_gates/{gate_id}/rules' . sub ( '{gate_id}' , CGI . escape ( gate_id . to_s ) . gsub ( '%2F' , '/' ) )
427+
428+ # query parameters
429+ query_params = opts [ :query_params ] || { }
430+
431+ # header parameters
432+ header_params = opts [ :header_params ] || { }
433+ # HTTP header 'Accept' (if needed)
434+ header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] )
435+
436+ # form parameters
437+ form_params = opts [ :form_params ] || { }
438+
439+ # http body (model)
440+ post_body = opts [ :debug_body ]
441+
442+ # return_type
443+ return_type = opts [ :debug_return_type ] || 'DeploymentGateRulesResponse'
444+
445+ # auth_names
446+ auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth ]
447+
448+ new_options = opts . merge (
449+ :operation => :get_deployment_gate_rules ,
450+ :header_params => header_params ,
451+ :query_params => query_params ,
452+ :form_params => form_params ,
453+ :body => post_body ,
454+ :auth_names => auth_names ,
455+ :return_type => return_type ,
456+ :api_version => "V2"
457+ )
458+
459+ data , status_code , headers = @api_client . call_api ( Net ::HTTP ::Get , local_var_path , new_options )
460+ if @api_client . config . debugging
461+ @api_client . config . logger . debug "API called: DeploymentGatesAPI#get_deployment_gate_rules\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
462+ end
463+ return data , status_code , headers
464+ end
465+
395466 # Get deployment rule.
396467 #
397468 # @see #get_deployment_rule_with_http_info
0 commit comments