OVHCloud v2.7.3 published on Thursday, Aug 28, 2025 by OVHcloud
ovh.getCloudProjectSshKey
Explore with Pulumi AI
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 dictionary
The following arguments are supported:
- Id string
- SSH key ID
- Service
Name string - Service name
- Id string
- SSH key ID
- Service
Name string - Service name
- id String
- SSH key ID
- service
Name String - Service name
- id string
- SSH key ID
- service
Name string - Service name
- id str
- SSH key ID
- service_
name str - Service name
- id String
- SSH key ID
- service
Name String - Service name
getCloudProjectSshKey Result
The following output properties are available:
- Finger
Print string - SSH key fingerprint
- Id string
- SSH key ID
- Name string
- SSH key name
- Public
Key string - SSH public key
- Regions List<string>
- SSH key regions
- Service
Name string - Service name
- Finger
Print string - SSH key fingerprint
- Id string
- SSH key ID
- Name string
- SSH key name
- Public
Key string - SSH public key
- Regions []string
- SSH key regions
- Service
Name string - Service name
- finger
Print String - SSH key fingerprint
- id String
- SSH key ID
- name String
- SSH key name
- public
Key String - SSH public key
- regions List<String>
- SSH key regions
- service
Name String - Service name
- finger
Print string - SSH key fingerprint
- id string
- SSH key ID
- name string
- SSH key name
- public
Key string - SSH public key
- regions string[]
- SSH key regions
- service
Name 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
- finger
Print String - SSH key fingerprint
- id String
- SSH key ID
- name String
- SSH key name
- public
Key String - SSH public key
- regions List<String>
- SSH key regions
- service
Name String - Service name
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.