linode.getDatabasePostgresqlV2
Explore with Pulumi AI
Provides information about a Linode PostgreSQL Database. For more information, see the Linode APIv4 docs.
Example Usage
Get information about a PostgreSQL database:
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const my_db = linode.getDatabasePostgresqlV2({
id: "12345",
});
import pulumi
import pulumi_linode as linode
my_db = linode.get_database_postgresql_v2(id="12345")
package main
import (
"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := linode.LookupDatabasePostgresqlV2(ctx, &linode.LookupDatabasePostgresqlV2Args{
Id: "12345",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() =>
{
var my_db = Linode.GetDatabasePostgresqlV2.Invoke(new()
{
Id = "12345",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetDatabasePostgresqlV2Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var my-db = LinodeFunctions.getDatabasePostgresqlV2(GetDatabasePostgresqlV2Args.builder()
.id("12345")
.build());
}
}
variables:
my-db:
fn::invoke:
function: linode:getDatabasePostgresqlV2
arguments:
id: 12345
pending_updates
The following arguments are exposed by each entry in the pending_updates attribute:
deadline- The time when a mandatory update needs to be applied.description- A description of the update.planned_for- The date and time a maintenance update will be applied.
updates
The following arguments are supported in the updates specification block:
day_of_week- The day to perform maintenance. (monday,tuesday, …)duration- The maximum maintenance window time in hours. (1..3)frequency- The frequency at which maintenance occurs. (weekly)hour_of_day- The hour to begin maintenance based in UTC time. (0..23)
Using getDatabasePostgresqlV2
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDatabasePostgresqlV2(args: GetDatabasePostgresqlV2Args, opts?: InvokeOptions): Promise<GetDatabasePostgresqlV2Result>
function getDatabasePostgresqlV2Output(args: GetDatabasePostgresqlV2OutputArgs, opts?: InvokeOptions): Output<GetDatabasePostgresqlV2Result>def get_database_postgresql_v2(id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDatabasePostgresqlV2Result
def get_database_postgresql_v2_output(id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDatabasePostgresqlV2Result]func LookupDatabasePostgresqlV2(ctx *Context, args *LookupDatabasePostgresqlV2Args, opts ...InvokeOption) (*LookupDatabasePostgresqlV2Result, error)
func LookupDatabasePostgresqlV2Output(ctx *Context, args *LookupDatabasePostgresqlV2OutputArgs, opts ...InvokeOption) LookupDatabasePostgresqlV2ResultOutput> Note: This function is named LookupDatabasePostgresqlV2 in the Go SDK.
public static class GetDatabasePostgresqlV2
{
public static Task<GetDatabasePostgresqlV2Result> InvokeAsync(GetDatabasePostgresqlV2Args args, InvokeOptions? opts = null)
public static Output<GetDatabasePostgresqlV2Result> Invoke(GetDatabasePostgresqlV2InvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDatabasePostgresqlV2Result> getDatabasePostgresqlV2(GetDatabasePostgresqlV2Args args, InvokeOptions options)
public static Output<GetDatabasePostgresqlV2Result> getDatabasePostgresqlV2(GetDatabasePostgresqlV2Args args, InvokeOptions options)
fn::invoke:
function: linode:index/getDatabasePostgresqlV2:getDatabasePostgresqlV2
arguments:
# arguments dictionaryThe following arguments are supported:
- Id string
- The ID of the PostgreSQL database.
- Id string
- The ID of the PostgreSQL database.
- id String
- The ID of the PostgreSQL database.
- id string
- The ID of the PostgreSQL database.
- id str
- The ID of the PostgreSQL database.
- id String
- The ID of the PostgreSQL database.
getDatabasePostgresqlV2 Result
The following output properties are available:
- Allow
Lists List<string> - A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use
linode.DatabaseAccessControlsto manage your allow list separately. - Ca
Cert string - The base64-encoded SSL CA certificate for the Managed Database.
- Cluster
Size int - The number of Linode Instance nodes deployed to the Managed Database. (default
1) - Created string
- When this Managed Database was created.
- Encrypted bool
- Whether the Managed Databases is encrypted.
- Engine string
- The Managed Database engine. (e.g.
postgresql) - Engine
Id string - The Managed Database engine in engine/version format. (e.g.
postgresql/16) - Fork
Restore stringTime - The database timestamp from which it was restored.
- Fork
Source int - The ID of the database that was forked from.
- Host
Primary string - The primary host for the Managed Database.
- Host
Secondary string - The secondary/private host for the managed database.
- Id string
- Label string
- A unique, user-defined string referring to the Managed Database.
- Members Dictionary<string, string>
- Oldest
Restore stringTime - Pending
Updates List<GetDatabase Postgresql V2Pending Update> - Platform string
- The back-end platform for relational databases used by the service.
- Port int
- The access port for this Managed Database.
- Region string
- The region to use for the Managed Database.
- Root
Password string - The randomly-generated root password for the Managed Database instance.
- Root
Username string - The root username for the Managed Database instance.
- Ssl
Connection bool - Whether to require SSL credentials to establish a connection to the Managed Database.
- Status string
- The operating status of the Managed Database.
- Suspended bool
- Whether this Managed Database is suspended.
- Type string
- The Linode Instance type used for the nodes of the Managed Database.
- Updated string
- When this Managed Database was last updated.
- Updates
Get
Database Postgresql V2Updates - Version string
- The Managed Database engine version. (e.g.
13.2)
- Allow
Lists []string - A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use
linode.DatabaseAccessControlsto manage your allow list separately. - Ca
Cert string - The base64-encoded SSL CA certificate for the Managed Database.
- Cluster
Size int - The number of Linode Instance nodes deployed to the Managed Database. (default
1) - Created string
- When this Managed Database was created.
- Encrypted bool
- Whether the Managed Databases is encrypted.
- Engine string
- The Managed Database engine. (e.g.
postgresql) - Engine
Id string - The Managed Database engine in engine/version format. (e.g.
postgresql/16) - Fork
Restore stringTime - The database timestamp from which it was restored.
- Fork
Source int - The ID of the database that was forked from.
- Host
Primary string - The primary host for the Managed Database.
- Host
Secondary string - The secondary/private host for the managed database.
- Id string
- Label string
- A unique, user-defined string referring to the Managed Database.
- Members map[string]string
- Oldest
Restore stringTime - Pending
Updates []GetDatabase Postgresql V2Pending Update - Platform string
- The back-end platform for relational databases used by the service.
- Port int
- The access port for this Managed Database.
- Region string
- The region to use for the Managed Database.
- Root
Password string - The randomly-generated root password for the Managed Database instance.
- Root
Username string - The root username for the Managed Database instance.
- Ssl
Connection bool - Whether to require SSL credentials to establish a connection to the Managed Database.
- Status string
- The operating status of the Managed Database.
- Suspended bool
- Whether this Managed Database is suspended.
- Type string
- The Linode Instance type used for the nodes of the Managed Database.
- Updated string
- When this Managed Database was last updated.
- Updates
Get
Database Postgresql V2Updates - Version string
- The Managed Database engine version. (e.g.
13.2)
- allow
Lists List<String> - A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use
linode.DatabaseAccessControlsto manage your allow list separately. - ca
Cert String - The base64-encoded SSL CA certificate for the Managed Database.
- cluster
Size Integer - The number of Linode Instance nodes deployed to the Managed Database. (default
1) - created String
- When this Managed Database was created.
- encrypted Boolean
- Whether the Managed Databases is encrypted.
- engine String
- The Managed Database engine. (e.g.
postgresql) - engine
Id String - The Managed Database engine in engine/version format. (e.g.
postgresql/16) - fork
Restore StringTime - The database timestamp from which it was restored.
- fork
Source Integer - The ID of the database that was forked from.
- host
Primary String - The primary host for the Managed Database.
- host
Secondary String - The secondary/private host for the managed database.
- id String
- label String
- A unique, user-defined string referring to the Managed Database.
- members Map<String,String>
- oldest
Restore StringTime - pending
Updates List<GetDatabase Postgresql V2Pending Update> - platform String
- The back-end platform for relational databases used by the service.
- port Integer
- The access port for this Managed Database.
- region String
- The region to use for the Managed Database.
- root
Password String - The randomly-generated root password for the Managed Database instance.
- root
Username String - The root username for the Managed Database instance.
- ssl
Connection Boolean - Whether to require SSL credentials to establish a connection to the Managed Database.
- status String
- The operating status of the Managed Database.
- suspended Boolean
- Whether this Managed Database is suspended.
- type String
- The Linode Instance type used for the nodes of the Managed Database.
- updated String
- When this Managed Database was last updated.
- updates
Get
Database Postgresql V2Updates - version String
- The Managed Database engine version. (e.g.
13.2)
- allow
Lists string[] - A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use
linode.DatabaseAccessControlsto manage your allow list separately. - ca
Cert string - The base64-encoded SSL CA certificate for the Managed Database.
- cluster
Size number - The number of Linode Instance nodes deployed to the Managed Database. (default
1) - created string
- When this Managed Database was created.
- encrypted boolean
- Whether the Managed Databases is encrypted.
- engine string
- The Managed Database engine. (e.g.
postgresql) - engine
Id string - The Managed Database engine in engine/version format. (e.g.
postgresql/16) - fork
Restore stringTime - The database timestamp from which it was restored.
- fork
Source number - The ID of the database that was forked from.
- host
Primary string - The primary host for the Managed Database.
- host
Secondary string - The secondary/private host for the managed database.
- id string
- label string
- A unique, user-defined string referring to the Managed Database.
- members {[key: string]: string}
- oldest
Restore stringTime - pending
Updates GetDatabase Postgresql V2Pending Update[] - platform string
- The back-end platform for relational databases used by the service.
- port number
- The access port for this Managed Database.
- region string
- The region to use for the Managed Database.
- root
Password string - The randomly-generated root password for the Managed Database instance.
- root
Username string - The root username for the Managed Database instance.
- ssl
Connection boolean - Whether to require SSL credentials to establish a connection to the Managed Database.
- status string
- The operating status of the Managed Database.
- suspended boolean
- Whether this Managed Database is suspended.
- type string
- The Linode Instance type used for the nodes of the Managed Database.
- updated string
- When this Managed Database was last updated.
- updates
Get
Database Postgresql V2Updates - version string
- The Managed Database engine version. (e.g.
13.2)
- allow_
lists Sequence[str] - A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use
linode.DatabaseAccessControlsto manage your allow list separately. - ca_
cert str - The base64-encoded SSL CA certificate for the Managed Database.
- cluster_
size int - The number of Linode Instance nodes deployed to the Managed Database. (default
1) - created str
- When this Managed Database was created.
- encrypted bool
- Whether the Managed Databases is encrypted.
- engine str
- The Managed Database engine. (e.g.
postgresql) - engine_
id str - The Managed Database engine in engine/version format. (e.g.
postgresql/16) - fork_
restore_ strtime - The database timestamp from which it was restored.
- fork_
source int - The ID of the database that was forked from.
- host_
primary str - The primary host for the Managed Database.
- host_
secondary str - The secondary/private host for the managed database.
- id str
- label str
- A unique, user-defined string referring to the Managed Database.
- members Mapping[str, str]
- oldest_
restore_ strtime - pending_
updates Sequence[GetDatabase Postgresql V2Pending Update] - platform str
- The back-end platform for relational databases used by the service.
- port int
- The access port for this Managed Database.
- region str
- The region to use for the Managed Database.
- root_
password str - The randomly-generated root password for the Managed Database instance.
- root_
username str - The root username for the Managed Database instance.
- ssl_
connection bool - Whether to require SSL credentials to establish a connection to the Managed Database.
- status str
- The operating status of the Managed Database.
- suspended bool
- Whether this Managed Database is suspended.
- type str
- The Linode Instance type used for the nodes of the Managed Database.
- updated str
- When this Managed Database was last updated.
- updates
Get
Database Postgresql V2Updates - version str
- The Managed Database engine version. (e.g.
13.2)
- allow
Lists List<String> - A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use
linode.DatabaseAccessControlsto manage your allow list separately. - ca
Cert String - The base64-encoded SSL CA certificate for the Managed Database.
- cluster
Size Number - The number of Linode Instance nodes deployed to the Managed Database. (default
1) - created String
- When this Managed Database was created.
- encrypted Boolean
- Whether the Managed Databases is encrypted.
- engine String
- The Managed Database engine. (e.g.
postgresql) - engine
Id String - The Managed Database engine in engine/version format. (e.g.
postgresql/16) - fork
Restore StringTime - The database timestamp from which it was restored.
- fork
Source Number - The ID of the database that was forked from.
- host
Primary String - The primary host for the Managed Database.
- host
Secondary String - The secondary/private host for the managed database.
- id String
- label String
- A unique, user-defined string referring to the Managed Database.
- members Map<String>
- oldest
Restore StringTime - pending
Updates List<Property Map> - platform String
- The back-end platform for relational databases used by the service.
- port Number
- The access port for this Managed Database.
- region String
- The region to use for the Managed Database.
- root
Password String - The randomly-generated root password for the Managed Database instance.
- root
Username String - The root username for the Managed Database instance.
- ssl
Connection Boolean - Whether to require SSL credentials to establish a connection to the Managed Database.
- status String
- The operating status of the Managed Database.
- suspended Boolean
- Whether this Managed Database is suspended.
- type String
- The Linode Instance type used for the nodes of the Managed Database.
- updated String
- When this Managed Database was last updated.
- updates Property Map
- version String
- The Managed Database engine version. (e.g.
13.2)
Supporting Types
GetDatabasePostgresqlV2PendingUpdate
- Deadline string
- Description string
- Planned
For string
- Deadline string
- Description string
- Planned
For string
- deadline String
- description String
- planned
For String
- deadline string
- description string
- planned
For string
- deadline str
- description str
- planned_
for str
- deadline String
- description String
- planned
For String
GetDatabasePostgresqlV2Updates
- day_
of_ intweek - duration int
- frequency str
- hour_
of_ intday
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
linodeTerraform Provider.