OVHCloud v2.8.0 published on Wednesday, Sep 24, 2025 by OVHcloud
ovh.getCloudProjectSshKey
Retrieve information about a SSH key.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const key = ovh.getCloudProjectSshKey({
    serviceName: "XXX",
    id: "YYY",
});
import pulumi
import pulumi_ovh as ovh
key = ovh.get_cloud_project_ssh_key(service_name="XXX",
    id="YYY")
package main
import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ovh.LookupCloudProjectSshKey(ctx, &ovh.LookupCloudProjectSshKeyArgs{
			ServiceName: "XXX",
			Id:          "YYY",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() => 
{
    var key = Ovh.GetCloudProjectSshKey.Invoke(new()
    {
        ServiceName = "XXX",
        Id = "YYY",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.OvhFunctions;
import com.pulumi.ovh.inputs.GetCloudProjectSshKeyArgs;
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 key = OvhFunctions.getCloudProjectSshKey(GetCloudProjectSshKeyArgs.builder()
            .serviceName("XXX")
            .id("YYY")
            .build());
    }
}
variables:
  key:
    fn::invoke:
      function: ovh:getCloudProjectSshKey
      arguments:
        serviceName: XXX
        id: YYY
Using getCloudProjectSshKey
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 getCloudProjectSshKey(args: GetCloudProjectSshKeyArgs, opts?: InvokeOptions): Promise<GetCloudProjectSshKeyResult>
function getCloudProjectSshKeyOutput(args: GetCloudProjectSshKeyOutputArgs, opts?: InvokeOptions): Output<GetCloudProjectSshKeyResult>def get_cloud_project_ssh_key(id: Optional[str] = None,
                              service_name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetCloudProjectSshKeyResult
def get_cloud_project_ssh_key_output(id: Optional[pulumi.Input[str]] = None,
                              service_name: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetCloudProjectSshKeyResult]func LookupCloudProjectSshKey(ctx *Context, args *LookupCloudProjectSshKeyArgs, opts ...InvokeOption) (*LookupCloudProjectSshKeyResult, error)
func LookupCloudProjectSshKeyOutput(ctx *Context, args *LookupCloudProjectSshKeyOutputArgs, opts ...InvokeOption) LookupCloudProjectSshKeyResultOutput> Note: This function is named LookupCloudProjectSshKey in the Go SDK.
public static class GetCloudProjectSshKey 
{
    public static Task<GetCloudProjectSshKeyResult> InvokeAsync(GetCloudProjectSshKeyArgs args, InvokeOptions? opts = null)
    public static Output<GetCloudProjectSshKeyResult> Invoke(GetCloudProjectSshKeyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCloudProjectSshKeyResult> getCloudProjectSshKey(GetCloudProjectSshKeyArgs args, InvokeOptions options)
public static Output<GetCloudProjectSshKeyResult> getCloudProjectSshKey(GetCloudProjectSshKeyArgs args, InvokeOptions options)
fn::invoke:
  function: ovh:index/getCloudProjectSshKey:getCloudProjectSshKey
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Id string
- SSH key ID
- ServiceName string
- Service name
- Id string
- SSH key ID
- ServiceName string
- Service name
- id String
- SSH key ID
- serviceName String
- Service name
- id string
- SSH key ID
- serviceName string
- Service name
- id str
- SSH key ID
- service_name str
- Service name
- id String
- SSH key ID
- serviceName String
- Service name
getCloudProjectSshKey Result
The following output properties are available:
- FingerPrint string
- SSH key fingerprint
- Id string
- SSH key ID
- Name string
- SSH key name
- PublicKey string
- SSH public key
- Regions List<string>
- SSH key regions
- ServiceName string
- Service name
- FingerPrint string
- SSH key fingerprint
- Id string
- SSH key ID
- Name string
- SSH key name
- PublicKey string
- SSH public key
- Regions []string
- SSH key regions
- ServiceName string
- Service name
- fingerPrint String
- SSH key fingerprint
- id String
- SSH key ID
- name String
- SSH key name
- publicKey String
- SSH public key
- regions List<String>
- SSH key regions
- serviceName String
- Service name
- fingerPrint string
- SSH key fingerprint
- id string
- SSH key ID
- name string
- SSH key name
- publicKey string
- SSH public key
- regions string[]
- SSH key regions
- serviceName string
- Service name
- finger_print str
- SSH key fingerprint
- id str
- SSH key ID
- name str
- SSH key name
- public_key str
- SSH public key
- regions Sequence[str]
- SSH key regions
- service_name str
- Service name
- fingerPrint String
- SSH key fingerprint
- id String
- SSH key ID
- name String
- SSH key name
- publicKey String
- SSH public key
- regions List<String>
- SSH key regions
- serviceName String
- Service name
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ovhTerraform Provider.
