1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getPostgresqlRecoveryTime
tencentcloud 1.81.182 published on Monday, Apr 14, 2025 by tencentcloudstack

tencentcloud.getPostgresqlRecoveryTime

Explore with Pulumi AI

Use this data source to query detailed information of postgresql recovery_time

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const recoveryTime = tencentcloud.getPostgresqlRecoveryTime({
    dbInstanceId: local.pgsql_id,
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

recovery_time = tencentcloud.get_postgresql_recovery_time(db_instance_id=local["pgsql_id"])
Copy
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.GetPostgresqlRecoveryTime(ctx, &tencentcloud.GetPostgresqlRecoveryTimeArgs{
			DbInstanceId: local.Pgsql_id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var recoveryTime = Tencentcloud.GetPostgresqlRecoveryTime.Invoke(new()
    {
        DbInstanceId = local.Pgsql_id,
    });

});
Copy
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.GetPostgresqlRecoveryTimeArgs;
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 recoveryTime = TencentcloudFunctions.getPostgresqlRecoveryTime(GetPostgresqlRecoveryTimeArgs.builder()
            .dbInstanceId(local.pgsql_id())
            .build());

    }
}
Copy
variables:
  recoveryTime:
    fn::invoke:
      function: tencentcloud:getPostgresqlRecoveryTime
      arguments:
        dbInstanceId: ${local.pgsql_id}
Copy

Using getPostgresqlRecoveryTime

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 getPostgresqlRecoveryTime(args: GetPostgresqlRecoveryTimeArgs, opts?: InvokeOptions): Promise<GetPostgresqlRecoveryTimeResult>
function getPostgresqlRecoveryTimeOutput(args: GetPostgresqlRecoveryTimeOutputArgs, opts?: InvokeOptions): Output<GetPostgresqlRecoveryTimeResult>
Copy
def get_postgresql_recovery_time(db_instance_id: Optional[str] = None,
                                 id: Optional[str] = None,
                                 result_output_file: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetPostgresqlRecoveryTimeResult
def get_postgresql_recovery_time_output(db_instance_id: Optional[pulumi.Input[str]] = None,
                                 id: Optional[pulumi.Input[str]] = None,
                                 result_output_file: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetPostgresqlRecoveryTimeResult]
Copy
func GetPostgresqlRecoveryTime(ctx *Context, args *GetPostgresqlRecoveryTimeArgs, opts ...InvokeOption) (*GetPostgresqlRecoveryTimeResult, error)
func GetPostgresqlRecoveryTimeOutput(ctx *Context, args *GetPostgresqlRecoveryTimeOutputArgs, opts ...InvokeOption) GetPostgresqlRecoveryTimeResultOutput
Copy

> Note: This function is named GetPostgresqlRecoveryTime in the Go SDK.

public static class GetPostgresqlRecoveryTime 
{
    public static Task<GetPostgresqlRecoveryTimeResult> InvokeAsync(GetPostgresqlRecoveryTimeArgs args, InvokeOptions? opts = null)
    public static Output<GetPostgresqlRecoveryTimeResult> Invoke(GetPostgresqlRecoveryTimeInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetPostgresqlRecoveryTimeResult> getPostgresqlRecoveryTime(GetPostgresqlRecoveryTimeArgs args, InvokeOptions options)
public static Output<GetPostgresqlRecoveryTimeResult> getPostgresqlRecoveryTime(GetPostgresqlRecoveryTimeArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: tencentcloud:index/getPostgresqlRecoveryTime:getPostgresqlRecoveryTime
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DbInstanceId This property is required. string
Instance ID.
Id string
ResultOutputFile string
Used to save results.
DbInstanceId This property is required. string
Instance ID.
Id string
ResultOutputFile string
Used to save results.
dbInstanceId This property is required. String
Instance ID.
id String
resultOutputFile String
Used to save results.
dbInstanceId This property is required. string
Instance ID.
id string
resultOutputFile string
Used to save results.
db_instance_id This property is required. str
Instance ID.
id str
result_output_file str
Used to save results.
dbInstanceId This property is required. String
Instance ID.
id String
resultOutputFile String
Used to save results.

getPostgresqlRecoveryTime Result

The following output properties are available:

DbInstanceId string
Id string
RecoveryBeginTime string
The earliest restoration time (UTC+8).
RecoveryEndTime string
The latest restoration time (UTC+8).
ResultOutputFile string
DbInstanceId string
Id string
RecoveryBeginTime string
The earliest restoration time (UTC+8).
RecoveryEndTime string
The latest restoration time (UTC+8).
ResultOutputFile string
dbInstanceId String
id String
recoveryBeginTime String
The earliest restoration time (UTC+8).
recoveryEndTime String
The latest restoration time (UTC+8).
resultOutputFile String
dbInstanceId string
id string
recoveryBeginTime string
The earliest restoration time (UTC+8).
recoveryEndTime string
The latest restoration time (UTC+8).
resultOutputFile string
db_instance_id str
id str
recovery_begin_time str
The earliest restoration time (UTC+8).
recovery_end_time str
The latest restoration time (UTC+8).
result_output_file str
dbInstanceId String
id String
recoveryBeginTime String
The earliest restoration time (UTC+8).
recoveryEndTime String
The latest restoration time (UTC+8).
resultOutputFile String

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.