// *** 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
{
    public static class GetMetalDeviceBGPNeighbors
    {
        /// <summary>
        /// Use this datasource to retrieve list of BGP neighbors of a device in the Equinix Metal host.
        /// 
        /// To have any BGP neighbors listed, the device must be in BGP-enabled project
        /// and have a BGP session assigned.
        /// 
        /// To learn more about using BGP in Equinix Metal, see the
        /// equinix.MetalBGPSession resource documentation.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Equinix = Pulumi.Equinix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var test = Output.Create(Equinix.GetMetalDeviceBGPNeighbors.InvokeAsync(new Equinix.GetMetalDeviceBGPNeighborsArgs
        ///         {
        ///             DeviceId = "4c641195-25e5-4c3c-b2b7-4cd7a42c7b40",
        ///         }));
        ///         this.BgpNeighborsListing = test.Apply(test =&gt; test.BgpNeighbors);
        ///     }
        /// 
        ///     [Output("bgpNeighborsListing")]
        ///     public Output&lt;string&gt; BgpNeighborsListing { get; set; }
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetMetalDeviceBGPNeighborsResult> InvokeAsync(GetMetalDeviceBGPNeighborsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetMetalDeviceBGPNeighborsResult>("equinix:index/getMetalDeviceBGPNeighbors:GetMetalDeviceBGPNeighbors", args ?? new GetMetalDeviceBGPNeighborsArgs(), options.WithDefaults());

        /// <summary>
        /// Use this datasource to retrieve list of BGP neighbors of a device in the Equinix Metal host.
        /// 
        /// To have any BGP neighbors listed, the device must be in BGP-enabled project
        /// and have a BGP session assigned.
        /// 
        /// To learn more about using BGP in Equinix Metal, see the
        /// equinix.MetalBGPSession resource documentation.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Equinix = Pulumi.Equinix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var test = Output.Create(Equinix.GetMetalDeviceBGPNeighbors.InvokeAsync(new Equinix.GetMetalDeviceBGPNeighborsArgs
        ///         {
        ///             DeviceId = "4c641195-25e5-4c3c-b2b7-4cd7a42c7b40",
        ///         }));
        ///         this.BgpNeighborsListing = test.Apply(test =&gt; test.BgpNeighbors);
        ///     }
        /// 
        ///     [Output("bgpNeighborsListing")]
        ///     public Output&lt;string&gt; BgpNeighborsListing { get; set; }
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetMetalDeviceBGPNeighborsResult> Invoke(GetMetalDeviceBGPNeighborsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetMetalDeviceBGPNeighborsResult>("equinix:index/getMetalDeviceBGPNeighbors:GetMetalDeviceBGPNeighbors", args ?? new GetMetalDeviceBGPNeighborsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetMetalDeviceBGPNeighborsArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// UUID of BGP-enabled device whose neighbors to list.
        /// </summary>
        [Input("deviceId", required: true)]
        public string DeviceId { get; set; } = null!;

        public GetMetalDeviceBGPNeighborsArgs()
        {
        }
    }

    public sealed class GetMetalDeviceBGPNeighborsInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// UUID of BGP-enabled device whose neighbors to list.
        /// </summary>
        [Input("deviceId", required: true)]
        public Input<string> DeviceId { get; set; } = null!;

        public GetMetalDeviceBGPNeighborsInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetMetalDeviceBGPNeighborsResult
    {
        /// <summary>
        /// array of BGP neighbor records with attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetMetalDeviceBGPNeighborsBgpNeighborResult> BgpNeighbors;
        public readonly string DeviceId;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;

        [OutputConstructor]
        private GetMetalDeviceBGPNeighborsResult(
            ImmutableArray<Outputs.GetMetalDeviceBGPNeighborsBgpNeighborResult> bgpNeighbors,

            string deviceId,

            string id)
        {
            BgpNeighbors = bgpNeighbors;
            DeviceId = deviceId;
            Id = id;
        }
    }
}
