Show / Hide Table of Contents

Class GetPublicKey

Inheritance
System.Object
GetPublicKey
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Tls
Assembly: Pulumi.Tls.dll
Syntax
public static class GetPublicKey

Methods

View Source

InvokeAsync(GetPublicKeyArgs, InvokeOptions)

Use this data source to get the public key from a PEM-encoded private key for use in other resources.

{{% examples %}}

Example Usage

{{% example %}}

using System.IO;
using Pulumi;
using Tls = Pulumi.Tls;

class MyStack : Stack
{
public MyStack()
{
    var example = Output.Create(Tls.GetPublicKey.InvokeAsync(new Tls.GetPublicKeyArgs
    {
        PrivateKeyPem = File.ReadAllText("~/.ssh/id_rsa"),
    }));
}

}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetPublicKeyResult> InvokeAsync(GetPublicKeyArgs args, InvokeOptions options = null)
Parameters
Type Name Description
GetPublicKeyArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetPublicKeyResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.