Class BackupPolicy
Provides a backup policy for ApsaraDB Redis / Memcache instance resource.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var config = new Config();
var creation = config.Get("creation") ?? "KVStore";
var multiAz = config.Get("multiAz") ?? "false";
var name = config.Get("name") ?? "kvstorebackuppolicyvpc";
var defaultZones = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
{
AvailableResourceCreation = creation,
}));
var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new AliCloud.Vpc.NetworkArgs
{
CidrBlock = "172.16.0.0/16",
});
var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new AliCloud.Vpc.SwitchArgs
{
AvailabilityZone = defaultZones.Apply(defaultZones => defaultZones.Zones[0].Id),
CidrBlock = "172.16.0.0/24",
VpcId = defaultNetwork.Id,
});
var defaultInstance = new AliCloud.KVStore.Instance("defaultInstance", new AliCloud.KVStore.InstanceArgs
{
EngineVersion = "2.8",
InstanceClass = "Memcache",
InstanceName = name,
InstanceType = "memcache.master.small.default",
PrivateIp = "172.16.0.10",
SecurityIps =
{
"10.0.0.1",
},
VswitchId = defaultSwitch.Id,
});
var defaultBackupPolicy = new AliCloud.KVStore.BackupPolicy("defaultBackupPolicy", new AliCloud.KVStore.BackupPolicyArgs
{
BackupPeriods =
{
"Tuesday",
"Wednesday",
},
BackupTime = "10:00Z-11:00Z",
InstanceId = defaultInstance.Id,
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.KVStore
Assembly: Pulumi.AliCloud.dll
Syntax
public class BackupPolicy : CustomResource
Constructors
View SourceBackupPolicy(String, BackupPolicyArgs, CustomResourceOptions)
Create a BackupPolicy resource with the given unique name, arguments, and options.
Declaration
public BackupPolicy(string name, BackupPolicyArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| BackupPolicyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceBackupPeriods
Backup Cycle. Allowed values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
Declaration
public Output<ImmutableArray<string>> BackupPeriods { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
BackupTime
Backup time, in the format of HH:mmZ- HH:mm Z
Declaration
public Output<string> BackupTime { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InstanceId
The id of ApsaraDB for Redis or Memcache intance.
Declaration
public Output<string> InstanceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, BackupPolicyState, CustomResourceOptions)
Get an existing BackupPolicy resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static BackupPolicy Get(string name, Input<string> id, BackupPolicyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| BackupPolicyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| BackupPolicy |