<filename>sdk/dotnet/ExpressConnect/GetPhysicalConnections.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.ExpressConnect
{
    public static class GetPhysicalConnections
    {
        /// <summary>
        /// This data source provides the Express Connect Physical Connections of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.132.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.ExpressConnect.GetPhysicalConnections.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             "pc-2345678",
        ///         },
        ///     });
        /// 
        ///     var nameRegex = AliCloud.ExpressConnect.GetPhysicalConnections.Invoke(new()
        ///     {
        ///         NameRegex = "^my-PhysicalConnection",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["expressConnectPhysicalConnectionId1"] = ids.Apply(getPhysicalConnectionsResult =&gt; getPhysicalConnectionsResult.Connections[0]?.Id),
        ///         ["expressConnectPhysicalConnectionId2"] = nameRegex.Apply(getPhysicalConnectionsResult =&gt; getPhysicalConnectionsResult.Connections[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetPhysicalConnectionsResult> InvokeAsync(GetPhysicalConnectionsArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetPhysicalConnectionsResult>("alicloud:expressconnect/getPhysicalConnections:getPhysicalConnections", args ?? new GetPhysicalConnectionsArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the Express Connect Physical Connections of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.132.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.ExpressConnect.GetPhysicalConnections.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             "pc-2345678",
        ///         },
        ///     });
        /// 
        ///     var nameRegex = AliCloud.ExpressConnect.GetPhysicalConnections.Invoke(new()
        ///     {
        ///         NameRegex = "^my-PhysicalConnection",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["expressConnectPhysicalConnectionId1"] = ids.Apply(getPhysicalConnectionsResult =&gt; getPhysicalConnectionsResult.Connections[0]?.Id),
        ///         ["expressConnectPhysicalConnectionId2"] = nameRegex.Apply(getPhysicalConnectionsResult =&gt; getPhysicalConnectionsResult.Connections[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetPhysicalConnectionsResult> Invoke(GetPhysicalConnectionsInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetPhysicalConnectionsResult>("alicloud:expressconnect/getPhysicalConnections:getPhysicalConnections", args ?? new GetPhysicalConnectionsInvokeArgs(), options.WithDefaults());
    }


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

        /// <summary>
        /// A list of Physical Connection IDs.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

        /// <summary>
        /// The include reservation data.
        /// </summary>
        [Input("includeReservationData")]
        public bool? IncludeReservationData { get; set; }

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

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

        /// <summary>
        /// Resources on Behalf of a State of the Resource Attribute Field.
        /// </summary>
        [Input("status")]
        public string? Status { get; set; }

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

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

        /// <summary>
        /// A list of Physical Connection IDs.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

        /// <summary>
        /// The include reservation data.
        /// </summary>
        [Input("includeReservationData")]
        public Input<bool>? IncludeReservationData { get; set; }

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

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

        /// <summary>
        /// Resources on Behalf of a State of the Resource Attribute Field.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

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


    [OutputType]
    public sealed class GetPhysicalConnectionsResult
    {
        public readonly ImmutableArray<Outputs.GetPhysicalConnectionsConnectionResult> Connections;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Ids;
        public readonly bool? IncludeReservationData;
        public readonly string? NameRegex;
        public readonly ImmutableArray<string> Names;
        public readonly string? OutputFile;
        public readonly string? Status;

        [OutputConstructor]
        private GetPhysicalConnectionsResult(
            ImmutableArray<Outputs.GetPhysicalConnectionsConnectionResult> connections,

            string id,

            ImmutableArray<string> ids,

            bool? includeReservationData,

            string? nameRegex,

            ImmutableArray<string> names,

            string? outputFile,

            string? status)
        {
            Connections = connections;
            Id = id;
            Ids = ids;
            IncludeReservationData = includeReservationData;
            NameRegex = nameRegex;
            Names = names;
            OutputFile = outputFile;
            Status = status;
        }
    }
}
