1. Packages
  2. OVH
  3. API Docs
  4. Me
  5. getSshKeys
OVHCloud v0.42.0 published on Tuesday, Apr 9, 2024 by OVHcloud

ovh.Me.getSshKeys

Explore with Pulumi AI

ovh logo
OVHCloud v0.42.0 published on Tuesday, Apr 9, 2024 by OVHcloud

    Use this data source to retrieve list of names of the account’s SSH keys.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@pulumi/ovh";
    
    const mykeys = ovh.Me.getSshKeys({});
    
    import pulumi
    import pulumi_ovh as ovh
    
    mykeys = ovh.Me.get_ssh_keys()
    
    package main
    
    import (
    	"github.com/ovh/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.GetSshKeys(ctx, nil, 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.Me.GetSshKeys.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.Me.MeFunctions;
    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 = MeFunctions.getSshKeys();
    
        }
    }
    
    variables:
      mykeys:
        fn::invoke:
          Function: ovh:Me:getSshKeys
          Arguments: {}
    

    Using getSshKeys

    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 getSshKeys(opts?: InvokeOptions): Promise<GetSshKeysResult>
    function getSshKeysOutput(opts?: InvokeOptions): Output<GetSshKeysResult>
    def get_ssh_keys(opts: Optional[InvokeOptions] = None) -> GetSshKeysResult
    def get_ssh_keys_output(opts: Optional[InvokeOptions] = None) -> Output[GetSshKeysResult]
    func GetSshKeys(ctx *Context, opts ...InvokeOption) (*GetSshKeysResult, error)
    func GetSshKeysOutput(ctx *Context, opts ...InvokeOption) GetSshKeysResultOutput

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

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

    getSshKeys Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Names List<string>
    The list of the names of all the SSH keys.
    Id string
    The provider-assigned unique ID for this managed resource.
    Names []string
    The list of the names of all the SSH keys.
    id String
    The provider-assigned unique ID for this managed resource.
    names List<String>
    The list of the names of all the SSH keys.
    id string
    The provider-assigned unique ID for this managed resource.
    names string[]
    The list of the names of all the SSH keys.
    id str
    The provider-assigned unique ID for this managed resource.
    names Sequence[str]
    The list of the names of all the SSH keys.
    id String
    The provider-assigned unique ID for this managed resource.
    names List<String>
    The list of the names of all the SSH keys.

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v0.42.0 published on Tuesday, Apr 9, 2024 by OVHcloud