// *** 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.Yandex
{
    /// <summary>
    /// Yandex Cloud Lockbox secret vesrion resource. For more information, see
    /// [the official documentation](https://cloud.yandex.com/en/docs/lockbox/).
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Yandex = Pulumi.Yandex;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var mySecret = new Yandex.LockboxSecret("mySecret");
    /// 
    ///     var myVersion = new Yandex.LockboxSecretVersion("myVersion", new()
    ///     {
    ///         SecretId = mySecret.Id,
    ///         Entries = new[]
    ///         {
    ///             new Yandex.Inputs.LockboxSecretVersionEntryArgs
    ///             {
    ///                 Key = "key1",
    ///                 TextValue = "value1",
    ///             },
    ///             new Yandex.Inputs.LockboxSecretVersionEntryArgs
    ///             {
    ///                 Key = "k2",
    ///                 Command = new Yandex.Inputs.LockboxSecretVersionEntryCommandArgs
    ///                 {
    ///                     Path = "my_secret_generator.sh",
    ///                 },
    ///             },
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// </summary>
    [YandexResourceType("yandex:index/lockboxSecretVersion:lockboxSecretVersion")]
    public partial class LockboxSecretVersion : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The Yandex Cloud Lockbox secret version description.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// List of entries in the Yandex Cloud Lockbox secret version.
        /// </summary>
        [Output("entries")]
        public Output<ImmutableArray<Outputs.LockboxSecretVersionEntry>> Entries { get; private set; } = null!;

        /// <summary>
        /// The Yandex Cloud Lockbox secret ID where to add the version.
        /// </summary>
        [Output("secretId")]
        public Output<string> SecretId { get; private set; } = null!;


        /// <summary>
        /// Create a LockboxSecretVersion 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 LockboxSecretVersion(string name, LockboxSecretVersionArgs args, CustomResourceOptions? options = null)
            : base("yandex:index/lockboxSecretVersion:lockboxSecretVersion", name, args ?? new LockboxSecretVersionArgs(), MakeResourceOptions(options, ""))
        {
        }

        private LockboxSecretVersion(string name, Input<string> id, LockboxSecretVersionState? state = null, CustomResourceOptions? options = null)
            : base("yandex:index/lockboxSecretVersion:lockboxSecretVersion", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "https://github.com/regrau/pulumi-yandex/releases",
            };
            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 LockboxSecretVersion 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 LockboxSecretVersion Get(string name, Input<string> id, LockboxSecretVersionState? state = null, CustomResourceOptions? options = null)
        {
            return new LockboxSecretVersion(name, id, state, options);
        }
    }

    public sealed class LockboxSecretVersionArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The Yandex Cloud Lockbox secret version description.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        [Input("entries", required: true)]
        private InputList<Inputs.LockboxSecretVersionEntryArgs>? _entries;

        /// <summary>
        /// List of entries in the Yandex Cloud Lockbox secret version.
        /// </summary>
        public InputList<Inputs.LockboxSecretVersionEntryArgs> Entries
        {
            get => _entries ?? (_entries = new InputList<Inputs.LockboxSecretVersionEntryArgs>());
            set => _entries = value;
        }

        /// <summary>
        /// The Yandex Cloud Lockbox secret ID where to add the version.
        /// </summary>
        [Input("secretId", required: true)]
        public Input<string> SecretId { get; set; } = null!;

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

    public sealed class LockboxSecretVersionState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The Yandex Cloud Lockbox secret version description.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        [Input("entries")]
        private InputList<Inputs.LockboxSecretVersionEntryGetArgs>? _entries;

        /// <summary>
        /// List of entries in the Yandex Cloud Lockbox secret version.
        /// </summary>
        public InputList<Inputs.LockboxSecretVersionEntryGetArgs> Entries
        {
            get => _entries ?? (_entries = new InputList<Inputs.LockboxSecretVersionEntryGetArgs>());
            set => _entries = value;
        }

        /// <summary>
        /// The Yandex Cloud Lockbox secret ID where to add the version.
        /// </summary>
        [Input("secretId")]
        public Input<string>? SecretId { get; set; }

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