tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getPostgresqlLogBackups
Explore with Pulumi AI
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
Use this data source to query detailed information of postgresql log_backups
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const logBackups = tencentcloud.getPostgresqlLogBackups({
minFinishTime: "%s",
maxFinishTime: "%s",
filters: [{
name: "db-instance-id",
values: [local.pgsql_id],
}],
orderBy: "StartTime",
orderByType: "desc",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
log_backups = tencentcloud.get_postgresql_log_backups(min_finish_time="%s",
max_finish_time="%s",
filters=[{
"name": "db-instance-id",
"values": [local["pgsql_id"]],
}],
order_by="StartTime",
order_by_type="desc")
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.GetPostgresqlLogBackups(ctx, &tencentcloud.GetPostgresqlLogBackupsArgs{
MinFinishTime: pulumi.StringRef("%s"),
MaxFinishTime: pulumi.StringRef("%s"),
Filters: []tencentcloud.GetPostgresqlLogBackupsFilter{
{
Name: pulumi.StringRef("db-instance-id"),
Values: interface{}{
local.Pgsql_id,
},
},
},
OrderBy: pulumi.StringRef("StartTime"),
OrderByType: pulumi.StringRef("desc"),
}, 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 logBackups = Tencentcloud.GetPostgresqlLogBackups.Invoke(new()
{
MinFinishTime = "%s",
MaxFinishTime = "%s",
Filters = new[]
{
new Tencentcloud.Inputs.GetPostgresqlLogBackupsFilterInputArgs
{
Name = "db-instance-id",
Values = new[]
{
local.Pgsql_id,
},
},
},
OrderBy = "StartTime",
OrderByType = "desc",
});
});
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.GetPostgresqlLogBackupsArgs;
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 logBackups = TencentcloudFunctions.getPostgresqlLogBackups(GetPostgresqlLogBackupsArgs.builder()
.minFinishTime("%s")
.maxFinishTime("%s")
.filters(GetPostgresqlLogBackupsFilterArgs.builder()
.name("db-instance-id")
.values(local.pgsql_id())
.build())
.orderBy("StartTime")
.orderByType("desc")
.build());
}
}
variables:
logBackups:
fn::invoke:
function: tencentcloud:getPostgresqlLogBackups
arguments:
minFinishTime: '%s'
maxFinishTime: '%s'
filters:
- name: db-instance-id
values:
- ${local.pgsql_id}
orderBy: StartTime
orderByType: desc
Using getPostgresqlLogBackups
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 getPostgresqlLogBackups(args: GetPostgresqlLogBackupsArgs, opts?: InvokeOptions): Promise<GetPostgresqlLogBackupsResult>
function getPostgresqlLogBackupsOutput(args: GetPostgresqlLogBackupsOutputArgs, opts?: InvokeOptions): Output<GetPostgresqlLogBackupsResult>
def get_postgresql_log_backups(filters: Optional[Sequence[GetPostgresqlLogBackupsFilter]] = None,
id: Optional[str] = None,
max_finish_time: Optional[str] = None,
min_finish_time: Optional[str] = None,
order_by: Optional[str] = None,
order_by_type: Optional[str] = None,
result_output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPostgresqlLogBackupsResult
def get_postgresql_log_backups_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetPostgresqlLogBackupsFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
max_finish_time: Optional[pulumi.Input[str]] = None,
min_finish_time: Optional[pulumi.Input[str]] = None,
order_by: Optional[pulumi.Input[str]] = None,
order_by_type: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPostgresqlLogBackupsResult]
func GetPostgresqlLogBackups(ctx *Context, args *GetPostgresqlLogBackupsArgs, opts ...InvokeOption) (*GetPostgresqlLogBackupsResult, error)
func GetPostgresqlLogBackupsOutput(ctx *Context, args *GetPostgresqlLogBackupsOutputArgs, opts ...InvokeOption) GetPostgresqlLogBackupsResultOutput
> Note: This function is named GetPostgresqlLogBackups
in the Go SDK.
public static class GetPostgresqlLogBackups
{
public static Task<GetPostgresqlLogBackupsResult> InvokeAsync(GetPostgresqlLogBackupsArgs args, InvokeOptions? opts = null)
public static Output<GetPostgresqlLogBackupsResult> Invoke(GetPostgresqlLogBackupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPostgresqlLogBackupsResult> getPostgresqlLogBackups(GetPostgresqlLogBackupsArgs args, InvokeOptions options)
public static Output<GetPostgresqlLogBackupsResult> getPostgresqlLogBackups(GetPostgresqlLogBackupsArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getPostgresqlLogBackups:getPostgresqlLogBackups
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<Get
Postgresql Log Backups Filter> - Filter instances using one or more criteria. Valid filter names:db-instance-id: Filter by instance ID (in string format).db-instance-name: Filter by instance name (in string format).db-instance-ip: Filter by instance VPC IP (in string format).
- Id string
- Unique ID of a backup file.
- Max
Finish stringTime - Maximum end time of a backup in the format of
2018-01-01 00:00:00
. It is the current time by default. - Min
Finish stringTime - Minimum end time of a backup in the format of
2018-01-01 00:00:00
. It is 7 days ago by default. - Order
By string - Sorting field. Valid values:
StartTime
,FinishTime
,Size
. - Order
By stringType - Sorting order. Valid values:
asc
(ascending),desc
(descending). - Result
Output stringFile - Used to save results.
- Filters
[]Get
Postgresql Log Backups Filter - Filter instances using one or more criteria. Valid filter names:db-instance-id: Filter by instance ID (in string format).db-instance-name: Filter by instance name (in string format).db-instance-ip: Filter by instance VPC IP (in string format).
- Id string
- Unique ID of a backup file.
- Max
Finish stringTime - Maximum end time of a backup in the format of
2018-01-01 00:00:00
. It is the current time by default. - Min
Finish stringTime - Minimum end time of a backup in the format of
2018-01-01 00:00:00
. It is 7 days ago by default. - Order
By string - Sorting field. Valid values:
StartTime
,FinishTime
,Size
. - Order
By stringType - Sorting order. Valid values:
asc
(ascending),desc
(descending). - Result
Output stringFile - Used to save results.
- filters
List<Get
Postgresql Log Backups Filter> - Filter instances using one or more criteria. Valid filter names:db-instance-id: Filter by instance ID (in string format).db-instance-name: Filter by instance name (in string format).db-instance-ip: Filter by instance VPC IP (in string format).
- id String
- Unique ID of a backup file.
- max
Finish StringTime - Maximum end time of a backup in the format of
2018-01-01 00:00:00
. It is the current time by default. - min
Finish StringTime - Minimum end time of a backup in the format of
2018-01-01 00:00:00
. It is 7 days ago by default. - order
By String - Sorting field. Valid values:
StartTime
,FinishTime
,Size
. - order
By StringType - Sorting order. Valid values:
asc
(ascending),desc
(descending). - result
Output StringFile - Used to save results.
- filters
Get
Postgresql Log Backups Filter[] - Filter instances using one or more criteria. Valid filter names:db-instance-id: Filter by instance ID (in string format).db-instance-name: Filter by instance name (in string format).db-instance-ip: Filter by instance VPC IP (in string format).
- id string
- Unique ID of a backup file.
- max
Finish stringTime - Maximum end time of a backup in the format of
2018-01-01 00:00:00
. It is the current time by default. - min
Finish stringTime - Minimum end time of a backup in the format of
2018-01-01 00:00:00
. It is 7 days ago by default. - order
By string - Sorting field. Valid values:
StartTime
,FinishTime
,Size
. - order
By stringType - Sorting order. Valid values:
asc
(ascending),desc
(descending). - result
Output stringFile - Used to save results.
- filters
Sequence[Get
Postgresql Log Backups Filter] - Filter instances using one or more criteria. Valid filter names:db-instance-id: Filter by instance ID (in string format).db-instance-name: Filter by instance name (in string format).db-instance-ip: Filter by instance VPC IP (in string format).
- id str
- Unique ID of a backup file.
- max_
finish_ strtime - Maximum end time of a backup in the format of
2018-01-01 00:00:00
. It is the current time by default. - min_
finish_ strtime - Minimum end time of a backup in the format of
2018-01-01 00:00:00
. It is 7 days ago by default. - order_
by str - Sorting field. Valid values:
StartTime
,FinishTime
,Size
. - order_
by_ strtype - Sorting order. Valid values:
asc
(ascending),desc
(descending). - result_
output_ strfile - Used to save results.
- filters List<Property Map>
- Filter instances using one or more criteria. Valid filter names:db-instance-id: Filter by instance ID (in string format).db-instance-name: Filter by instance name (in string format).db-instance-ip: Filter by instance VPC IP (in string format).
- id String
- Unique ID of a backup file.
- max
Finish StringTime - Maximum end time of a backup in the format of
2018-01-01 00:00:00
. It is the current time by default. - min
Finish StringTime - Minimum end time of a backup in the format of
2018-01-01 00:00:00
. It is 7 days ago by default. - order
By String - Sorting field. Valid values:
StartTime
,FinishTime
,Size
. - order
By StringType - Sorting order. Valid values:
asc
(ascending),desc
(descending). - result
Output StringFile - Used to save results.
getPostgresqlLogBackups Result
The following output properties are available:
- Id string
- Unique ID of a backup file.
- Log
Backup List<GetSets Postgresql Log Backups Log Backup Set> - List of log backup details.
- Filters
List<Get
Postgresql Log Backups Filter> - Max
Finish stringTime - Min
Finish stringTime - Order
By string - Order
By stringType - Result
Output stringFile
- Id string
- Unique ID of a backup file.
- Log
Backup []GetSets Postgresql Log Backups Log Backup Set - List of log backup details.
- Filters
[]Get
Postgresql Log Backups Filter - Max
Finish stringTime - Min
Finish stringTime - Order
By string - Order
By stringType - Result
Output stringFile
- id String
- Unique ID of a backup file.
- log
Backup List<GetSets Postgresql Log Backups Log Backup Set> - List of log backup details.
- filters
List<Get
Postgresql Log Backups Filter> - max
Finish StringTime - min
Finish StringTime - order
By String - order
By StringType - result
Output StringFile
- id string
- Unique ID of a backup file.
- log
Backup GetSets Postgresql Log Backups Log Backup Set[] - List of log backup details.
- filters
Get
Postgresql Log Backups Filter[] - max
Finish stringTime - min
Finish stringTime - order
By string - order
By stringType - result
Output stringFile
- id str
- Unique ID of a backup file.
- log_
backup_ Sequence[Getsets Postgresql Log Backups Log Backup Set] - List of log backup details.
- filters
Sequence[Get
Postgresql Log Backups Filter] - max_
finish_ strtime - min_
finish_ strtime - order_
by str - order_
by_ strtype - result_
output_ strfile
- id String
- Unique ID of a backup file.
- log
Backup List<Property Map>Sets - List of log backup details.
- filters List<Property Map>
- max
Finish StringTime - min
Finish StringTime - order
By String - order
By StringType - result
Output StringFile
Supporting Types
GetPostgresqlLogBackupsFilter
GetPostgresqlLogBackupsLogBackupSet
- Backup
Method string - Backup method, including physical and logical.
- Backup
Mode string - Backup mode, including automatic and manual.
- Db
Instance stringId - Instance ID.
- Expire
Time string - Backup expiration time.
- Finish
Time string - Backup end time.
- Id string
- Unique ID of a backup file.
- Name string
- Backup file name.
- Size double
- Backup set size in bytes.
- Start
Time string - Backup start time.
- State string
- Backup task status.
- Backup
Method string - Backup method, including physical and logical.
- Backup
Mode string - Backup mode, including automatic and manual.
- Db
Instance stringId - Instance ID.
- Expire
Time string - Backup expiration time.
- Finish
Time string - Backup end time.
- Id string
- Unique ID of a backup file.
- Name string
- Backup file name.
- Size float64
- Backup set size in bytes.
- Start
Time string - Backup start time.
- State string
- Backup task status.
- backup
Method String - Backup method, including physical and logical.
- backup
Mode String - Backup mode, including automatic and manual.
- db
Instance StringId - Instance ID.
- expire
Time String - Backup expiration time.
- finish
Time String - Backup end time.
- id String
- Unique ID of a backup file.
- name String
- Backup file name.
- size Double
- Backup set size in bytes.
- start
Time String - Backup start time.
- state String
- Backup task status.
- backup
Method string - Backup method, including physical and logical.
- backup
Mode string - Backup mode, including automatic and manual.
- db
Instance stringId - Instance ID.
- expire
Time string - Backup expiration time.
- finish
Time string - Backup end time.
- id string
- Unique ID of a backup file.
- name string
- Backup file name.
- size number
- Backup set size in bytes.
- start
Time string - Backup start time.
- state string
- Backup task status.
- backup_
method str - Backup method, including physical and logical.
- backup_
mode str - Backup mode, including automatic and manual.
- db_
instance_ strid - Instance ID.
- expire_
time str - Backup expiration time.
- finish_
time str - Backup end time.
- id str
- Unique ID of a backup file.
- name str
- Backup file name.
- size float
- Backup set size in bytes.
- start_
time str - Backup start time.
- state str
- Backup task status.
- backup
Method String - Backup method, including physical and logical.
- backup
Mode String - Backup mode, including automatic and manual.
- db
Instance StringId - Instance ID.
- expire
Time String - Backup expiration time.
- finish
Time String - Backup end time.
- id String
- Unique ID of a backup file.
- name String
- Backup file name.
- size Number
- Backup set size in bytes.
- start
Time String - Backup start time.
- state String
- Backup task status.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack