Class: PEClient::Resource::NodeClassifierV1::UpdateClasses

Inherits:
Base
  • Object
show all
Defined in:
lib/pe_client/resources/node_classifier.v1/update_classes.rb

Overview

Use the update-classes endpoint to trigger the node classifier to get updated class and environment definitions from the primary server.

Constant Summary collapse

BASE_PATH =

The base path for Node Classifier API v1 update classes endpoints.

"#{NodeClassifierV1::BASE_PATH}/update-classes".freeze

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from PEClient::Resource::Base

Instance Method Details

#update(environment: nil) ⇒ Hash

Trigger the node classifier to retrieve updated class and environment definitions from the primary server. The classifier service also uses this endpoint when you refresh classes in the console.

Parameters:

  • environment (String) (defaults to: nil)

Returns:

  • (Hash)

    If the request is successful, the response body is empty.



35
36
37
# File 'lib/pe_client/resources/node_classifier.v1/update_classes.rb', line 35

def update(environment: nil)
  @client.post BASE_PATH, params: {environment:}.compact
end