tencentcloud.PostgresqlBackupDownloadRestrictionConfig
Explore with Pulumi AI
Provides a resource to create a postgresql backup_download_restriction_config
Example Usage
Unlimit the restriction of the backup file download.
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const backupDownloadRestrictionConfig = new tencentcloud.PostgresqlBackupDownloadRestrictionConfig("backupDownloadRestrictionConfig", {restrictionType: "NONE"});
import pulumi
import pulumi_tencentcloud as tencentcloud
backup_download_restriction_config = tencentcloud.PostgresqlBackupDownloadRestrictionConfig("backupDownloadRestrictionConfig", restriction_type="NONE")
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.NewPostgresqlBackupDownloadRestrictionConfig(ctx, "backupDownloadRestrictionConfig", &tencentcloud.PostgresqlBackupDownloadRestrictionConfigArgs{
RestrictionType: pulumi.String("NONE"),
})
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 backupDownloadRestrictionConfig = new Tencentcloud.PostgresqlBackupDownloadRestrictionConfig("backupDownloadRestrictionConfig", new()
{
RestrictionType = "NONE",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PostgresqlBackupDownloadRestrictionConfig;
import com.pulumi.tencentcloud.PostgresqlBackupDownloadRestrictionConfigArgs;
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) {
var backupDownloadRestrictionConfig = new PostgresqlBackupDownloadRestrictionConfig("backupDownloadRestrictionConfig", PostgresqlBackupDownloadRestrictionConfigArgs.builder()
.restrictionType("NONE")
.build());
}
}
resources:
backupDownloadRestrictionConfig:
type: tencentcloud:PostgresqlBackupDownloadRestrictionConfig
properties:
restrictionType: NONE
Set the download only to allow the intranet downloads.
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const backupDownloadRestrictionConfig = new tencentcloud.PostgresqlBackupDownloadRestrictionConfig("backupDownloadRestrictionConfig", {restrictionType: "INTRANET"});
import pulumi
import pulumi_tencentcloud as tencentcloud
backup_download_restriction_config = tencentcloud.PostgresqlBackupDownloadRestrictionConfig("backupDownloadRestrictionConfig", restriction_type="INTRANET")
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.NewPostgresqlBackupDownloadRestrictionConfig(ctx, "backupDownloadRestrictionConfig", &tencentcloud.PostgresqlBackupDownloadRestrictionConfigArgs{
RestrictionType: pulumi.String("INTRANET"),
})
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 backupDownloadRestrictionConfig = new Tencentcloud.PostgresqlBackupDownloadRestrictionConfig("backupDownloadRestrictionConfig", new()
{
RestrictionType = "INTRANET",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PostgresqlBackupDownloadRestrictionConfig;
import com.pulumi.tencentcloud.PostgresqlBackupDownloadRestrictionConfigArgs;
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) {
var backupDownloadRestrictionConfig = new PostgresqlBackupDownloadRestrictionConfig("backupDownloadRestrictionConfig", PostgresqlBackupDownloadRestrictionConfigArgs.builder()
.restrictionType("INTRANET")
.build());
}
}
resources:
backupDownloadRestrictionConfig:
type: tencentcloud:PostgresqlBackupDownloadRestrictionConfig
properties:
restrictionType: INTRANET
Restrict the backup file download by customizing.
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const pgVpc = new tencentcloud.Vpc("pgVpc", {cidrBlock: _var.vpc_cidr});
const backupDownloadRestrictionConfig = new tencentcloud.PostgresqlBackupDownloadRestrictionConfig("backupDownloadRestrictionConfig", {
restrictionType: "CUSTOMIZE",
vpcRestrictionEffect: "DENY",
vpcIdSets: [tencentcloud_vpc.pg_vpc2.id],
ipRestrictionEffect: "DENY",
ipSets: ["192.168.0.0"],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
pg_vpc = tencentcloud.Vpc("pgVpc", cidr_block=var["vpc_cidr"])
backup_download_restriction_config = tencentcloud.PostgresqlBackupDownloadRestrictionConfig("backupDownloadRestrictionConfig",
restriction_type="CUSTOMIZE",
vpc_restriction_effect="DENY",
vpc_id_sets=[tencentcloud_vpc["pg_vpc2"]["id"]],
ip_restriction_effect="DENY",
ip_sets=["192.168.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 {
_, err := tencentcloud.NewVpc(ctx, "pgVpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.Any(_var.Vpc_cidr),
})
if err != nil {
return err
}
_, err = tencentcloud.NewPostgresqlBackupDownloadRestrictionConfig(ctx, "backupDownloadRestrictionConfig", &tencentcloud.PostgresqlBackupDownloadRestrictionConfigArgs{
RestrictionType: pulumi.String("CUSTOMIZE"),
VpcRestrictionEffect: pulumi.String("DENY"),
VpcIdSets: pulumi.StringArray{
tencentcloud_vpc.Pg_vpc2.Id,
},
IpRestrictionEffect: pulumi.String("DENY"),
IpSets: pulumi.StringArray{
pulumi.String("192.168.0.0"),
},
})
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 pgVpc = new Tencentcloud.Vpc("pgVpc", new()
{
CidrBlock = @var.Vpc_cidr,
});
var backupDownloadRestrictionConfig = new Tencentcloud.PostgresqlBackupDownloadRestrictionConfig("backupDownloadRestrictionConfig", new()
{
RestrictionType = "CUSTOMIZE",
VpcRestrictionEffect = "DENY",
VpcIdSets = new[]
{
tencentcloud_vpc.Pg_vpc2.Id,
},
IpRestrictionEffect = "DENY",
IpSets = new[]
{
"192.168.0.0",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.PostgresqlBackupDownloadRestrictionConfig;
import com.pulumi.tencentcloud.PostgresqlBackupDownloadRestrictionConfigArgs;
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) {
var pgVpc = new Vpc("pgVpc", VpcArgs.builder()
.cidrBlock(var_.vpc_cidr())
.build());
var backupDownloadRestrictionConfig = new PostgresqlBackupDownloadRestrictionConfig("backupDownloadRestrictionConfig", PostgresqlBackupDownloadRestrictionConfigArgs.builder()
.restrictionType("CUSTOMIZE")
.vpcRestrictionEffect("DENY")
.vpcIdSets(tencentcloud_vpc.pg_vpc2().id())
.ipRestrictionEffect("DENY")
.ipSets("192.168.0.0")
.build());
}
}
resources:
pgVpc:
type: tencentcloud:Vpc
properties:
cidrBlock: ${var.vpc_cidr}
backupDownloadRestrictionConfig:
type: tencentcloud:PostgresqlBackupDownloadRestrictionConfig
properties:
restrictionType: CUSTOMIZE
vpcRestrictionEffect: DENY
vpcIdSets:
- ${tencentcloud_vpc.pg_vpc2.id}
ipRestrictionEffect: DENY
ipSets:
- 192.168.0.0
Create PostgresqlBackupDownloadRestrictionConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PostgresqlBackupDownloadRestrictionConfig(name: string, args: PostgresqlBackupDownloadRestrictionConfigArgs, opts?: CustomResourceOptions);
@overload
def PostgresqlBackupDownloadRestrictionConfig(resource_name: str,
args: PostgresqlBackupDownloadRestrictionConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PostgresqlBackupDownloadRestrictionConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
restriction_type: Optional[str] = None,
ip_restriction_effect: Optional[str] = None,
ip_sets: Optional[Sequence[str]] = None,
postgresql_backup_download_restriction_config_id: Optional[str] = None,
vpc_id_sets: Optional[Sequence[str]] = None,
vpc_restriction_effect: Optional[str] = None)
func NewPostgresqlBackupDownloadRestrictionConfig(ctx *Context, name string, args PostgresqlBackupDownloadRestrictionConfigArgs, opts ...ResourceOption) (*PostgresqlBackupDownloadRestrictionConfig, error)
public PostgresqlBackupDownloadRestrictionConfig(string name, PostgresqlBackupDownloadRestrictionConfigArgs args, CustomResourceOptions? opts = null)
public PostgresqlBackupDownloadRestrictionConfig(String name, PostgresqlBackupDownloadRestrictionConfigArgs args)
public PostgresqlBackupDownloadRestrictionConfig(String name, PostgresqlBackupDownloadRestrictionConfigArgs args, CustomResourceOptions options)
type: tencentcloud:PostgresqlBackupDownloadRestrictionConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PostgresqlBackupDownloadRestrictionConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PostgresqlBackupDownloadRestrictionConfigArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PostgresqlBackupDownloadRestrictionConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresqlBackupDownloadRestrictionConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresqlBackupDownloadRestrictionConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
PostgresqlBackupDownloadRestrictionConfig Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PostgresqlBackupDownloadRestrictionConfig resource accepts the following input properties:
- Restriction
Type string - Backup file download restriction type: NONE:Unlimited, both internal and external networks can be downloaded. INTRANET:Only intranet downloads are allowed. CUSTOMIZE:Customize the vpc or ip that limits downloads.
- Ip
Restriction stringEffect - ip limit Strategy: ALLOW, DENY.
- Ip
Sets List<string> - The list of ips that are allowed or denied to download backup files.
- Postgresql
Backup stringDownload Restriction Config Id - ID of the resource.
- Vpc
Id List<string>Sets - The list of vpcIds that allow or deny downloading of backup files.
- Vpc
Restriction stringEffect - vpc limit Strategy: ALLOW, DENY.
- Restriction
Type string - Backup file download restriction type: NONE:Unlimited, both internal and external networks can be downloaded. INTRANET:Only intranet downloads are allowed. CUSTOMIZE:Customize the vpc or ip that limits downloads.
- Ip
Restriction stringEffect - ip limit Strategy: ALLOW, DENY.
- Ip
Sets []string - The list of ips that are allowed or denied to download backup files.
- Postgresql
Backup stringDownload Restriction Config Id - ID of the resource.
- Vpc
Id []stringSets - The list of vpcIds that allow or deny downloading of backup files.
- Vpc
Restriction stringEffect - vpc limit Strategy: ALLOW, DENY.
- restriction
Type String - Backup file download restriction type: NONE:Unlimited, both internal and external networks can be downloaded. INTRANET:Only intranet downloads are allowed. CUSTOMIZE:Customize the vpc or ip that limits downloads.
- ip
Restriction StringEffect - ip limit Strategy: ALLOW, DENY.
- ip
Sets List<String> - The list of ips that are allowed or denied to download backup files.
- postgresql
Backup StringDownload Restriction Config Id - ID of the resource.
- vpc
Id List<String>Sets - The list of vpcIds that allow or deny downloading of backup files.
- vpc
Restriction StringEffect - vpc limit Strategy: ALLOW, DENY.
- restriction
Type string - Backup file download restriction type: NONE:Unlimited, both internal and external networks can be downloaded. INTRANET:Only intranet downloads are allowed. CUSTOMIZE:Customize the vpc or ip that limits downloads.
- ip
Restriction stringEffect - ip limit Strategy: ALLOW, DENY.
- ip
Sets string[] - The list of ips that are allowed or denied to download backup files.
- postgresql
Backup stringDownload Restriction Config Id - ID of the resource.
- vpc
Id string[]Sets - The list of vpcIds that allow or deny downloading of backup files.
- vpc
Restriction stringEffect - vpc limit Strategy: ALLOW, DENY.
- restriction_
type str - Backup file download restriction type: NONE:Unlimited, both internal and external networks can be downloaded. INTRANET:Only intranet downloads are allowed. CUSTOMIZE:Customize the vpc or ip that limits downloads.
- ip_
restriction_ streffect - ip limit Strategy: ALLOW, DENY.
- ip_
sets Sequence[str] - The list of ips that are allowed or denied to download backup files.
- postgresql_
backup_ strdownload_ restriction_ config_ id - ID of the resource.
- vpc_
id_ Sequence[str]sets - The list of vpcIds that allow or deny downloading of backup files.
- vpc_
restriction_ streffect - vpc limit Strategy: ALLOW, DENY.
- restriction
Type String - Backup file download restriction type: NONE:Unlimited, both internal and external networks can be downloaded. INTRANET:Only intranet downloads are allowed. CUSTOMIZE:Customize the vpc or ip that limits downloads.
- ip
Restriction StringEffect - ip limit Strategy: ALLOW, DENY.
- ip
Sets List<String> - The list of ips that are allowed or denied to download backup files.
- postgresql
Backup StringDownload Restriction Config Id - ID of the resource.
- vpc
Id List<String>Sets - The list of vpcIds that allow or deny downloading of backup files.
- vpc
Restriction StringEffect - vpc limit Strategy: ALLOW, DENY.
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresqlBackupDownloadRestrictionConfig resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PostgresqlBackupDownloadRestrictionConfig Resource
Get an existing PostgresqlBackupDownloadRestrictionConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PostgresqlBackupDownloadRestrictionConfigState, opts?: CustomResourceOptions): PostgresqlBackupDownloadRestrictionConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ip_restriction_effect: Optional[str] = None,
ip_sets: Optional[Sequence[str]] = None,
postgresql_backup_download_restriction_config_id: Optional[str] = None,
restriction_type: Optional[str] = None,
vpc_id_sets: Optional[Sequence[str]] = None,
vpc_restriction_effect: Optional[str] = None) -> PostgresqlBackupDownloadRestrictionConfig
func GetPostgresqlBackupDownloadRestrictionConfig(ctx *Context, name string, id IDInput, state *PostgresqlBackupDownloadRestrictionConfigState, opts ...ResourceOption) (*PostgresqlBackupDownloadRestrictionConfig, error)
public static PostgresqlBackupDownloadRestrictionConfig Get(string name, Input<string> id, PostgresqlBackupDownloadRestrictionConfigState? state, CustomResourceOptions? opts = null)
public static PostgresqlBackupDownloadRestrictionConfig get(String name, Output<String> id, PostgresqlBackupDownloadRestrictionConfigState state, CustomResourceOptions options)
resources: _: type: tencentcloud:PostgresqlBackupDownloadRestrictionConfig get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Ip
Restriction stringEffect - ip limit Strategy: ALLOW, DENY.
- Ip
Sets List<string> - The list of ips that are allowed or denied to download backup files.
- Postgresql
Backup stringDownload Restriction Config Id - ID of the resource.
- Restriction
Type string - Backup file download restriction type: NONE:Unlimited, both internal and external networks can be downloaded. INTRANET:Only intranet downloads are allowed. CUSTOMIZE:Customize the vpc or ip that limits downloads.
- Vpc
Id List<string>Sets - The list of vpcIds that allow or deny downloading of backup files.
- Vpc
Restriction stringEffect - vpc limit Strategy: ALLOW, DENY.
- Ip
Restriction stringEffect - ip limit Strategy: ALLOW, DENY.
- Ip
Sets []string - The list of ips that are allowed or denied to download backup files.
- Postgresql
Backup stringDownload Restriction Config Id - ID of the resource.
- Restriction
Type string - Backup file download restriction type: NONE:Unlimited, both internal and external networks can be downloaded. INTRANET:Only intranet downloads are allowed. CUSTOMIZE:Customize the vpc or ip that limits downloads.
- Vpc
Id []stringSets - The list of vpcIds that allow or deny downloading of backup files.
- Vpc
Restriction stringEffect - vpc limit Strategy: ALLOW, DENY.
- ip
Restriction StringEffect - ip limit Strategy: ALLOW, DENY.
- ip
Sets List<String> - The list of ips that are allowed or denied to download backup files.
- postgresql
Backup StringDownload Restriction Config Id - ID of the resource.
- restriction
Type String - Backup file download restriction type: NONE:Unlimited, both internal and external networks can be downloaded. INTRANET:Only intranet downloads are allowed. CUSTOMIZE:Customize the vpc or ip that limits downloads.
- vpc
Id List<String>Sets - The list of vpcIds that allow or deny downloading of backup files.
- vpc
Restriction StringEffect - vpc limit Strategy: ALLOW, DENY.
- ip
Restriction stringEffect - ip limit Strategy: ALLOW, DENY.
- ip
Sets string[] - The list of ips that are allowed or denied to download backup files.
- postgresql
Backup stringDownload Restriction Config Id - ID of the resource.
- restriction
Type string - Backup file download restriction type: NONE:Unlimited, both internal and external networks can be downloaded. INTRANET:Only intranet downloads are allowed. CUSTOMIZE:Customize the vpc or ip that limits downloads.
- vpc
Id string[]Sets - The list of vpcIds that allow or deny downloading of backup files.
- vpc
Restriction stringEffect - vpc limit Strategy: ALLOW, DENY.
- ip_
restriction_ streffect - ip limit Strategy: ALLOW, DENY.
- ip_
sets Sequence[str] - The list of ips that are allowed or denied to download backup files.
- postgresql_
backup_ strdownload_ restriction_ config_ id - ID of the resource.
- restriction_
type str - Backup file download restriction type: NONE:Unlimited, both internal and external networks can be downloaded. INTRANET:Only intranet downloads are allowed. CUSTOMIZE:Customize the vpc or ip that limits downloads.
- vpc_
id_ Sequence[str]sets - The list of vpcIds that allow or deny downloading of backup files.
- vpc_
restriction_ streffect - vpc limit Strategy: ALLOW, DENY.
- ip
Restriction StringEffect - ip limit Strategy: ALLOW, DENY.
- ip
Sets List<String> - The list of ips that are allowed or denied to download backup files.
- postgresql
Backup StringDownload Restriction Config Id - ID of the resource.
- restriction
Type String - Backup file download restriction type: NONE:Unlimited, both internal and external networks can be downloaded. INTRANET:Only intranet downloads are allowed. CUSTOMIZE:Customize the vpc or ip that limits downloads.
- vpc
Id List<String>Sets - The list of vpcIds that allow or deny downloading of backup files.
- vpc
Restriction StringEffect - vpc limit Strategy: ALLOW, DENY.
Import
postgresql backup_download_restriction_config can be imported using the id, e.g.
$ pulumi import tencentcloud:index/postgresqlBackupDownloadRestrictionConfig:PostgresqlBackupDownloadRestrictionConfig backup_download_restriction_config backup_download_restriction_config_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.