getKeyHandle

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const myKeyHandle = gcp.kms.getKeyHandle({
name: "eed58b7b-20ad-4da8-ad85-ba78a0d5ab87",
location: "us-central1",
});
import pulumi
import pulumi_gcp as gcp
my_key_handle = gcp.kms.get_key_handle(name="eed58b7b-20ad-4da8-ad85-ba78a0d5ab87",
location="us-central1")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var myKeyHandle = Gcp.Kms.GetKeyHandle.Invoke(new()
{
Name = "eed58b7b-20ad-4da8-ad85-ba78a0d5ab87",
Location = "us-central1",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/kms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := kms.LookupKeyHandle(ctx, &kms.LookupKeyHandleArgs{
Name: "eed58b7b-20ad-4da8-ad85-ba78a0d5ab87",
Location: "us-central1",
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.kms.KmsFunctions;
import com.pulumi.gcp.kms.inputs.GetKeyHandleArgs;
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 myKeyHandle = KmsFunctions.getKeyHandle(GetKeyHandleArgs.builder()
.name("eed58b7b-20ad-4da8-ad85-ba78a0d5ab87")
.location("us-central1")
.build());
}
}
variables:
myKeyHandle:
fn::invoke:
function: gcp:kms:getKeyHandle
arguments:
name: eed58b7b-20ad-4da8-ad85-ba78a0d5ab87
location: us-central1

Return

A collection of values returned by getKeyHandle.

Parameters

argument

A collection of arguments for invoking getKeyHandle.


suspend fun getKeyHandle(location: String, name: String, project: String? = null): GetKeyHandleResult

Return

A collection of values returned by getKeyHandle.

Parameters

location

The Google Cloud Platform location for the KeyHandle. A full list of valid locations can be found by running gcloud kms locations list.

name

The KeyHandle's name. A KeyHandle name must exist within the provided location and must be valid UUID.

project

The project in which the resource belongs. If it is not provided, the provider project is used.

See also


Return

A collection of values returned by getKeyHandle.

Parameters

argument

Builder for com.pulumi.gcp.kms.kotlin.inputs.GetKeyHandlePlainArgs.

See also