// *** 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
{
    /// <summary>
    /// Provides a VPC Bgp Network resource.
    /// 
    /// For information about VPC Bgp Network and how to use it, see [What is Bgp Network](https://www.alibabacloud.com/help/en/doc-detail/91267.html).
    /// 
    /// &gt; **NOTE:** Available in v1.153.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var defaultPhysicalConnections = AliCloud.ExpressConnect.GetPhysicalConnections.Invoke();
    /// 
    ///     var defaultVirtualBorderRouter = new AliCloud.ExpressConnect.VirtualBorderRouter("defaultVirtualBorderRouter", new()
    ///     {
    ///         LocalGatewayIp = "10.0.0.1",
    ///         PeerGatewayIp = "10.0.0.2",
    ///         PeeringSubnetMask = "255.255.255.252",
    ///         PhysicalConnectionId = defaultPhysicalConnections.Apply(getPhysicalConnectionsResult =&gt; getPhysicalConnectionsResult.Connections[0]?.Id),
    ///         VirtualBorderRouterName = @var.Name,
    ///         VlanId = 120,
    ///         MinRxInterval = 1000,
    ///         MinTxInterval = 1000,
    ///         DetectMultiplier = 10,
    ///     });
    /// 
    ///     var example = new AliCloud.Vpc.BgpNetwork("example", new()
    ///     {
    ///         DstCidrBlock = "example_value",
    ///         RouterId = defaultVirtualBorderRouter.Id,
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// VPC Bgp Network can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:vpc/bgpNetwork:BgpNetwork example &lt;router_id&gt;:&lt;dst_cidr_block&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:vpc/bgpNetwork:BgpNetwork")]
    public partial class BgpNetwork : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
        /// </summary>
        [Output("dstCidrBlock")]
        public Output<string> DstCidrBlock { get; private set; } = null!;

        /// <summary>
        /// The ID of the vRouter associated with the router interface.
        /// </summary>
        [Output("routerId")]
        public Output<string> RouterId { get; private set; } = null!;

        /// <summary>
        /// The state of the advertised BGP network.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;


        /// <summary>
        /// Create a BgpNetwork 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 BgpNetwork(string name, BgpNetworkArgs args, CustomResourceOptions? options = null)
            : base("alicloud:vpc/bgpNetwork:BgpNetwork", name, args ?? new BgpNetworkArgs(), MakeResourceOptions(options, ""))
        {
        }

        private BgpNetwork(string name, Input<string> id, BgpNetworkState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:vpc/bgpNetwork:BgpNetwork", 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/rhysmdnz/pulumi-alicloud",
            };
            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 BgpNetwork 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 BgpNetwork Get(string name, Input<string> id, BgpNetworkState? state = null, CustomResourceOptions? options = null)
        {
            return new BgpNetwork(name, id, state, options);
        }
    }

    public sealed class BgpNetworkArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
        /// </summary>
        [Input("dstCidrBlock", required: true)]
        public Input<string> DstCidrBlock { get; set; } = null!;

        /// <summary>
        /// The ID of the vRouter associated with the router interface.
        /// </summary>
        [Input("routerId", required: true)]
        public Input<string> RouterId { get; set; } = null!;

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

    public sealed class BgpNetworkState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
        /// </summary>
        [Input("dstCidrBlock")]
        public Input<string>? DstCidrBlock { get; set; }

        /// <summary>
        /// The ID of the vRouter associated with the router interface.
        /// </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 BgpNetworkState()
        {
        }
        public static new BgpNetworkState Empty => new BgpNetworkState();
    }
}
