// *** 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 GetRouteMaps
    {
        /// <summary>
        /// This data source provides CEN Route Maps available to the user.
        /// 
        /// &gt; **NOTE:** Available in v1.87.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = AliCloud.Cen.GetRouteMaps.Invoke(new()
        ///     {
        ///         CenId = "cen-ihdlgo87ai********",
        ///         Ids = new[]
        ///         {
        ///             "cen-ihdlgo87ai:cenrmap-bnh97kb3mn********",
        ///         },
        ///         DescriptionRegex = "datasource_test",
        ///         CenRegionId = "cn-hangzhou",
        ///         TransmitDirection = "RegionIn",
        ///         Status = "Active",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstCenRouteMapId"] = @this.Apply(getRouteMapsResult =&gt; getRouteMapsResult).Apply(@this =&gt; @this.Apply(getRouteMapsResult =&gt; getRouteMapsResult.Maps[0]?.RouteMapId)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetRouteMapsResult> InvokeAsync(GetRouteMapsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetRouteMapsResult>("alicloud:cen/getRouteMaps:getRouteMaps", args ?? new GetRouteMapsArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides CEN Route Maps available to the user.
        /// 
        /// &gt; **NOTE:** Available in v1.87.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = AliCloud.Cen.GetRouteMaps.Invoke(new()
        ///     {
        ///         CenId = "cen-ihdlgo87ai********",
        ///         Ids = new[]
        ///         {
        ///             "cen-ihdlgo87ai:cenrmap-bnh97kb3mn********",
        ///         },
        ///         DescriptionRegex = "datasource_test",
        ///         CenRegionId = "cn-hangzhou",
        ///         TransmitDirection = "RegionIn",
        ///         Status = "Active",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstCenRouteMapId"] = @this.Apply(getRouteMapsResult =&gt; getRouteMapsResult).Apply(@this =&gt; @this.Apply(getRouteMapsResult =&gt; getRouteMapsResult.Maps[0]?.RouteMapId)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetRouteMapsResult> Invoke(GetRouteMapsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetRouteMapsResult>("alicloud:cen/getRouteMaps:getRouteMaps", args ?? new GetRouteMapsInvokeArgs(), options.WithDefaults());
    }


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

        /// <summary>
        /// The ID of the region to which the CEN instance belongs.
        /// </summary>
        [Input("cenRegionId")]
        public string? CenRegionId { get; set; }

        /// <summary>
        /// A regex string to filter CEN route map by description.
        /// </summary>
        [Input("descriptionRegex")]
        public string? DescriptionRegex { get; set; }

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

        /// <summary>
        /// A list of CEN route map IDs. Each item formats as `&lt;cen_id&gt;:&lt;route_map_id&gt;`.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

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

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

        /// <summary>
        /// The direction in which the route map is applied, including `RegionIn` and `RegionOut`.
        /// </summary>
        [Input("transmitDirection")]
        public string? TransmitDirection { get; set; }

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

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

        /// <summary>
        /// The ID of the region to which the CEN instance belongs.
        /// </summary>
        [Input("cenRegionId")]
        public Input<string>? CenRegionId { get; set; }

        /// <summary>
        /// A regex string to filter CEN route map by description.
        /// </summary>
        [Input("descriptionRegex")]
        public Input<string>? DescriptionRegex { get; set; }

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

        /// <summary>
        /// A list of CEN route map IDs. Each item formats as `&lt;cen_id&gt;:&lt;route_map_id&gt;`.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

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

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

        /// <summary>
        /// The direction in which the route map is applied, including `RegionIn` and `RegionOut`.
        /// </summary>
        [Input("transmitDirection")]
        public Input<string>? TransmitDirection { get; set; }

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


    [OutputType]
    public sealed class GetRouteMapsResult
    {
        /// <summary>
        /// The ID of the CEN instance.
        /// </summary>
        public readonly string CenId;
        /// <summary>
        /// The ID of the region to which the CEN instance belongs.
        /// </summary>
        public readonly string? CenRegionId;
        public readonly string? DescriptionRegex;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A list of CEN route map IDs. Each item formats as `&lt;cen_id&gt;:&lt;route_map_id&gt;`. Before 1.161.0, its element is `route_map_id`.
        /// </summary>
        public readonly ImmutableArray<string> Ids;
        /// <summary>
        /// A list of CEN instances. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetRouteMapsMapResult> Maps;
        public readonly string? OutputFile;
        /// <summary>
        /// The status of the route map.
        /// </summary>
        public readonly string? Status;
        /// <summary>
        /// The direction in which the route map is applied.
        /// </summary>
        public readonly string? TransmitDirection;

        [OutputConstructor]
        private GetRouteMapsResult(
            string cenId,

            string? cenRegionId,

            string? descriptionRegex,

            string id,

            ImmutableArray<string> ids,

            ImmutableArray<Outputs.GetRouteMapsMapResult> maps,

            string? outputFile,

            string? status,

            string? transmitDirection)
        {
            CenId = cenId;
            CenRegionId = cenRegionId;
            DescriptionRegex = descriptionRegex;
            Id = id;
            Ids = ids;
            Maps = maps;
            OutputFile = outputFile;
            Status = status;
            TransmitDirection = transmitDirection;
        }
    }
}
