// *** 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.Aviatrix
{
    /// <summary>
    /// The **aviatrix_cloudn_registration** resource allows the registration and deregistration of Aviatrix CloudN as a Gateway. This resource is available as of provider version R2.21+.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Aviatrix = Pulumi.Aviatrix;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     // Create a CloudN Registration
    ///     var testCloudnRegistration = new Aviatrix.AviatrixCloudnRegistration("testCloudnRegistration", new()
    ///     {
    ///         Address = "10.210.38.100",
    ///         LocalAsNumber = "65000",
    ///         Password = "password",
    ///         PrependAsPaths = new[]
    ///         {
    ///             "65000",
    ///             "65000",
    ///         },
    ///         Username = "admin",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// **cloudn_registration** can be imported using the `name`, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import aviatrix:index/aviatrixCloudnRegistration:AviatrixCloudnRegistration test_cloudn_registration name
    /// ```
    /// </summary>
    [AviatrixResourceType("aviatrix:index/aviatrixCloudnRegistration:AviatrixCloudnRegistration")]
    public partial class AviatrixCloudnRegistration : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Aviatrix CloudN's public or private IP. Type: String.
        /// </summary>
        [Output("address")]
        public Output<string> Address { get; private set; } = null!;

        /// <summary>
        /// BGP AS Number to assign to the Transit Gateway. Type: String.
        /// </summary>
        [Output("localAsNumber")]
        public Output<string> LocalAsNumber { get; private set; } = null!;

        /// <summary>
        /// Gateway name to assign to the CloudN device. Type: String.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Aviatrix account password corresponding to above username. Type: String.
        /// </summary>
        [Output("password")]
        public Output<string> Password { get; private set; } = null!;

        /// <summary>
        /// Connection AS Path Prepend customized by specifying AS PATH for a BGP connection. Requires local_as_number to be set. Type: List.
        /// </summary>
        [Output("prependAsPaths")]
        public Output<ImmutableArray<string>> PrependAsPaths { get; private set; } = null!;

        /// <summary>
        /// Aviatrix account username which will be used to log in to Aviatrix CloudN. Type: String.
        /// </summary>
        [Output("username")]
        public Output<string> Username { get; private set; } = null!;


        /// <summary>
        /// Create a AviatrixCloudnRegistration 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 AviatrixCloudnRegistration(string name, AviatrixCloudnRegistrationArgs args, CustomResourceOptions? options = null)
            : base("aviatrix:index/aviatrixCloudnRegistration:AviatrixCloudnRegistration", name, args ?? new AviatrixCloudnRegistrationArgs(), MakeResourceOptions(options, ""))
        {
        }

        private AviatrixCloudnRegistration(string name, Input<string> id, AviatrixCloudnRegistrationState? state = null, CustomResourceOptions? options = null)
            : base("aviatrix:index/aviatrixCloudnRegistration:AviatrixCloudnRegistration", 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/astipkovits",
                AdditionalSecretOutputs =
                {
                    "password",
                },
            };
            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 AviatrixCloudnRegistration 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 AviatrixCloudnRegistration Get(string name, Input<string> id, AviatrixCloudnRegistrationState? state = null, CustomResourceOptions? options = null)
        {
            return new AviatrixCloudnRegistration(name, id, state, options);
        }
    }

    public sealed class AviatrixCloudnRegistrationArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Aviatrix CloudN's public or private IP. Type: String.
        /// </summary>
        [Input("address", required: true)]
        public Input<string> Address { get; set; } = null!;

        /// <summary>
        /// BGP AS Number to assign to the Transit Gateway. Type: String.
        /// </summary>
        [Input("localAsNumber")]
        public Input<string>? LocalAsNumber { get; set; }

        /// <summary>
        /// Gateway name to assign to the CloudN device. Type: String.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("password", required: true)]
        private Input<string>? _password;

        /// <summary>
        /// Aviatrix account password corresponding to above username. Type: String.
        /// </summary>
        public Input<string>? Password
        {
            get => _password;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _password = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        [Input("prependAsPaths")]
        private InputList<string>? _prependAsPaths;

        /// <summary>
        /// Connection AS Path Prepend customized by specifying AS PATH for a BGP connection. Requires local_as_number to be set. Type: List.
        /// </summary>
        public InputList<string> PrependAsPaths
        {
            get => _prependAsPaths ?? (_prependAsPaths = new InputList<string>());
            set => _prependAsPaths = value;
        }

        /// <summary>
        /// Aviatrix account username which will be used to log in to Aviatrix CloudN. Type: String.
        /// </summary>
        [Input("username", required: true)]
        public Input<string> Username { get; set; } = null!;

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

    public sealed class AviatrixCloudnRegistrationState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Aviatrix CloudN's public or private IP. Type: String.
        /// </summary>
        [Input("address")]
        public Input<string>? Address { get; set; }

        /// <summary>
        /// BGP AS Number to assign to the Transit Gateway. Type: String.
        /// </summary>
        [Input("localAsNumber")]
        public Input<string>? LocalAsNumber { get; set; }

        /// <summary>
        /// Gateway name to assign to the CloudN device. Type: String.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("password")]
        private Input<string>? _password;

        /// <summary>
        /// Aviatrix account password corresponding to above username. Type: String.
        /// </summary>
        public Input<string>? Password
        {
            get => _password;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _password = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        [Input("prependAsPaths")]
        private InputList<string>? _prependAsPaths;

        /// <summary>
        /// Connection AS Path Prepend customized by specifying AS PATH for a BGP connection. Requires local_as_number to be set. Type: List.
        /// </summary>
        public InputList<string> PrependAsPaths
        {
            get => _prependAsPaths ?? (_prependAsPaths = new InputList<string>());
            set => _prependAsPaths = value;
        }

        /// <summary>
        /// Aviatrix account username which will be used to log in to Aviatrix CloudN. Type: String.
        /// </summary>
        [Input("username")]
        public Input<string>? Username { get; set; }

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