@@ -1153,6 +1153,78 @@ def list_org_group_policy_overrides_with_http_info(filter_org_group_id, opts = {
11531153 return data , status_code , headers
11541154 end
11551155
1156+ # List org group policy suggestions.
1157+ #
1158+ # @see #list_org_group_policy_suggestions_with_http_info
1159+ def list_org_group_policy_suggestions ( filter_org_group_id , opts = { } )
1160+ data , _status_code , _headers = list_org_group_policy_suggestions_with_http_info ( filter_org_group_id , opts )
1161+ data
1162+ end
1163+
1164+ # List org group policy suggestions.
1165+ #
1166+ # List suggested organization group policies. Requires a filter on org group ID.
1167+ #
1168+ # @param filter_org_group_id [UUID] Filter policies by org group ID.
1169+ # @param opts [Hash] the optional parameters
1170+ # @return [Array<(OrgGroupPolicySuggestionListResponse, Integer, Hash)>] OrgGroupPolicySuggestionListResponse data, response status code and response headers
1171+ def list_org_group_policy_suggestions_with_http_info ( filter_org_group_id , opts = { } )
1172+ unstable_enabled = @api_client . config . unstable_operations [ "v2.list_org_group_policy_suggestions" . to_sym ]
1173+ if unstable_enabled
1174+ @api_client . config . logger . warn format ( "Using unstable operation '%s'" , "v2.list_org_group_policy_suggestions" )
1175+ else
1176+ raise DatadogAPIClient ::APIError . new ( message : format ( "Unstable operation '%s' is disabled" , "v2.list_org_group_policy_suggestions" ) )
1177+ end
1178+
1179+ if @api_client . config . debugging
1180+ @api_client . config . logger . debug 'Calling API: OrgGroupsAPI.list_org_group_policy_suggestions ...'
1181+ end
1182+ # verify the required parameter 'filter_org_group_id' is set
1183+ if @api_client . config . client_side_validation && filter_org_group_id . nil?
1184+ fail ArgumentError , "Missing the required parameter 'filter_org_group_id' when calling OrgGroupsAPI.list_org_group_policy_suggestions"
1185+ end
1186+ # resource path
1187+ local_var_path = '/api/v2/org_group_policy_suggestions'
1188+
1189+ # query parameters
1190+ query_params = opts [ :query_params ] || { }
1191+ query_params [ :'filter[org_group_id]' ] = filter_org_group_id
1192+
1193+ # header parameters
1194+ header_params = opts [ :header_params ] || { }
1195+ # HTTP header 'Accept' (if needed)
1196+ header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] )
1197+
1198+ # form parameters
1199+ form_params = opts [ :form_params ] || { }
1200+
1201+ # http body (model)
1202+ post_body = opts [ :debug_body ]
1203+
1204+ # return_type
1205+ return_type = opts [ :debug_return_type ] || 'OrgGroupPolicySuggestionListResponse'
1206+
1207+ # auth_names
1208+ auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth ]
1209+
1210+ new_options = opts . merge (
1211+ :operation => :list_org_group_policy_suggestions ,
1212+ :header_params => header_params ,
1213+ :query_params => query_params ,
1214+ :form_params => form_params ,
1215+ :body => post_body ,
1216+ :auth_names => auth_names ,
1217+ :return_type => return_type ,
1218+ :api_version => "V2"
1219+ )
1220+
1221+ data , status_code , headers = @api_client . call_api ( Net ::HTTP ::Get , local_var_path , new_options )
1222+ if @api_client . config . debugging
1223+ @api_client . config . logger . debug "API called: OrgGroupsAPI#list_org_group_policy_suggestions\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
1224+ end
1225+ return data , status_code , headers
1226+ end
1227+
11561228 # List org groups.
11571229 #
11581230 # @see #list_org_groups_with_http_info
0 commit comments