<filename>sdk/dotnet/Cen/GetTransitRouters.cs// *** 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.Cen
{
    public static class GetTransitRouters
    {
        /// <summary>
        /// This data source provides CEN Transit Routers available to the user.[What is Cen Transit Routers](https://help.aliyun.com/document_detail/261219.html)
        /// 
        /// &gt; **NOTE:** Available in 1.126.0+
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.Cen.GetTransitRouters.Invoke(new()
        ///     {
        ///         CenId = "cen-id1",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstTransitRoutersType"] = @default.Apply(getTransitRoutersResult =&gt; getTransitRoutersResult).Apply(@default =&gt; @default.Apply(getTransitRoutersResult =&gt; getTransitRoutersResult.TransitRouters[0]?.Type)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetTransitRoutersResult> InvokeAsync(GetTransitRoutersArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetTransitRoutersResult>("alicloud:cen/getTransitRouters:getTransitRouters", args ?? new GetTransitRoutersArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides CEN Transit Routers available to the user.[What is Cen Transit Routers](https://help.aliyun.com/document_detail/261219.html)
        /// 
        /// &gt; **NOTE:** Available in 1.126.0+
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.Cen.GetTransitRouters.Invoke(new()
        ///     {
        ///         CenId = "cen-id1",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstTransitRoutersType"] = @default.Apply(getTransitRoutersResult =&gt; getTransitRoutersResult).Apply(@default =&gt; @default.Apply(getTransitRoutersResult =&gt; getTransitRoutersResult.TransitRouters[0]?.Type)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetTransitRoutersResult> Invoke(GetTransitRoutersInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetTransitRoutersResult>("alicloud:cen/getTransitRouters:getTransitRouters", args ?? new GetTransitRoutersInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetTransitRoutersArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The ID of the CEN instance.
        /// </summary>
        [Input("cenId", required: true)]
        public string CenId { get; set; } = null!;

        [Input("ids")]
        private List<string>? _ids;

        /// <summary>
        /// A list of resource id. The element value is same as &lt;cen_id&gt;:&lt;transit_router_id&gt;`.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

        /// <summary>
        /// A regex string to filter CEN Transit Routers by name.
        /// </summary>
        [Input("nameRegex")]
        public string? NameRegex { get; set; }

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

        /// <summary>
        /// The status of the resource. Valid values `Active`, `Creating`, `Deleting` and `Updating`.
        /// </summary>
        [Input("status")]
        public string? Status { get; set; }

        /// <summary>
        /// The ID of the transit router.
        /// </summary>
        [Input("transitRouterId")]
        public string? TransitRouterId { get; set; }

        [Input("transitRouterIds")]
        private List<string>? _transitRouterIds;

        /// <summary>
        /// A list of ID of the transit router.
        /// </summary>
        public List<string> TransitRouterIds
        {
            get => _transitRouterIds ?? (_transitRouterIds = new List<string>());
            set => _transitRouterIds = value;
        }

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

    public sealed class GetTransitRoutersInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The ID of the CEN instance.
        /// </summary>
        [Input("cenId", required: true)]
        public Input<string> CenId { get; set; } = null!;

        [Input("ids")]
        private InputList<string>? _ids;

        /// <summary>
        /// A list of resource id. The element value is same as &lt;cen_id&gt;:&lt;transit_router_id&gt;`.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

        /// <summary>
        /// A regex string to filter CEN Transit Routers by name.
        /// </summary>
        [Input("nameRegex")]
        public Input<string>? NameRegex { get; set; }

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

        /// <summary>
        /// The status of the resource. Valid values `Active`, `Creating`, `Deleting` and `Updating`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// The ID of the transit router.
        /// </summary>
        [Input("transitRouterId")]
        public Input<string>? TransitRouterId { get; set; }

        [Input("transitRouterIds")]
        private InputList<string>? _transitRouterIds;

        /// <summary>
        /// A list of ID of the transit router.
        /// </summary>
        public InputList<string> TransitRouterIds
        {
            get => _transitRouterIds ?? (_transitRouterIds = new InputList<string>());
            set => _transitRouterIds = value;
        }

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


    [OutputType]
    public sealed class GetTransitRoutersResult
    {
        /// <summary>
        /// The ID of the CEN instance.
        /// </summary>
        public readonly string CenId;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Ids;
        public readonly string? NameRegex;
        /// <summary>
        /// A list of  CEN Transit Routers names.
        /// </summary>
        public readonly ImmutableArray<string> Names;
        public readonly string? OutputFile;
        /// <summary>
        /// The status of the transit router attachment.
        /// </summary>
        public readonly string? Status;
        /// <summary>
        /// The ID of the transit router.
        /// </summary>
        public readonly string? TransitRouterId;
        public readonly ImmutableArray<string> TransitRouterIds;
        /// <summary>
        /// A list of CEN Transit Routers. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetTransitRoutersTransitRouterResult> TransitRouters;

        [OutputConstructor]
        private GetTransitRoutersResult(
            string cenId,

            string id,

            ImmutableArray<string> ids,

            string? nameRegex,

            ImmutableArray<string> names,

            string? outputFile,

            string? status,

            string? transitRouterId,

            ImmutableArray<string> transitRouterIds,

            ImmutableArray<Outputs.GetTransitRoutersTransitRouterResult> transitRouters)
        {
            CenId = cenId;
            Id = id;
            Ids = ids;
            NameRegex = nameRegex;
            Names = names;
            OutputFile = outputFile;
            Status = status;
            TransitRouterId = transitRouterId;
            TransitRouterIds = transitRouterIds;
            TransitRouters = transitRouters;
        }
    }
}
