<filename>sdk/dotnet/GetMetalProjectSSHKey.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;
using Pulumi;

namespace Cuemby.Equinix
{
    public static class GetMetalProjectSSHKey
    {
        /// <summary>
        /// Use this datasource to retrieve attributes of a Project SSH Key API resource.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Equinix = Pulumi.Equinix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var myKey = Output.Create(Equinix.GetMetalProjectSSHKey.InvokeAsync(new Equinix.GetMetalProjectSSHKeyArgs
        ///         {
        ///             Search = "username@hostname",
        ///             ProjectId = local.Project_id,
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetMetalProjectSSHKeyResult> InvokeAsync(GetMetalProjectSSHKeyArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetMetalProjectSSHKeyResult>("equinix:index/getMetalProjectSSHKey:GetMetalProjectSSHKey", args ?? new GetMetalProjectSSHKeyArgs(), options.WithDefaults());

        /// <summary>
        /// Use this datasource to retrieve attributes of a Project SSH Key API resource.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Equinix = Pulumi.Equinix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var myKey = Output.Create(Equinix.GetMetalProjectSSHKey.InvokeAsync(new Equinix.GetMetalProjectSSHKeyArgs
        ///         {
        ///             Search = "username@hostname",
        ///             ProjectId = local.Project_id,
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetMetalProjectSSHKeyResult> Invoke(GetMetalProjectSSHKeyInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetMetalProjectSSHKeyResult>("equinix:index/getMetalProjectSSHKey:GetMetalProjectSSHKey", args ?? new GetMetalProjectSSHKeyInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetMetalProjectSSHKeyArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// The id of the SSH Key to search for in the Equinix Metal project.
        /// </summary>
        [Input("id")]
        public string? Id { get; set; }

        /// <summary>
        /// The Equinix Metal project id of the Equinix Metal SSH Key.
        /// </summary>
        [Input("projectId", required: true)]
        public string ProjectId { get; set; } = null!;

        /// <summary>
        /// The name, fingerprint, or public_key of the SSH Key to search for
        /// in the Equinix Metal project.
        /// </summary>
        [Input("search")]
        public string? Search { get; set; }

        public GetMetalProjectSSHKeyArgs()
        {
        }
    }

    public sealed class GetMetalProjectSSHKeyInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// The id of the SSH Key to search for in the Equinix Metal project.
        /// </summary>
        [Input("id")]
        public Input<string>? Id { get; set; }

        /// <summary>
        /// The Equinix Metal project id of the Equinix Metal SSH Key.
        /// </summary>
        [Input("projectId", required: true)]
        public Input<string> ProjectId { get; set; } = null!;

        /// <summary>
        /// The name, fingerprint, or public_key of the SSH Key to search for
        /// in the Equinix Metal project.
        /// </summary>
        [Input("search")]
        public Input<string>? Search { get; set; }

        public GetMetalProjectSSHKeyInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetMetalProjectSSHKeyResult
    {
        /// <summary>
        /// The timestamp for when the SSH key was created.
        /// </summary>
        public readonly string Created;
        /// <summary>
        /// The fingerprint of the SSH key.
        /// </summary>
        public readonly string Fingerprint;
        /// <summary>
        /// The unique ID of the key.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// The name of the SSH key.
        /// </summary>
        public readonly string Name;
        /// <summary>
        /// The ID of parent project (same as project_id).
        /// </summary>
        public readonly string OwnerId;
        /// <summary>
        /// The ID of parent project.
        /// </summary>
        public readonly string ProjectId;
        /// <summary>
        /// The text of the public key.
        /// </summary>
        public readonly string PublicKey;
        public readonly string? Search;
        /// <summary>
        /// The timestamp for the last time the SSH key was updated.
        /// </summary>
        public readonly string Updated;

        [OutputConstructor]
        private GetMetalProjectSSHKeyResult(
            string created,

            string fingerprint,

            string id,

            string name,

            string ownerId,

            string projectId,

            string publicKey,

            string? search,

            string updated)
        {
            Created = created;
            Fingerprint = fingerprint;
            Id = id;
            Name = name;
            OwnerId = ownerId;
            ProjectId = projectId;
            PublicKey = publicKey;
            Search = search;
            Updated = updated;
        }
    }
}
