<filename>sdk/dotnet/Vpc/GetTrafficMirrorFilterEgressRules.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.Vpc
{
    public static class GetTrafficMirrorFilterEgressRules
    {
        /// <summary>
        /// This data source provides the Vpc Traffic Mirror Filter Egress Rules of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.140.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var ids = AliCloud.Vpc.GetTrafficMirrorFilterEgressRules.Invoke(new()
        ///     {
        ///         TrafficMirrorFilterId = "example_traffic_mirror_filter_id",
        ///         Ids = new[]
        ///         {
        ///             "example_id",
        ///         },
        ///     });
        /// 
        ///     var status = AliCloud.Vpc.GetTrafficMirrorFilterEgressRules.Invoke(new()
        ///     {
        ///         TrafficMirrorFilterId = "example_traffic_mirror_filter_id",
        ///         Ids = new[]
        ///         {
        ///             "example_id",
        ///         },
        ///         Status = "Created",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["vpcTrafficMirrorFilterEgressRuleId1"] = ids.Apply(getTrafficMirrorFilterEgressRulesResult =&gt; getTrafficMirrorFilterEgressRulesResult.Rules[0]?.Id),
        ///         ["vpcTrafficMirrorFilterEgressRuleId2"] = status.Apply(getTrafficMirrorFilterEgressRulesResult =&gt; getTrafficMirrorFilterEgressRulesResult.Rules[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetTrafficMirrorFilterEgressRulesResult> InvokeAsync(GetTrafficMirrorFilterEgressRulesArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetTrafficMirrorFilterEgressRulesResult>("alicloud:vpc/getTrafficMirrorFilterEgressRules:getTrafficMirrorFilterEgressRules", args ?? new GetTrafficMirrorFilterEgressRulesArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the Vpc Traffic Mirror Filter Egress Rules of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.140.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var ids = AliCloud.Vpc.GetTrafficMirrorFilterEgressRules.Invoke(new()
        ///     {
        ///         TrafficMirrorFilterId = "example_traffic_mirror_filter_id",
        ///         Ids = new[]
        ///         {
        ///             "example_id",
        ///         },
        ///     });
        /// 
        ///     var status = AliCloud.Vpc.GetTrafficMirrorFilterEgressRules.Invoke(new()
        ///     {
        ///         TrafficMirrorFilterId = "example_traffic_mirror_filter_id",
        ///         Ids = new[]
        ///         {
        ///             "example_id",
        ///         },
        ///         Status = "Created",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["vpcTrafficMirrorFilterEgressRuleId1"] = ids.Apply(getTrafficMirrorFilterEgressRulesResult =&gt; getTrafficMirrorFilterEgressRulesResult.Rules[0]?.Id),
        ///         ["vpcTrafficMirrorFilterEgressRuleId2"] = status.Apply(getTrafficMirrorFilterEgressRulesResult =&gt; getTrafficMirrorFilterEgressRulesResult.Rules[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetTrafficMirrorFilterEgressRulesResult> Invoke(GetTrafficMirrorFilterEgressRulesInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetTrafficMirrorFilterEgressRulesResult>("alicloud:vpc/getTrafficMirrorFilterEgressRules:getTrafficMirrorFilterEgressRules", args ?? new GetTrafficMirrorFilterEgressRulesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetTrafficMirrorFilterEgressRulesArgs : global::Pulumi.InvokeArgs
    {
        [Input("ids")]
        private List<string>? _ids;

        /// <summary>
        /// A list of Traffic Mirror Filter Egress Rule IDs.
        /// </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 resource. Valid values:`Creating`, `Created`, `Modifying` and `Deleting`.
        /// </summary>
        [Input("status")]
        public string? Status { get; set; }

        /// <summary>
        /// The ID of the filter associated with the outbound rule.
        /// </summary>
        [Input("trafficMirrorFilterId", required: true)]
        public string TrafficMirrorFilterId { get; set; } = null!;

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

    public sealed class GetTrafficMirrorFilterEgressRulesInvokeArgs : global::Pulumi.InvokeArgs
    {
        [Input("ids")]
        private InputList<string>? _ids;

        /// <summary>
        /// A list of Traffic Mirror Filter Egress Rule IDs.
        /// </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 resource. Valid values:`Creating`, `Created`, `Modifying` and `Deleting`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// The ID of the filter associated with the outbound rule.
        /// </summary>
        [Input("trafficMirrorFilterId", required: true)]
        public Input<string> TrafficMirrorFilterId { get; set; } = null!;

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


    [OutputType]
    public sealed class GetTrafficMirrorFilterEgressRulesResult
    {
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Ids;
        public readonly string? OutputFile;
        public readonly ImmutableArray<Outputs.GetTrafficMirrorFilterEgressRulesRuleResult> Rules;
        public readonly string? Status;
        public readonly string TrafficMirrorFilterId;

        [OutputConstructor]
        private GetTrafficMirrorFilterEgressRulesResult(
            string id,

            ImmutableArray<string> ids,

            string? outputFile,

            ImmutableArray<Outputs.GetTrafficMirrorFilterEgressRulesRuleResult> rules,

            string? status,

            string trafficMirrorFilterId)
        {
            Id = id;
            Ids = ids;
            OutputFile = outputFile;
            Rules = rules;
            Status = status;
            TrafficMirrorFilterId = trafficMirrorFilterId;
        }
    }
}
