cloudflare.WorkersKv
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleWorkersKv = new cloudflare.WorkersKv("example_workers_kv", {
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
namespaceId: "0f2ac74b498b48028cb68387c421e279",
keyName: "My-Key",
metadata: "{\"someMetadataKey\": \"someMetadataValue\"}",
value: "Some Value",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_workers_kv = cloudflare.WorkersKv("example_workers_kv",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
namespace_id="0f2ac74b498b48028cb68387c421e279",
key_name="My-Key",
metadata="{\"someMetadataKey\": \"someMetadataValue\"}",
value="Some Value")
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewWorkersKv(ctx, "example_workers_kv", &cloudflare.WorkersKvArgs{
AccountId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
NamespaceId: pulumi.String("0f2ac74b498b48028cb68387c421e279"),
KeyName: pulumi.String("My-Key"),
Metadata: pulumi.String("{\"someMetadataKey\": \"someMetadataValue\"}"),
Value: pulumi.String("Some Value"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleWorkersKv = new Cloudflare.WorkersKv("example_workers_kv", new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
NamespaceId = "0f2ac74b498b48028cb68387c421e279",
KeyName = "My-Key",
Metadata = "{\"someMetadataKey\": \"someMetadataValue\"}",
Value = "Some Value",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.WorkersKv;
import com.pulumi.cloudflare.WorkersKvArgs;
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 exampleWorkersKv = new WorkersKv("exampleWorkersKv", WorkersKvArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.namespaceId("0f2ac74b498b48028cb68387c421e279")
.keyName("My-Key")
.metadata("{\"someMetadataKey\": \"someMetadataValue\"}")
.value("Some Value")
.build());
}
}
resources:
exampleWorkersKv:
type: cloudflare:WorkersKv
name: example_workers_kv
properties:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
namespaceId: 0f2ac74b498b48028cb68387c421e279
keyName: My-Key
metadata: '{"someMetadataKey": "someMetadataValue"}'
value: Some Value
Create WorkersKv Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkersKv(name: string, args: WorkersKvArgs, opts?: CustomResourceOptions);
@overload
def WorkersKv(resource_name: str,
args: WorkersKvArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkersKv(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
key_name: Optional[str] = None,
namespace_id: Optional[str] = None,
value: Optional[str] = None,
metadata: Optional[str] = None)
func NewWorkersKv(ctx *Context, name string, args WorkersKvArgs, opts ...ResourceOption) (*WorkersKv, error)
public WorkersKv(string name, WorkersKvArgs args, CustomResourceOptions? opts = null)
public WorkersKv(String name, WorkersKvArgs args)
public WorkersKv(String name, WorkersKvArgs args, CustomResourceOptions options)
type: cloudflare:WorkersKv
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 WorkersKvArgs
- 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 WorkersKvArgs
- 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 WorkersKvArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkersKvArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkersKvArgs
- 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 workersKvResource = new Cloudflare.WorkersKv("workersKvResource", new()
{
AccountId = "string",
KeyName = "string",
NamespaceId = "string",
Value = "string",
Metadata = "string",
});
example, err := cloudflare.NewWorkersKv(ctx, "workersKvResource", &cloudflare.WorkersKvArgs{
AccountId: pulumi.String("string"),
KeyName: pulumi.String("string"),
NamespaceId: pulumi.String("string"),
Value: pulumi.String("string"),
Metadata: pulumi.String("string"),
})
var workersKvResource = new WorkersKv("workersKvResource", WorkersKvArgs.builder()
.accountId("string")
.keyName("string")
.namespaceId("string")
.value("string")
.metadata("string")
.build());
workers_kv_resource = cloudflare.WorkersKv("workersKvResource",
account_id="string",
key_name="string",
namespace_id="string",
value="string",
metadata="string")
const workersKvResource = new cloudflare.WorkersKv("workersKvResource", {
accountId: "string",
keyName: "string",
namespaceId: "string",
value: "string",
metadata: "string",
});
type: cloudflare:WorkersKv
properties:
accountId: string
keyName: string
metadata: string
namespaceId: string
value: string
WorkersKv 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 WorkersKv resource accepts the following input properties:
- Account
Id string - Identifier
- Key
Name string - A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.
- Namespace
Id string - Namespace identifier tag.
- Value string
- A byte sequence to be stored, up to 25 MiB in length.
- Metadata string
- Arbitrary JSON to be associated with a key/value pair.
- Account
Id string - Identifier
- Key
Name string - A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.
- Namespace
Id string - Namespace identifier tag.
- Value string
- A byte sequence to be stored, up to 25 MiB in length.
- Metadata string
- Arbitrary JSON to be associated with a key/value pair.
- account
Id String - Identifier
- key
Name String - A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.
- namespace
Id String - Namespace identifier tag.
- value String
- A byte sequence to be stored, up to 25 MiB in length.
- metadata String
- Arbitrary JSON to be associated with a key/value pair.
- account
Id string - Identifier
- key
Name string - A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.
- namespace
Id string - Namespace identifier tag.
- value string
- A byte sequence to be stored, up to 25 MiB in length.
- metadata string
- Arbitrary JSON to be associated with a key/value pair.
- account_
id str - Identifier
- key_
name str - A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.
- namespace_
id str - Namespace identifier tag.
- value str
- A byte sequence to be stored, up to 25 MiB in length.
- metadata str
- Arbitrary JSON to be associated with a key/value pair.
- account
Id String - Identifier
- key
Name String - A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.
- namespace
Id String - Namespace identifier tag.
- value String
- A byte sequence to be stored, up to 25 MiB in length.
- metadata String
- Arbitrary JSON to be associated with a key/value pair.
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkersKv resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing WorkersKv Resource
Get an existing WorkersKv 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?: WorkersKvState, opts?: CustomResourceOptions): WorkersKv
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
key_name: Optional[str] = None,
metadata: Optional[str] = None,
namespace_id: Optional[str] = None,
value: Optional[str] = None) -> WorkersKv
func GetWorkersKv(ctx *Context, name string, id IDInput, state *WorkersKvState, opts ...ResourceOption) (*WorkersKv, error)
public static WorkersKv Get(string name, Input<string> id, WorkersKvState? state, CustomResourceOptions? opts = null)
public static WorkersKv get(String name, Output<String> id, WorkersKvState state, CustomResourceOptions options)
resources: _: type: cloudflare:WorkersKv get: id: ${id}
- 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.
- Account
Id string - Identifier
- Key
Name string - A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.
- Metadata string
- Arbitrary JSON to be associated with a key/value pair.
- Namespace
Id string - Namespace identifier tag.
- Value string
- A byte sequence to be stored, up to 25 MiB in length.
- Account
Id string - Identifier
- Key
Name string - A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.
- Metadata string
- Arbitrary JSON to be associated with a key/value pair.
- Namespace
Id string - Namespace identifier tag.
- Value string
- A byte sequence to be stored, up to 25 MiB in length.
- account
Id String - Identifier
- key
Name String - A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.
- metadata String
- Arbitrary JSON to be associated with a key/value pair.
- namespace
Id String - Namespace identifier tag.
- value String
- A byte sequence to be stored, up to 25 MiB in length.
- account
Id string - Identifier
- key
Name string - A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.
- metadata string
- Arbitrary JSON to be associated with a key/value pair.
- namespace
Id string - Namespace identifier tag.
- value string
- A byte sequence to be stored, up to 25 MiB in length.
- account_
id str - Identifier
- key_
name str - A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.
- metadata str
- Arbitrary JSON to be associated with a key/value pair.
- namespace_
id str - Namespace identifier tag.
- value str
- A byte sequence to be stored, up to 25 MiB in length.
- account
Id String - Identifier
- key
Name String - A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.
- metadata String
- Arbitrary JSON to be associated with a key/value pair.
- namespace
Id String - Namespace identifier tag.
- value String
- A byte sequence to be stored, up to 25 MiB in length.
Import
$ pulumi import cloudflare:index/workersKv:WorkersKv example '<account_id>/<namespace_id>/<key_name>'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.