Class: PEClient::Resource::RBACV1::LDAP
- Defined in:
- lib/pe_client/resources/rbac.v1/ldap.rb
Overview
Use the v1 LDAP endpoints to test and configure LDAP directory service connections.
Constant Summary collapse
- BASE_PATH =
Deprecated.
Use COMMAND_BASE_PATH methods instead.
The base path for RBAC API v1 LDAP endpoints.
"#{RBACV1::BASE_PATH}/ds".freeze
- COMMAND_BASE_PATH =
The base path for RBAC API v1 LDAP command endpoints.
"#{RBACV1::BASE_PATH}/command/ldap".freeze
Instance Method Summary collapse
-
#create(attributes) ⇒ Hash
Configure a new LDAP connection.
-
#delete(id) ⇒ Hash
Delete an existing directory service connection.
- #ds(attributes) ⇒ Hash deprecated Deprecated.
-
#ds_test(attributes = nil) ⇒ Hash
deprecated
Deprecated.
Use #test instead.
-
#test(attributes) ⇒ Hash
Test a directory service connection based on supplied settings.
-
#update(attributes) ⇒ Hash
Replace an existing directory service connection’s settings.
Methods inherited from Base
Constructor Details
This class inherits a constructor from PEClient::Resource::Base
Instance Method Details
#create(attributes) ⇒ Hash
Configure a new LDAP connection.
64 65 66 |
# File 'lib/pe_client/resources/rbac.v1/ldap.rb', line 64 def create(attributes) @client.post("#{COMMAND_BASE_PATH}/create", body: attributes) end |
#delete(id) ⇒ Hash
Delete an existing directory service connection.
84 85 86 |
# File 'lib/pe_client/resources/rbac.v1/ldap.rb', line 84 def delete(id) @client.post "#{COMMAND_BASE_PATH}/delete", body: {id:} end |
#ds(attributes) ⇒ Hash
127 128 129 130 |
# File 'lib/pe_client/resources/rbac.v1/ldap.rb', line 127 def ds(attributes) PEClient.deprecated "ds", "create, update, or delete" @client.put("#{BASE_PATH}/ds", body: attributes) end |
#ds_test(attributes = nil) ⇒ Hash
Use #test instead.
Test the connection to the connected directory service.
108 109 110 111 112 113 114 115 |
# File 'lib/pe_client/resources/rbac.v1/ldap.rb', line 108 def ds_test(attributes = nil) PEClient.deprecated "ds_test", "test" if attributes.nil? @client.get "#{BASE_PATH}/test" else @client.put "#{BASE_PATH}/test", body: attributes end end |
#test(attributes) ⇒ Hash
Test a directory service connection based on supplied settings.
95 96 97 |
# File 'lib/pe_client/resources/rbac.v1/ldap.rb', line 95 def test(attributes) @client.post "#{COMMAND_BASE_PATH}/test", body: attributes end |
#update(attributes) ⇒ Hash
Replace an existing directory service connection’s settings.
75 76 77 |
# File 'lib/pe_client/resources/rbac.v1/ldap.rb', line 75 def update(attributes) @client.put "#{COMMAND_BASE_PATH}/update", body: attributes end |