1. Packages
  2. Alicloud Provider
  3. API Docs
  4. databasefilesystem
  5. getAutoSnapShotPolicies
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.databasefilesystem.getAutoSnapShotPolicies

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    This data source provides Dbfs Auto Snap Shot Policy available to the user.What is Auto Snap Shot Policy

    NOTE: Available in 1.202.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.databasefilesystem.getAutoSnapShotPolicies({
        ids: [defaultAlicloudDbfsAutoSnapShotPolicy.id],
    });
    export const alicloudDbfsAutoSnapShotPolicyExampleId = _default.then(_default => _default.autoSnapShotPolicies?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.databasefilesystem.get_auto_snap_shot_policies(ids=[default_alicloud_dbfs_auto_snap_shot_policy["id"]])
    pulumi.export("alicloudDbfsAutoSnapShotPolicyExampleId", default.auto_snap_shot_policies[0].id)
    
    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 {
    _default, err := databasefilesystem.GetAutoSnapShotPolicies(ctx, &databasefilesystem.GetAutoSnapShotPoliciesArgs{
    Ids: interface{}{
    defaultAlicloudDbfsAutoSnapShotPolicy.Id,
    },
    }, nil);
    if err != nil {
    return err
    }
    ctx.Export("alicloudDbfsAutoSnapShotPolicyExampleId", _default.AutoSnapShotPolicies[0].Id)
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.DatabaseFilesystem.GetAutoSnapShotPolicies.Invoke(new()
        {
            Ids = new[]
            {
                defaultAlicloudDbfsAutoSnapShotPolicy.Id,
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["alicloudDbfsAutoSnapShotPolicyExampleId"] = @default.Apply(@default => @default.Apply(getAutoSnapShotPoliciesResult => getAutoSnapShotPoliciesResult.AutoSnapShotPolicies[0]?.Id)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.databasefilesystem.DatabasefilesystemFunctions;
    import com.pulumi.alicloud.databasefilesystem.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) {
            final var default = DatabasefilesystemFunctions.getAutoSnapShotPolicies(GetAutoSnapShotPoliciesArgs.builder()
                .ids(defaultAlicloudDbfsAutoSnapShotPolicy.id())
                .build());
    
            ctx.export("alicloudDbfsAutoSnapShotPolicyExampleId", default_.autoSnapShotPolicies()[0].id());
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: alicloud:databasefilesystem:getAutoSnapShotPolicies
          Arguments:
            ids:
              - ${defaultAlicloudDbfsAutoSnapShotPolicy.id}
    outputs:
      alicloudDbfsAutoSnapShotPolicyExampleId: ${default.autoSnapShotPolicies[0].id}
    

    Using getAutoSnapShotPolicies

    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 getAutoSnapShotPolicies(args: GetAutoSnapShotPoliciesArgs, opts?: InvokeOptions): Promise<GetAutoSnapShotPoliciesResult>
    function getAutoSnapShotPoliciesOutput(args: GetAutoSnapShotPoliciesOutputArgs, opts?: InvokeOptions): Output<GetAutoSnapShotPoliciesResult>
    def get_auto_snap_shot_policies(ids: Optional[Sequence[str]] = None,
                                    name_regex: Optional[str] = None,
                                    output_file: Optional[str] = None,
                                    page_number: Optional[int] = None,
                                    page_size: Optional[int] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetAutoSnapShotPoliciesResult
    def get_auto_snap_shot_policies_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                    name_regex: Optional[pulumi.Input[str]] = None,
                                    output_file: Optional[pulumi.Input[str]] = None,
                                    page_number: Optional[pulumi.Input[int]] = None,
                                    page_size: Optional[pulumi.Input[int]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetAutoSnapShotPoliciesResult]
    func GetAutoSnapShotPolicies(ctx *Context, args *GetAutoSnapShotPoliciesArgs, opts ...InvokeOption) (*GetAutoSnapShotPoliciesResult, error)
    func GetAutoSnapShotPoliciesOutput(ctx *Context, args *GetAutoSnapShotPoliciesOutputArgs, opts ...InvokeOption) GetAutoSnapShotPoliciesResultOutput

    > Note: This function is named GetAutoSnapShotPolicies in the Go SDK.

    public static class GetAutoSnapShotPolicies 
    {
        public static Task<GetAutoSnapShotPoliciesResult> InvokeAsync(GetAutoSnapShotPoliciesArgs args, InvokeOptions? opts = null)
        public static Output<GetAutoSnapShotPoliciesResult> Invoke(GetAutoSnapShotPoliciesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAutoSnapShotPoliciesResult> getAutoSnapShotPolicies(GetAutoSnapShotPoliciesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:databasefilesystem/getAutoSnapShotPolicies:getAutoSnapShotPolicies
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Auto Snap Shot Policy IDs.
    NameRegex string
    A regex string to filter results by Auto Snap Shot Policy name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    Ids []string
    A list of Auto Snap Shot Policy IDs.
    NameRegex string
    A regex string to filter results by Auto Snap Shot Policy name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    ids List<String>
    A list of Auto Snap Shot Policy IDs.
    nameRegex String
    A regex string to filter results by Auto Snap Shot Policy name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Integer
    pageSize Integer
    ids string[]
    A list of Auto Snap Shot Policy IDs.
    nameRegex string
    A regex string to filter results by Auto Snap Shot Policy name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    pageNumber number
    pageSize number
    ids Sequence[str]
    A list of Auto Snap Shot Policy IDs.
    name_regex str
    A regex string to filter results by Auto Snap Shot Policy name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    page_number int
    page_size int
    ids List<String>
    A list of Auto Snap Shot Policy IDs.
    nameRegex String
    A regex string to filter results by Auto Snap Shot Policy name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Number
    pageSize Number

    getAutoSnapShotPolicies Result

    The following output properties are available:

    AutoSnapShotPolicies List<Pulumi.AliCloud.DatabaseFilesystem.Outputs.GetAutoSnapShotPoliciesAutoSnapShotPolicy>
    A list of Auto Snap Shot Policy Entries. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of Auto Snap Shot Policy IDs.
    Names List<string>
    A list of Auto Snap Shot Policy names.
    NameRegex string
    OutputFile string
    PageNumber int
    PageSize int
    AutoSnapShotPolicies []GetAutoSnapShotPoliciesAutoSnapShotPolicy
    A list of Auto Snap Shot Policy Entries. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of Auto Snap Shot Policy IDs.
    Names []string
    A list of Auto Snap Shot Policy names.
    NameRegex string
    OutputFile string
    PageNumber int
    PageSize int
    autoSnapShotPolicies List<GetAutoSnapShotPoliciesAutoSnapShotPolicy>
    A list of Auto Snap Shot Policy Entries. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Auto Snap Shot Policy IDs.
    names List<String>
    A list of Auto Snap Shot Policy names.
    nameRegex String
    outputFile String
    pageNumber Integer
    pageSize Integer
    autoSnapShotPolicies GetAutoSnapShotPoliciesAutoSnapShotPolicy[]
    A list of Auto Snap Shot Policy Entries. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of Auto Snap Shot Policy IDs.
    names string[]
    A list of Auto Snap Shot Policy names.
    nameRegex string
    outputFile string
    pageNumber number
    pageSize number
    auto_snap_shot_policies Sequence[GetAutoSnapShotPoliciesAutoSnapShotPolicy]
    A list of Auto Snap Shot Policy Entries. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of Auto Snap Shot Policy IDs.
    names Sequence[str]
    A list of Auto Snap Shot Policy names.
    name_regex str
    output_file str
    page_number int
    page_size int
    autoSnapShotPolicies List<Property Map>
    A list of Auto Snap Shot Policy Entries. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Auto Snap Shot Policy IDs.
    names List<String>
    A list of Auto Snap Shot Policy names.
    nameRegex String
    outputFile String
    pageNumber Number
    pageSize Number

    Supporting Types

    GetAutoSnapShotPoliciesAutoSnapShotPolicy

    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 ID of the policy.
    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.
    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.
    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 ID of the policy.
    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.
    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.
    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 ID of the policy.
    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.
    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.
    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 ID of the policy.
    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.
    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.
    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 ID of the policy.
    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.
    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.
    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 ID of the policy.
    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.
    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.

    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.62.1 published on Monday, Sep 16, 2024 by Pulumi