// *** 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;
using Pulumi;

namespace Cuemby.Equinix
{
    public static class GetMetalConnection
    {
        /// <summary>
        /// Use this data source to retrieve a [connection resource](https://metal.equinix.com/developers/docs/networking/fabric/)
        /// 
        /// &gt; Equinix Metal connection with service_token_type `a_side` is not generally available and may not be enabled yet for your organization.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Equinix = Pulumi.Equinix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var example = Output.Create(Equinix.GetMetalConnection.InvokeAsync(new Equinix.GetMetalConnectionArgs
        ///         {
        ///             ConnectionId = "4347e805-eb46-4699-9eb9-5c116e6a017d",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetMetalConnectionResult> InvokeAsync(GetMetalConnectionArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetMetalConnectionResult>("equinix:index/getMetalConnection:GetMetalConnection", args ?? new GetMetalConnectionArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to retrieve a [connection resource](https://metal.equinix.com/developers/docs/networking/fabric/)
        /// 
        /// &gt; Equinix Metal connection with service_token_type `a_side` is not generally available and may not be enabled yet for your organization.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Equinix = Pulumi.Equinix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var example = Output.Create(Equinix.GetMetalConnection.InvokeAsync(new Equinix.GetMetalConnectionArgs
        ///         {
        ///             ConnectionId = "4347e805-eb46-4699-9eb9-5c116e6a017d",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetMetalConnectionResult> Invoke(GetMetalConnectionInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetMetalConnectionResult>("equinix:index/getMetalConnection:GetMetalConnection", args ?? new GetMetalConnectionInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetMetalConnectionArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// ID of the connection resource.
        /// </summary>
        [Input("connectionId", required: true)]
        public string ConnectionId { get; set; } = null!;

        public GetMetalConnectionArgs()
        {
        }
    }

    public sealed class GetMetalConnectionInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// ID of the connection resource.
        /// </summary>
        [Input("connectionId", required: true)]
        public Input<string> ConnectionId { get; set; } = null!;

        public GetMetalConnectionInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetMetalConnectionResult
    {
        public readonly string ConnectionId;
        /// <summary>
        /// Description of the connection resource.
        /// </summary>
        public readonly string Description;
        /// <summary>
        /// Slug of a facility to which the connection belongs.
        /// </summary>
        public readonly string Facility;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// Slug of a metro to which the connection belongs.
        /// </summary>
        public readonly string Metro;
        /// <summary>
        /// Mode for connections in IBX facilities with the dedicated type - standard or tunnel.
        /// </summary>
        public readonly string Mode;
        /// <summary>
        /// Port name.
        /// </summary>
        public readonly string Name;
        /// <summary>
        /// ID of the organization where the connection is scoped to.
        /// </summary>
        public readonly string OrganizationId;
        /// <summary>
        /// List of connection ports - primary (`ports[0]`) and secondary (`ports[1]`)
        /// </summary>
        public readonly ImmutableArray<Outputs.GetMetalConnectionPortResult> Ports;
        /// <summary>
        /// ID of project to which the connection belongs.
        /// </summary>
        public readonly string ProjectId;
        /// <summary>
        /// Connection redundancy, reduntant or primary.
        /// </summary>
        public readonly string Redundancy;
        /// <summary>
        /// Type of service token, a_side or z_side. One available in shared connection.
        /// </summary>
        public readonly string ServiceTokenType;
        /// <summary>
        /// List of connection service tokens with attributes
        /// </summary>
        public readonly ImmutableArray<Outputs.GetMetalConnectionServiceTokenResult> ServiceTokens;
        /// <summary>
        /// Port speed in bits per second.
        /// </summary>
        public readonly string Speed;
        /// <summary>
        /// Port status.
        /// </summary>
        public readonly string Status;
        /// <summary>
        /// String list of tags.
        /// </summary>
        public readonly ImmutableArray<string> Tags;
        /// <summary>
        /// (Deprecated) Token to configure the connection in the [Equinix Fabric Portal](https://ecxfabric.equinix.com/dashboard).
        /// </summary>
        public readonly string Token;
        /// <summary>
        /// Token type, `a_side` or `z_side`.
        /// </summary>
        public readonly string Type;
        /// <summary>
        /// Attached VLANs. Only available in shared connection. One vlan for Primary/Single connection and two vlans for Redundant connection.
        /// </summary>
        public readonly ImmutableArray<int> Vlans;

        [OutputConstructor]
        private GetMetalConnectionResult(
            string connectionId,

            string description,

            string facility,

            string id,

            string metro,

            string mode,

            string name,

            string organizationId,

            ImmutableArray<Outputs.GetMetalConnectionPortResult> ports,

            string projectId,

            string redundancy,

            string serviceTokenType,

            ImmutableArray<Outputs.GetMetalConnectionServiceTokenResult> serviceTokens,

            string speed,

            string status,

            ImmutableArray<string> tags,

            string token,

            string type,

            ImmutableArray<int> vlans)
        {
            ConnectionId = connectionId;
            Description = description;
            Facility = facility;
            Id = id;
            Metro = metro;
            Mode = mode;
            Name = name;
            OrganizationId = organizationId;
            Ports = ports;
            ProjectId = projectId;
            Redundancy = redundancy;
            ServiceTokenType = serviceTokenType;
            ServiceTokens = serviceTokens;
            Speed = speed;
            Status = status;
            Tags = tags;
            Token = token;
            Type = type;
            Vlans = vlans;
        }
    }
}
