alicloud.databasefilesystem.AutoSnapShotPolicy
Explore with Pulumi AI
Provides a Dbfs Auto Snap Shot Policy resource.
For information about Dbfs Auto Snap Shot Policy and how to use it.
NOTE: Available since v1.202.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = new alicloud.databasefilesystem.AutoSnapShotPolicy("default", {
timePoints: ["01"],
policyName: "tf-example",
retentionDays: 1,
repeatWeekdays: ["2"],
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.databasefilesystem.AutoSnapShotPolicy("default",
time_points=["01"],
policy_name="tf-example",
retention_days=1,
repeat_weekdays=["2"])
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/databasefilesystem"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := databasefilesystem.NewAutoSnapShotPolicy(ctx, "default", &databasefilesystem.AutoSnapShotPolicyArgs{
TimePoints: pulumi.StringArray{
pulumi.String("01"),
},
PolicyName: pulumi.String("tf-example"),
RetentionDays: pulumi.Int(1),
RepeatWeekdays: pulumi.StringArray{
pulumi.String("2"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = new AliCloud.DatabaseFilesystem.AutoSnapShotPolicy("default", new()
{
TimePoints = new[]
{
"01",
},
PolicyName = "tf-example",
RetentionDays = 1,
RepeatWeekdays = new[]
{
"2",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.databasefilesystem.AutoSnapShotPolicy;
import com.pulumi.alicloud.databasefilesystem.AutoSnapShotPolicyArgs;
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 default_ = new AutoSnapShotPolicy("default", AutoSnapShotPolicyArgs.builder()
.timePoints("01")
.policyName("tf-example")
.retentionDays(1)
.repeatWeekdays("2")
.build());
}
}
resources:
default:
type: alicloud:databasefilesystem:AutoSnapShotPolicy
properties:
timePoints:
- '01'
policyName: tf-example
retentionDays: 1
repeatWeekdays:
- '2'
Create AutoSnapShotPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AutoSnapShotPolicy(name: string, args: AutoSnapShotPolicyArgs, opts?: CustomResourceOptions);
@overload
def AutoSnapShotPolicy(resource_name: str,
args: AutoSnapShotPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AutoSnapShotPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
policy_name: Optional[str] = None,
repeat_weekdays: Optional[Sequence[str]] = None,
retention_days: Optional[int] = None,
time_points: Optional[Sequence[str]] = None)
func NewAutoSnapShotPolicy(ctx *Context, name string, args AutoSnapShotPolicyArgs, opts ...ResourceOption) (*AutoSnapShotPolicy, error)
public AutoSnapShotPolicy(string name, AutoSnapShotPolicyArgs args, CustomResourceOptions? opts = null)
public AutoSnapShotPolicy(String name, AutoSnapShotPolicyArgs args)
public AutoSnapShotPolicy(String name, AutoSnapShotPolicyArgs args, CustomResourceOptions options)
type: alicloud:databasefilesystem:AutoSnapShotPolicy
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 AutoSnapShotPolicyArgs
- 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 AutoSnapShotPolicyArgs
- 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 AutoSnapShotPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AutoSnapShotPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AutoSnapShotPolicyArgs
- 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 autoSnapShotPolicyResource = new AliCloud.DatabaseFilesystem.AutoSnapShotPolicy("autoSnapShotPolicyResource", new()
{
PolicyName = "string",
RepeatWeekdays = new[]
{
"string",
},
RetentionDays = 0,
TimePoints = new[]
{
"string",
},
});
example, err := databasefilesystem.NewAutoSnapShotPolicy(ctx, "autoSnapShotPolicyResource", &databasefilesystem.AutoSnapShotPolicyArgs{
PolicyName: pulumi.String("string"),
RepeatWeekdays: pulumi.StringArray{
pulumi.String("string"),
},
RetentionDays: pulumi.Int(0),
TimePoints: pulumi.StringArray{
pulumi.String("string"),
},
})
var autoSnapShotPolicyResource = new AutoSnapShotPolicy("autoSnapShotPolicyResource", AutoSnapShotPolicyArgs.builder()
.policyName("string")
.repeatWeekdays("string")
.retentionDays(0)
.timePoints("string")
.build());
auto_snap_shot_policy_resource = alicloud.databasefilesystem.AutoSnapShotPolicy("autoSnapShotPolicyResource",
policy_name="string",
repeat_weekdays=["string"],
retention_days=0,
time_points=["string"])
const autoSnapShotPolicyResource = new alicloud.databasefilesystem.AutoSnapShotPolicy("autoSnapShotPolicyResource", {
policyName: "string",
repeatWeekdays: ["string"],
retentionDays: 0,
timePoints: ["string"],
});
type: alicloud:databasefilesystem:AutoSnapShotPolicy
properties:
policyName: string
repeatWeekdays:
- string
retentionDays: 0
timePoints:
- string
AutoSnapShotPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The AutoSnapShotPolicy resource accepts the following input properties:
- Policy
Name string - Automatic snapshot policy name
- Repeat
Weekdays List<string> - A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example,
1
means Monday. - Retention
Days int - Automatic snapshot retention days.
- Time
Points List<string> - The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range:
00
to23
, representing 24 time points from 00:00 to 23:00, for example,01
indicates 01:00.
- Policy
Name string - Automatic snapshot policy name
- Repeat
Weekdays []string - A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example,
1
means Monday. - Retention
Days int - Automatic snapshot retention days.
- Time
Points []string - The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range:
00
to23
, representing 24 time points from 00:00 to 23:00, for example,01
indicates 01:00.
- policy
Name String - Automatic snapshot policy name
- repeat
Weekdays List<String> - A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example,
1
means Monday. - retention
Days Integer - Automatic snapshot retention days.
- time
Points List<String> - The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range:
00
to23
, representing 24 time points from 00:00 to 23:00, for example,01
indicates 01:00.
- policy
Name string - Automatic snapshot policy name
- repeat
Weekdays string[] - A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example,
1
means Monday. - retention
Days number - Automatic snapshot retention days.
- time
Points string[] - The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range:
00
to23
, representing 24 time points from 00:00 to 23:00, for example,01
indicates 01:00.
- policy_
name str - Automatic snapshot policy name
- repeat_
weekdays Sequence[str] - A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example,
1
means Monday. - retention_
days int - Automatic snapshot retention days.
- time_
points Sequence[str] - The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range:
00
to23
, representing 24 time points from 00:00 to 23:00, for example,01
indicates 01:00.
- policy
Name String - Automatic snapshot policy name
- repeat
Weekdays List<String> - A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example,
1
means Monday. - retention
Days Number - Automatic snapshot retention days.
- time
Points List<String> - The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range:
00
to23
, representing 24 time points from 00:00 to 23:00, for example,01
indicates 01:00.
Outputs
All input properties are implicitly available as output properties. Additionally, the AutoSnapShotPolicy resource produces the following output properties:
- Applied
Dbfs intNumber - The number of database file systems set by the automatic snapshot policy.
- Create
Time string - The creation time of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified string - Last modification time of automatic snapshot policy
- Policy
Id string - Automatic snapshot policy ID
- Status string
- Automatic snapshot policy status
- Status
Detail string - Automatic snapshot policy status details
- Applied
Dbfs intNumber - The number of database file systems set by the automatic snapshot policy.
- Create
Time string - The creation time of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified string - Last modification time of automatic snapshot policy
- Policy
Id string - Automatic snapshot policy ID
- Status string
- Automatic snapshot policy status
- Status
Detail string - Automatic snapshot policy status details
- applied
Dbfs IntegerNumber - The number of database file systems set by the automatic snapshot policy.
- create
Time String - The creation time of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified String - Last modification time of automatic snapshot policy
- policy
Id String - Automatic snapshot policy ID
- status String
- Automatic snapshot policy status
- status
Detail String - Automatic snapshot policy status details
- applied
Dbfs numberNumber - The number of database file systems set by the automatic snapshot policy.
- create
Time string - The creation time of the resource
- id string
- The provider-assigned unique ID for this managed resource.
- last
Modified string - Last modification time of automatic snapshot policy
- policy
Id string - Automatic snapshot policy ID
- status string
- Automatic snapshot policy status
- status
Detail string - Automatic snapshot policy status details
- applied_
dbfs_ intnumber - The number of database file systems set by the automatic snapshot policy.
- create_
time str - The creation time of the resource
- id str
- The provider-assigned unique ID for this managed resource.
- last_
modified str - Last modification time of automatic snapshot policy
- policy_
id str - Automatic snapshot policy ID
- status str
- Automatic snapshot policy status
- status_
detail str - Automatic snapshot policy status details
- applied
Dbfs NumberNumber - The number of database file systems set by the automatic snapshot policy.
- create
Time String - The creation time of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified String - Last modification time of automatic snapshot policy
- policy
Id String - Automatic snapshot policy ID
- status String
- Automatic snapshot policy status
- status
Detail String - Automatic snapshot policy status details
Look up Existing AutoSnapShotPolicy Resource
Get an existing AutoSnapShotPolicy 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?: AutoSnapShotPolicyState, opts?: CustomResourceOptions): AutoSnapShotPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
applied_dbfs_number: Optional[int] = None,
create_time: Optional[str] = None,
last_modified: Optional[str] = None,
policy_id: Optional[str] = None,
policy_name: Optional[str] = None,
repeat_weekdays: Optional[Sequence[str]] = None,
retention_days: Optional[int] = None,
status: Optional[str] = None,
status_detail: Optional[str] = None,
time_points: Optional[Sequence[str]] = None) -> AutoSnapShotPolicy
func GetAutoSnapShotPolicy(ctx *Context, name string, id IDInput, state *AutoSnapShotPolicyState, opts ...ResourceOption) (*AutoSnapShotPolicy, error)
public static AutoSnapShotPolicy Get(string name, Input<string> id, AutoSnapShotPolicyState? state, CustomResourceOptions? opts = null)
public static AutoSnapShotPolicy get(String name, Output<String> id, AutoSnapShotPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Applied
Dbfs intNumber - The number of database file systems set by the automatic snapshot policy.
- Create
Time string - The creation time of the resource
- Last
Modified string - Last modification time of automatic snapshot policy
- Policy
Id string - Automatic snapshot policy ID
- Policy
Name string - Automatic snapshot policy name
- Repeat
Weekdays List<string> - A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example,
1
means Monday. - Retention
Days int - Automatic snapshot retention days.
- Status string
- Automatic snapshot policy status
- Status
Detail string - Automatic snapshot policy status details
- Time
Points List<string> - The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range:
00
to23
, representing 24 time points from 00:00 to 23:00, for example,01
indicates 01:00.
- Applied
Dbfs intNumber - The number of database file systems set by the automatic snapshot policy.
- Create
Time string - The creation time of the resource
- Last
Modified string - Last modification time of automatic snapshot policy
- Policy
Id string - Automatic snapshot policy ID
- Policy
Name string - Automatic snapshot policy name
- Repeat
Weekdays []string - A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example,
1
means Monday. - Retention
Days int - Automatic snapshot retention days.
- Status string
- Automatic snapshot policy status
- Status
Detail string - Automatic snapshot policy status details
- Time
Points []string - The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range:
00
to23
, representing 24 time points from 00:00 to 23:00, for example,01
indicates 01:00.
- applied
Dbfs IntegerNumber - The number of database file systems set by the automatic snapshot policy.
- create
Time String - The creation time of the resource
- last
Modified String - Last modification time of automatic snapshot policy
- policy
Id String - Automatic snapshot policy ID
- policy
Name String - Automatic snapshot policy name
- repeat
Weekdays List<String> - A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example,
1
means Monday. - retention
Days Integer - Automatic snapshot retention days.
- status String
- Automatic snapshot policy status
- status
Detail String - Automatic snapshot policy status details
- time
Points List<String> - The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range:
00
to23
, representing 24 time points from 00:00 to 23:00, for example,01
indicates 01:00.
- applied
Dbfs numberNumber - The number of database file systems set by the automatic snapshot policy.
- create
Time string - The creation time of the resource
- last
Modified string - Last modification time of automatic snapshot policy
- policy
Id string - Automatic snapshot policy ID
- policy
Name string - Automatic snapshot policy name
- repeat
Weekdays string[] - A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example,
1
means Monday. - retention
Days number - Automatic snapshot retention days.
- status string
- Automatic snapshot policy status
- status
Detail string - Automatic snapshot policy status details
- time
Points string[] - The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range:
00
to23
, representing 24 time points from 00:00 to 23:00, for example,01
indicates 01:00.
- applied_
dbfs_ intnumber - The number of database file systems set by the automatic snapshot policy.
- create_
time str - The creation time of the resource
- last_
modified str - Last modification time of automatic snapshot policy
- policy_
id str - Automatic snapshot policy ID
- policy_
name str - Automatic snapshot policy name
- repeat_
weekdays Sequence[str] - A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example,
1
means Monday. - retention_
days int - Automatic snapshot retention days.
- status str
- Automatic snapshot policy status
- status_
detail str - Automatic snapshot policy status details
- time_
points Sequence[str] - The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range:
00
to23
, representing 24 time points from 00:00 to 23:00, for example,01
indicates 01:00.
- applied
Dbfs NumberNumber - The number of database file systems set by the automatic snapshot policy.
- create
Time String - The creation time of the resource
- last
Modified String - Last modification time of automatic snapshot policy
- policy
Id String - Automatic snapshot policy ID
- policy
Name String - Automatic snapshot policy name
- repeat
Weekdays List<String> - A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example,
1
means Monday. - retention
Days Number - Automatic snapshot retention days.
- status String
- Automatic snapshot policy status
- status
Detail String - Automatic snapshot policy status details
- time
Points List<String> - The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range:
00
to23
, representing 24 time points from 00:00 to 23:00, for example,01
indicates 01:00.
Import
Dbfs Auto Snap Shot Policy can be imported using the id, e.g.
$ pulumi import alicloud:databasefilesystem/autoSnapShotPolicy:AutoSnapShotPolicy example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.