// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AliCloud.Hbr
{
    public static class GetSnapshots
    {
        /// <summary>
        /// This data source provides the Hbr Snapshots of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.133.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var defaultEcsBackupPlans = AliCloud.Hbr.GetEcsBackupPlans.Invoke(new()
        ///     {
        ///         NameRegex = "plan-tf-used-dont-delete",
        ///     });
        /// 
        ///     var defaultOssBackupPlans = AliCloud.Hbr.GetOssBackupPlans.Invoke(new()
        ///     {
        ///         NameRegex = "plan-tf-used-dont-delete",
        ///     });
        /// 
        ///     var defaultNasBackupPlans = AliCloud.Hbr.GetNasBackupPlans.Invoke(new()
        ///     {
        ///         NameRegex = "plan-tf-used-dont-delete",
        ///     });
        /// 
        ///     var ecsSnapshots = AliCloud.Hbr.GetSnapshots.Invoke(new()
        ///     {
        ///         SourceType = "ECS_FILE",
        ///         VaultId = defaultEcsBackupPlans.Apply(getEcsBackupPlansResult =&gt; getEcsBackupPlansResult.Plans[0]?.VaultId),
        ///         InstanceId = defaultEcsBackupPlans.Apply(getEcsBackupPlansResult =&gt; getEcsBackupPlansResult.Plans[0]?.InstanceId),
        ///     });
        /// 
        ///     var ossSnapshots = AliCloud.Hbr.GetSnapshots.Invoke(new()
        ///     {
        ///         SourceType = "OSS",
        ///         VaultId = defaultOssBackupPlans.Apply(getOssBackupPlansResult =&gt; getOssBackupPlansResult.Plans[0]?.VaultId),
        ///         Bucket = defaultOssBackupPlans.Apply(getOssBackupPlansResult =&gt; getOssBackupPlansResult.Plans[0]?.Bucket),
        ///         CompleteTime = "2021-07-20T14:17:15CST,2021-07-24T14:17:15CST",
        ///         CompleteTimeChecker = "BETWEEN",
        ///     });
        /// 
        ///     var nasSnapshots = AliCloud.Hbr.GetSnapshots.Invoke(new()
        ///     {
        ///         SourceType = "NAS",
        ///         VaultId = defaultNasBackupPlans.Apply(getNasBackupPlansResult =&gt; getNasBackupPlansResult.Plans[0]?.VaultId),
        ///         FileSystemId = defaultNasBackupPlans.Apply(getNasBackupPlansResult =&gt; getNasBackupPlansResult.Plans[0]?.FileSystemId),
        ///         CreateTime = defaultNasBackupPlans.Apply(getNasBackupPlansResult =&gt; getNasBackupPlansResult.Plans[0]?.CreateTime),
        ///         CompleteTime = "2021-08-23T14:17:15CST",
        ///         CompleteTimeChecker = "GREATER_THAN_OR_EQUAL",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["hbrSnapshotId1"] = nasSnapshots.Apply(getSnapshotsResult =&gt; getSnapshotsResult.Snapshots[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetSnapshotsResult> InvokeAsync(GetSnapshotsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetSnapshotsResult>("alicloud:hbr/getSnapshots:getSnapshots", args ?? new GetSnapshotsArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the Hbr Snapshots of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.133.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var defaultEcsBackupPlans = AliCloud.Hbr.GetEcsBackupPlans.Invoke(new()
        ///     {
        ///         NameRegex = "plan-tf-used-dont-delete",
        ///     });
        /// 
        ///     var defaultOssBackupPlans = AliCloud.Hbr.GetOssBackupPlans.Invoke(new()
        ///     {
        ///         NameRegex = "plan-tf-used-dont-delete",
        ///     });
        /// 
        ///     var defaultNasBackupPlans = AliCloud.Hbr.GetNasBackupPlans.Invoke(new()
        ///     {
        ///         NameRegex = "plan-tf-used-dont-delete",
        ///     });
        /// 
        ///     var ecsSnapshots = AliCloud.Hbr.GetSnapshots.Invoke(new()
        ///     {
        ///         SourceType = "ECS_FILE",
        ///         VaultId = defaultEcsBackupPlans.Apply(getEcsBackupPlansResult =&gt; getEcsBackupPlansResult.Plans[0]?.VaultId),
        ///         InstanceId = defaultEcsBackupPlans.Apply(getEcsBackupPlansResult =&gt; getEcsBackupPlansResult.Plans[0]?.InstanceId),
        ///     });
        /// 
        ///     var ossSnapshots = AliCloud.Hbr.GetSnapshots.Invoke(new()
        ///     {
        ///         SourceType = "OSS",
        ///         VaultId = defaultOssBackupPlans.Apply(getOssBackupPlansResult =&gt; getOssBackupPlansResult.Plans[0]?.VaultId),
        ///         Bucket = defaultOssBackupPlans.Apply(getOssBackupPlansResult =&gt; getOssBackupPlansResult.Plans[0]?.Bucket),
        ///         CompleteTime = "2021-07-20T14:17:15CST,2021-07-24T14:17:15CST",
        ///         CompleteTimeChecker = "BETWEEN",
        ///     });
        /// 
        ///     var nasSnapshots = AliCloud.Hbr.GetSnapshots.Invoke(new()
        ///     {
        ///         SourceType = "NAS",
        ///         VaultId = defaultNasBackupPlans.Apply(getNasBackupPlansResult =&gt; getNasBackupPlansResult.Plans[0]?.VaultId),
        ///         FileSystemId = defaultNasBackupPlans.Apply(getNasBackupPlansResult =&gt; getNasBackupPlansResult.Plans[0]?.FileSystemId),
        ///         CreateTime = defaultNasBackupPlans.Apply(getNasBackupPlansResult =&gt; getNasBackupPlansResult.Plans[0]?.CreateTime),
        ///         CompleteTime = "2021-08-23T14:17:15CST",
        ///         CompleteTimeChecker = "GREATER_THAN_OR_EQUAL",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["hbrSnapshotId1"] = nasSnapshots.Apply(getSnapshotsResult =&gt; getSnapshotsResult.Snapshots[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetSnapshotsResult> Invoke(GetSnapshotsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetSnapshotsResult>("alicloud:hbr/getSnapshots:getSnapshots", args ?? new GetSnapshotsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetSnapshotsArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The name of OSS bucket.
        /// </summary>
        [Input("bucket")]
        public string? Bucket { get; set; }

        /// <summary>
        /// The time when the snapshot completed. UNIX time in seconds.
        /// </summary>
        [Input("completeTime")]
        public string? CompleteTime { get; set; }

        /// <summary>
        /// Complete time filter operator. Optional values: `MATCH_TERM`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN`.
        /// </summary>
        [Input("completeTimeChecker")]
        public string? CompleteTimeChecker { get; set; }

        /// <summary>
        /// File System Creation Time of Nas. Unix Time Seconds.
        /// </summary>
        [Input("createTime")]
        public string? CreateTime { get; set; }

        /// <summary>
        /// The ID of NAS File system.
        /// </summary>
        [Input("fileSystemId")]
        public string? FileSystemId { get; set; }

        [Input("ids")]
        private List<string>? _ids;

        /// <summary>
        /// A list of Snapshot IDs.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

        /// <summary>
        /// The ID of ECS instance.
        /// </summary>
        [Input("instanceId")]
        public string? InstanceId { get; set; }

        [Input("limit")]
        public int? Limit { get; set; }

        [Input("outputFile")]
        public string? OutputFile { get; set; }

        [Input("query")]
        public string? Query { get; set; }

        /// <summary>
        /// Data source type, optional values: `ECS_FILE`, `OSS`, `NAS`.
        /// </summary>
        [Input("sourceType", required: true)]
        public string SourceType { get; set; } = null!;

        /// <summary>
        /// The status of snapshot execution. Possible values: `COMPLETE`, `PARTIAL_COMPLETE`, `FAILED`.
        /// </summary>
        [Input("status")]
        public string? Status { get; set; }

        /// <summary>
        /// The ID of Vault.
        /// </summary>
        [Input("vaultId", required: true)]
        public string VaultId { get; set; } = null!;

        public GetSnapshotsArgs()
        {
        }
        public static new GetSnapshotsArgs Empty => new GetSnapshotsArgs();
    }

    public sealed class GetSnapshotsInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The name of OSS bucket.
        /// </summary>
        [Input("bucket")]
        public Input<string>? Bucket { get; set; }

        /// <summary>
        /// The time when the snapshot completed. UNIX time in seconds.
        /// </summary>
        [Input("completeTime")]
        public Input<string>? CompleteTime { get; set; }

        /// <summary>
        /// Complete time filter operator. Optional values: `MATCH_TERM`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `BETWEEN`.
        /// </summary>
        [Input("completeTimeChecker")]
        public Input<string>? CompleteTimeChecker { get; set; }

        /// <summary>
        /// File System Creation Time of Nas. Unix Time Seconds.
        /// </summary>
        [Input("createTime")]
        public Input<string>? CreateTime { get; set; }

        /// <summary>
        /// The ID of NAS File system.
        /// </summary>
        [Input("fileSystemId")]
        public Input<string>? FileSystemId { get; set; }

        [Input("ids")]
        private InputList<string>? _ids;

        /// <summary>
        /// A list of Snapshot IDs.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

        /// <summary>
        /// The ID of ECS instance.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        [Input("limit")]
        public Input<int>? Limit { get; set; }

        [Input("outputFile")]
        public Input<string>? OutputFile { get; set; }

        [Input("query")]
        public Input<string>? Query { get; set; }

        /// <summary>
        /// Data source type, optional values: `ECS_FILE`, `OSS`, `NAS`.
        /// </summary>
        [Input("sourceType", required: true)]
        public Input<string> SourceType { get; set; } = null!;

        /// <summary>
        /// The status of snapshot execution. Possible values: `COMPLETE`, `PARTIAL_COMPLETE`, `FAILED`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// The ID of Vault.
        /// </summary>
        [Input("vaultId", required: true)]
        public Input<string> VaultId { get; set; } = null!;

        public GetSnapshotsInvokeArgs()
        {
        }
        public static new GetSnapshotsInvokeArgs Empty => new GetSnapshotsInvokeArgs();
    }


    [OutputType]
    public sealed class GetSnapshotsResult
    {
        public readonly string? Bucket;
        public readonly string? CompleteTime;
        public readonly string? CompleteTimeChecker;
        public readonly string? CreateTime;
        public readonly string? FileSystemId;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Ids;
        public readonly string? InstanceId;
        public readonly int? Limit;
        public readonly string? OutputFile;
        public readonly string? Query;
        public readonly ImmutableArray<Outputs.GetSnapshotsSnapshotResult> Snapshots;
        public readonly string SourceType;
        public readonly string? Status;
        public readonly string VaultId;

        [OutputConstructor]
        private GetSnapshotsResult(
            string? bucket,

            string? completeTime,

            string? completeTimeChecker,

            string? createTime,

            string? fileSystemId,

            string id,

            ImmutableArray<string> ids,

            string? instanceId,

            int? limit,

            string? outputFile,

            string? query,

            ImmutableArray<Outputs.GetSnapshotsSnapshotResult> snapshots,

            string sourceType,

            string? status,

            string vaultId)
        {
            Bucket = bucket;
            CompleteTime = completeTime;
            CompleteTimeChecker = completeTimeChecker;
            CreateTime = createTime;
            FileSystemId = fileSystemId;
            Id = id;
            Ids = ids;
            InstanceId = instanceId;
            Limit = limit;
            OutputFile = outputFile;
            Query = query;
            Snapshots = snapshots;
            SourceType = sourceType;
            Status = status;
            VaultId = vaultId;
        }
    }
}
