ovh.Me.getSshKey

Use this data source to retrieve information about an SSH key.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var mykey = Ovh.Me.GetSshKey.Invoke(new()
    {
        KeyName = "mykey",
    });

});
package main

import (
	"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh/Me"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Me.GetSshKey(ctx, &me.GetSshKeyArgs{
			KeyName: "mykey",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.Me.MeFunctions;
import com.pulumi.ovh.Me.inputs.GetSshKeyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var mykey = MeFunctions.getSshKey(GetSshKeyArgs.builder()
            .keyName("mykey")
            .build());

    }
}
import pulumi
import pulumi_ovh as ovh

mykey = ovh.Me.get_ssh_key(key_name="mykey")
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";

const mykey = ovh.Me.getSshKey({
    keyName: "mykey",
});
variables:
  mykey:
    fn::invoke:
      Function: ovh:Me:getSshKey
      Arguments:
        keyName: mykey

Using getSshKey

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getSshKey(args: GetSshKeyArgs, opts?: InvokeOptions): Promise<GetSshKeyResult>
function getSshKeyOutput(args: GetSshKeyOutputArgs, opts?: InvokeOptions): Output<GetSshKeyResult>
def get_ssh_key(key_name: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetSshKeyResult
def get_ssh_key_output(key_name: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetSshKeyResult]
func GetSshKey(ctx *Context, args *GetSshKeyArgs, opts ...InvokeOption) (*GetSshKeyResult, error)
func GetSshKeyOutput(ctx *Context, args *GetSshKeyOutputArgs, opts ...InvokeOption) GetSshKeyResultOutput

> Note: This function is named GetSshKey in the Go SDK.

public static class GetSshKey 
{
    public static Task<GetSshKeyResult> InvokeAsync(GetSshKeyArgs args, InvokeOptions? opts = null)
    public static Output<GetSshKeyResult> Invoke(GetSshKeyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSshKeyResult> getSshKey(GetSshKeyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: ovh:Me/getSshKey:getSshKey
  arguments:
    # arguments dictionary

The following arguments are supported:

KeyName string

The name of the SSH key.

KeyName string

The name of the SSH key.

keyName String

The name of the SSH key.

keyName string

The name of the SSH key.

key_name str

The name of the SSH key.

keyName String

The name of the SSH key.

getSshKey Result

The following output properties are available:

Default bool

True when this public SSH key is used for rescue mode and reinstallations.

Id string

The provider-assigned unique ID for this managed resource.

Key string

The content of the public key. E.g.: "ssh-ed25519 AAAAC3..."

KeyName string

See Argument Reference above.

Default bool

True when this public SSH key is used for rescue mode and reinstallations.

Id string

The provider-assigned unique ID for this managed resource.

Key string

The content of the public key. E.g.: "ssh-ed25519 AAAAC3..."

KeyName string

See Argument Reference above.

default_ Boolean

True when this public SSH key is used for rescue mode and reinstallations.

id String

The provider-assigned unique ID for this managed resource.

key String

The content of the public key. E.g.: "ssh-ed25519 AAAAC3..."

keyName String

See Argument Reference above.

default boolean

True when this public SSH key is used for rescue mode and reinstallations.

id string

The provider-assigned unique ID for this managed resource.

key string

The content of the public key. E.g.: "ssh-ed25519 AAAAC3..."

keyName string

See Argument Reference above.

default bool

True when this public SSH key is used for rescue mode and reinstallations.

id str

The provider-assigned unique ID for this managed resource.

key str

The content of the public key. E.g.: "ssh-ed25519 AAAAC3..."

key_name str

See Argument Reference above.

default Boolean

True when this public SSH key is used for rescue mode and reinstallations.

id String

The provider-assigned unique ID for this managed resource.

key String

The content of the public key. E.g.: "ssh-ed25519 AAAAC3..."

keyName String

See Argument Reference above.

Package Details

Repository
ovh lbrlabs/pulumi-ovh
License
Apache-2.0
Notes

This Pulumi package is based on the ovh Terraform Provider.