Class: Oz::Resources::Identities
- Defined in:
- lib/oz/resources/identities.rb
Overview
Manage agent identities (team-owned execution principals), reachable via client.agent.identities. These back the /agent/identities endpoints.
Instance Method Summary collapse
-
#create(name:, **params) ⇒ Oz::Model
Create an agent identity.
-
#delete(uid) ⇒ nil
Delete an agent identity.
-
#list ⇒ Oz::Model
List all agent identities.
-
#retrieve(uid) ⇒ Oz::Model
(also: #get)
Retrieve a single agent identity by uid.
-
#update(uid, **params) ⇒ Oz::Model
Update an agent identity.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Oz::Resources::Base
Instance Method Details
#create(name:, **params) ⇒ Oz::Model
Create an agent identity.
15 16 17 |
# File 'lib/oz/resources/identities.rb', line 15 def create(name:, **params) model(@client.post('/agent/identities', body: { name: name }.merge(params))) end |
#delete(uid) ⇒ nil
Delete an agent identity.
40 41 42 43 |
# File 'lib/oz/resources/identities.rb', line 40 def delete(uid) @client.delete("/agent/identities/#{enc(uid)}") nil end |
#list ⇒ Oz::Model
List all agent identities.
27 28 29 |
# File 'lib/oz/resources/identities.rb', line 27 def list model(@client.get('/agent/identities')) end |
#retrieve(uid) ⇒ Oz::Model Also known as: get
Retrieve a single agent identity by uid.
33 34 35 |
# File 'lib/oz/resources/identities.rb', line 33 def retrieve(uid) model(@client.get("/agent/identities/#{enc(uid)}")) end |