You can use the faraway replica-specific CLI commands to create, promote, and get information on faraway replicas.
To update, delete, and restore faraway replicas, use the update-cluster, delete-cluster, and restore-cluster commands. See Managing clusters with the CLI for more information.
Create a faraway replica
You use the create-faraway-replica command to create a replica. You can use either interactive mode or a config file. The example shows interactive mode:
You are prompted to confirm you want to create the faraway replica. After the faraway replica creation process is completed, it generates a replica cluster ID.
Get information on faraway replicas
You use the show-cluster-faraway-replicas command to get information on faraway clusters for a specified source cluster. You can use either interactive mode or specify the settings with flags on the command line. The example shows interactive mode:
Promote a faraway replica
You use the promote-faraway-replica command to promote an existing replica to a standalone single-node or high availability cluster. You can use either interactive mode or specify the settings with flags on the command line. The example shows interactive mode:
You are prompted to confirm you want to promote the faraway replica. After the faraway replica promotion process is completed, it generates a cluster ID.
IAM authentication CLI commands
To create a cluster that is enabled for IAM authentication, set the --iam-authentication flag on the create-cluster command or in the configuration file to Yes or true, respectively.
To change the IAM authentication setting after creating a cluster, use the --iam-authentication flag on the update-cluster command.
To change the IAM authentication setting when restoring a cluster, use the --iam-authentication flag on the restore-cluster command.
For more information on IAM authentication for AWS, see [IAM authentication for Postgres
(biganimal/latest/using_cluster/01_postgres_access/#iam-authentication-for-postgres).
Logging and metrics CLI command
You can get the URLs to access Prometheus metrics and logs in your cloud provider's blob storage solution using the show-cluster-monitoring-urls CLI command.
The syntax of the command is:
If you don't use the optional flags to specify one or the other, the output includes both the metrics URL and the logs URL.