<reponame>rhysmdnz/pulumi-alicloud-rhys-hacks// *** 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.Vpc
{
    public static class GetBgpNetworks
    {
        /// <summary>
        /// This data source provides the Vpc Bgp Networks of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.153.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var ids = AliCloud.Vpc.GetBgpNetworks.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             "example_value",
        ///         },
        ///     });
        /// 
        ///     var routerId = AliCloud.Vpc.GetBgpNetworks.Invoke(new()
        ///     {
        ///         RouterId = "example_value",
        ///     });
        /// 
        ///     var status = AliCloud.Vpc.GetBgpNetworks.Invoke(new()
        ///     {
        ///         Status = "Available",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["vpcBgpNetworkId1"] = ids.Apply(getBgpNetworksResult =&gt; getBgpNetworksResult.Networks[0]?.Id),
        ///         ["vpcBgpNetworkId2"] = routerId.Apply(getBgpNetworksResult =&gt; getBgpNetworksResult.Networks[0]?.Id),
        ///         ["vpcBgpNetworkId3"] = status.Apply(getBgpNetworksResult =&gt; getBgpNetworksResult.Networks[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetBgpNetworksResult> InvokeAsync(GetBgpNetworksArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetBgpNetworksResult>("alicloud:vpc/getBgpNetworks:getBgpNetworks", args ?? new GetBgpNetworksArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the Vpc Bgp Networks of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.153.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var ids = AliCloud.Vpc.GetBgpNetworks.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             "example_value",
        ///         },
        ///     });
        /// 
        ///     var routerId = AliCloud.Vpc.GetBgpNetworks.Invoke(new()
        ///     {
        ///         RouterId = "example_value",
        ///     });
        /// 
        ///     var status = AliCloud.Vpc.GetBgpNetworks.Invoke(new()
        ///     {
        ///         Status = "Available",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["vpcBgpNetworkId1"] = ids.Apply(getBgpNetworksResult =&gt; getBgpNetworksResult.Networks[0]?.Id),
        ///         ["vpcBgpNetworkId2"] = routerId.Apply(getBgpNetworksResult =&gt; getBgpNetworksResult.Networks[0]?.Id),
        ///         ["vpcBgpNetworkId3"] = status.Apply(getBgpNetworksResult =&gt; getBgpNetworksResult.Networks[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetBgpNetworksResult> Invoke(GetBgpNetworksInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetBgpNetworksResult>("alicloud:vpc/getBgpNetworks:getBgpNetworks", args ?? new GetBgpNetworksInvokeArgs(), options.WithDefaults());
    }


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

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

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

        /// <summary>
        /// The ID of the vRouter.
        /// </summary>
        [Input("routerId")]
        public string? RouterId { get; set; }

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

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

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

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

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

        /// <summary>
        /// The ID of the vRouter.
        /// </summary>
        [Input("routerId")]
        public Input<string>? RouterId { get; set; }

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

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


    [OutputType]
    public sealed class GetBgpNetworksResult
    {
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Ids;
        public readonly ImmutableArray<Outputs.GetBgpNetworksNetworkResult> Networks;
        public readonly string? OutputFile;
        public readonly string? RouterId;
        public readonly string? Status;

        [OutputConstructor]
        private GetBgpNetworksResult(
            string id,

            ImmutableArray<string> ids,

            ImmutableArray<Outputs.GetBgpNetworksNetworkResult> networks,

            string? outputFile,

            string? routerId,

            string? status)
        {
            Id = id;
            Ids = ids;
            Networks = networks;
            OutputFile = outputFile;
            RouterId = routerId;
            Status = status;
        }
    }
}
