<filename>sdk/dotnet/MetalVlan.cs// *** 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 Cuemby.Equinix
{
    /// <summary>
    /// Provides a resource to allow users to manage Virtual Networks in their projects.
    /// 
    /// To learn more about Layer 2 networking in Equinix Metal, refer to
    /// 
    /// * &lt;https://metal.equinix.com/developers/docs/networking/layer2/&gt;
    /// * &lt;https://metal.equinix.com/developers/docs/networking/layer2-configs/&gt;
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Equinix = Cuemby.Equinix;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         // Create a new VLAN in facility "sv15"
    ///         var vlan1MetalVlan = new Equinix.MetalVlan("vlan1MetalVlan", new Equinix.MetalVlanArgs
    ///         {
    ///             Description = "VLAN in New Jersey",
    ///             Facility = "sv15",
    ///             ProjectId = local.Project_id,
    ///         });
    ///         // Create a new VLAN in metro "esv"
    ///         var vlan1Index_metalVlanMetalVlan = new Equinix.MetalVlan("vlan1Index/metalVlanMetalVlan", new Equinix.MetalVlanArgs
    ///         {
    ///             Description = "VLAN in New Jersey",
    ///             Metro = "sv",
    ///             ProjectId = local.Project_id,
    ///             Vxlan = 1040,
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// This resource can be imported using an existing VLAN ID (UUID)
    /// 
    /// ```sh
    ///  $ pulumi import equinix:index/metalVlan:MetalVlan equinix_metal_vlan {existing_vlan_id}
    /// ```
    /// </summary>
    [EquinixResourceType("equinix:index/metalVlan:MetalVlan")]
    public partial class MetalVlan : Pulumi.CustomResource
    {
        /// <summary>
        /// Description string.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// Facility where to create the VLAN.
        /// </summary>
        [Output("facility")]
        public Output<string?> Facility { get; private set; } = null!;

        [Output("metro")]
        public Output<string?> Metro { get; private set; } = null!;

        /// <summary>
        /// ID of parent project.
        /// </summary>
        [Output("projectId")]
        public Output<string> ProjectId { get; private set; } = null!;

        /// <summary>
        /// VLAN ID, must be unique in metro.
        /// </summary>
        [Output("vxlan")]
        public Output<int> Vxlan { get; private set; } = null!;


        /// <summary>
        /// Create a MetalVlan 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 MetalVlan(string name, MetalVlanArgs args, CustomResourceOptions? options = null)
            : base("equinix:index/metalVlan:MetalVlan", name, args ?? new MetalVlanArgs(), MakeResourceOptions(options, ""))
        {
        }

        private MetalVlan(string name, Input<string> id, MetalVlanState? state = null, CustomResourceOptions? options = null)
            : base("equinix:index/metalVlan:MetalVlan", 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/cuemby",
            };
            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 MetalVlan 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 MetalVlan Get(string name, Input<string> id, MetalVlanState? state = null, CustomResourceOptions? options = null)
        {
            return new MetalVlan(name, id, state, options);
        }
    }

    public sealed class MetalVlanArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Description string.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Facility where to create the VLAN.
        /// </summary>
        [Input("facility")]
        public Input<string>? Facility { get; set; }

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

        /// <summary>
        /// ID of parent project.
        /// </summary>
        [Input("projectId", required: true)]
        public Input<string> ProjectId { get; set; } = null!;

        /// <summary>
        /// VLAN ID, must be unique in metro.
        /// </summary>
        [Input("vxlan")]
        public Input<int>? Vxlan { get; set; }

        public MetalVlanArgs()
        {
        }
    }

    public sealed class MetalVlanState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Description string.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Facility where to create the VLAN.
        /// </summary>
        [Input("facility")]
        public Input<string>? Facility { get; set; }

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

        /// <summary>
        /// ID of parent project.
        /// </summary>
        [Input("projectId")]
        public Input<string>? ProjectId { get; set; }

        /// <summary>
        /// VLAN ID, must be unique in metro.
        /// </summary>
        [Input("vxlan")]
        public Input<int>? Vxlan { get; set; }

        public MetalVlanState()
        {
        }
    }
}
