tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack
tencentcloud.getPostgresqlInstances
Explore with Pulumi AI
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack
Use this data source to query postgresql instances
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const name = tencentcloud.getPostgresqlInstances({
name: "test",
});
const project = tencentcloud.getPostgresqlInstances({
projectId: 0,
});
const id = tencentcloud.getPostgresqlInstances({
id: "postgres-h9t4fde1",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
name = tencentcloud.get_postgresql_instances(name="test")
project = tencentcloud.get_postgresql_instances(project_id=0)
id = tencentcloud.get_postgresql_instances(id="postgres-h9t4fde1")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.GetPostgresqlInstances(ctx, &tencentcloud.GetPostgresqlInstancesArgs{
Name: pulumi.StringRef("test"),
}, nil)
if err != nil {
return err
}
_, err = tencentcloud.GetPostgresqlInstances(ctx, &tencentcloud.GetPostgresqlInstancesArgs{
ProjectId: pulumi.Float64Ref(0),
}, nil)
if err != nil {
return err
}
_, err = tencentcloud.GetPostgresqlInstances(ctx, &tencentcloud.GetPostgresqlInstancesArgs{
Id: pulumi.StringRef("postgres-h9t4fde1"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var name = Tencentcloud.GetPostgresqlInstances.Invoke(new()
{
Name = "test",
});
var project = Tencentcloud.GetPostgresqlInstances.Invoke(new()
{
ProjectId = 0,
});
var id = Tencentcloud.GetPostgresqlInstances.Invoke(new()
{
Id = "postgres-h9t4fde1",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetPostgresqlInstancesArgs;
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 name = TencentcloudFunctions.getPostgresqlInstances(GetPostgresqlInstancesArgs.builder()
.name("test")
.build());
final var project = TencentcloudFunctions.getPostgresqlInstances(GetPostgresqlInstancesArgs.builder()
.projectId(0)
.build());
final var id = TencentcloudFunctions.getPostgresqlInstances(GetPostgresqlInstancesArgs.builder()
.id("postgres-h9t4fde1")
.build());
}
}
variables:
name:
fn::invoke:
function: tencentcloud:getPostgresqlInstances
arguments:
name: test
project:
fn::invoke:
function: tencentcloud:getPostgresqlInstances
arguments:
projectId: 0
id:
fn::invoke:
function: tencentcloud:getPostgresqlInstances
arguments:
id: postgres-h9t4fde1
Using getPostgresqlInstances
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 getPostgresqlInstances(args: GetPostgresqlInstancesArgs, opts?: InvokeOptions): Promise<GetPostgresqlInstancesResult>
function getPostgresqlInstancesOutput(args: GetPostgresqlInstancesOutputArgs, opts?: InvokeOptions): Output<GetPostgresqlInstancesResult>
def get_postgresql_instances(id: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[float] = None,
result_output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPostgresqlInstancesResult
def get_postgresql_instances_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[float]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPostgresqlInstancesResult]
func GetPostgresqlInstances(ctx *Context, args *GetPostgresqlInstancesArgs, opts ...InvokeOption) (*GetPostgresqlInstancesResult, error)
func GetPostgresqlInstancesOutput(ctx *Context, args *GetPostgresqlInstancesOutputArgs, opts ...InvokeOption) GetPostgresqlInstancesResultOutput
> Note: This function is named GetPostgresqlInstances
in the Go SDK.
public static class GetPostgresqlInstances
{
public static Task<GetPostgresqlInstancesResult> InvokeAsync(GetPostgresqlInstancesArgs args, InvokeOptions? opts = null)
public static Output<GetPostgresqlInstancesResult> Invoke(GetPostgresqlInstancesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPostgresqlInstancesResult> getPostgresqlInstances(GetPostgresqlInstancesArgs args, InvokeOptions options)
public static Output<GetPostgresqlInstancesResult> getPostgresqlInstances(GetPostgresqlInstancesArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getPostgresqlInstances:getPostgresqlInstances
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- ID of the postgresql instance to be query.
- Name string
- Name of the postgresql instance to be query.
- Project
Id double - Project ID of the postgresql instance to be query.
- Result
Output stringFile - Used to save results.
- Id string
- ID of the postgresql instance to be query.
- Name string
- Name of the postgresql instance to be query.
- Project
Id float64 - Project ID of the postgresql instance to be query.
- Result
Output stringFile - Used to save results.
- id String
- ID of the postgresql instance to be query.
- name String
- Name of the postgresql instance to be query.
- project
Id Double - Project ID of the postgresql instance to be query.
- result
Output StringFile - Used to save results.
- id string
- ID of the postgresql instance to be query.
- name string
- Name of the postgresql instance to be query.
- project
Id number - Project ID of the postgresql instance to be query.
- result
Output stringFile - Used to save results.
- id str
- ID of the postgresql instance to be query.
- name str
- Name of the postgresql instance to be query.
- project_
id float - Project ID of the postgresql instance to be query.
- result_
output_ strfile - Used to save results.
- id String
- ID of the postgresql instance to be query.
- name String
- Name of the postgresql instance to be query.
- project
Id Number - Project ID of the postgresql instance to be query.
- result
Output StringFile - Used to save results.
getPostgresqlInstances Result
The following output properties are available:
- Instance
Lists List<GetPostgresql Instances Instance List> - A list of postgresql instances. Each element contains the following attributes.
- Id string
- ID of the postgresql instance.
- Name string
- Name of the postgresql instance.
- Project
Id double - Project id, default value is 0.
- Result
Output stringFile
- Instance
Lists []GetPostgresql Instances Instance List - A list of postgresql instances. Each element contains the following attributes.
- Id string
- ID of the postgresql instance.
- Name string
- Name of the postgresql instance.
- Project
Id float64 - Project id, default value is 0.
- Result
Output stringFile
- instance
Lists List<GetPostgresql Instances Instance List> - A list of postgresql instances. Each element contains the following attributes.
- id String
- ID of the postgresql instance.
- name String
- Name of the postgresql instance.
- project
Id Double - Project id, default value is 0.
- result
Output StringFile
- instance
Lists GetPostgresql Instances Instance List[] - A list of postgresql instances. Each element contains the following attributes.
- id string
- ID of the postgresql instance.
- name string
- Name of the postgresql instance.
- project
Id number - Project id, default value is 0.
- result
Output stringFile
- instance_
lists Sequence[GetPostgresql Instances Instance List] - A list of postgresql instances. Each element contains the following attributes.
- id str
- ID of the postgresql instance.
- name str
- Name of the postgresql instance.
- project_
id float - Project id, default value is 0.
- result_
output_ strfile
- instance
Lists List<Property Map> - A list of postgresql instances. Each element contains the following attributes.
- id String
- ID of the postgresql instance.
- name String
- Name of the postgresql instance.
- project
Id Number - Project id, default value is 0.
- result
Output StringFile
Supporting Types
GetPostgresqlInstancesInstanceList
- Auto
Renew doubleFlag - Auto renew flag.
- Availability
Zone string - Availability zone.
- Charge
Type string - Pay type of the postgresql instance.
- Charset string
- Charset of the postgresql instance.
- Create
Time string - Create time of the postgresql instance.
- Engine
Version string - Version of the postgresql database engine.
- Id string
- ID of the postgresql instance to be query.
- Memory double
- Memory size(in GB).
- Name string
- Name of the postgresql instance to be query.
- Private
Access stringIp - IP address for private access.
- Private
Access doublePort - Port for private access.
- Project
Id double - Project ID of the postgresql instance to be query.
- Public
Access stringHost - Host for public access.
- Public
Access doublePort - Port for public access.
- Public
Access boolSwitch - Indicates whether to enable the access to an instance from public network or not.
- Root
User string - Instance root account name, default value is
root
. - Storage double
- Volume size(in GB).
- Subnet
Id string - ID of subnet.
- Dictionary<string, string>
- The available tags within this postgresql.
- Vpc
Id string - ID of VPC.
- Auto
Renew float64Flag - Auto renew flag.
- Availability
Zone string - Availability zone.
- Charge
Type string - Pay type of the postgresql instance.
- Charset string
- Charset of the postgresql instance.
- Create
Time string - Create time of the postgresql instance.
- Engine
Version string - Version of the postgresql database engine.
- Id string
- ID of the postgresql instance to be query.
- Memory float64
- Memory size(in GB).
- Name string
- Name of the postgresql instance to be query.
- Private
Access stringIp - IP address for private access.
- Private
Access float64Port - Port for private access.
- Project
Id float64 - Project ID of the postgresql instance to be query.
- Public
Access stringHost - Host for public access.
- Public
Access float64Port - Port for public access.
- Public
Access boolSwitch - Indicates whether to enable the access to an instance from public network or not.
- Root
User string - Instance root account name, default value is
root
. - Storage float64
- Volume size(in GB).
- Subnet
Id string - ID of subnet.
- map[string]string
- The available tags within this postgresql.
- Vpc
Id string - ID of VPC.
- auto
Renew DoubleFlag - Auto renew flag.
- availability
Zone String - Availability zone.
- charge
Type String - Pay type of the postgresql instance.
- charset String
- Charset of the postgresql instance.
- create
Time String - Create time of the postgresql instance.
- engine
Version String - Version of the postgresql database engine.
- id String
- ID of the postgresql instance to be query.
- memory Double
- Memory size(in GB).
- name String
- Name of the postgresql instance to be query.
- private
Access StringIp - IP address for private access.
- private
Access DoublePort - Port for private access.
- project
Id Double - Project ID of the postgresql instance to be query.
- public
Access StringHost - Host for public access.
- public
Access DoublePort - Port for public access.
- public
Access BooleanSwitch - Indicates whether to enable the access to an instance from public network or not.
- root
User String - Instance root account name, default value is
root
. - storage Double
- Volume size(in GB).
- subnet
Id String - ID of subnet.
- Map<String,String>
- The available tags within this postgresql.
- vpc
Id String - ID of VPC.
- auto
Renew numberFlag - Auto renew flag.
- availability
Zone string - Availability zone.
- charge
Type string - Pay type of the postgresql instance.
- charset string
- Charset of the postgresql instance.
- create
Time string - Create time of the postgresql instance.
- engine
Version string - Version of the postgresql database engine.
- id string
- ID of the postgresql instance to be query.
- memory number
- Memory size(in GB).
- name string
- Name of the postgresql instance to be query.
- private
Access stringIp - IP address for private access.
- private
Access numberPort - Port for private access.
- project
Id number - Project ID of the postgresql instance to be query.
- public
Access stringHost - Host for public access.
- public
Access numberPort - Port for public access.
- public
Access booleanSwitch - Indicates whether to enable the access to an instance from public network or not.
- root
User string - Instance root account name, default value is
root
. - storage number
- Volume size(in GB).
- subnet
Id string - ID of subnet.
- {[key: string]: string}
- The available tags within this postgresql.
- vpc
Id string - ID of VPC.
- auto_
renew_ floatflag - Auto renew flag.
- availability_
zone str - Availability zone.
- charge_
type str - Pay type of the postgresql instance.
- charset str
- Charset of the postgresql instance.
- create_
time str - Create time of the postgresql instance.
- engine_
version str - Version of the postgresql database engine.
- id str
- ID of the postgresql instance to be query.
- memory float
- Memory size(in GB).
- name str
- Name of the postgresql instance to be query.
- private_
access_ strip - IP address for private access.
- private_
access_ floatport - Port for private access.
- project_
id float - Project ID of the postgresql instance to be query.
- public_
access_ strhost - Host for public access.
- public_
access_ floatport - Port for public access.
- public_
access_ boolswitch - Indicates whether to enable the access to an instance from public network or not.
- root_
user str - Instance root account name, default value is
root
. - storage float
- Volume size(in GB).
- subnet_
id str - ID of subnet.
- Mapping[str, str]
- The available tags within this postgresql.
- vpc_
id str - ID of VPC.
- auto
Renew NumberFlag - Auto renew flag.
- availability
Zone String - Availability zone.
- charge
Type String - Pay type of the postgresql instance.
- charset String
- Charset of the postgresql instance.
- create
Time String - Create time of the postgresql instance.
- engine
Version String - Version of the postgresql database engine.
- id String
- ID of the postgresql instance to be query.
- memory Number
- Memory size(in GB).
- name String
- Name of the postgresql instance to be query.
- private
Access StringIp - IP address for private access.
- private
Access NumberPort - Port for private access.
- project
Id Number - Project ID of the postgresql instance to be query.
- public
Access StringHost - Host for public access.
- public
Access NumberPort - Port for public access.
- public
Access BooleanSwitch - Indicates whether to enable the access to an instance from public network or not.
- root
User String - Instance root account name, default value is
root
. - storage Number
- Volume size(in GB).
- subnet
Id String - ID of subnet.
- Map<String>
- The available tags within this postgresql.
- vpc
Id String - ID of VPC.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack