// *** 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;
using Pulumi;

namespace TencentCloudIAC.PulumiPackage.Tencentcloud.Cbs
{
    /// <summary>
    /// Provides a resource to create a CBS snapshot.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var snapshot = new Tencentcloud.Cbs.Snapshot("snapshot", new Tencentcloud.Cbs.SnapshotArgs
    ///         {
    ///             SnapshotName = "unnamed",
    ///             StorageId = "disk-kdt0sq6m",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// CBS snapshot can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Cbs/snapshot:Snapshot snapshot snap-3sa3f39b
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Cbs/snapshot:Snapshot")]
    public partial class Snapshot : Pulumi.CustomResource
    {
        /// <summary>
        /// Creation time of snapshot.
        /// </summary>
        [Output("createTime")]
        public Output<string> CreateTime { get; private set; } = null!;

        /// <summary>
        /// Types of CBS which this snapshot created from.
        /// </summary>
        [Output("diskType")]
        public Output<string> DiskType { get; private set; } = null!;

        /// <summary>
        /// Snapshot creation progress percentage. If the snapshot has created successfully, the constant value is 100.
        /// </summary>
        [Output("percent")]
        public Output<int> Percent { get; private set; } = null!;

        /// <summary>
        /// Name of the snapshot.
        /// </summary>
        [Output("snapshotName")]
        public Output<string> SnapshotName { get; private set; } = null!;

        /// <summary>
        /// Status of the snapshot.
        /// </summary>
        [Output("snapshotStatus")]
        public Output<string> SnapshotStatus { get; private set; } = null!;

        /// <summary>
        /// ID of the the CBS which this snapshot created from.
        /// </summary>
        [Output("storageId")]
        public Output<string> StorageId { get; private set; } = null!;

        /// <summary>
        /// Volume of storage which this snapshot created from.
        /// </summary>
        [Output("storageSize")]
        public Output<int> StorageSize { get; private set; } = null!;

        /// <summary>
        /// cbs snapshot do not support tag now. The available tags within this CBS Snapshot.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;


        /// <summary>
        /// Create a Snapshot resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public Snapshot(string name, SnapshotArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Cbs/snapshot:Snapshot", name, args ?? new SnapshotArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Snapshot(string name, Input<string> id, SnapshotState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Cbs/snapshot:Snapshot", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/tencentcloudstack",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing Snapshot resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static Snapshot Get(string name, Input<string> id, SnapshotState? state = null, CustomResourceOptions? options = null)
        {
            return new Snapshot(name, id, state, options);
        }
    }

    public sealed class SnapshotArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Name of the snapshot.
        /// </summary>
        [Input("snapshotName", required: true)]
        public Input<string> SnapshotName { get; set; } = null!;

        /// <summary>
        /// ID of the the CBS which this snapshot created from.
        /// </summary>
        [Input("storageId", required: true)]
        public Input<string> StorageId { get; set; } = null!;

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// cbs snapshot do not support tag now. The available tags within this CBS Snapshot.
        /// </summary>
        [Obsolete(@"cbs snapshot do not support tag now.")]
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        public SnapshotArgs()
        {
        }
    }

    public sealed class SnapshotState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Creation time of snapshot.
        /// </summary>
        [Input("createTime")]
        public Input<string>? CreateTime { get; set; }

        /// <summary>
        /// Types of CBS which this snapshot created from.
        /// </summary>
        [Input("diskType")]
        public Input<string>? DiskType { get; set; }

        /// <summary>
        /// Snapshot creation progress percentage. If the snapshot has created successfully, the constant value is 100.
        /// </summary>
        [Input("percent")]
        public Input<int>? Percent { get; set; }

        /// <summary>
        /// Name of the snapshot.
        /// </summary>
        [Input("snapshotName")]
        public Input<string>? SnapshotName { get; set; }

        /// <summary>
        /// Status of the snapshot.
        /// </summary>
        [Input("snapshotStatus")]
        public Input<string>? SnapshotStatus { get; set; }

        /// <summary>
        /// ID of the the CBS which this snapshot created from.
        /// </summary>
        [Input("storageId")]
        public Input<string>? StorageId { get; set; }

        /// <summary>
        /// Volume of storage which this snapshot created from.
        /// </summary>
        [Input("storageSize")]
        public Input<int>? StorageSize { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// cbs snapshot do not support tag now. The available tags within this CBS Snapshot.
        /// </summary>
        [Obsolete(@"cbs snapshot do not support tag now.")]
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        public SnapshotState()
        {
        }
    }
}
