<filename>sdk/dotnet/GetRouterPolicy.cs<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 Pulumiverse.Fortios
{
    public static class GetRouterPolicy
    {
        /// <summary>
        /// Use this data source to get information on an fortios router policy
        /// </summary>
        public static Task<GetRouterPolicyResult> InvokeAsync(GetRouterPolicyArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetRouterPolicyResult>("fortios:index/getRouterPolicy:getRouterPolicy", args ?? new GetRouterPolicyArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to get information on an fortios router policy
        /// </summary>
        public static Output<GetRouterPolicyResult> Invoke(GetRouterPolicyInvokeArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetRouterPolicyResult>("fortios:index/getRouterPolicy:getRouterPolicy", args ?? new GetRouterPolicyInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetRouterPolicyArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Specify the seq_num of the desired router policy.
        /// </summary>
        [Input("seqNum", required: true)]
        public int SeqNum { get; set; }

        /// <summary>
        /// Specifies the vdom to which the data source will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Input("vdomparam")]
        public string? Vdomparam { get; set; }

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

    public sealed class GetRouterPolicyInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Specify the seq_num of the desired router policy.
        /// </summary>
        [Input("seqNum", required: true)]
        public Input<int> SeqNum { get; set; } = null!;

        /// <summary>
        /// Specifies the vdom to which the data source will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Input("vdomparam")]
        public Input<string>? Vdomparam { get; set; }

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


    [OutputType]
    public sealed class GetRouterPolicyResult
    {
        /// <summary>
        /// Action of the policy route.
        /// </summary>
        public readonly string Action;
        /// <summary>
        /// Optional comments.
        /// </summary>
        public readonly string Comments;
        /// <summary>
        /// Enable/disable negating destination address match.
        /// </summary>
        public readonly string DstNegate;
        /// <summary>
        /// Destination address name. The structure of `dstaddr` block is documented below.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetRouterPolicyDstaddrResult> Dstaddrs;
        /// <summary>
        /// Destination IP and mask (x.x.x.x/x). The structure of `dst` block is documented below.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetRouterPolicyDstResult> Dsts;
        /// <summary>
        /// End destination port number (0 - 65535).
        /// </summary>
        public readonly int EndPort;
        /// <summary>
        /// End source port number (0 - 65535).
        /// </summary>
        public readonly int EndSourcePort;
        /// <summary>
        /// IP address of the gateway.
        /// </summary>
        public readonly string Gateway;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// Enable/disable negation of input device match.
        /// </summary>
        public readonly string InputDeviceNegate;
        /// <summary>
        /// Incoming interface name. The structure of `input_device` block is documented below.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetRouterPolicyInputDeviceResult> InputDevices;
        /// <summary>
        /// Custom Destination Internet Service name. The structure of `internet_service_custom` block is documented below.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetRouterPolicyInternetServiceCustomResult> InternetServiceCustoms;
        /// <summary>
        /// Destination Internet Service ID. The structure of `internet_service_id` block is documented below.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetRouterPolicyInternetServiceIdResult> InternetServiceIds;
        /// <summary>
        /// Outgoing interface name.
        /// </summary>
        public readonly string OutputDevice;
        /// <summary>
        /// Protocol number (0 - 255).
        /// </summary>
        public readonly int Protocol;
        /// <summary>
        /// Sequence number.
        /// </summary>
        public readonly int SeqNum;
        /// <summary>
        /// Enable/disable negating source address match.
        /// </summary>
        public readonly string SrcNegate;
        /// <summary>
        /// Source address name. The structure of `srcaddr` block is documented below.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetRouterPolicySrcaddrResult> Srcaddrs;
        /// <summary>
        /// Source IP and mask (x.x.x.x/x). The structure of `src` block is documented below.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetRouterPolicySrcResult> Srcs;
        /// <summary>
        /// Start destination port number (0 - 65535).
        /// </summary>
        public readonly int StartPort;
        /// <summary>
        /// Start source port number (0 - 65535).
        /// </summary>
        public readonly int StartSourcePort;
        /// <summary>
        /// Enable/disable this policy route.
        /// </summary>
        public readonly string Status;
        /// <summary>
        /// Type of service bit pattern.
        /// </summary>
        public readonly string Tos;
        /// <summary>
        /// Type of service evaluated bits.
        /// </summary>
        public readonly string TosMask;
        public readonly string? Vdomparam;

        [OutputConstructor]
        private GetRouterPolicyResult(
            string action,

            string comments,

            string dstNegate,

            ImmutableArray<Outputs.GetRouterPolicyDstaddrResult> dstaddrs,

            ImmutableArray<Outputs.GetRouterPolicyDstResult> dsts,

            int endPort,

            int endSourcePort,

            string gateway,

            string id,

            string inputDeviceNegate,

            ImmutableArray<Outputs.GetRouterPolicyInputDeviceResult> inputDevices,

            ImmutableArray<Outputs.GetRouterPolicyInternetServiceCustomResult> internetServiceCustoms,

            ImmutableArray<Outputs.GetRouterPolicyInternetServiceIdResult> internetServiceIds,

            string outputDevice,

            int protocol,

            int seqNum,

            string srcNegate,

            ImmutableArray<Outputs.GetRouterPolicySrcaddrResult> srcaddrs,

            ImmutableArray<Outputs.GetRouterPolicySrcResult> srcs,

            int startPort,

            int startSourcePort,

            string status,

            string tos,

            string tosMask,

            string? vdomparam)
        {
            Action = action;
            Comments = comments;
            DstNegate = dstNegate;
            Dstaddrs = dstaddrs;
            Dsts = dsts;
            EndPort = endPort;
            EndSourcePort = endSourcePort;
            Gateway = gateway;
            Id = id;
            InputDeviceNegate = inputDeviceNegate;
            InputDevices = inputDevices;
            InternetServiceCustoms = internetServiceCustoms;
            InternetServiceIds = internetServiceIds;
            OutputDevice = outputDevice;
            Protocol = protocol;
            SeqNum = seqNum;
            SrcNegate = srcNegate;
            Srcaddrs = srcaddrs;
            Srcs = srcs;
            StartPort = startPort;
            StartSourcePort = startSourcePort;
            Status = status;
            Tos = tos;
            TosMask = tosMask;
            Vdomparam = vdomparam;
        }
    }
}
