aws.cloudfront.KeyvaluestoreKey
Explore with Pulumi AI
Resource for managing an AWS CloudFront KeyValueStore Key.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.cloudfront.KeyValueStore("example", {
name: "ExampleKeyValueStore",
comment: "This is an example key value store",
});
const exampleKeyvaluestoreKey = new aws.cloudfront.KeyvaluestoreKey("example", {
keyValueStoreArn: example.arn,
key: "Test Key",
value: "Test Value",
});
import pulumi
import pulumi_aws as aws
example = aws.cloudfront.KeyValueStore("example",
name="ExampleKeyValueStore",
comment="This is an example key value store")
example_keyvaluestore_key = aws.cloudfront.KeyvaluestoreKey("example",
key_value_store_arn=example.arn,
key="Test Key",
value="Test Value")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := cloudfront.NewKeyValueStore(ctx, "example", &cloudfront.KeyValueStoreArgs{
Name: pulumi.String("ExampleKeyValueStore"),
Comment: pulumi.String("This is an example key value store"),
})
if err != nil {
return err
}
_, err = cloudfront.NewKeyvaluestoreKey(ctx, "example", &cloudfront.KeyvaluestoreKeyArgs{
KeyValueStoreArn: example.Arn,
Key: pulumi.String("Test Key"),
Value: pulumi.String("Test Value"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.CloudFront.KeyValueStore("example", new()
{
Name = "ExampleKeyValueStore",
Comment = "This is an example key value store",
});
var exampleKeyvaluestoreKey = new Aws.CloudFront.KeyvaluestoreKey("example", new()
{
KeyValueStoreArn = example.Arn,
Key = "Test Key",
Value = "Test Value",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.KeyValueStore;
import com.pulumi.aws.cloudfront.KeyValueStoreArgs;
import com.pulumi.aws.cloudfront.KeyvaluestoreKey;
import com.pulumi.aws.cloudfront.KeyvaluestoreKeyArgs;
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 example = new KeyValueStore("example", KeyValueStoreArgs.builder()
.name("ExampleKeyValueStore")
.comment("This is an example key value store")
.build());
var exampleKeyvaluestoreKey = new KeyvaluestoreKey("exampleKeyvaluestoreKey", KeyvaluestoreKeyArgs.builder()
.keyValueStoreArn(example.arn())
.key("Test Key")
.value("Test Value")
.build());
}
}
resources:
example:
type: aws:cloudfront:KeyValueStore
properties:
name: ExampleKeyValueStore
comment: This is an example key value store
exampleKeyvaluestoreKey:
type: aws:cloudfront:KeyvaluestoreKey
name: example
properties:
keyValueStoreArn: ${example.arn}
key: Test Key
value: Test Value
Create KeyvaluestoreKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KeyvaluestoreKey(name: string, args: KeyvaluestoreKeyArgs, opts?: CustomResourceOptions);
@overload
def KeyvaluestoreKey(resource_name: str,
args: KeyvaluestoreKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def KeyvaluestoreKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
key: Optional[str] = None,
key_value_store_arn: Optional[str] = None,
value: Optional[str] = None)
func NewKeyvaluestoreKey(ctx *Context, name string, args KeyvaluestoreKeyArgs, opts ...ResourceOption) (*KeyvaluestoreKey, error)
public KeyvaluestoreKey(string name, KeyvaluestoreKeyArgs args, CustomResourceOptions? opts = null)
public KeyvaluestoreKey(String name, KeyvaluestoreKeyArgs args)
public KeyvaluestoreKey(String name, KeyvaluestoreKeyArgs args, CustomResourceOptions options)
type: aws:cloudfront:KeyvaluestoreKey
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 KeyvaluestoreKeyArgs
- 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 KeyvaluestoreKeyArgs
- 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 KeyvaluestoreKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KeyvaluestoreKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KeyvaluestoreKeyArgs
- 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 keyvaluestoreKeyResource = new Aws.CloudFront.KeyvaluestoreKey("keyvaluestoreKeyResource", new()
{
Key = "string",
KeyValueStoreArn = "string",
Value = "string",
});
example, err := cloudfront.NewKeyvaluestoreKey(ctx, "keyvaluestoreKeyResource", &cloudfront.KeyvaluestoreKeyArgs{
Key: pulumi.String("string"),
KeyValueStoreArn: pulumi.String("string"),
Value: pulumi.String("string"),
})
var keyvaluestoreKeyResource = new KeyvaluestoreKey("keyvaluestoreKeyResource", KeyvaluestoreKeyArgs.builder()
.key("string")
.keyValueStoreArn("string")
.value("string")
.build());
keyvaluestore_key_resource = aws.cloudfront.KeyvaluestoreKey("keyvaluestoreKeyResource",
key="string",
key_value_store_arn="string",
value="string")
const keyvaluestoreKeyResource = new aws.cloudfront.KeyvaluestoreKey("keyvaluestoreKeyResource", {
key: "string",
keyValueStoreArn: "string",
value: "string",
});
type: aws:cloudfront:KeyvaluestoreKey
properties:
key: string
keyValueStoreArn: string
value: string
KeyvaluestoreKey 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 KeyvaluestoreKey resource accepts the following input properties:
- Key string
- Key to put.
- Key
Value stringStore Arn - Amazon Resource Name (ARN) of the Key Value Store.
- Value string
- Value to put.
- Key string
- Key to put.
- Key
Value stringStore Arn - Amazon Resource Name (ARN) of the Key Value Store.
- Value string
- Value to put.
- key String
- Key to put.
- key
Value StringStore Arn - Amazon Resource Name (ARN) of the Key Value Store.
- value String
- Value to put.
- key string
- Key to put.
- key
Value stringStore Arn - Amazon Resource Name (ARN) of the Key Value Store.
- value string
- Value to put.
- key str
- Key to put.
- key_
value_ strstore_ arn - Amazon Resource Name (ARN) of the Key Value Store.
- value str
- Value to put.
- key String
- Key to put.
- key
Value StringStore Arn - Amazon Resource Name (ARN) of the Key Value Store.
- value String
- Value to put.
Outputs
All input properties are implicitly available as output properties. Additionally, the KeyvaluestoreKey resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Size intIn Bytes - Total size of the Key Value Store in bytes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Size intIn Bytes - Total size of the Key Value Store in bytes.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Size IntegerIn Bytes - Total size of the Key Value Store in bytes.
- id string
- The provider-assigned unique ID for this managed resource.
- total
Size numberIn Bytes - Total size of the Key Value Store in bytes.
- id str
- The provider-assigned unique ID for this managed resource.
- total_
size_ intin_ bytes - Total size of the Key Value Store in bytes.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Size NumberIn Bytes - Total size of the Key Value Store in bytes.
Look up Existing KeyvaluestoreKey Resource
Get an existing KeyvaluestoreKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: KeyvaluestoreKeyState, opts?: CustomResourceOptions): KeyvaluestoreKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
key: Optional[str] = None,
key_value_store_arn: Optional[str] = None,
total_size_in_bytes: Optional[int] = None,
value: Optional[str] = None) -> KeyvaluestoreKey
func GetKeyvaluestoreKey(ctx *Context, name string, id IDInput, state *KeyvaluestoreKeyState, opts ...ResourceOption) (*KeyvaluestoreKey, error)
public static KeyvaluestoreKey Get(string name, Input<string> id, KeyvaluestoreKeyState? state, CustomResourceOptions? opts = null)
public static KeyvaluestoreKey get(String name, Output<String> id, KeyvaluestoreKeyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Key string
- Key to put.
- Key
Value stringStore Arn - Amazon Resource Name (ARN) of the Key Value Store.
- Total
Size intIn Bytes - Total size of the Key Value Store in bytes.
- Value string
- Value to put.
- Key string
- Key to put.
- Key
Value stringStore Arn - Amazon Resource Name (ARN) of the Key Value Store.
- Total
Size intIn Bytes - Total size of the Key Value Store in bytes.
- Value string
- Value to put.
- key String
- Key to put.
- key
Value StringStore Arn - Amazon Resource Name (ARN) of the Key Value Store.
- total
Size IntegerIn Bytes - Total size of the Key Value Store in bytes.
- value String
- Value to put.
- key string
- Key to put.
- key
Value stringStore Arn - Amazon Resource Name (ARN) of the Key Value Store.
- total
Size numberIn Bytes - Total size of the Key Value Store in bytes.
- value string
- Value to put.
- key str
- Key to put.
- key_
value_ strstore_ arn - Amazon Resource Name (ARN) of the Key Value Store.
- total_
size_ intin_ bytes - Total size of the Key Value Store in bytes.
- value str
- Value to put.
- key String
- Key to put.
- key
Value StringStore Arn - Amazon Resource Name (ARN) of the Key Value Store.
- total
Size NumberIn Bytes - Total size of the Key Value Store in bytes.
- value String
- Value to put.
Import
Using pulumi import
, import CloudFront KeyValueStore Key using the id
. For example:
$ pulumi import aws:cloudfront/keyvaluestoreKey:KeyvaluestoreKey example arn:aws:cloudfront::111111111111:key-value-store/8562g61f-caba-2845-9d99-b97diwae5d3c,someKey
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.