Skip to main content

postgresql_instance_credentials

Creates, updates, deletes, gets or lists a postgresql_instance_credentials resource.

Overview​

Namepostgresql_instance_credentials
TypeResource
Idlinode.databases.postgresql_instance_credentials

Fields​

The following fields are returned by SELECT queries:

PostgreSQL Managed Database root username and password.

NameDatatypeDescription
passwordstringRead-only The randomly generated root password for the Managed Database instance. (example: s3cur3P@ssw0rd)
usernamestringRead-only The root username for the Managed Database instance. (example: linroot)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectinstanceIdDisplay the root username and password for an accessible PostgreSQL Managed Database. The database's status needs to be active.

Learn more...

Learn more...
reset_credentialsexecinstanceIdReset the root password for a PostgreSQL Managed Database. A new root password is randomly generated and accessible with the Get PostgreSQL Managed Database credentials operation.

- The database's status needs to be active.

- Only unrestricted users can access this operation. These users have access regardless of the acting token's OAuth scopes.

- It may take several seconds for credentials to reset.

Learn more...

Learn more...

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
instanceIdstringThe ID of the Managed PostgreSQL Database.

SELECT examples​

Display the root username and password for an accessible PostgreSQL Managed Database. The database's status needs to be active.

Learn more...

Learn more...

SELECT
password,
username
FROM linode.databases.postgresql_instance_credentials
WHERE instanceId = '{{ instanceId }}' -- required
;

Lifecycle Methods​

Reset the root password for a PostgreSQL Managed Database. A new root password is randomly generated and accessible with the Get PostgreSQL Managed Database credentials operation.

- The database's status needs to be active.

- Only unrestricted users can access this operation. These users have access regardless of the acting token's OAuth scopes.

- It may take several seconds for credentials to reset.

Learn more...

Learn more...

EXEC linode.databases.postgresql_instance_credentials.reset_credentials
@instanceId='{{ instanceId }}' --required
;