flexibleengine.RdsCrossRegionBackupStrategy
Explore with Pulumi AI
Manages RDS cross-region backup strategy resource within FlexibleEngine.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const config = new pulumi.Config();
const instanceId = config.requireObject("instanceId");
const destinationRegion = config.requireObject("destinationRegion");
const destinationProjectId = config.requireObject("destinationProjectId");
const test = new flexibleengine.RdsCrossRegionBackupStrategy("test", {
instanceId: instanceId,
backupType: "all",
keepDays: 5,
destinationRegion: destinationRegion,
destinationProjectId: destinationProjectId,
});
import pulumi
import pulumi_flexibleengine as flexibleengine
config = pulumi.Config()
instance_id = config.require_object("instanceId")
destination_region = config.require_object("destinationRegion")
destination_project_id = config.require_object("destinationProjectId")
test = flexibleengine.RdsCrossRegionBackupStrategy("test",
instance_id=instance_id,
backup_type="all",
keep_days=5,
destination_region=destination_region,
destination_project_id=destination_project_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
instanceId := cfg.RequireObject("instanceId")
destinationRegion := cfg.RequireObject("destinationRegion")
destinationProjectId := cfg.RequireObject("destinationProjectId")
_, err := flexibleengine.NewRdsCrossRegionBackupStrategy(ctx, "test", &flexibleengine.RdsCrossRegionBackupStrategyArgs{
InstanceId: pulumi.Any(instanceId),
BackupType: pulumi.String("all"),
KeepDays: pulumi.Float64(5),
DestinationRegion: pulumi.Any(destinationRegion),
DestinationProjectId: pulumi.Any(destinationProjectId),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var instanceId = config.RequireObject<dynamic>("instanceId");
var destinationRegion = config.RequireObject<dynamic>("destinationRegion");
var destinationProjectId = config.RequireObject<dynamic>("destinationProjectId");
var test = new Flexibleengine.RdsCrossRegionBackupStrategy("test", new()
{
InstanceId = instanceId,
BackupType = "all",
KeepDays = 5,
DestinationRegion = destinationRegion,
DestinationProjectId = destinationProjectId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.RdsCrossRegionBackupStrategy;
import com.pulumi.flexibleengine.RdsCrossRegionBackupStrategyArgs;
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 config = ctx.config();
final var instanceId = config.get("instanceId");
final var destinationRegion = config.get("destinationRegion");
final var destinationProjectId = config.get("destinationProjectId");
var test = new RdsCrossRegionBackupStrategy("test", RdsCrossRegionBackupStrategyArgs.builder()
.instanceId(instanceId)
.backupType("all")
.keepDays(5)
.destinationRegion(destinationRegion)
.destinationProjectId(destinationProjectId)
.build());
}
}
configuration:
instanceId:
type: dynamic
destinationRegion:
type: dynamic
destinationProjectId:
type: dynamic
resources:
test:
type: flexibleengine:RdsCrossRegionBackupStrategy
properties:
instanceId: ${instanceId}
backupType: all
keepDays: 5
destinationRegion: ${destinationRegion}
destinationProjectId: ${destinationProjectId}
Create RdsCrossRegionBackupStrategy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RdsCrossRegionBackupStrategy(name: string, args: RdsCrossRegionBackupStrategyArgs, opts?: CustomResourceOptions);
@overload
def RdsCrossRegionBackupStrategy(resource_name: str,
args: RdsCrossRegionBackupStrategyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RdsCrossRegionBackupStrategy(resource_name: str,
opts: Optional[ResourceOptions] = None,
backup_type: Optional[str] = None,
destination_project_id: Optional[str] = None,
destination_region: Optional[str] = None,
instance_id: Optional[str] = None,
keep_days: Optional[float] = None,
rds_cross_region_backup_strategy_id: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[RdsCrossRegionBackupStrategyTimeoutsArgs] = None)
func NewRdsCrossRegionBackupStrategy(ctx *Context, name string, args RdsCrossRegionBackupStrategyArgs, opts ...ResourceOption) (*RdsCrossRegionBackupStrategy, error)
public RdsCrossRegionBackupStrategy(string name, RdsCrossRegionBackupStrategyArgs args, CustomResourceOptions? opts = null)
public RdsCrossRegionBackupStrategy(String name, RdsCrossRegionBackupStrategyArgs args)
public RdsCrossRegionBackupStrategy(String name, RdsCrossRegionBackupStrategyArgs args, CustomResourceOptions options)
type: flexibleengine:RdsCrossRegionBackupStrategy
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 RdsCrossRegionBackupStrategyArgs
- 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 RdsCrossRegionBackupStrategyArgs
- 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 RdsCrossRegionBackupStrategyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RdsCrossRegionBackupStrategyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RdsCrossRegionBackupStrategyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var rdsCrossRegionBackupStrategyResource = new Flexibleengine.RdsCrossRegionBackupStrategy("rdsCrossRegionBackupStrategyResource", new()
{
BackupType = "string",
DestinationProjectId = "string",
DestinationRegion = "string",
InstanceId = "string",
KeepDays = 0,
RdsCrossRegionBackupStrategyId = "string",
Region = "string",
Timeouts = new Flexibleengine.Inputs.RdsCrossRegionBackupStrategyTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
});
example, err := flexibleengine.NewRdsCrossRegionBackupStrategy(ctx, "rdsCrossRegionBackupStrategyResource", &flexibleengine.RdsCrossRegionBackupStrategyArgs{
BackupType: pulumi.String("string"),
DestinationProjectId: pulumi.String("string"),
DestinationRegion: pulumi.String("string"),
InstanceId: pulumi.String("string"),
KeepDays: pulumi.Float64(0),
RdsCrossRegionBackupStrategyId: pulumi.String("string"),
Region: pulumi.String("string"),
Timeouts: &flexibleengine.RdsCrossRegionBackupStrategyTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var rdsCrossRegionBackupStrategyResource = new RdsCrossRegionBackupStrategy("rdsCrossRegionBackupStrategyResource", RdsCrossRegionBackupStrategyArgs.builder()
.backupType("string")
.destinationProjectId("string")
.destinationRegion("string")
.instanceId("string")
.keepDays(0)
.rdsCrossRegionBackupStrategyId("string")
.region("string")
.timeouts(RdsCrossRegionBackupStrategyTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.build());
rds_cross_region_backup_strategy_resource = flexibleengine.RdsCrossRegionBackupStrategy("rdsCrossRegionBackupStrategyResource",
backup_type="string",
destination_project_id="string",
destination_region="string",
instance_id="string",
keep_days=0,
rds_cross_region_backup_strategy_id="string",
region="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
})
const rdsCrossRegionBackupStrategyResource = new flexibleengine.RdsCrossRegionBackupStrategy("rdsCrossRegionBackupStrategyResource", {
backupType: "string",
destinationProjectId: "string",
destinationRegion: "string",
instanceId: "string",
keepDays: 0,
rdsCrossRegionBackupStrategyId: "string",
region: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: flexibleengine:RdsCrossRegionBackupStrategy
properties:
backupType: string
destinationProjectId: string
destinationRegion: string
instanceId: string
keepDays: 0
rdsCrossRegionBackupStrategyId: string
region: string
timeouts:
create: string
delete: string
update: string
RdsCrossRegionBackupStrategy 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 RdsCrossRegionBackupStrategy resource accepts the following input properties:
- Backup
Type string Specifies the backup type. Value options:
- auto: open automated full backup.
- all: open both automated full backup and automated incremental backup.
Only all is supported for SQL server.
- Destination
Project stringId Specifies the target project ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- Destination
Region string Specifies the target region ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- Instance
Id string Specifies the ID of the RDS instance.
Changing this parameter will create a new resource.
- Keep
Days double - Specifies the number of days to retain the generated backup files.
Value ranges from
1
to1825
. - Rds
Cross stringRegion Backup Strategy Id - The resource ID.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Timeouts
Rds
Cross Region Backup Strategy Timeouts
- Backup
Type string Specifies the backup type. Value options:
- auto: open automated full backup.
- all: open both automated full backup and automated incremental backup.
Only all is supported for SQL server.
- Destination
Project stringId Specifies the target project ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- Destination
Region string Specifies the target region ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- Instance
Id string Specifies the ID of the RDS instance.
Changing this parameter will create a new resource.
- Keep
Days float64 - Specifies the number of days to retain the generated backup files.
Value ranges from
1
to1825
. - Rds
Cross stringRegion Backup Strategy Id - The resource ID.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Timeouts
Rds
Cross Region Backup Strategy Timeouts Args
- backup
Type String Specifies the backup type. Value options:
- auto: open automated full backup.
- all: open both automated full backup and automated incremental backup.
Only all is supported for SQL server.
- destination
Project StringId Specifies the target project ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- destination
Region String Specifies the target region ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- instance
Id String Specifies the ID of the RDS instance.
Changing this parameter will create a new resource.
- keep
Days Double - Specifies the number of days to retain the generated backup files.
Value ranges from
1
to1825
. - rds
Cross StringRegion Backup Strategy Id - The resource ID.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- timeouts
Rds
Cross Region Backup Strategy Timeouts
- backup
Type string Specifies the backup type. Value options:
- auto: open automated full backup.
- all: open both automated full backup and automated incremental backup.
Only all is supported for SQL server.
- destination
Project stringId Specifies the target project ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- destination
Region string Specifies the target region ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- instance
Id string Specifies the ID of the RDS instance.
Changing this parameter will create a new resource.
- keep
Days number - Specifies the number of days to retain the generated backup files.
Value ranges from
1
to1825
. - rds
Cross stringRegion Backup Strategy Id - The resource ID.
- region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- timeouts
Rds
Cross Region Backup Strategy Timeouts
- backup_
type str Specifies the backup type. Value options:
- auto: open automated full backup.
- all: open both automated full backup and automated incremental backup.
Only all is supported for SQL server.
- destination_
project_ strid Specifies the target project ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- destination_
region str Specifies the target region ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- instance_
id str Specifies the ID of the RDS instance.
Changing this parameter will create a new resource.
- keep_
days float - Specifies the number of days to retain the generated backup files.
Value ranges from
1
to1825
. - rds_
cross_ strregion_ backup_ strategy_ id - The resource ID.
- region str
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- timeouts
Rds
Cross Region Backup Strategy Timeouts Args
- backup
Type String Specifies the backup type. Value options:
- auto: open automated full backup.
- all: open both automated full backup and automated incremental backup.
Only all is supported for SQL server.
- destination
Project StringId Specifies the target project ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- destination
Region String Specifies the target region ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- instance
Id String Specifies the ID of the RDS instance.
Changing this parameter will create a new resource.
- keep
Days Number - Specifies the number of days to retain the generated backup files.
Value ranges from
1
to1825
. - rds
Cross StringRegion Backup Strategy Id - The resource ID.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the RdsCrossRegionBackupStrategy 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 RdsCrossRegionBackupStrategy Resource
Get an existing RdsCrossRegionBackupStrategy 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?: RdsCrossRegionBackupStrategyState, opts?: CustomResourceOptions): RdsCrossRegionBackupStrategy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backup_type: Optional[str] = None,
destination_project_id: Optional[str] = None,
destination_region: Optional[str] = None,
instance_id: Optional[str] = None,
keep_days: Optional[float] = None,
rds_cross_region_backup_strategy_id: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[RdsCrossRegionBackupStrategyTimeoutsArgs] = None) -> RdsCrossRegionBackupStrategy
func GetRdsCrossRegionBackupStrategy(ctx *Context, name string, id IDInput, state *RdsCrossRegionBackupStrategyState, opts ...ResourceOption) (*RdsCrossRegionBackupStrategy, error)
public static RdsCrossRegionBackupStrategy Get(string name, Input<string> id, RdsCrossRegionBackupStrategyState? state, CustomResourceOptions? opts = null)
public static RdsCrossRegionBackupStrategy get(String name, Output<String> id, RdsCrossRegionBackupStrategyState state, CustomResourceOptions options)
resources: _: type: flexibleengine:RdsCrossRegionBackupStrategy 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.
- Backup
Type string Specifies the backup type. Value options:
- auto: open automated full backup.
- all: open both automated full backup and automated incremental backup.
Only all is supported for SQL server.
- Destination
Project stringId Specifies the target project ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- Destination
Region string Specifies the target region ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- Instance
Id string Specifies the ID of the RDS instance.
Changing this parameter will create a new resource.
- Keep
Days double - Specifies the number of days to retain the generated backup files.
Value ranges from
1
to1825
. - Rds
Cross stringRegion Backup Strategy Id - The resource ID.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Timeouts
Rds
Cross Region Backup Strategy Timeouts
- Backup
Type string Specifies the backup type. Value options:
- auto: open automated full backup.
- all: open both automated full backup and automated incremental backup.
Only all is supported for SQL server.
- Destination
Project stringId Specifies the target project ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- Destination
Region string Specifies the target region ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- Instance
Id string Specifies the ID of the RDS instance.
Changing this parameter will create a new resource.
- Keep
Days float64 - Specifies the number of days to retain the generated backup files.
Value ranges from
1
to1825
. - Rds
Cross stringRegion Backup Strategy Id - The resource ID.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Timeouts
Rds
Cross Region Backup Strategy Timeouts Args
- backup
Type String Specifies the backup type. Value options:
- auto: open automated full backup.
- all: open both automated full backup and automated incremental backup.
Only all is supported for SQL server.
- destination
Project StringId Specifies the target project ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- destination
Region String Specifies the target region ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- instance
Id String Specifies the ID of the RDS instance.
Changing this parameter will create a new resource.
- keep
Days Double - Specifies the number of days to retain the generated backup files.
Value ranges from
1
to1825
. - rds
Cross StringRegion Backup Strategy Id - The resource ID.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- timeouts
Rds
Cross Region Backup Strategy Timeouts
- backup
Type string Specifies the backup type. Value options:
- auto: open automated full backup.
- all: open both automated full backup and automated incremental backup.
Only all is supported for SQL server.
- destination
Project stringId Specifies the target project ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- destination
Region string Specifies the target region ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- instance
Id string Specifies the ID of the RDS instance.
Changing this parameter will create a new resource.
- keep
Days number - Specifies the number of days to retain the generated backup files.
Value ranges from
1
to1825
. - rds
Cross stringRegion Backup Strategy Id - The resource ID.
- region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- timeouts
Rds
Cross Region Backup Strategy Timeouts
- backup_
type str Specifies the backup type. Value options:
- auto: open automated full backup.
- all: open both automated full backup and automated incremental backup.
Only all is supported for SQL server.
- destination_
project_ strid Specifies the target project ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- destination_
region str Specifies the target region ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- instance_
id str Specifies the ID of the RDS instance.
Changing this parameter will create a new resource.
- keep_
days float - Specifies the number of days to retain the generated backup files.
Value ranges from
1
to1825
. - rds_
cross_ strregion_ backup_ strategy_ id - The resource ID.
- region str
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- timeouts
Rds
Cross Region Backup Strategy Timeouts Args
- backup
Type String Specifies the backup type. Value options:
- auto: open automated full backup.
- all: open both automated full backup and automated incremental backup.
Only all is supported for SQL server.
- destination
Project StringId Specifies the target project ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- destination
Region String Specifies the target region ID for the cross-region backup policy.
Changing this parameter will create a new resource.
- instance
Id String Specifies the ID of the RDS instance.
Changing this parameter will create a new resource.
- keep
Days Number - Specifies the number of days to retain the generated backup files.
Value ranges from
1
to1825
. - rds
Cross StringRegion Backup Strategy Id - The resource ID.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- timeouts Property Map
Supporting Types
RdsCrossRegionBackupStrategyTimeouts, RdsCrossRegionBackupStrategyTimeoutsArgs
Import
The RDS cross-region backup strategy can be imported using the id
, e.g.
$ pulumi import flexibleengine:index/rdsCrossRegionBackupStrategy:RdsCrossRegionBackupStrategy test <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.