Class: Heroku::Api::Postgres::Credentials
- Inherits:
-
Object
- Object
- Heroku::Api::Postgres::Credentials
- Defined in:
- lib/heroku/api/postgres/credentials.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ Credentials
constructor
A new instance of Credentials.
-
#rotate(app_id, database_id, name: 'default') ⇒ Object
Public: Rotate the database credentials.
Constructor Details
#initialize(client) ⇒ Credentials
Returns a new instance of Credentials.
11 12 13 |
# File 'lib/heroku/api/postgres/credentials.rb', line 11 def initialize(client) @client = client end |
Instance Method Details
#rotate(app_id, database_id, name: 'default') ⇒ Object
Public: Rotate the database credentials.
20 21 22 23 24 |
# File 'lib/heroku/api/postgres/credentials.rb', line 20 def rotate(app_id, database_id, name: 'default') path = "/postgres/v0/databases/#{database_id}/credentials" \ "/#{URI.encode_www_form_component(name)}/credentials_rotation" @client.perform_post_request(path, {}, host: db_host(app_id, database_id)) end |