Class: PEClient::Resource::PuppetCAV1::BulkCertificateSign

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

Overview

Allows you to update a selection or all pending certificate requests to the signed state with a single request.

Constant Summary collapse

BASE_PATH =

The base path for Puppet CA API v1 Bulk Certificate Sign endpoints.

"#{PuppetCAV1::BASE_PATH}/sign".freeze

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

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

Instance Method Details

#sign(certnames) ⇒ Hash

Allows you to request the signing of CSRs that match the certnames included in the payload.

Parameters:

  • certnames (Array<String>)

Returns:

  • (Hash)


34
35
36
# File 'lib/pe_client/resources/puppet_ca.v1/bulk_certificate_sign.rb', line 34

def sign(certnames)
  @client.post BASE_PATH, body: {certnames:}
end

#sign_allHash

Allows you to request the signing of all outstanding CSRs.

Returns:

  • (Hash)


41
42
43
# File 'lib/pe_client/resources/puppet_ca.v1/bulk_certificate_sign.rb', line 41

def sign_all
  @client.post "#{BASE_PATH}/all"
end