1. Packages
  2. Packages
  3. OVH
  4. API Docs
  5. getCloudSshKeys
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud

    This data source uses a Beta API. Use this data source to list the SSH keys of a Public Cloud project (API v2).

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const myKeys = ovh.getCloudSshKeys({
        serviceName: "aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    my_keys = ovh.get_cloud_ssh_keys(service_name="aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")
    
    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.GetCloudSshKeys(ctx, &ovh.GetCloudSshKeysArgs{
    			ServiceName: pulumi.StringRef("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
    		}, 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 myKeys = Ovh.GetCloudSshKeys.Invoke(new()
        {
            ServiceName = "aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
        });
    
    });
    
    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.GetCloudSshKeysArgs;
    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 myKeys = OvhFunctions.getCloudSshKeys(GetCloudSshKeysArgs.builder()
                .serviceName("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")
                .build());
    
        }
    }
    
    variables:
      myKeys:
        fn::invoke:
          function: ovh:getCloudSshKeys
          arguments:
            serviceName: aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
    
    Example coming soon!
    

    Using getCloudSshKeys

    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 getCloudSshKeys(args: GetCloudSshKeysArgs, opts?: InvokeOptions): Promise<GetCloudSshKeysResult>
    function getCloudSshKeysOutput(args: GetCloudSshKeysOutputArgs, opts?: InvokeOptions): Output<GetCloudSshKeysResult>
    def get_cloud_ssh_keys(service_name: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetCloudSshKeysResult
    def get_cloud_ssh_keys_output(service_name: pulumi.Input[Optional[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetCloudSshKeysResult]
    func GetCloudSshKeys(ctx *Context, args *GetCloudSshKeysArgs, opts ...InvokeOption) (*GetCloudSshKeysResult, error)
    func GetCloudSshKeysOutput(ctx *Context, args *GetCloudSshKeysOutputArgs, opts ...InvokeOption) GetCloudSshKeysResultOutput

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

    public static class GetCloudSshKeys 
    {
        public static Task<GetCloudSshKeysResult> InvokeAsync(GetCloudSshKeysArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudSshKeysResult> Invoke(GetCloudSshKeysInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudSshKeysResult> getCloudSshKeys(GetCloudSshKeysArgs args, InvokeOptions options)
    public static Output<GetCloudSshKeysResult> getCloudSshKeys(GetCloudSshKeysArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:index/getCloudSshKeys:getCloudSshKeys
      arguments:
        # arguments dictionary
    data "ovh_get_cloud_ssh_keys" "name" {
        # arguments
    }

    The following arguments are supported:

    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    service_name string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

    getCloudSshKeys Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    SshKeys List<GetCloudSshKeysSshKey>
    The list of SSH keys of the project. Each element contains:
    ServiceName string
    The id of the public cloud project.
    Id string
    The provider-assigned unique ID for this managed resource.
    SshKeys []GetCloudSshKeysSshKey
    The list of SSH keys of the project. Each element contains:
    ServiceName string
    The id of the public cloud project.
    id string
    The provider-assigned unique ID for this managed resource.
    ssh_keys list(object)
    The list of SSH keys of the project. Each element contains:
    service_name string
    The id of the public cloud project.
    id String
    The provider-assigned unique ID for this managed resource.
    sshKeys List<GetCloudSshKeysSshKey>
    The list of SSH keys of the project. Each element contains:
    serviceName String
    The id of the public cloud project.
    id string
    The provider-assigned unique ID for this managed resource.
    sshKeys GetCloudSshKeysSshKey[]
    The list of SSH keys of the project. Each element contains:
    serviceName string
    The id of the public cloud project.
    id str
    The provider-assigned unique ID for this managed resource.
    ssh_keys Sequence[GetCloudSshKeysSshKey]
    The list of SSH keys of the project. Each element contains:
    service_name str
    The id of the public cloud project.
    id String
    The provider-assigned unique ID for this managed resource.
    sshKeys List<Property Map>
    The list of SSH keys of the project. Each element contains:
    serviceName String
    The id of the public cloud project.

    Supporting Types

    GetCloudSshKeysSshKey

    CreatedAt string
    Creation date of the SSH key (RFC 3339 format).
    Name string
    SSH key name.
    PublicKey string
    SSH public key content.
    UpdatedAt string
    Last update date of the SSH key (RFC 3339 format).
    CreatedAt string
    Creation date of the SSH key (RFC 3339 format).
    Name string
    SSH key name.
    PublicKey string
    SSH public key content.
    UpdatedAt string
    Last update date of the SSH key (RFC 3339 format).
    created_at string
    Creation date of the SSH key (RFC 3339 format).
    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).
    createdAt String
    Creation date of the SSH key (RFC 3339 format).
    name String
    SSH key name.
    publicKey String
    SSH public key content.
    updatedAt String
    Last update date of the SSH key (RFC 3339 format).
    createdAt string
    Creation date of the SSH key (RFC 3339 format).
    name string
    SSH key name.
    publicKey string
    SSH public key content.
    updatedAt string
    Last update date of the SSH key (RFC 3339 format).
    created_at str
    Creation date of the SSH key (RFC 3339 format).
    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).
    createdAt String
    Creation date of the SSH key (RFC 3339 format).
    name String
    SSH key name.
    publicKey String
    SSH public key content.
    updatedAt String
    Last update date of the SSH key (RFC 3339 format).

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    Viewing docs for OVHCloud v2.17.0
    published on Friday, Jul 17, 2026 by OVHcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial