// *** 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 Group resource.
    /// 
    /// For information about VPC Bgp Group and how to use it, see [What is Bgp Group](https://www.alibabacloud.com/help/en/doc-detail/91267.html).
    /// 
    /// &gt; **NOTE:** Available in v1.152.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var examplePhysicalConnections = AliCloud.ExpressConnect.GetPhysicalConnections.Invoke();
    /// 
    ///     var exampleVirtualBorderRouter = new AliCloud.ExpressConnect.VirtualBorderRouter("exampleVirtualBorderRouter", new()
    ///     {
    ///         LocalGatewayIp = "10.0.0.1",
    ///         PeerGatewayIp = "10.0.0.2",
    ///         PeeringSubnetMask = "255.255.255.252",
    ///         PhysicalConnectionId = examplePhysicalConnections.Apply(getPhysicalConnectionsResult =&gt; getPhysicalConnectionsResult.Connections[0]?.Id),
    ///         VirtualBorderRouterName = @var.Name,
    ///         VlanId = 120,
    ///         MinRxInterval = 1000,
    ///         MinTxInterval = 1000,
    ///         DetectMultiplier = 10,
    ///     });
    /// 
    ///     var @default = new AliCloud.Vpc.BgpGroup("default", new()
    ///     {
    ///         AuthKey = "YourPassword+12345678",
    ///         BgpGroupName = "example_value",
    ///         Description = "example_value",
    ///         LocalAsn = 64512,
    ///         PeerAsn = 1111,
    ///         RouterId = exampleVirtualBorderRouter.Id,
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// VPC Bgp Group can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:vpc/bgpGroup:BgpGroup example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:vpc/bgpGroup:BgpGroup")]
    public partial class BgpGroup : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The authentication key of the BGP group.
        /// </summary>
        [Output("authKey")]
        public Output<string?> AuthKey { get; private set; } = null!;

        /// <summary>
        /// The name of the BGP group. The name must be `2` to `128` characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with `http://` or `https://`.
        /// </summary>
        [Output("bgpGroupName")]
        public Output<string?> BgpGroupName { get; private set; } = null!;

        /// <summary>
        /// The description of the BGP group. The description must be `2` to `256` characters in length. It must start with a letter but cannot start with `http://` or `https://`.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// The is fake asn. A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.
        /// </summary>
        [Output("isFakeAsn")]
        public Output<bool> IsFakeAsn { get; private set; } = null!;

        /// <summary>
        /// The AS number on the Alibaba Cloud side.
        /// </summary>
        [Output("localAsn")]
        public Output<int> LocalAsn { get; private set; } = null!;

        /// <summary>
        /// The AS number of the BGP peer.
        /// </summary>
        [Output("peerAsn")]
        public Output<int> PeerAsn { get; private set; } = null!;

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

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


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

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

    public sealed class BgpGroupArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The authentication key of the BGP group.
        /// </summary>
        [Input("authKey")]
        public Input<string>? AuthKey { get; set; }

        /// <summary>
        /// The name of the BGP group. The name must be `2` to `128` characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with `http://` or `https://`.
        /// </summary>
        [Input("bgpGroupName")]
        public Input<string>? BgpGroupName { get; set; }

        /// <summary>
        /// The description of the BGP group. The description must be `2` to `256` characters in length. It must start with a letter but cannot start with `http://` or `https://`.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// The is fake asn. A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.
        /// </summary>
        [Input("isFakeAsn")]
        public Input<bool>? IsFakeAsn { get; set; }

        /// <summary>
        /// The AS number on the Alibaba Cloud side.
        /// </summary>
        [Input("localAsn")]
        public Input<int>? LocalAsn { get; set; }

        /// <summary>
        /// The AS number of the BGP peer.
        /// </summary>
        [Input("peerAsn", required: true)]
        public Input<int> PeerAsn { get; set; } = null!;

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

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

    public sealed class BgpGroupState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The authentication key of the BGP group.
        /// </summary>
        [Input("authKey")]
        public Input<string>? AuthKey { get; set; }

        /// <summary>
        /// The name of the BGP group. The name must be `2` to `128` characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with `http://` or `https://`.
        /// </summary>
        [Input("bgpGroupName")]
        public Input<string>? BgpGroupName { get; set; }

        /// <summary>
        /// The description of the BGP group. The description must be `2` to `256` characters in length. It must start with a letter but cannot start with `http://` or `https://`.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// The is fake asn. A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.
        /// </summary>
        [Input("isFakeAsn")]
        public Input<bool>? IsFakeAsn { get; set; }

        /// <summary>
        /// The AS number on the Alibaba Cloud side.
        /// </summary>
        [Input("localAsn")]
        public Input<int>? LocalAsn { get; set; }

        /// <summary>
        /// The AS number of the BGP peer.
        /// </summary>
        [Input("peerAsn")]
        public Input<int>? PeerAsn { get; set; }

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

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

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