<reponame>pierskarsenbarg/pulumi-nutanix<filename>sdk/dotnet/FloatingIp.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 PiersKarsenbarg.Nutanix
{
    /// <summary>
    /// Provides Nutanix resource to create Floating IPs.
    /// 
    /// ## create Floating IP with External Subnet UUID
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Nutanix = PiersKarsenbarg.Nutanix;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var fip1 = new Nutanix.FloatingIp("fip1", new Nutanix.FloatingIpArgs
    ///         {
    ///             ExternalSubnetReferenceUuid = "{{ext_sub_uuid}}",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## create Floating IP with vpc name with external subnet name
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Nutanix = PiersKarsenbarg.Nutanix;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var fip2 = new Nutanix.FloatingIp("fip2", new Nutanix.FloatingIpArgs
    ///         {
    ///             ExternalSubnetReferenceName = "{{ext_sub_name}}",
    ///             PrivateIp = "{{ip_address}}",
    ///             VpcReferenceName = "{{vpc_name}}",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// </summary>
    [NutanixResourceType("nutanix:index/floatingIp:FloatingIp")]
    public partial class FloatingIp : Pulumi.CustomResource
    {
        /// <summary>
        /// The version of the API.
        /// </summary>
        [Output("apiVersion")]
        public Output<string> ApiVersion { get; private set; } = null!;

        /// <summary>
        /// The reference to a subnet. Should not be used with 
        /// {external_subnet_reference_uuid} .
        /// </summary>
        [Output("externalSubnetReferenceName")]
        public Output<string?> ExternalSubnetReferenceName { get; private set; } = null!;

        /// <summary>
        /// The reference to a subnet. Should not be used with {external_subnet_reference_name} .
        /// </summary>
        [Output("externalSubnetReferenceUuid")]
        public Output<string> ExternalSubnetReferenceUuid { get; private set; } = null!;

        /// <summary>
        /// The floating_ips kind metadata.
        /// </summary>
        [Output("metadata")]
        public Output<ImmutableDictionary<string, string>> Metadata { get; private set; } = null!;

        /// <summary>
        /// Private IP with which floating IP is associated. Should be used with vpc_reference .
        /// </summary>
        [Output("privateIp")]
        public Output<string?> PrivateIp { get; private set; } = null!;

        /// <summary>
        /// The reference to a vm_nic .
        /// </summary>
        [Output("vmNicReferenceUuid")]
        public Output<string?> VmNicReferenceUuid { get; private set; } = null!;

        /// <summary>
        /// The reference to a vpc. Should not be used with {vpc_reference_uuid}.
        /// </summary>
        [Output("vpcReferenceName")]
        public Output<string?> VpcReferenceName { get; private set; } = null!;

        /// <summary>
        /// The reference to a vpc. Should not be used with {vpc_reference_name}.
        /// </summary>
        [Output("vpcReferenceUuid")]
        public Output<string> VpcReferenceUuid { get; private set; } = null!;


        /// <summary>
        /// Create a FloatingIp 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 FloatingIp(string name, FloatingIpArgs? args = null, CustomResourceOptions? options = null)
            : base("nutanix:index/floatingIp:FloatingIp", name, args ?? new FloatingIpArgs(), MakeResourceOptions(options, ""))
        {
        }

        private FloatingIp(string name, Input<string> id, FloatingIpState? state = null, CustomResourceOptions? options = null)
            : base("nutanix:index/floatingIp:FloatingIp", 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/pierskarsenbarg/pulumi-nutanix/releases/download/${VERSION}",
            };
            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 FloatingIp 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 FloatingIp Get(string name, Input<string> id, FloatingIpState? state = null, CustomResourceOptions? options = null)
        {
            return new FloatingIp(name, id, state, options);
        }
    }

    public sealed class FloatingIpArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// The version of the API.
        /// </summary>
        [Input("apiVersion")]
        public Input<string>? ApiVersion { get; set; }

        /// <summary>
        /// The reference to a subnet. Should not be used with 
        /// {external_subnet_reference_uuid} .
        /// </summary>
        [Input("externalSubnetReferenceName")]
        public Input<string>? ExternalSubnetReferenceName { get; set; }

        /// <summary>
        /// The reference to a subnet. Should not be used with {external_subnet_reference_name} .
        /// </summary>
        [Input("externalSubnetReferenceUuid")]
        public Input<string>? ExternalSubnetReferenceUuid { get; set; }

        /// <summary>
        /// Private IP with which floating IP is associated. Should be used with vpc_reference .
        /// </summary>
        [Input("privateIp")]
        public Input<string>? PrivateIp { get; set; }

        /// <summary>
        /// The reference to a vm_nic .
        /// </summary>
        [Input("vmNicReferenceUuid")]
        public Input<string>? VmNicReferenceUuid { get; set; }

        /// <summary>
        /// The reference to a vpc. Should not be used with {vpc_reference_uuid}.
        /// </summary>
        [Input("vpcReferenceName")]
        public Input<string>? VpcReferenceName { get; set; }

        /// <summary>
        /// The reference to a vpc. Should not be used with {vpc_reference_name}.
        /// </summary>
        [Input("vpcReferenceUuid")]
        public Input<string>? VpcReferenceUuid { get; set; }

        public FloatingIpArgs()
        {
        }
    }

    public sealed class FloatingIpState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// The version of the API.
        /// </summary>
        [Input("apiVersion")]
        public Input<string>? ApiVersion { get; set; }

        /// <summary>
        /// The reference to a subnet. Should not be used with 
        /// {external_subnet_reference_uuid} .
        /// </summary>
        [Input("externalSubnetReferenceName")]
        public Input<string>? ExternalSubnetReferenceName { get; set; }

        /// <summary>
        /// The reference to a subnet. Should not be used with {external_subnet_reference_name} .
        /// </summary>
        [Input("externalSubnetReferenceUuid")]
        public Input<string>? ExternalSubnetReferenceUuid { get; set; }

        [Input("metadata")]
        private InputMap<string>? _metadata;

        /// <summary>
        /// The floating_ips kind metadata.
        /// </summary>
        public InputMap<string> Metadata
        {
            get => _metadata ?? (_metadata = new InputMap<string>());
            set => _metadata = value;
        }

        /// <summary>
        /// Private IP with which floating IP is associated. Should be used with vpc_reference .
        /// </summary>
        [Input("privateIp")]
        public Input<string>? PrivateIp { get; set; }

        /// <summary>
        /// The reference to a vm_nic .
        /// </summary>
        [Input("vmNicReferenceUuid")]
        public Input<string>? VmNicReferenceUuid { get; set; }

        /// <summary>
        /// The reference to a vpc. Should not be used with {vpc_reference_uuid}.
        /// </summary>
        [Input("vpcReferenceName")]
        public Input<string>? VpcReferenceName { get; set; }

        /// <summary>
        /// The reference to a vpc. Should not be used with {vpc_reference_name}.
        /// </summary>
        [Input("vpcReferenceUuid")]
        public Input<string>? VpcReferenceUuid { get; set; }

        public FloatingIpState()
        {
        }
    }
}
