WorkersKvArgs

data class WorkersKvArgs(val accountId: Output<String>? = null, val key: Output<String>? = null, val namespaceId: Output<String>? = null, val value: Output<String>? = null) : ConvertibleToJava<WorkersKvArgs>

Provides a resource to manage a Cloudflare Workers KV Pair.

This resource uses the Cloudflare account APIs. This requires setting the CLOUDFLARE_ACCOUNT_ID environment variable or account_id provider argument if you do not explicitly set the resource level account_id value.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.WorkersKvNamespace;
import com.pulumi.cloudflare.WorkersKvNamespaceArgs;
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 exampleNs = new WorkersKvNamespace("exampleNs", WorkersKvNamespaceArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.title("test-namespace")
.build());
var example = new WorkersKv("example", WorkersKvArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.namespaceId(exampleNs.id())
.key("test-key")
.value("test value")
.build());
}
}

Import

$ pulumi import cloudflare:index/workersKv:WorkersKv example <account_id>/<namespace_id>/<key_name>

Constructors

Link copied to clipboard
constructor(accountId: Output<String>? = null, key: Output<String>? = null, namespaceId: Output<String>? = null, value: Output<String>? = null)

Properties

Link copied to clipboard
val accountId: Output<String>? = null

The account identifier to target for the resource.

Link copied to clipboard
val key: Output<String>? = null

Name of the KV pair. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
val namespaceId: Output<String>? = null

The ID of the Workers KV namespace in which you want to create the KV pair. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
val value: Output<String>? = null

Value of the KV pair.

Functions

Link copied to clipboard
open override fun toJava(): WorkersKvArgs