1. Packages
  2. Azure Native
  3. API Docs
  4. appconfiguration
  5. KeyValue
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi

azure-native.appconfiguration.KeyValue

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi

    The key-value resource along with all resource properties. Azure REST API version: 2023-03-01. Prior API version in Azure Native 1.x: 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",
        });
    
    });
    
    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 pulumi
    import pulumi_azure_native as azure_native
    
    key_value = azure_native.appconfiguration.KeyValue("keyValue",
        config_store_name="contoso",
        key_value_name="myKey$myLabel",
        resource_group_name="myResourceGroup",
        tags={
            "tag1": "tagValue1",
            "tag2": "tagValue2",
        },
        value="myValue")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const keyValue = new azure_native.appconfiguration.KeyValue("keyValue", {
        configStoreName: "contoso",
        keyValueName: "myKey$myLabel",
        resourceGroupName: "myResourceGroup",
        tags: {
            tag1: "tagValue1",
            tag2: "tagValue2",
        },
        value: "myValue",
    });
    
    resources:
      keyValue:
        type: azure-native:appconfiguration:KeyValue
        properties:
          configStoreName: contoso
          keyValueName: myKey$myLabel
          resourceGroupName: myResourceGroup
          tags:
            tag1: tagValue1
            tag2: tagValue2
          value: myValue
    

    Create KeyValue Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new KeyValue(name: string, args: KeyValueArgs, opts?: CustomResourceOptions);
    @overload
    def KeyValue(resource_name: str,
                 args: KeyValueArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def KeyValue(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 config_store_name: Optional[str] = None,
                 resource_group_name: Optional[str] = None,
                 content_type: Optional[str] = None,
                 key_value_name: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 value: Optional[str] = None)
    func NewKeyValue(ctx *Context, name string, args KeyValueArgs, opts ...ResourceOption) (*KeyValue, error)
    public KeyValue(string name, KeyValueArgs args, CustomResourceOptions? opts = null)
    public KeyValue(String name, KeyValueArgs args)
    public KeyValue(String name, KeyValueArgs args, CustomResourceOptions options)
    
    type: azure-native:appconfiguration:KeyValue
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args KeyValueArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args KeyValueArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args KeyValueArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KeyValueArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args KeyValueArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var keyValueResource = new AzureNative.AppConfiguration.KeyValue("keyValueResource", new()
    {
        ConfigStoreName = "string",
        ResourceGroupName = "string",
        ContentType = "string",
        KeyValueName = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Value = "string",
    });
    
    example, err := appconfiguration.NewKeyValue(ctx, "keyValueResource", &appconfiguration.KeyValueArgs{
    	ConfigStoreName:   pulumi.String("string"),
    	ResourceGroupName: pulumi.String("string"),
    	ContentType:       pulumi.String("string"),
    	KeyValueName:      pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Value: pulumi.String("string"),
    })
    
    var keyValueResource = new KeyValue("keyValueResource", KeyValueArgs.builder()
        .configStoreName("string")
        .resourceGroupName("string")
        .contentType("string")
        .keyValueName("string")
        .tags(Map.of("string", "string"))
        .value("string")
        .build());
    
    key_value_resource = azure_native.appconfiguration.KeyValue("keyValueResource",
        config_store_name="string",
        resource_group_name="string",
        content_type="string",
        key_value_name="string",
        tags={
            "string": "string",
        },
        value="string")
    
    const keyValueResource = new azure_native.appconfiguration.KeyValue("keyValueResource", {
        configStoreName: "string",
        resourceGroupName: "string",
        contentType: "string",
        keyValueName: "string",
        tags: {
            string: "string",
        },
        value: "string",
    });
    
    type: azure-native:appconfiguration:KeyValue
    properties:
        configStoreName: string
        contentType: string
        keyValueName: string
        resourceGroupName: string
        tags:
            string: string
        value: string
    

    KeyValue Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The KeyValue resource accepts the following input properties:

    ConfigStoreName string
    The name of the configuration store.
    ResourceGroupName string
    The name of the resource group to which the container registry belongs.
    ContentType 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.
    KeyValueName string
    Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
    Tags Dictionary<string, string>
    A dictionary of tags that can help identify what a key-value may be applicable for.
    Value string
    The value of the key-value.
    ConfigStoreName string
    The name of the configuration store.
    ResourceGroupName string
    The name of the resource group to which the container registry belongs.
    ContentType 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.
    KeyValueName string
    Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
    Tags map[string]string
    A dictionary of tags that can help identify what a key-value may be applicable for.
    Value string
    The value of the key-value.
    configStoreName String
    The name of the configuration store.
    resourceGroupName String
    The name of the resource group to which the container registry belongs.
    contentType 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.
    keyValueName String
    Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
    tags Map<String,String>
    A dictionary of tags that can help identify what a key-value may be applicable for.
    value String
    The value of the key-value.
    configStoreName string
    The name of the configuration store.
    resourceGroupName string
    The name of the resource group to which the container registry belongs.
    contentType 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.
    keyValueName string
    Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
    tags {[key: string]: string}
    A dictionary of tags that can help identify what a key-value may be applicable for.
    value string
    The value of the key-value.
    config_store_name str
    The name of the configuration store.
    resource_group_name str
    The name of the resource group to which the container registry belongs.
    content_type str
    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.
    key_value_name str
    Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
    tags Mapping[str, str]
    A dictionary of tags that can help identify what a key-value may be applicable for.
    value str
    The value of the key-value.
    configStoreName String
    The name of the configuration store.
    resourceGroupName String
    The name of the resource group to which the container registry belongs.
    contentType 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.
    keyValueName String
    Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
    tags Map<String>
    A dictionary of tags that can help identify what a key-value may be applicable for.
    value String
    The value of the key-value.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the KeyValue resource produces the following output properties:

    ETag string
    An ETag indicating the state of a key-value within a configuration store.
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    The primary identifier of a key-value. The key is used in unison with the label to uniquely identify a key-value.
    Label string
    A value used to group key-values. The label is used in unison with the key to uniquely identify a key-value.
    LastModified string
    The last time a modifying operation was performed on the given key-value.
    Locked bool
    A value indicating whether the key-value is locked. A locked key-value may not be modified until it is unlocked.
    Name string
    The name of the resource.
    Type string
    The type of the resource.
    ETag string
    An ETag indicating the state of a key-value within a configuration store.
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    The primary identifier of a key-value. The key is used in unison with the label to uniquely identify a key-value.
    Label string
    A value used to group key-values. The label is used in unison with the key to uniquely identify a key-value.
    LastModified string
    The last time a modifying operation was performed on the given key-value.
    Locked bool
    A value indicating whether the key-value is locked. A locked key-value may not be modified until it is unlocked.
    Name string
    The name of the resource.
    Type string
    The type of the resource.
    eTag String
    An ETag indicating the state of a key-value within a configuration store.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    The primary identifier of a key-value. The key is used in unison with the label to uniquely identify a key-value.
    label String
    A value used to group key-values. The label is used in unison with the key to uniquely identify a key-value.
    lastModified String
    The last time a modifying operation was performed on the given key-value.
    locked Boolean
    A value indicating whether the key-value is locked. A locked key-value may not be modified until it is unlocked.
    name String
    The name of the resource.
    type String
    The type of the resource.
    eTag string
    An ETag indicating the state of a key-value within a configuration store.
    id string
    The provider-assigned unique ID for this managed resource.
    key string
    The primary identifier of a key-value. The key is used in unison with the label to uniquely identify a key-value.
    label string
    A value used to group key-values. The label is used in unison with the key to uniquely identify a key-value.
    lastModified string
    The last time a modifying operation was performed on the given key-value.
    locked boolean
    A value indicating whether the key-value is locked. A locked key-value may not be modified until it is unlocked.
    name string
    The name of the resource.
    type string
    The type of the resource.
    e_tag str
    An ETag indicating the state of a key-value within a configuration store.
    id str
    The provider-assigned unique ID for this managed resource.
    key str
    The primary identifier of a key-value. The key is used in unison with the label to uniquely identify a key-value.
    label str
    A value used to group key-values. The label is used in unison with the key to uniquely identify a key-value.
    last_modified str
    The last time a modifying operation was performed on the given key-value.
    locked bool
    A value indicating whether the key-value is locked. A locked key-value may not be modified until it is unlocked.
    name str
    The name of the resource.
    type str
    The type of the resource.
    eTag String
    An ETag indicating the state of a key-value within a configuration store.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    The primary identifier of a key-value. The key is used in unison with the label to uniquely identify a key-value.
    label String
    A value used to group key-values. The label is used in unison with the key to uniquely identify a key-value.
    lastModified String
    The last time a modifying operation was performed on the given key-value.
    locked Boolean
    A value indicating whether the key-value is locked. A locked key-value may not be modified until it is unlocked.
    name String
    The name of the resource.
    type String
    The type of the resource.

    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} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi