Key Value Args
data class KeyValueArgs(val configStoreName: Output<String>? = null, val contentType: Output<String>? = null, val keyValueName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val value: Output<String>? = null) : ConvertibleToJava<KeyValueArgs>
The key-value resource along with all resource properties. Uses Azure REST API version 2023-03-01. In version 1.x of the Azure Native provider, it used API version 2020-07-01-preview. Other available API versions: 2023-08-01-preview, 2023-09-01-preview, 2024-05-01.
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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}
Content copied to clipboard
Constructors
Properties
Link copied to clipboard
The name of the configuration store.
Link copied to clipboard
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
Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
Link copied to clipboard
The name of the resource group to which the container registry belongs.