KeyValue

class KeyValue : KotlinCustomResource

The key-value resource along with all resource properties. Uses Azure REST API version 2024-05-01. In version 2.x of the Azure Native provider, it used API version 2023-03-01. Other available API versions: 2023-03-01, 2023-08-01-preview, 2023-09-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native appconfiguration [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

KeyValues_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var keyValue = new AzureNative.AppConfiguration.KeyValue("keyValue", new()
{
ConfigStoreName = "contoso",
KeyValueName = "myKey$myLabel",
ResourceGroupName = "myResourceGroup",
Tags =
{
{ "tag1", "tagValue1" },
{ "tag2", "tagValue2" },
},
Value = "myValue",
});
});
package main
import (
appconfiguration "github.com/pulumi/pulumi-azure-native-sdk/appconfiguration/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appconfiguration.NewKeyValue(ctx, "keyValue", &appconfiguration.KeyValueArgs{
ConfigStoreName: pulumi.String("contoso"),
KeyValueName: pulumi.String("myKey$myLabel"),
ResourceGroupName: pulumi.String("myResourceGroup"),
Tags: pulumi.StringMap{
"tag1": pulumi.String("tagValue1"),
"tag2": pulumi.String("tagValue2"),
},
Value: pulumi.String("myValue"),
})
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.appconfiguration.KeyValue;
import com.pulumi.azurenative.appconfiguration.KeyValueArgs;
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 keyValue = new KeyValue("keyValue", KeyValueArgs.builder()
.configStoreName("contoso")
.keyValueName("myKey$myLabel")
.resourceGroupName("myResourceGroup")
.tags(Map.ofEntries(
Map.entry("tag1", "tagValue1"),
Map.entry("tag2", "tagValue2")
))
.value("myValue")
.build());
}
}

Import

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

$ pulumi import azure-native:appconfiguration:KeyValue myKey$myLabel /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}

Properties

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

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

The content type of the key-value's value. Providing a proper content-type can enable transformations of values when they are retrieved by applications.

Link copied to clipboard
val eTag: Output<String>

An ETag indicating the state of a key-value within a configuration store.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val key: Output<String>

The primary identifier of a key-value. The key is used in unison with the label to uniquely identify a key-value.

Link copied to clipboard
val label: Output<String>

A value used to group key-values. The label is used in unison with the key to uniquely identify a key-value.

Link copied to clipboard
val lastModified: Output<String>

The last time a modifying operation was performed on the given key-value.

Link copied to clipboard
val locked: Output<Boolean>

A value indicating whether the key-value is locked. A locked key-value may not be modified until it is unlocked.

Link copied to clipboard
val name: Output<String>

The name of the 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>>?

A dictionary of tags that can help identify what a key-value may be applicable for.

Link copied to clipboard
val type: Output<String>

The type of the resource.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val value: Output<String>?

The value of the key-value.