Class: Hawkular::Metrics::Client::Tenants
- Inherits:
-
Object
- Object
- Hawkular::Metrics::Client::Tenants
- Defined in:
- lib/hawkular/metrics/tenant_api.rb
Overview
Provides access to tenants API
Instance Method Summary collapse
-
#create(id) ⇒ Object
Create new tenant.
-
#initialize(client) ⇒ Tenants
constructor
A new instance of Tenants.
-
#query ⇒ Array[Tenant]
Query existing tenants.
Constructor Details
#initialize(client) ⇒ Tenants
Returns a new instance of Tenants
6 7 8 9 |
# File 'lib/hawkular/metrics/tenant_api.rb', line 6 def initialize(client) @client = client @resource = 'tenants' end |
Instance Method Details
#create(id) ⇒ Object
Create new tenant
13 14 15 |
# File 'lib/hawkular/metrics/tenant_api.rb', line 13 def create(id) @client.http_post("/#{@resource}", { id: id }, @client.admin_header) end |