<reponame>rhysmdnz/pulumi-alicloud-rhys-hacks<gh_stars>0// *** 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.AliCloud.Ecs
{
    public static class GetEcsNetworkInterfaces
    {
        /// <summary>
        /// This data source provides the Ecs Network Interfaces of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.123.1+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.Ecs.GetEcsNetworkInterfaces.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             "eni-abcd1234",
        ///         },
        ///         NameRegex = "tf-testAcc",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstEcsNetworkInterfaceId"] = example.Apply(getEcsNetworkInterfacesResult =&gt; getEcsNetworkInterfacesResult.Interfaces[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetEcsNetworkInterfacesResult> InvokeAsync(GetEcsNetworkInterfacesArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetEcsNetworkInterfacesResult>("alicloud:ecs/getEcsNetworkInterfaces:getEcsNetworkInterfaces", args ?? new GetEcsNetworkInterfacesArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the Ecs Network Interfaces of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.123.1+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.Ecs.GetEcsNetworkInterfaces.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             "eni-abcd1234",
        ///         },
        ///         NameRegex = "tf-testAcc",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstEcsNetworkInterfaceId"] = example.Apply(getEcsNetworkInterfacesResult =&gt; getEcsNetworkInterfacesResult.Interfaces[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetEcsNetworkInterfacesResult> Invoke(GetEcsNetworkInterfacesInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetEcsNetworkInterfacesResult>("alicloud:ecs/getEcsNetworkInterfaces:getEcsNetworkInterfaces", args ?? new GetEcsNetworkInterfacesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetEcsNetworkInterfacesArgs : global::Pulumi.InvokeArgs
    {
        [Input("ids")]
        private List<string>? _ids;

        /// <summary>
        /// A list of Network Interface IDs.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

        /// <summary>
        /// The instance id.
        /// </summary>
        [Input("instanceId")]
        public string? InstanceId { get; set; }

        /// <summary>
        /// The network interface name.
        /// </summary>
        [Input("name")]
        public string? Name { get; set; }

        /// <summary>
        /// A regex string to filter results by Network Interface name.
        /// </summary>
        [Input("nameRegex")]
        public string? NameRegex { get; set; }

        /// <summary>
        /// The network interface name.
        /// </summary>
        [Input("networkInterfaceName")]
        public string? NetworkInterfaceName { get; set; }

        [Input("outputFile")]
        public string? OutputFile { get; set; }

        /// <summary>
        /// The primary private IP address of the ENI.
        /// </summary>
        [Input("primaryIpAddress")]
        public string? PrimaryIpAddress { get; set; }

        /// <summary>
        /// The primary private IP address of the ENI.
        /// </summary>
        [Input("privateIp")]
        public string? PrivateIp { get; set; }

        /// <summary>
        /// The resource group id.
        /// </summary>
        [Input("resourceGroupId")]
        public string? ResourceGroupId { get; set; }

        /// <summary>
        /// The security group id.
        /// </summary>
        [Input("securityGroupId")]
        public string? SecurityGroupId { get; set; }

        /// <summary>
        /// Whether the user of the elastic network card is a cloud product or a virtual vendor.
        /// </summary>
        [Input("serviceManaged")]
        public bool? ServiceManaged { get; set; }

        /// <summary>
        /// The status of the ENI.
        /// </summary>
        [Input("status")]
        public string? Status { get; set; }

        [Input("tags")]
        private Dictionary<string, object>? _tags;

        /// <summary>
        /// The tags.
        /// </summary>
        public Dictionary<string, object> Tags
        {
            get => _tags ?? (_tags = new Dictionary<string, object>());
            set => _tags = value;
        }

        /// <summary>
        /// The type of the ENI.
        /// </summary>
        [Input("type")]
        public string? Type { get; set; }

        /// <summary>
        /// The Vpc Id.
        /// </summary>
        [Input("vpcId")]
        public string? VpcId { get; set; }

        /// <summary>
        /// The vswitch id.
        /// </summary>
        [Input("vswitchId")]
        public string? VswitchId { get; set; }

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

    public sealed class GetEcsNetworkInterfacesInvokeArgs : global::Pulumi.InvokeArgs
    {
        [Input("ids")]
        private InputList<string>? _ids;

        /// <summary>
        /// A list of Network Interface IDs.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

        /// <summary>
        /// The instance id.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        /// <summary>
        /// The network interface name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// A regex string to filter results by Network Interface name.
        /// </summary>
        [Input("nameRegex")]
        public Input<string>? NameRegex { get; set; }

        /// <summary>
        /// The network interface name.
        /// </summary>
        [Input("networkInterfaceName")]
        public Input<string>? NetworkInterfaceName { get; set; }

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

        /// <summary>
        /// The primary private IP address of the ENI.
        /// </summary>
        [Input("primaryIpAddress")]
        public Input<string>? PrimaryIpAddress { get; set; }

        /// <summary>
        /// The primary private IP address of the ENI.
        /// </summary>
        [Input("privateIp")]
        public Input<string>? PrivateIp { get; set; }

        /// <summary>
        /// The resource group id.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// The security group id.
        /// </summary>
        [Input("securityGroupId")]
        public Input<string>? SecurityGroupId { get; set; }

        /// <summary>
        /// Whether the user of the elastic network card is a cloud product or a virtual vendor.
        /// </summary>
        [Input("serviceManaged")]
        public Input<bool>? ServiceManaged { get; set; }

        /// <summary>
        /// The status of the ENI.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

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

        /// <summary>
        /// The tags.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// The type of the ENI.
        /// </summary>
        [Input("type")]
        public Input<string>? Type { get; set; }

        /// <summary>
        /// The Vpc Id.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        /// <summary>
        /// The vswitch id.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

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


    [OutputType]
    public sealed class GetEcsNetworkInterfacesResult
    {
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Ids;
        public readonly string? InstanceId;
        public readonly ImmutableArray<Outputs.GetEcsNetworkInterfacesInterfaceResult> Interfaces;
        public readonly string? Name;
        public readonly string? NameRegex;
        public readonly ImmutableArray<string> Names;
        public readonly string? NetworkInterfaceName;
        public readonly string? OutputFile;
        public readonly string? PrimaryIpAddress;
        public readonly string? PrivateIp;
        public readonly string? ResourceGroupId;
        public readonly string? SecurityGroupId;
        public readonly bool? ServiceManaged;
        public readonly string? Status;
        public readonly ImmutableDictionary<string, object>? Tags;
        public readonly string? Type;
        public readonly string? VpcId;
        public readonly string? VswitchId;

        [OutputConstructor]
        private GetEcsNetworkInterfacesResult(
            string id,

            ImmutableArray<string> ids,

            string? instanceId,

            ImmutableArray<Outputs.GetEcsNetworkInterfacesInterfaceResult> interfaces,

            string? name,

            string? nameRegex,

            ImmutableArray<string> names,

            string? networkInterfaceName,

            string? outputFile,

            string? primaryIpAddress,

            string? privateIp,

            string? resourceGroupId,

            string? securityGroupId,

            bool? serviceManaged,

            string? status,

            ImmutableDictionary<string, object>? tags,

            string? type,

            string? vpcId,

            string? vswitchId)
        {
            Id = id;
            Ids = ids;
            InstanceId = instanceId;
            Interfaces = interfaces;
            Name = name;
            NameRegex = nameRegex;
            Names = names;
            NetworkInterfaceName = networkInterfaceName;
            OutputFile = outputFile;
            PrimaryIpAddress = primaryIpAddress;
            PrivateIp = privateIp;
            ResourceGroupId = resourceGroupId;
            SecurityGroupId = securityGroupId;
            ServiceManaged = serviceManaged;
            Status = status;
            Tags = tags;
            Type = type;
            VpcId = vpcId;
            VswitchId = vswitchId;
        }
    }
}
