Class WorkersKv
Provides a Workers KV Pair. NOTE: This resource uses the Cloudflare account APIs. This requires setting the CLOUDFLARE_ACCOUNT_ID environment variable or account_id provider argument.
Example Usage
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
class MyStack : Stack
{
public MyStack()
{
var exampleNs = new Cloudflare.WorkersKvNamespace("exampleNs", new Cloudflare.WorkersKvNamespaceArgs
{
Title = "test-namespace",
});
var example = new Cloudflare.WorkersKv("example", new Cloudflare.WorkersKvArgs
{
NamespaceId = exampleNs.Id,
Key = "test-key",
Value = "test value",
});
}
}
Inherited Members
Namespace: Pulumi.Cloudflare
Assembly: Pulumi.Cloudflare.dll
Syntax
public class WorkersKv : CustomResource
Constructors
View SourceWorkersKv(String, WorkersKvArgs, CustomResourceOptions)
Create a WorkersKv resource with the given unique name, arguments, and options.
Declaration
public WorkersKv(string name, WorkersKvArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| WorkersKvArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceKey
The key name
Declaration
public Output<string> Key { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NamespaceId
The ID of the Workers KV namespace in which you want to create the KV pair
Declaration
public Output<string> NamespaceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Value
The string value to be stored in the key
Declaration
public Output<string> Value { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, WorkersKvState, CustomResourceOptions)
Get an existing WorkersKv resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static WorkersKv Get(string name, Input<string> id, WorkersKvState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| WorkersKvState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| WorkersKv |