1. Packages
  2. Gcore Provider
  3. API Docs
  4. getStorageSftpKey
gcore 0.22.0 published on Wednesday, Apr 30, 2025 by g-core

gcore.getStorageSftpKey

Explore with Pulumi AI

gcore logo
gcore 0.22.0 published on Wednesday, Apr 30, 2025 by g-core

    Represent storage key resource. https://storage.gcore.com/ssh-key/list

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const exampleKey = gcore.getStorageSftpKey({
        name: "example",
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    example_key = gcore.get_storage_sftp_key(name="example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.LookupStorageSftpKey(ctx, &gcore.LookupStorageSftpKeyArgs{
    			Name: "example",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleKey = Gcore.GetStorageSftpKey.Invoke(new()
        {
            Name = "example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.GcoreFunctions;
    import com.pulumi.gcore.inputs.GetStorageSftpKeyArgs;
    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 exampleKey = GcoreFunctions.getStorageSftpKey(GetStorageSftpKeyArgs.builder()
                .name("example")
                .build());
    
        }
    }
    
    variables:
      exampleKey:
        fn::invoke:
          function: gcore:getStorageSftpKey
          arguments:
            name: example
    

    Using getStorageSftpKey

    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 getStorageSftpKey(args: GetStorageSftpKeyArgs, opts?: InvokeOptions): Promise<GetStorageSftpKeyResult>
    function getStorageSftpKeyOutput(args: GetStorageSftpKeyOutputArgs, opts?: InvokeOptions): Output<GetStorageSftpKeyResult>
    def get_storage_sftp_key(id: Optional[str] = None,
                             name: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetStorageSftpKeyResult
    def get_storage_sftp_key_output(id: Optional[pulumi.Input[str]] = None,
                             name: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetStorageSftpKeyResult]
    func LookupStorageSftpKey(ctx *Context, args *LookupStorageSftpKeyArgs, opts ...InvokeOption) (*LookupStorageSftpKeyResult, error)
    func LookupStorageSftpKeyOutput(ctx *Context, args *LookupStorageSftpKeyOutputArgs, opts ...InvokeOption) LookupStorageSftpKeyResultOutput

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

    public static class GetStorageSftpKey 
    {
        public static Task<GetStorageSftpKeyResult> InvokeAsync(GetStorageSftpKeyArgs args, InvokeOptions? opts = null)
        public static Output<GetStorageSftpKeyResult> Invoke(GetStorageSftpKeyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStorageSftpKeyResult> getStorageSftpKey(GetStorageSftpKeyArgs args, InvokeOptions options)
    public static Output<GetStorageSftpKeyResult> getStorageSftpKey(GetStorageSftpKeyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcore:index/getStorageSftpKey:getStorageSftpKey
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    A name of storage key resource.
    Id string
    The ID of this resource.
    Name string
    A name of storage key resource.
    Id string
    The ID of this resource.
    name String
    A name of storage key resource.
    id String
    The ID of this resource.
    name string
    A name of storage key resource.
    id string
    The ID of this resource.
    name str
    A name of storage key resource.
    id str
    The ID of this resource.
    name String
    A name of storage key resource.
    id String
    The ID of this resource.

    getStorageSftpKey Result

    The following output properties are available:

    Id string
    The ID of this resource.
    KeyId double
    An id of of storage key resource.
    Name string
    A name of storage key resource.
    Id string
    The ID of this resource.
    KeyId float64
    An id of of storage key resource.
    Name string
    A name of storage key resource.
    id String
    The ID of this resource.
    keyId Double
    An id of of storage key resource.
    name String
    A name of storage key resource.
    id string
    The ID of this resource.
    keyId number
    An id of of storage key resource.
    name string
    A name of storage key resource.
    id str
    The ID of this resource.
    key_id float
    An id of of storage key resource.
    name str
    A name of storage key resource.
    id String
    The ID of this resource.
    keyId Number
    An id of of storage key resource.
    name String
    A name of storage key resource.

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    gcore logo
    gcore 0.22.0 published on Wednesday, Apr 30, 2025 by g-core