<reponame>Dwonczykj/gember_deploy<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;
using Pulumi;

namespace TencentCloudIAC.PulumiPackage.Tencentcloud.Route
{
    /// <summary>
    /// Provides a resource to create an entry of a routing table.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var config = new Config();
    ///         var availabilityZone = config.Get("availabilityZone") ?? "na-siliconvalley-1";
    ///         var fooInstance = new Tencentcloud.Vpc.Instance("fooInstance", new Tencentcloud.Vpc.InstanceArgs
    ///         {
    ///             CidrBlock = "10.0.0.0/16",
    ///         });
    ///         var fooTable = new Tencentcloud.Route.Table("fooTable", new Tencentcloud.Route.TableArgs
    ///         {
    ///             VpcId = fooInstance.Id,
    ///         });
    ///         var fooSubnet_instanceInstance = new Tencentcloud.Subnet.Instance("fooSubnet/instanceInstance", new Tencentcloud.Subnet.InstanceArgs
    ///         {
    ///             VpcId = fooInstance.Id,
    ///             CidrBlock = "10.0.12.0/24",
    ///             AvailabilityZone = availabilityZone,
    ///             RouteTableId = fooTable.Id,
    ///         });
    ///         var instance = new Tencentcloud.Route.TableEntry("instance", new Tencentcloud.Route.TableEntryArgs
    ///         {
    ///             RouteTableId = fooTable.Id,
    ///             DestinationCidrBlock = "10.4.4.0/24",
    ///             NextType = "EIP",
    ///             NextHub = "0",
    ///             Description = "ci-test-route-table-entry",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// Route table entry can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Route/tableEntry:TableEntry foo 83517.rtb-mlhpg09u
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Route/tableEntry:TableEntry")]
    public partial class TableEntry : Pulumi.CustomResource
    {
        /// <summary>
        /// Description of the routing table entry.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// Destination address block.
        /// </summary>
        [Output("destinationCidrBlock")]
        public Output<string> DestinationCidrBlock { get; private set; } = null!;

        /// <summary>
        /// Whether the entry is disabled, default is `false`.
        /// </summary>
        [Output("disabled")]
        public Output<bool?> Disabled { get; private set; } = null!;

        /// <summary>
        /// ID of next-hop gateway. Note: when `next_type` is EIP, GatewayId should be `0`.
        /// </summary>
        [Output("nextHub")]
        public Output<string> NextHub { get; private set; } = null!;

        /// <summary>
        /// Type of next-hop. Valid values: `CVM`, `VPN`, `DIRECTCONNECT`, `PEERCONNECTION`, `HAVIP`, `NAT`, `NORMAL_CVM`, `EIP` and `LOCAL_GATEWAY`.
        /// </summary>
        [Output("nextType")]
        public Output<string> NextType { get; private set; } = null!;

        /// <summary>
        /// ID of routing table to which this entry belongs.
        /// </summary>
        [Output("routeTableId")]
        public Output<string> RouteTableId { get; private set; } = null!;


        /// <summary>
        /// Create a TableEntry 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 TableEntry(string name, TableEntryArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Route/tableEntry:TableEntry", name, args ?? new TableEntryArgs(), MakeResourceOptions(options, ""))
        {
        }

        private TableEntry(string name, Input<string> id, TableEntryState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Route/tableEntry:TableEntry", 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/tencentcloudstack",
            };
            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 TableEntry 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 TableEntry Get(string name, Input<string> id, TableEntryState? state = null, CustomResourceOptions? options = null)
        {
            return new TableEntry(name, id, state, options);
        }
    }

    public sealed class TableEntryArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Description of the routing table entry.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Destination address block.
        /// </summary>
        [Input("destinationCidrBlock", required: true)]
        public Input<string> DestinationCidrBlock { get; set; } = null!;

        /// <summary>
        /// Whether the entry is disabled, default is `false`.
        /// </summary>
        [Input("disabled")]
        public Input<bool>? Disabled { get; set; }

        /// <summary>
        /// ID of next-hop gateway. Note: when `next_type` is EIP, GatewayId should be `0`.
        /// </summary>
        [Input("nextHub", required: true)]
        public Input<string> NextHub { get; set; } = null!;

        /// <summary>
        /// Type of next-hop. Valid values: `CVM`, `VPN`, `DIRECTCONNECT`, `PEERCONNECTION`, `HAVIP`, `NAT`, `NORMAL_CVM`, `EIP` and `LOCAL_GATEWAY`.
        /// </summary>
        [Input("nextType", required: true)]
        public Input<string> NextType { get; set; } = null!;

        /// <summary>
        /// ID of routing table to which this entry belongs.
        /// </summary>
        [Input("routeTableId", required: true)]
        public Input<string> RouteTableId { get; set; } = null!;

        public TableEntryArgs()
        {
        }
    }

    public sealed class TableEntryState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Description of the routing table entry.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Destination address block.
        /// </summary>
        [Input("destinationCidrBlock")]
        public Input<string>? DestinationCidrBlock { get; set; }

        /// <summary>
        /// Whether the entry is disabled, default is `false`.
        /// </summary>
        [Input("disabled")]
        public Input<bool>? Disabled { get; set; }

        /// <summary>
        /// ID of next-hop gateway. Note: when `next_type` is EIP, GatewayId should be `0`.
        /// </summary>
        [Input("nextHub")]
        public Input<string>? NextHub { get; set; }

        /// <summary>
        /// Type of next-hop. Valid values: `CVM`, `VPN`, `DIRECTCONNECT`, `PEERCONNECTION`, `HAVIP`, `NAT`, `NORMAL_CVM`, `EIP` and `LOCAL_GATEWAY`.
        /// </summary>
        [Input("nextType")]
        public Input<string>? NextType { get; set; }

        /// <summary>
        /// ID of routing table to which this entry belongs.
        /// </summary>
        [Input("routeTableId")]
        public Input<string>? RouteTableId { get; set; }

        public TableEntryState()
        {
        }
    }
}
