1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. databasefilesystem
  5. AutoSnapShotPolicy
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.databasefilesystem.AutoSnapShotPolicy

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    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:

    PolicyName string
    Automatic snapshot policy name
    RepeatWeekdays List<string>
    A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example, 1 means Monday.
    RetentionDays int
    Automatic snapshot retention days.
    TimePoints List<string>
    The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range: 00 to 23, representing 24 time points from 00:00 to 23:00, for example, 01 indicates 01:00.
    PolicyName string
    Automatic snapshot policy name
    RepeatWeekdays []string
    A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example, 1 means Monday.
    RetentionDays int
    Automatic snapshot retention days.
    TimePoints []string
    The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range: 00 to 23, representing 24 time points from 00:00 to 23:00, for example, 01 indicates 01:00.
    policyName String
    Automatic snapshot policy name
    repeatWeekdays List<String>
    A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example, 1 means Monday.
    retentionDays Integer
    Automatic snapshot retention days.
    timePoints List<String>
    The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range: 00 to 23, representing 24 time points from 00:00 to 23:00, for example, 01 indicates 01:00.
    policyName string
    Automatic snapshot policy name
    repeatWeekdays string[]
    A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example, 1 means Monday.
    retentionDays number
    Automatic snapshot retention days.
    timePoints string[]
    The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range: 00 to 23, 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 to 23, representing 24 time points from 00:00 to 23:00, for example, 01 indicates 01:00.
    policyName String
    Automatic snapshot policy name
    repeatWeekdays List<String>
    A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example, 1 means Monday.
    retentionDays Number
    Automatic snapshot retention days.
    timePoints List<String>
    The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range: 00 to 23, 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:

    AppliedDbfsNumber int
    The number of database file systems set by the automatic snapshot policy.
    CreateTime string
    The creation time of the resource
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified string
    Last modification time of automatic snapshot policy
    PolicyId string
    Automatic snapshot policy ID
    Status string
    Automatic snapshot policy status
    StatusDetail string
    Automatic snapshot policy status details
    AppliedDbfsNumber int
    The number of database file systems set by the automatic snapshot policy.
    CreateTime string
    The creation time of the resource
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified string
    Last modification time of automatic snapshot policy
    PolicyId string
    Automatic snapshot policy ID
    Status string
    Automatic snapshot policy status
    StatusDetail string
    Automatic snapshot policy status details
    appliedDbfsNumber Integer
    The number of database file systems set by the automatic snapshot policy.
    createTime String
    The creation time of the resource
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified String
    Last modification time of automatic snapshot policy
    policyId String
    Automatic snapshot policy ID
    status String
    Automatic snapshot policy status
    statusDetail String
    Automatic snapshot policy status details
    appliedDbfsNumber number
    The number of database file systems set by the automatic snapshot policy.
    createTime string
    The creation time of the resource
    id string
    The provider-assigned unique ID for this managed resource.
    lastModified string
    Last modification time of automatic snapshot policy
    policyId string
    Automatic snapshot policy ID
    status string
    Automatic snapshot policy status
    statusDetail string
    Automatic snapshot policy status details
    applied_dbfs_number int
    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
    appliedDbfsNumber Number
    The number of database file systems set by the automatic snapshot policy.
    createTime String
    The creation time of the resource
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified String
    Last modification time of automatic snapshot policy
    policyId String
    Automatic snapshot policy ID
    status String
    Automatic snapshot policy status
    statusDetail 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.
    The following state arguments are supported:
    AppliedDbfsNumber int
    The number of database file systems set by the automatic snapshot policy.
    CreateTime string
    The creation time of the resource
    LastModified string
    Last modification time of automatic snapshot policy
    PolicyId string
    Automatic snapshot policy ID
    PolicyName string
    Automatic snapshot policy name
    RepeatWeekdays List<string>
    A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example, 1 means Monday.
    RetentionDays int
    Automatic snapshot retention days.
    Status string
    Automatic snapshot policy status
    StatusDetail string
    Automatic snapshot policy status details
    TimePoints List<string>
    The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range: 00 to 23, representing 24 time points from 00:00 to 23:00, for example, 01 indicates 01:00.
    AppliedDbfsNumber int
    The number of database file systems set by the automatic snapshot policy.
    CreateTime string
    The creation time of the resource
    LastModified string
    Last modification time of automatic snapshot policy
    PolicyId string
    Automatic snapshot policy ID
    PolicyName string
    Automatic snapshot policy name
    RepeatWeekdays []string
    A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example, 1 means Monday.
    RetentionDays int
    Automatic snapshot retention days.
    Status string
    Automatic snapshot policy status
    StatusDetail string
    Automatic snapshot policy status details
    TimePoints []string
    The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range: 00 to 23, representing 24 time points from 00:00 to 23:00, for example, 01 indicates 01:00.
    appliedDbfsNumber Integer
    The number of database file systems set by the automatic snapshot policy.
    createTime String
    The creation time of the resource
    lastModified String
    Last modification time of automatic snapshot policy
    policyId String
    Automatic snapshot policy ID
    policyName String
    Automatic snapshot policy name
    repeatWeekdays List<String>
    A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example, 1 means Monday.
    retentionDays Integer
    Automatic snapshot retention days.
    status String
    Automatic snapshot policy status
    statusDetail String
    Automatic snapshot policy status details
    timePoints List<String>
    The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range: 00 to 23, representing 24 time points from 00:00 to 23:00, for example, 01 indicates 01:00.
    appliedDbfsNumber number
    The number of database file systems set by the automatic snapshot policy.
    createTime string
    The creation time of the resource
    lastModified string
    Last modification time of automatic snapshot policy
    policyId string
    Automatic snapshot policy ID
    policyName string
    Automatic snapshot policy name
    repeatWeekdays string[]
    A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example, 1 means Monday.
    retentionDays number
    Automatic snapshot retention days.
    status string
    Automatic snapshot policy status
    statusDetail string
    Automatic snapshot policy status details
    timePoints string[]
    The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range: 00 to 23, representing 24 time points from 00:00 to 23:00, for example, 01 indicates 01:00.
    applied_dbfs_number int
    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 to 23, representing 24 time points from 00:00 to 23:00, for example, 01 indicates 01:00.
    appliedDbfsNumber Number
    The number of database file systems set by the automatic snapshot policy.
    createTime String
    The creation time of the resource
    lastModified String
    Last modification time of automatic snapshot policy
    policyId String
    Automatic snapshot policy ID
    policyName String
    Automatic snapshot policy name
    repeatWeekdays List<String>
    A collection of automatic snapshots performed on several days of the week. Value range: 1~7, for example, 1 means Monday.
    retentionDays Number
    Automatic snapshot retention days.
    status String
    Automatic snapshot policy status
    statusDetail String
    Automatic snapshot policy status details
    timePoints List<String>
    The set of times at which the snapshot is taken on the day the automatic snapshot is executed. Value range: 00 to 23, 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.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi