1. Packages
  2. Scaleway
  3. API Docs
  4. getAccountSshKey
Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse

scaleway.getAccountSshKey

Explore with Pulumi AI

scaleway logo
Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse

    Use this data source to get SSH key information based on its ID or name.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    
    const myKey = scaleway.getAccountSshKey({
        sshKeyId: "11111111-1111-1111-1111-111111111111",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    my_key = scaleway.get_account_ssh_key(ssh_key_id="11111111-1111-1111-1111-111111111111")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.LookupAccountSshKey(ctx, &scaleway.LookupAccountSshKeyArgs{
    			SshKeyId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var myKey = Scaleway.GetAccountSshKey.Invoke(new()
        {
            SshKeyId = "11111111-1111-1111-1111-111111111111",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetAccountSshKeyArgs;
    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 = ScalewayFunctions.getAccountSshKey(GetAccountSshKeyArgs.builder()
                .sshKeyId("11111111-1111-1111-1111-111111111111")
                .build());
    
        }
    }
    
    variables:
      myKey:
        fn::invoke:
          Function: scaleway:getAccountSshKey
          Arguments:
            sshKeyId: 11111111-1111-1111-1111-111111111111
    

    Using getAccountSshKey

    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 getAccountSshKey(args: GetAccountSshKeyArgs, opts?: InvokeOptions): Promise<GetAccountSshKeyResult>
    function getAccountSshKeyOutput(args: GetAccountSshKeyOutputArgs, opts?: InvokeOptions): Output<GetAccountSshKeyResult>
    def get_account_ssh_key(name: Optional[str] = None,
                            project_id: Optional[str] = None,
                            ssh_key_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetAccountSshKeyResult
    def get_account_ssh_key_output(name: Optional[pulumi.Input[str]] = None,
                            project_id: Optional[pulumi.Input[str]] = None,
                            ssh_key_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetAccountSshKeyResult]
    func LookupAccountSshKey(ctx *Context, args *LookupAccountSshKeyArgs, opts ...InvokeOption) (*LookupAccountSshKeyResult, error)
    func LookupAccountSshKeyOutput(ctx *Context, args *LookupAccountSshKeyOutputArgs, opts ...InvokeOption) LookupAccountSshKeyResultOutput

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

    public static class GetAccountSshKey 
    {
        public static Task<GetAccountSshKeyResult> InvokeAsync(GetAccountSshKeyArgs args, InvokeOptions? opts = null)
        public static Output<GetAccountSshKeyResult> Invoke(GetAccountSshKeyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAccountSshKeyResult> getAccountSshKey(GetAccountSshKeyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getAccountSshKey:getAccountSshKey
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The SSH key name. Only one of name and ssh_key_id should be specified.
    ProjectId string
    project_id) The ID of the project the SSH key is associated with.
    SshKeyId string
    The SSH key id. Only one of name and ssh_key_id should be specified.
    Name string
    The SSH key name. Only one of name and ssh_key_id should be specified.
    ProjectId string
    project_id) The ID of the project the SSH key is associated with.
    SshKeyId string
    The SSH key id. Only one of name and ssh_key_id should be specified.
    name String
    The SSH key name. Only one of name and ssh_key_id should be specified.
    projectId String
    project_id) The ID of the project the SSH key is associated with.
    sshKeyId String
    The SSH key id. Only one of name and ssh_key_id should be specified.
    name string
    The SSH key name. Only one of name and ssh_key_id should be specified.
    projectId string
    project_id) The ID of the project the SSH key is associated with.
    sshKeyId string
    The SSH key id. Only one of name and ssh_key_id should be specified.
    name str
    The SSH key name. Only one of name and ssh_key_id should be specified.
    project_id str
    project_id) The ID of the project the SSH key is associated with.
    ssh_key_id str
    The SSH key id. Only one of name and ssh_key_id should be specified.
    name String
    The SSH key name. Only one of name and ssh_key_id should be specified.
    projectId String
    project_id) The ID of the project the SSH key is associated with.
    sshKeyId String
    The SSH key id. Only one of name and ssh_key_id should be specified.

    getAccountSshKey Result

    The following output properties are available:

    CreatedAt string
    Disabled bool
    Fingerprint string
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The ID of the organization the SSH key is associated with.
    PublicKey string
    The SSH public key string
    UpdatedAt string
    Name string
    ProjectId string
    SshKeyId string
    CreatedAt string
    Disabled bool
    Fingerprint string
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The ID of the organization the SSH key is associated with.
    PublicKey string
    The SSH public key string
    UpdatedAt string
    Name string
    ProjectId string
    SshKeyId string
    createdAt String
    disabled Boolean
    fingerprint String
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The ID of the organization the SSH key is associated with.
    publicKey String
    The SSH public key string
    updatedAt String
    name String
    projectId String
    sshKeyId String
    createdAt string
    disabled boolean
    fingerprint string
    id string
    The provider-assigned unique ID for this managed resource.
    organizationId string
    The ID of the organization the SSH key is associated with.
    publicKey string
    The SSH public key string
    updatedAt string
    name string
    projectId string
    sshKeyId string
    created_at str
    disabled bool
    fingerprint str
    id str
    The provider-assigned unique ID for this managed resource.
    organization_id str
    The ID of the organization the SSH key is associated with.
    public_key str
    The SSH public key string
    updated_at str
    name str
    project_id str
    ssh_key_id str
    createdAt String
    disabled Boolean
    fingerprint String
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The ID of the organization the SSH key is associated with.
    publicKey String
    The SSH public key string
    updatedAt String
    name String
    projectId String
    sshKeyId String

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse