1. Packages
  2. Volcengine
  3. API Docs
  4. nas
  5. AutoSnapshotPolicies
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

volcengine.nas.AutoSnapshotPolicies

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine
    Deprecated: volcengine.nas.AutoSnapshotPolicies has been deprecated in favor of volcengine.nas.getAutoSnapshotPolicies

    Use this data source to query detailed information of nas auto snapshot policies

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    import * as volcengine from "@volcengine/pulumi";
    
    const fooAutoSnapshotPolicy = new volcengine.nas.AutoSnapshotPolicy("fooAutoSnapshotPolicy", {
        autoSnapshotPolicyName: "acc-test-auto_snapshot_policy",
        repeatWeekdays: "1,3,5,7",
        timePoints: "0,7,17",
        retentionDays: 20,
    });
    const fooAutoSnapshotPolicies = volcengine.nas.getAutoSnapshotPoliciesOutput({
        autoSnapshotPolicyId: fooAutoSnapshotPolicy.id,
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_auto_snapshot_policy = volcengine.nas.AutoSnapshotPolicy("fooAutoSnapshotPolicy",
        auto_snapshot_policy_name="acc-test-auto_snapshot_policy",
        repeat_weekdays="1,3,5,7",
        time_points="0,7,17",
        retention_days=20)
    foo_auto_snapshot_policies = volcengine.nas.get_auto_snapshot_policies_output(auto_snapshot_policy_id=foo_auto_snapshot_policy.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/nas"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooAutoSnapshotPolicy, err := nas.NewAutoSnapshotPolicy(ctx, "fooAutoSnapshotPolicy", &nas.AutoSnapshotPolicyArgs{
    			AutoSnapshotPolicyName: pulumi.String("acc-test-auto_snapshot_policy"),
    			RepeatWeekdays:         pulumi.String("1,3,5,7"),
    			TimePoints:             pulumi.String("0,7,17"),
    			RetentionDays:          pulumi.Int(20),
    		})
    		if err != nil {
    			return err
    		}
    		_ = nas.GetAutoSnapshotPoliciesOutput(ctx, nas.GetAutoSnapshotPoliciesOutputArgs{
    			AutoSnapshotPolicyId: fooAutoSnapshotPolicy.ID(),
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var fooAutoSnapshotPolicy = new Volcengine.Nas.AutoSnapshotPolicy("fooAutoSnapshotPolicy", new()
        {
            AutoSnapshotPolicyName = "acc-test-auto_snapshot_policy",
            RepeatWeekdays = "1,3,5,7",
            TimePoints = "0,7,17",
            RetentionDays = 20,
        });
    
        var fooAutoSnapshotPolicies = Volcengine.Nas.GetAutoSnapshotPolicies.Invoke(new()
        {
            AutoSnapshotPolicyId = fooAutoSnapshotPolicy.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.nas.AutoSnapshotPolicy;
    import com.pulumi.volcengine.nas.AutoSnapshotPolicyArgs;
    import com.pulumi.volcengine.nas.NasFunctions;
    import com.pulumi.volcengine.nas.inputs.GetAutoSnapshotPoliciesArgs;
    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 fooAutoSnapshotPolicy = new AutoSnapshotPolicy("fooAutoSnapshotPolicy", AutoSnapshotPolicyArgs.builder()        
                .autoSnapshotPolicyName("acc-test-auto_snapshot_policy")
                .repeatWeekdays("1,3,5,7")
                .timePoints("0,7,17")
                .retentionDays(20)
                .build());
    
            final var fooAutoSnapshotPolicies = NasFunctions.getAutoSnapshotPolicies(GetAutoSnapshotPoliciesArgs.builder()
                .autoSnapshotPolicyId(fooAutoSnapshotPolicy.id())
                .build());
    
        }
    }
    
    resources:
      fooAutoSnapshotPolicy:
        type: volcengine:nas:AutoSnapshotPolicy
        properties:
          autoSnapshotPolicyName: acc-test-auto_snapshot_policy
          repeatWeekdays: 1,3,5,7
          timePoints: 0,7,17
          retentionDays: 20
    variables:
      fooAutoSnapshotPolicies:
        fn::invoke:
          Function: volcengine:nas:getAutoSnapshotPolicies
          Arguments:
            autoSnapshotPolicyId: ${fooAutoSnapshotPolicy.id}
    

    Using AutoSnapshotPolicies

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function autoSnapshotPolicies(args: AutoSnapshotPoliciesArgs, opts?: InvokeOptions): Promise<AutoSnapshotPoliciesResult>
    function autoSnapshotPoliciesOutput(args: AutoSnapshotPoliciesOutputArgs, opts?: InvokeOptions): Output<AutoSnapshotPoliciesResult>
    def auto_snapshot_policies(auto_snapshot_policy_id: Optional[str] = None,
                               auto_snapshot_policy_name: Optional[str] = None,
                               name_regex: Optional[str] = None,
                               output_file: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> AutoSnapshotPoliciesResult
    def auto_snapshot_policies_output(auto_snapshot_policy_id: Optional[pulumi.Input[str]] = None,
                               auto_snapshot_policy_name: Optional[pulumi.Input[str]] = None,
                               name_regex: Optional[pulumi.Input[str]] = None,
                               output_file: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[AutoSnapshotPoliciesResult]
    func AutoSnapshotPolicies(ctx *Context, args *AutoSnapshotPoliciesArgs, opts ...InvokeOption) (*AutoSnapshotPoliciesResult, error)
    func AutoSnapshotPoliciesOutput(ctx *Context, args *AutoSnapshotPoliciesOutputArgs, opts ...InvokeOption) AutoSnapshotPoliciesResultOutput
    public static class AutoSnapshotPolicies 
    {
        public static Task<AutoSnapshotPoliciesResult> InvokeAsync(AutoSnapshotPoliciesArgs args, InvokeOptions? opts = null)
        public static Output<AutoSnapshotPoliciesResult> Invoke(AutoSnapshotPoliciesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<AutoSnapshotPoliciesResult> autoSnapshotPolicies(AutoSnapshotPoliciesArgs args, InvokeOptions options)
    public static Output<AutoSnapshotPoliciesResult> autoSnapshotPolicies(AutoSnapshotPoliciesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:nas:AutoSnapshotPolicies
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AutoSnapshotPolicyId string
    The id of auto snapshot policy.
    AutoSnapshotPolicyName string
    The name of auto snapshot policy.
    NameRegex string
    A Name Regex of Resource.
    OutputFile string
    File name where to save data source results.
    AutoSnapshotPolicyId string
    The id of auto snapshot policy.
    AutoSnapshotPolicyName string
    The name of auto snapshot policy.
    NameRegex string
    A Name Regex of Resource.
    OutputFile string
    File name where to save data source results.
    autoSnapshotPolicyId String
    The id of auto snapshot policy.
    autoSnapshotPolicyName String
    The name of auto snapshot policy.
    nameRegex String
    A Name Regex of Resource.
    outputFile String
    File name where to save data source results.
    autoSnapshotPolicyId string
    The id of auto snapshot policy.
    autoSnapshotPolicyName string
    The name of auto snapshot policy.
    nameRegex string
    A Name Regex of Resource.
    outputFile string
    File name where to save data source results.
    auto_snapshot_policy_id str
    The id of auto snapshot policy.
    auto_snapshot_policy_name str
    The name of auto snapshot policy.
    name_regex str
    A Name Regex of Resource.
    output_file str
    File name where to save data source results.
    autoSnapshotPolicyId String
    The id of auto snapshot policy.
    autoSnapshotPolicyName String
    The name of auto snapshot policy.
    nameRegex String
    A Name Regex of Resource.
    outputFile String
    File name where to save data source results.

    AutoSnapshotPolicies Result

    The following output properties are available:

    AutoSnapshotPolices List<AutoSnapshotPoliciesAutoSnapshotPolice>
    The collection of query.
    Id string
    The provider-assigned unique ID for this managed resource.
    TotalCount int
    The total count of query.
    AutoSnapshotPolicyId string
    The ID of auto snapshot policy.
    AutoSnapshotPolicyName string
    The name of auto snapshot policy.
    NameRegex string
    OutputFile string
    AutoSnapshotPolices []AutoSnapshotPoliciesAutoSnapshotPolice
    The collection of query.
    Id string
    The provider-assigned unique ID for this managed resource.
    TotalCount int
    The total count of query.
    AutoSnapshotPolicyId string
    The ID of auto snapshot policy.
    AutoSnapshotPolicyName string
    The name of auto snapshot policy.
    NameRegex string
    OutputFile string
    autoSnapshotPolices List<AutoSnapshotPoliciesAutoSnapshotPolice>
    The collection of query.
    id String
    The provider-assigned unique ID for this managed resource.
    totalCount Integer
    The total count of query.
    autoSnapshotPolicyId String
    The ID of auto snapshot policy.
    autoSnapshotPolicyName String
    The name of auto snapshot policy.
    nameRegex String
    outputFile String
    autoSnapshotPolices AutoSnapshotPoliciesAutoSnapshotPolice[]
    The collection of query.
    id string
    The provider-assigned unique ID for this managed resource.
    totalCount number
    The total count of query.
    autoSnapshotPolicyId string
    The ID of auto snapshot policy.
    autoSnapshotPolicyName string
    The name of auto snapshot policy.
    nameRegex string
    outputFile string
    auto_snapshot_polices Sequence[AutoSnapshotPoliciesAutoSnapshotPolice]
    The collection of query.
    id str
    The provider-assigned unique ID for this managed resource.
    total_count int
    The total count of query.
    auto_snapshot_policy_id str
    The ID of auto snapshot policy.
    auto_snapshot_policy_name str
    The name of auto snapshot policy.
    name_regex str
    output_file str
    autoSnapshotPolices List<Property Map>
    The collection of query.
    id String
    The provider-assigned unique ID for this managed resource.
    totalCount Number
    The total count of query.
    autoSnapshotPolicyId String
    The ID of auto snapshot policy.
    autoSnapshotPolicyName String
    The name of auto snapshot policy.
    nameRegex String
    outputFile String

    Supporting Types

    AutoSnapshotPoliciesAutoSnapshotPolice

    AutoSnapshotPolicyId string
    The id of auto snapshot policy.
    AutoSnapshotPolicyName string
    The name of auto snapshot policy.
    CreateTime string
    The create time of auto snapshot policy.
    FileSystemCount int
    The count of file system which auto snapshot policy bind.
    Id string
    The ID of auto snapshot policy.
    RepeatWeekdays string
    The repeat weekdays of auto snapshot policy. Unit: day.
    RetentionDays int
    The retention days of auto snapshot policy. Unit: day.
    Status string
    The status of auto snapshot policy.
    TimePoints string
    The time points of auto snapshot policy. Unit: hour.
    AutoSnapshotPolicyId string
    The id of auto snapshot policy.
    AutoSnapshotPolicyName string
    The name of auto snapshot policy.
    CreateTime string
    The create time of auto snapshot policy.
    FileSystemCount int
    The count of file system which auto snapshot policy bind.
    Id string
    The ID of auto snapshot policy.
    RepeatWeekdays string
    The repeat weekdays of auto snapshot policy. Unit: day.
    RetentionDays int
    The retention days of auto snapshot policy. Unit: day.
    Status string
    The status of auto snapshot policy.
    TimePoints string
    The time points of auto snapshot policy. Unit: hour.
    autoSnapshotPolicyId String
    The id of auto snapshot policy.
    autoSnapshotPolicyName String
    The name of auto snapshot policy.
    createTime String
    The create time of auto snapshot policy.
    fileSystemCount Integer
    The count of file system which auto snapshot policy bind.
    id String
    The ID of auto snapshot policy.
    repeatWeekdays String
    The repeat weekdays of auto snapshot policy. Unit: day.
    retentionDays Integer
    The retention days of auto snapshot policy. Unit: day.
    status String
    The status of auto snapshot policy.
    timePoints String
    The time points of auto snapshot policy. Unit: hour.
    autoSnapshotPolicyId string
    The id of auto snapshot policy.
    autoSnapshotPolicyName string
    The name of auto snapshot policy.
    createTime string
    The create time of auto snapshot policy.
    fileSystemCount number
    The count of file system which auto snapshot policy bind.
    id string
    The ID of auto snapshot policy.
    repeatWeekdays string
    The repeat weekdays of auto snapshot policy. Unit: day.
    retentionDays number
    The retention days of auto snapshot policy. Unit: day.
    status string
    The status of auto snapshot policy.
    timePoints string
    The time points of auto snapshot policy. Unit: hour.
    auto_snapshot_policy_id str
    The id of auto snapshot policy.
    auto_snapshot_policy_name str
    The name of auto snapshot policy.
    create_time str
    The create time of auto snapshot policy.
    file_system_count int
    The count of file system which auto snapshot policy bind.
    id str
    The ID of auto snapshot policy.
    repeat_weekdays str
    The repeat weekdays of auto snapshot policy. Unit: day.
    retention_days int
    The retention days of auto snapshot policy. Unit: day.
    status str
    The status of auto snapshot policy.
    time_points str
    The time points of auto snapshot policy. Unit: hour.
    autoSnapshotPolicyId String
    The id of auto snapshot policy.
    autoSnapshotPolicyName String
    The name of auto snapshot policy.
    createTime String
    The create time of auto snapshot policy.
    fileSystemCount Number
    The count of file system which auto snapshot policy bind.
    id String
    The ID of auto snapshot policy.
    repeatWeekdays String
    The repeat weekdays of auto snapshot policy. Unit: day.
    retentionDays Number
    The retention days of auto snapshot policy. Unit: day.
    status String
    The status of auto snapshot policy.
    timePoints String
    The time points of auto snapshot policy. Unit: hour.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine