Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
published on Friday, Jul 17, 2026 by OVHcloud
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
published on Friday, Jul 17, 2026 by OVHcloud
This data source uses a Beta API. Use this data source to retrieve information about a single SSH key of a Public Cloud project (API v2), looked up by its name.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const myKey = ovh.getCloudSshKey({
serviceName: "aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
name: "my-deploy-key",
});
import pulumi
import pulumi_ovh as ovh
my_key = ovh.get_cloud_ssh_key(service_name="aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
name="my-deploy-key")
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.GetCloudSshKey(ctx, &ovh.GetCloudSshKeyArgs{
ServiceName: pulumi.StringRef("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
Name: "my-deploy-key",
}, 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 myKey = Ovh.GetCloudSshKey.Invoke(new()
{
ServiceName = "aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
Name = "my-deploy-key",
});
});
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.GetCloudSshKeyArgs;
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 = OvhFunctions.getCloudSshKey(GetCloudSshKeyArgs.builder()
.serviceName("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")
.name("my-deploy-key")
.build());
}
}
variables:
myKey:
fn::invoke:
function: ovh:getCloudSshKey
arguments:
serviceName: aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
name: my-deploy-key
Example coming soon!
Using getCloudSshKey
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 getCloudSshKey(args: GetCloudSshKeyArgs, opts?: InvokeOptions): Promise<GetCloudSshKeyResult>
function getCloudSshKeyOutput(args: GetCloudSshKeyOutputArgs, opts?: InvokeOptions): Output<GetCloudSshKeyResult>def get_cloud_ssh_key(name: Optional[str] = None,
service_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCloudSshKeyResult
def get_cloud_ssh_key_output(name: pulumi.Input[Optional[str]] = None,
service_name: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCloudSshKeyResult]func GetCloudSshKey(ctx *Context, args *GetCloudSshKeyArgs, opts ...InvokeOption) (*GetCloudSshKeyResult, error)
func GetCloudSshKeyOutput(ctx *Context, args *GetCloudSshKeyOutputArgs, opts ...InvokeOption) GetCloudSshKeyResultOutput> Note: This function is named GetCloudSshKey in the Go SDK.
public static class GetCloudSshKey
{
public static Task<GetCloudSshKeyResult> InvokeAsync(GetCloudSshKeyArgs args, InvokeOptions? opts = null)
public static Output<GetCloudSshKeyResult> Invoke(GetCloudSshKeyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCloudSshKeyResult> getCloudSshKey(GetCloudSshKeyArgs args, InvokeOptions options)
public static Output<GetCloudSshKeyResult> getCloudSshKey(GetCloudSshKeyArgs args, InvokeOptions options)
fn::invoke:
function: ovh:index/getCloudSshKey:getCloudSshKey
arguments:
# arguments dictionarydata "ovh_getcloudsshkey" "name" {
# arguments
}The following arguments are supported:
- Name string
- Name of the SSH key to retrieve. SSH key names are unique within a project.
- Service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- Name string
- Name of the SSH key to retrieve. SSH key names are unique within a project.
- Service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- name string
- Name of the SSH key to retrieve. SSH key names are unique within a project.
- service_
name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- name String
- Name of the SSH key to retrieve. SSH key names are unique within a project.
- service
Name String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- name string
- Name of the SSH key to retrieve. SSH key names are unique within a project.
- service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- name str
- Name of the SSH key to retrieve. SSH key names are unique within a project.
- service_
name str - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- name String
- Name of the SSH key to retrieve. SSH key names are unique within a project.
- service
Name String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
getCloudSshKey Result
The following output properties are available:
- Created
At string - Creation date of the SSH key (RFC 3339 format).
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- SSH key name.
- Public
Key string - SSH public key content.
- Updated
At string - Last update date of the SSH key (RFC 3339 format).
- Service
Name string - The id of the public cloud project.
- Created
At string - Creation date of the SSH key (RFC 3339 format).
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- SSH key name.
- Public
Key string - SSH public key content.
- Updated
At string - Last update date of the SSH key (RFC 3339 format).
- Service
Name string - The id of the public cloud project.
- created_
at string - Creation date of the SSH key (RFC 3339 format).
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- SSH key name.
- public_
key string - SSH public key content.
- updated_
at string - Last update date of the SSH key (RFC 3339 format).
- service_
name string - The id of the public cloud project.
- created
At String - Creation date of the SSH key (RFC 3339 format).
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- SSH key name.
- public
Key String - SSH public key content.
- updated
At String - Last update date of the SSH key (RFC 3339 format).
- service
Name String - The id of the public cloud project.
- created
At string - Creation date of the SSH key (RFC 3339 format).
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- SSH key name.
- public
Key string - SSH public key content.
- updated
At string - Last update date of the SSH key (RFC 3339 format).
- service
Name string - The id of the public cloud project.
- created_
at str - Creation date of the SSH key (RFC 3339 format).
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- SSH key name.
- public_
key str - SSH public key content.
- updated_
at str - Last update date of the SSH key (RFC 3339 format).
- service_
name str - The id of the public cloud project.
- created
At String - Creation date of the SSH key (RFC 3339 format).
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- SSH key name.
- public
Key String - SSH public key content.
- updated
At String - Last update date of the SSH key (RFC 3339 format).
- service
Name String - The id of the public cloud project.
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovhTerraform Provider.
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
published on Friday, Jul 17, 2026 by OVHcloud