1. Packages
  2. Gcore Provider
  3. API Docs
  4. getStorageSftpKey
gcore 0.19.0 published on Monday, Apr 14, 2025 by g-core

gcore.getStorageSftpKey

Explore with Pulumi AI

gcore 0.19.0 published on Monday, Apr 14, 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",
});
Copy
import pulumi
import pulumi_gcore as gcore

example_key = gcore.get_storage_sftp_key(name="example")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
variables:
  exampleKey:
    fn::invoke:
      function: gcore:getStorageSftpKey
      arguments:
        name: example
Copy

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>
Copy
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]
Copy
func LookupStorageSftpKey(ctx *Context, args *LookupStorageSftpKeyArgs, opts ...InvokeOption) (*LookupStorageSftpKeyResult, error)
func LookupStorageSftpKeyOutput(ctx *Context, args *LookupStorageSftpKeyOutputArgs, opts ...InvokeOption) LookupStorageSftpKeyResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetStorageSftpKeyResult> getStorageSftpKey(GetStorageSftpKeyArgs args, InvokeOptions options)
public static Output<GetStorageSftpKeyResult> getStorageSftpKey(GetStorageSftpKeyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gcore:index/getStorageSftpKey:getStorageSftpKey
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
A name of storage key resource.
Id string
The ID of this resource.
Name This property is required. string
A name of storage key resource.
Id string
The ID of this resource.
name This property is required. String
A name of storage key resource.
id String
The ID of this resource.
name This property is required. string
A name of storage key resource.
id string
The ID of this resource.
name This property is required. str
A name of storage key resource.
id str
The ID of this resource.
name This property is required. 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 0.19.0 published on Monday, Apr 14, 2025 by g-core