Key

class Key : KotlinCustomResource

The key resource. API Version: 2019-09-01.

Example Usage

Create a key

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var key = new AzureNative.KeyVault.Key("key", new()
{
KeyName = "sample-key-name",
Properties = new AzureNative.KeyVault.Inputs.KeyPropertiesArgs
{
Kty = "RSA",
},
ResourceGroupName = "sample-group",
VaultName = "sample-vault-name",
});
});
package main
import (
keyvault "github.com/pulumi/pulumi-azure-native-sdk/keyvault"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := keyvault.NewKey(ctx, "key", &keyvault.KeyArgs{
KeyName: pulumi.String("sample-key-name"),
Properties: &keyvault.KeyPropertiesArgs{
Kty: pulumi.String("RSA"),
},
ResourceGroupName: pulumi.String("sample-group"),
VaultName: pulumi.String("sample-vault-name"),
})
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.azurenative.keyvault.Key;
import com.pulumi.azurenative.keyvault.KeyArgs;
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) {
var key = new Key("key", KeyArgs.builder()
.keyName("sample-key-name")
.properties(Map.of("kty", "RSA"))
.resourceGroupName("sample-group")
.vaultName("sample-vault-name")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:keyvault:Key sample-key-name /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault-name/keys/sample-key-name

Properties

Link copied to clipboard

The attributes of the key.

Link copied to clipboard
val curveName: Output<String>?

The elliptic curve name. For valid values, see JsonWebKeyCurveName.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val keyOps: Output<List<String>>?
Link copied to clipboard
val keySize: Output<Int>?

The key size in bits. For example: 2048, 3072, or 4096 for RSA.

Link copied to clipboard
val keyUri: Output<String>

The URI to retrieve the current version of the key.

Link copied to clipboard

The URI to retrieve the specific version of the key.

Link copied to clipboard
val kty: Output<String>?

The type of the key. For valid values, see JsonWebKeyType.

Link copied to clipboard
val location: Output<String>

Azure location of the key vault resource.

Link copied to clipboard
val name: Output<String>

Name of the key vault resource.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val tags: Output<Map<String, String>>

Tags assigned to the key vault resource.

Link copied to clipboard
val type: Output<String>

Resource type of the key vault resource.

Link copied to clipboard
val urn: Output<String>