getWorkersSecret

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleWorkersSecret = cloudflare.getWorkersSecret({
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
dispatchNamespace: "my-dispatch-namespace",
scriptName: "this-is_my_script-01",
secretName: "mySecret",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_workers_secret = cloudflare.get_workers_secret(account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
script_name="this-is_my_script-01",
secret_name="mySecret")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleWorkersSecret = Cloudflare.GetWorkersSecret.Invoke(new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
DispatchNamespace = "my-dispatch-namespace",
ScriptName = "this-is_my_script-01",
SecretName = "mySecret",
});
});
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.LookupWorkersSecret(ctx, &cloudflare.LookupWorkersSecretArgs{
AccountId: "023e105f4ecef8ad9ca31a8372d0c353",
DispatchNamespace: "my-dispatch-namespace",
ScriptName: "this-is_my_script-01",
SecretName: pulumi.StringRef("mySecret"),
}, nil)
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.cloudflare.CloudflareFunctions;
import com.pulumi.cloudflare.inputs.GetWorkersSecretArgs;
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) {
final var exampleWorkersSecret = CloudflareFunctions.getWorkersSecret(GetWorkersSecretArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.dispatchNamespace("my-dispatch-namespace")
.scriptName("this-is_my_script-01")
.secretName("mySecret")
.build());
}
}
variables:
exampleWorkersSecret:
fn::invoke:
function: cloudflare:getWorkersSecret
arguments:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
dispatchNamespace: my-dispatch-namespace
scriptName: this-is_my_script-01
secretName: mySecret

Return

A collection of values returned by getWorkersSecret.

Parameters

argument

A collection of arguments for invoking getWorkersSecret.


suspend fun getWorkersSecret(accountId: String, dispatchNamespace: String, scriptName: String, secretName: String? = null): GetWorkersSecretResult

Return

A collection of values returned by getWorkersSecret.

Parameters

accountId

Identifier

dispatchNamespace

Name of the Workers for Platforms dispatch namespace.

scriptName

Name of the script, used in URLs and route configuration.

secretName

A JavaScript variable name for the secret binding.

See also


Return

A collection of values returned by getWorkersSecret.

Parameters

argument

Builder for com.pulumi.cloudflare.kotlin.inputs.GetWorkersSecretPlainArgs.

See also