azure-native.appconfiguration.KeyValue
Explore with Pulumi AI
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.
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
The KeyValue resource accepts the following input properties:
- Config
Store stringName - The name of the configuration store.
- Resource
Group stringName - The name of the resource group to which the container registry belongs.
- Content
Type 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.
- Key
Value stringName - Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
- 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.
- Config
Store stringName - The name of the configuration store.
- Resource
Group stringName - The name of the resource group to which the container registry belongs.
- Content
Type 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.
- Key
Value stringName - Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
- 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.
- config
Store StringName - The name of the configuration store.
- resource
Group StringName - The name of the resource group to which the container registry belongs.
- content
Type 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.
- key
Value StringName - Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
- 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.
- config
Store stringName - The name of the configuration store.
- resource
Group stringName - The name of the resource group to which the container registry belongs.
- content
Type 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.
- key
Value stringName - Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
- {[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_ strname - The name of the configuration store.
- resource_
group_ strname - 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_ strname - Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
- 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.
- config
Store StringName - The name of the configuration store.
- resource
Group StringName - The name of the resource group to which the container registry belongs.
- content
Type 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.
- key
Value StringName - Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
- 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.
- Last
Modified 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.
- Last
Modified 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.
- e
Tag 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.
- last
Modified 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 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.
- last
Modified 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.
- e
Tag 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.
- last
Modified 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