Update docs and return a better error message

This commit is contained in:
Brian Kassouf 2017-05-04 11:45:27 -07:00
parent 5ee0d696d4
commit 82b58d5b9c
2 changed files with 7 additions and 5 deletions

View File

@ -106,7 +106,7 @@ func (b *databaseBackend) createDBObj(s logical.Storage, name string) (dbplugin.
func (b *databaseBackend) DatabaseConfig(s logical.Storage, name string) (*DatabaseConfig, error) {
entry, err := s.Get(fmt.Sprintf("config/%s", name))
if err != nil {
return nil, fmt.Errorf("failed to read connection configuration with name: %s", name)
return nil, fmt.Errorf("failed to read connection configuration: %s", err)
}
if entry == nil {
return nil, fmt.Errorf("failed to find entry for connection with name: %s", name)

View File

@ -162,11 +162,13 @@ This endpoint creates or updates a role definition.
- `db_name` `(string: <required>)` - The name of the database connection to use
for this role.
- `default_ttl` `(string: <required>)` - Specifies the TTL for the lease
associated with this role.
- `default_ttl` `(string/int: 0)` - Specifies the TTL for the leases
associated with this role. Accepts time suffixed strings ("1h") or an integer
number of seconds. Defaults to system/backend default TTL time.
- `max_ttl` `(string: <required>)` - Specifies the maximum TTL for the lease
associated with this role.
- `max_ttl` `(string/int: 0)` - Specifies the maximum TTL for the leases
associated with this role. Accepts time suffixed strings ("1h") or an integer
number of seconds. Defaults to system/backend default TTL time.
- `creation_statements` `(string: <required>)` Specifies the database
statements executed to create and configure a user. Must be a