tencentcloud.PostgresqlBaseBackup
Explore with Pulumi AI
Provides a resource to create a postgresql base_backup
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const baseBackup = new tencentcloud.PostgresqlBaseBackup("baseBackup", {
dbInstanceId: local.pgsql_id,
tags: {
createdBy: "terraform",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
base_backup = tencentcloud.PostgresqlBaseBackup("baseBackup",
db_instance_id=local["pgsql_id"],
tags={
"createdBy": "terraform",
})
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.NewPostgresqlBaseBackup(ctx, "baseBackup", &tencentcloud.PostgresqlBaseBackupArgs{
DbInstanceId: pulumi.Any(local.Pgsql_id),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
})
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 baseBackup = new Tencentcloud.PostgresqlBaseBackup("baseBackup", new()
{
DbInstanceId = local.Pgsql_id,
Tags =
{
{ "createdBy", "terraform" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PostgresqlBaseBackup;
import com.pulumi.tencentcloud.PostgresqlBaseBackupArgs;
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 baseBackup = new PostgresqlBaseBackup("baseBackup", PostgresqlBaseBackupArgs.builder()
.dbInstanceId(local.pgsql_id())
.tags(Map.of("createdBy", "terraform"))
.build());
}
}
resources:
baseBackup:
type: tencentcloud:PostgresqlBaseBackup
properties:
dbInstanceId: ${local.pgsql_id}
tags:
createdBy: terraform
Create PostgresqlBaseBackup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PostgresqlBaseBackup(name: string, args: PostgresqlBaseBackupArgs, opts?: CustomResourceOptions);
@overload
def PostgresqlBaseBackup(resource_name: str,
args: PostgresqlBaseBackupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PostgresqlBaseBackup(resource_name: str,
opts: Optional[ResourceOptions] = None,
db_instance_id: Optional[str] = None,
new_expire_time: Optional[str] = None,
postgresql_base_backup_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewPostgresqlBaseBackup(ctx *Context, name string, args PostgresqlBaseBackupArgs, opts ...ResourceOption) (*PostgresqlBaseBackup, error)
public PostgresqlBaseBackup(string name, PostgresqlBaseBackupArgs args, CustomResourceOptions? opts = null)
public PostgresqlBaseBackup(String name, PostgresqlBaseBackupArgs args)
public PostgresqlBaseBackup(String name, PostgresqlBaseBackupArgs args, CustomResourceOptions options)
type: tencentcloud:PostgresqlBaseBackup
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 PostgresqlBaseBackupArgs
- 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 PostgresqlBaseBackupArgs
- 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 PostgresqlBaseBackupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresqlBaseBackupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresqlBaseBackupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
PostgresqlBaseBackup 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 PostgresqlBaseBackup resource accepts the following input properties:
- Db
Instance stringId - Instance ID.
- New
Expire stringTime - New expiration time.
- Postgresql
Base stringBackup Id - ID of the resource.
- Dictionary<string, string>
- Tag description list.
- Db
Instance stringId - Instance ID.
- New
Expire stringTime - New expiration time.
- Postgresql
Base stringBackup Id - ID of the resource.
- map[string]string
- Tag description list.
- db
Instance StringId - Instance ID.
- new
Expire StringTime - New expiration time.
- postgresql
Base StringBackup Id - ID of the resource.
- Map<String,String>
- Tag description list.
- db
Instance stringId - Instance ID.
- new
Expire stringTime - New expiration time.
- postgresql
Base stringBackup Id - ID of the resource.
- {[key: string]: string}
- Tag description list.
- db_
instance_ strid - Instance ID.
- new_
expire_ strtime - New expiration time.
- postgresql_
base_ strbackup_ id - ID of the resource.
- Mapping[str, str]
- Tag description list.
- db
Instance StringId - Instance ID.
- new
Expire StringTime - New expiration time.
- postgresql
Base StringBackup Id - ID of the resource.
- Map<String>
- Tag description list.
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresqlBaseBackup resource produces the following output properties:
- Base
Backup stringId - Base backup ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Base
Backup stringId - Base backup ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- base
Backup StringId - Base backup ID.
- id String
- The provider-assigned unique ID for this managed resource.
- base
Backup stringId - Base backup ID.
- id string
- The provider-assigned unique ID for this managed resource.
- base_
backup_ strid - Base backup ID.
- id str
- The provider-assigned unique ID for this managed resource.
- base
Backup StringId - Base backup ID.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PostgresqlBaseBackup Resource
Get an existing PostgresqlBaseBackup 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?: PostgresqlBaseBackupState, opts?: CustomResourceOptions): PostgresqlBaseBackup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
base_backup_id: Optional[str] = None,
db_instance_id: Optional[str] = None,
new_expire_time: Optional[str] = None,
postgresql_base_backup_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None) -> PostgresqlBaseBackup
func GetPostgresqlBaseBackup(ctx *Context, name string, id IDInput, state *PostgresqlBaseBackupState, opts ...ResourceOption) (*PostgresqlBaseBackup, error)
public static PostgresqlBaseBackup Get(string name, Input<string> id, PostgresqlBaseBackupState? state, CustomResourceOptions? opts = null)
public static PostgresqlBaseBackup get(String name, Output<String> id, PostgresqlBaseBackupState state, CustomResourceOptions options)
resources: _: type: tencentcloud:PostgresqlBaseBackup 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.
- Base
Backup stringId - Base backup ID.
- Db
Instance stringId - Instance ID.
- New
Expire stringTime - New expiration time.
- Postgresql
Base stringBackup Id - ID of the resource.
- Dictionary<string, string>
- Tag description list.
- Base
Backup stringId - Base backup ID.
- Db
Instance stringId - Instance ID.
- New
Expire stringTime - New expiration time.
- Postgresql
Base stringBackup Id - ID of the resource.
- map[string]string
- Tag description list.
- base
Backup StringId - Base backup ID.
- db
Instance StringId - Instance ID.
- new
Expire StringTime - New expiration time.
- postgresql
Base StringBackup Id - ID of the resource.
- Map<String,String>
- Tag description list.
- base
Backup stringId - Base backup ID.
- db
Instance stringId - Instance ID.
- new
Expire stringTime - New expiration time.
- postgresql
Base stringBackup Id - ID of the resource.
- {[key: string]: string}
- Tag description list.
- base_
backup_ strid - Base backup ID.
- db_
instance_ strid - Instance ID.
- new_
expire_ strtime - New expiration time.
- postgresql_
base_ strbackup_ id - ID of the resource.
- Mapping[str, str]
- Tag description list.
- base
Backup StringId - Base backup ID.
- db
Instance StringId - Instance ID.
- new
Expire StringTime - New expiration time.
- postgresql
Base StringBackup Id - ID of the resource.
- Map<String>
- Tag description list.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.