// *** 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.PrivateLink
{
    public static class GetVpcEndpointConnections
    {
        /// <summary>
        /// This data source provides the Privatelink Vpc Endpoint Connections of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.110.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.PrivateLink.GetVpcEndpointConnections.Invoke(new()
        ///     {
        ///         ServiceId = "example_value",
        ///         Status = "Connected",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstPrivatelinkVpcEndpointConnectionId"] = example.Apply(getVpcEndpointConnectionsResult =&gt; getVpcEndpointConnectionsResult.Connections[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetVpcEndpointConnectionsResult> InvokeAsync(GetVpcEndpointConnectionsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetVpcEndpointConnectionsResult>("alicloud:privatelink/getVpcEndpointConnections:getVpcEndpointConnections", args ?? new GetVpcEndpointConnectionsArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the Privatelink Vpc Endpoint Connections of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.110.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.PrivateLink.GetVpcEndpointConnections.Invoke(new()
        ///     {
        ///         ServiceId = "example_value",
        ///         Status = "Connected",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstPrivatelinkVpcEndpointConnectionId"] = example.Apply(getVpcEndpointConnectionsResult =&gt; getVpcEndpointConnectionsResult.Connections[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetVpcEndpointConnectionsResult> Invoke(GetVpcEndpointConnectionsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetVpcEndpointConnectionsResult>("alicloud:privatelink/getVpcEndpointConnections:getVpcEndpointConnections", args ?? new GetVpcEndpointConnectionsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetVpcEndpointConnectionsArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The ID of the Vpc Endpoint.
        /// </summary>
        [Input("endpointId")]
        public string? EndpointId { get; set; }

        /// <summary>
        /// The endpoint owner id.
        /// </summary>
        [Input("endpointOwnerId")]
        public int? EndpointOwnerId { get; set; }

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

        /// <summary>
        /// The ID of the Vpc Endpoint Service.
        /// </summary>
        [Input("serviceId", required: true)]
        public string ServiceId { get; set; } = null!;

        /// <summary>
        /// The status of Vpc Endpoint Connection.
        /// </summary>
        [Input("status")]
        public string? Status { get; set; }

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

    public sealed class GetVpcEndpointConnectionsInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The ID of the Vpc Endpoint.
        /// </summary>
        [Input("endpointId")]
        public Input<string>? EndpointId { get; set; }

        /// <summary>
        /// The endpoint owner id.
        /// </summary>
        [Input("endpointOwnerId")]
        public Input<int>? EndpointOwnerId { get; set; }

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

        /// <summary>
        /// The ID of the Vpc Endpoint Service.
        /// </summary>
        [Input("serviceId", required: true)]
        public Input<string> ServiceId { get; set; } = null!;

        /// <summary>
        /// The status of Vpc Endpoint Connection.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

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


    [OutputType]
    public sealed class GetVpcEndpointConnectionsResult
    {
        public readonly ImmutableArray<Outputs.GetVpcEndpointConnectionsConnectionResult> Connections;
        public readonly string? EndpointId;
        public readonly int? EndpointOwnerId;
        /// <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 string ServiceId;
        public readonly string? Status;

        [OutputConstructor]
        private GetVpcEndpointConnectionsResult(
            ImmutableArray<Outputs.GetVpcEndpointConnectionsConnectionResult> connections,

            string? endpointId,

            int? endpointOwnerId,

            string id,

            ImmutableArray<string> ids,

            string? outputFile,

            string serviceId,

            string? status)
        {
            Connections = connections;
            EndpointId = endpointId;
            EndpointOwnerId = endpointOwnerId;
            Id = id;
            Ids = ids;
            OutputFile = outputFile;
            ServiceId = serviceId;
            Status = status;
        }
    }
}
