tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
tencentcloud.getPostgresqlBackupDownloadUrls
Start a Neo task
Explain and create a tencentcloud.getPostgresqlBackupDownloadUrls resource
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
Use this data source to query detailed information of postgresql backup_download_urls
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: [pgsqlId],
}],
orderBy: "StartTime",
orderByType: "desc",
});
const backupDownloadUrls = logBackups.then(logBackups => tencentcloud.getPostgresqlBackupDownloadUrls({
dbInstanceId: pgsqlId,
backupType: "LogBackup",
backupId: logBackups.logBackupSets?.[0]?.id,
urlExpireTime: 12,
backupDownloadRestriction: {
restrictionType: "NONE",
vpcRestrictionEffect: "ALLOW",
vpcIdSets: [vpcId],
ipRestrictionEffect: "ALLOW",
ipSets: ["0.0.0.0"],
},
}));
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": [pgsql_id],
}],
order_by="StartTime",
order_by_type="desc")
backup_download_urls = tencentcloud.get_postgresql_backup_download_urls(db_instance_id=pgsql_id,
backup_type="LogBackup",
backup_id=log_backups.log_backup_sets[0].id,
url_expire_time=12,
backup_download_restriction={
"restriction_type": "NONE",
"vpc_restriction_effect": "ALLOW",
"vpc_id_sets": [vpc_id],
"ip_restriction_effect": "ALLOW",
"ip_sets": ["0.0.0.0"],
})
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 {
logBackups, 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{}{
pgsqlId,
},
},
},
OrderBy: pulumi.StringRef("StartTime"),
OrderByType: pulumi.StringRef("desc"),
}, nil);
if err != nil {
return err
}
_, err = tencentcloud.GetPostgresqlBackupDownloadUrls(ctx, &tencentcloud.GetPostgresqlBackupDownloadUrlsArgs{
DbInstanceId: pgsqlId,
BackupType: "LogBackup",
BackupId: logBackups.LogBackupSets[0].Id,
UrlExpireTime: pulumi.Float64Ref(12),
BackupDownloadRestriction: tencentcloud.GetPostgresqlBackupDownloadUrlsBackupDownloadRestriction{
RestrictionType: pulumi.StringRef("NONE"),
VpcRestrictionEffect: pulumi.StringRef("ALLOW"),
VpcIdSets: interface{}{
vpcId,
},
IpRestrictionEffect: pulumi.StringRef("ALLOW"),
IpSets: []string{
"0.0.0.0",
},
},
}, 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[]
{
pgsqlId,
},
},
},
OrderBy = "StartTime",
OrderByType = "desc",
});
var backupDownloadUrls = Tencentcloud.GetPostgresqlBackupDownloadUrls.Invoke(new()
{
DbInstanceId = pgsqlId,
BackupType = "LogBackup",
BackupId = logBackups.Apply(getPostgresqlLogBackupsResult => getPostgresqlLogBackupsResult.LogBackupSets[0]?.Id),
UrlExpireTime = 12,
BackupDownloadRestriction = new Tencentcloud.Inputs.GetPostgresqlBackupDownloadUrlsBackupDownloadRestrictionInputArgs
{
RestrictionType = "NONE",
VpcRestrictionEffect = "ALLOW",
VpcIdSets = new[]
{
vpcId,
},
IpRestrictionEffect = "ALLOW",
IpSets = new[]
{
"0.0.0.0",
},
},
});
});
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 com.pulumi.tencentcloud.inputs.GetPostgresqlBackupDownloadUrlsArgs;
import com.pulumi.tencentcloud.inputs.GetPostgresqlBackupDownloadUrlsBackupDownloadRestrictionArgs;
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(pgsqlId)
.build())
.orderBy("StartTime")
.orderByType("desc")
.build());
final var backupDownloadUrls = TencentcloudFunctions.getPostgresqlBackupDownloadUrls(GetPostgresqlBackupDownloadUrlsArgs.builder()
.dbInstanceId(pgsqlId)
.backupType("LogBackup")
.backupId(logBackups.logBackupSets()[0].id())
.urlExpireTime(12)
.backupDownloadRestriction(GetPostgresqlBackupDownloadUrlsBackupDownloadRestrictionArgs.builder()
.restrictionType("NONE")
.vpcRestrictionEffect("ALLOW")
.vpcIdSets(vpcId)
.ipRestrictionEffect("ALLOW")
.ipSets("0.0.0.0")
.build())
.build());
}
}
variables:
logBackups:
fn::invoke:
function: tencentcloud:getPostgresqlLogBackups
arguments:
minFinishTime: '%s'
maxFinishTime: '%s'
filters:
- name: db-instance-id
values:
- ${pgsqlId}
orderBy: StartTime
orderByType: desc
backupDownloadUrls:
fn::invoke:
function: tencentcloud:getPostgresqlBackupDownloadUrls
arguments:
dbInstanceId: ${pgsqlId}
backupType: LogBackup
backupId: ${logBackups.logBackupSets[0].id}
urlExpireTime: 12
backupDownloadRestriction:
restrictionType: NONE
vpcRestrictionEffect: ALLOW
vpcIdSets:
- ${vpcId}
ipRestrictionEffect: ALLOW
ipSets:
- 0.0.0.0
Using getPostgresqlBackupDownloadUrls
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 getPostgresqlBackupDownloadUrls(args: GetPostgresqlBackupDownloadUrlsArgs, opts?: InvokeOptions): Promise<GetPostgresqlBackupDownloadUrlsResult>
function getPostgresqlBackupDownloadUrlsOutput(args: GetPostgresqlBackupDownloadUrlsOutputArgs, opts?: InvokeOptions): Output<GetPostgresqlBackupDownloadUrlsResult>def get_postgresql_backup_download_urls(backup_download_restriction: Optional[GetPostgresqlBackupDownloadUrlsBackupDownloadRestriction] = None,
backup_id: Optional[str] = None,
backup_type: Optional[str] = None,
db_instance_id: Optional[str] = None,
id: Optional[str] = None,
result_output_file: Optional[str] = None,
url_expire_time: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetPostgresqlBackupDownloadUrlsResult
def get_postgresql_backup_download_urls_output(backup_download_restriction: Optional[pulumi.Input[GetPostgresqlBackupDownloadUrlsBackupDownloadRestrictionArgs]] = None,
backup_id: Optional[pulumi.Input[str]] = None,
backup_type: Optional[pulumi.Input[str]] = None,
db_instance_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
url_expire_time: Optional[pulumi.Input[float]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPostgresqlBackupDownloadUrlsResult]func GetPostgresqlBackupDownloadUrls(ctx *Context, args *GetPostgresqlBackupDownloadUrlsArgs, opts ...InvokeOption) (*GetPostgresqlBackupDownloadUrlsResult, error)
func GetPostgresqlBackupDownloadUrlsOutput(ctx *Context, args *GetPostgresqlBackupDownloadUrlsOutputArgs, opts ...InvokeOption) GetPostgresqlBackupDownloadUrlsResultOutput> Note: This function is named GetPostgresqlBackupDownloadUrls in the Go SDK.
public static class GetPostgresqlBackupDownloadUrls
{
public static Task<GetPostgresqlBackupDownloadUrlsResult> InvokeAsync(GetPostgresqlBackupDownloadUrlsArgs args, InvokeOptions? opts = null)
public static Output<GetPostgresqlBackupDownloadUrlsResult> Invoke(GetPostgresqlBackupDownloadUrlsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPostgresqlBackupDownloadUrlsResult> getPostgresqlBackupDownloadUrls(GetPostgresqlBackupDownloadUrlsArgs args, InvokeOptions options)
public static Output<GetPostgresqlBackupDownloadUrlsResult> getPostgresqlBackupDownloadUrls(GetPostgresqlBackupDownloadUrlsArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getPostgresqlBackupDownloadUrls:getPostgresqlBackupDownloadUrls
arguments:
# arguments dictionaryThe following arguments are supported:
- Backup
Id string - Unique backup ID.
- Backup
Type string - Backup type. Valid values:
LogBackup,BaseBackup. - Db
Instance stringId - Instance ID.
- Backup
Download GetRestriction Postgresql Backup Download Urls Backup Download Restriction - Backup download restriction.
- Id string
- Result
Output stringFile - Used to save results.
- Url
Expire doubleTime - Validity period of a URL, which is 12 hours by default.
- Backup
Id string - Unique backup ID.
- Backup
Type string - Backup type. Valid values:
LogBackup,BaseBackup. - Db
Instance stringId - Instance ID.
- Backup
Download GetRestriction Postgresql Backup Download Urls Backup Download Restriction - Backup download restriction.
- Id string
- Result
Output stringFile - Used to save results.
- Url
Expire float64Time - Validity period of a URL, which is 12 hours by default.
- backup
Id String - Unique backup ID.
- backup
Type String - Backup type. Valid values:
LogBackup,BaseBackup. - db
Instance StringId - Instance ID.
- backup
Download GetRestriction Postgresql Backup Download Urls Backup Download Restriction - Backup download restriction.
- id String
- result
Output StringFile - Used to save results.
- url
Expire DoubleTime - Validity period of a URL, which is 12 hours by default.
- backup
Id string - Unique backup ID.
- backup
Type string - Backup type. Valid values:
LogBackup,BaseBackup. - db
Instance stringId - Instance ID.
- backup
Download GetRestriction Postgresql Backup Download Urls Backup Download Restriction - Backup download restriction.
- id string
- result
Output stringFile - Used to save results.
- url
Expire numberTime - Validity period of a URL, which is 12 hours by default.
- backup_
id str - Unique backup ID.
- backup_
type str - Backup type. Valid values:
LogBackup,BaseBackup. - db_
instance_ strid - Instance ID.
- backup_
download_ Getrestriction Postgresql Backup Download Urls Backup Download Restriction - Backup download restriction.
- id str
- result_
output_ strfile - Used to save results.
- url_
expire_ floattime - Validity period of a URL, which is 12 hours by default.
- backup
Id String - Unique backup ID.
- backup
Type String - Backup type. Valid values:
LogBackup,BaseBackup. - db
Instance StringId - Instance ID.
- backup
Download Property MapRestriction - Backup download restriction.
- id String
- result
Output StringFile - Used to save results.
- url
Expire NumberTime - Validity period of a URL, which is 12 hours by default.
getPostgresqlBackupDownloadUrls Result
The following output properties are available:
- Backup
Download stringUrl - Backup download URL.
- Backup
Id string - Backup
Type string - Db
Instance stringId - Id string
- Backup
Download GetRestriction Postgresql Backup Download Urls Backup Download Restriction - Result
Output stringFile - Url
Expire doubleTime
- Backup
Download stringUrl - Backup download URL.
- Backup
Id string - Backup
Type string - Db
Instance stringId - Id string
- Backup
Download GetRestriction Postgresql Backup Download Urls Backup Download Restriction - Result
Output stringFile - Url
Expire float64Time
- backup
Download StringUrl - Backup download URL.
- backup
Id String - backup
Type String - db
Instance StringId - id String
- backup
Download GetRestriction Postgresql Backup Download Urls Backup Download Restriction - result
Output StringFile - url
Expire DoubleTime
- backup
Download stringUrl - Backup download URL.
- backup
Id string - backup
Type string - db
Instance stringId - id string
- backup
Download GetRestriction Postgresql Backup Download Urls Backup Download Restriction - result
Output stringFile - url
Expire numberTime
- backup_
download_ strurl - Backup download URL.
- backup_
id str - backup_
type str - db_
instance_ strid - id str
- backup_
download_ Getrestriction Postgresql Backup Download Urls Backup Download Restriction - result_
output_ strfile - url_
expire_ floattime
- backup
Download StringUrl - Backup download URL.
- backup
Id String - backup
Type String - db
Instance StringId - id String
- backup
Download Property MapRestriction - result
Output StringFile - url
Expire NumberTime
Supporting Types
GetPostgresqlBackupDownloadUrlsBackupDownloadRestriction
- Ip
Restriction stringEffect - Whether IP is allowed. Valid values:
ALLOW(allow),DENY(deny). - Ip
Sets List<string> - Whether it is allowed to download IP list of the backup files.
- Restriction
Type string - Type of the network restrictions for downloading backup files. Valid values:
NONE(backups can be downloaded over both private and public networks),INTRANET(backups can only be downloaded over the private network),CUSTOMIZE(backups can be downloaded over specified VPCs or at specified IPs). - Vpc
Id List<string>Sets - Whether it is allowed to download the VPC ID list of the backup files.
- Vpc
Restriction stringEffect - Whether VPC is allowed. Valid values:
ALLOW(allow),DENY(deny).
- Ip
Restriction stringEffect - Whether IP is allowed. Valid values:
ALLOW(allow),DENY(deny). - Ip
Sets []string - Whether it is allowed to download IP list of the backup files.
- Restriction
Type string - Type of the network restrictions for downloading backup files. Valid values:
NONE(backups can be downloaded over both private and public networks),INTRANET(backups can only be downloaded over the private network),CUSTOMIZE(backups can be downloaded over specified VPCs or at specified IPs). - Vpc
Id []stringSets - Whether it is allowed to download the VPC ID list of the backup files.
- Vpc
Restriction stringEffect - Whether VPC is allowed. Valid values:
ALLOW(allow),DENY(deny).
- ip
Restriction StringEffect - Whether IP is allowed. Valid values:
ALLOW(allow),DENY(deny). - ip
Sets List<String> - Whether it is allowed to download IP list of the backup files.
- restriction
Type String - Type of the network restrictions for downloading backup files. Valid values:
NONE(backups can be downloaded over both private and public networks),INTRANET(backups can only be downloaded over the private network),CUSTOMIZE(backups can be downloaded over specified VPCs or at specified IPs). - vpc
Id List<String>Sets - Whether it is allowed to download the VPC ID list of the backup files.
- vpc
Restriction StringEffect - Whether VPC is allowed. Valid values:
ALLOW(allow),DENY(deny).
- ip
Restriction stringEffect - Whether IP is allowed. Valid values:
ALLOW(allow),DENY(deny). - ip
Sets string[] - Whether it is allowed to download IP list of the backup files.
- restriction
Type string - Type of the network restrictions for downloading backup files. Valid values:
NONE(backups can be downloaded over both private and public networks),INTRANET(backups can only be downloaded over the private network),CUSTOMIZE(backups can be downloaded over specified VPCs or at specified IPs). - vpc
Id string[]Sets - Whether it is allowed to download the VPC ID list of the backup files.
- vpc
Restriction stringEffect - Whether VPC is allowed. Valid values:
ALLOW(allow),DENY(deny).
- ip_
restriction_ streffect - Whether IP is allowed. Valid values:
ALLOW(allow),DENY(deny). - ip_
sets Sequence[str] - Whether it is allowed to download IP list of the backup files.
- restriction_
type str - Type of the network restrictions for downloading backup files. Valid values:
NONE(backups can be downloaded over both private and public networks),INTRANET(backups can only be downloaded over the private network),CUSTOMIZE(backups can be downloaded over specified VPCs or at specified IPs). - vpc_
id_ Sequence[str]sets - Whether it is allowed to download the VPC ID list of the backup files.
- vpc_
restriction_ streffect - Whether VPC is allowed. Valid values:
ALLOW(allow),DENY(deny).
- ip
Restriction StringEffect - Whether IP is allowed. Valid values:
ALLOW(allow),DENY(deny). - ip
Sets List<String> - Whether it is allowed to download IP list of the backup files.
- restriction
Type String - Type of the network restrictions for downloading backup files. Valid values:
NONE(backups can be downloaded over both private and public networks),INTRANET(backups can only be downloaded over the private network),CUSTOMIZE(backups can be downloaded over specified VPCs or at specified IPs). - vpc
Id List<String>Sets - Whether it is allowed to download the VPC ID list of the backup files.
- vpc
Restriction StringEffect - Whether VPC is allowed. Valid values:
ALLOW(allow),DENY(deny).
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
