cloudflare.WorkersScriptSubdomain
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleWorkersScriptSubdomain = new cloudflare.WorkersScriptSubdomain("example_workers_script_subdomain", {
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
scriptName: "this-is_my_script-01",
enabled: true,
previewsEnabled: true,
});
import pulumi
import pulumi_cloudflare as cloudflare
example_workers_script_subdomain = cloudflare.WorkersScriptSubdomain("example_workers_script_subdomain",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
script_name="this-is_my_script-01",
enabled=True,
previews_enabled=True)
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.NewWorkersScriptSubdomain(ctx, "example_workers_script_subdomain", &cloudflare.WorkersScriptSubdomainArgs{
AccountId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
ScriptName: pulumi.String("this-is_my_script-01"),
Enabled: pulumi.Bool(true),
PreviewsEnabled: pulumi.Bool(true),
})
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 exampleWorkersScriptSubdomain = new Cloudflare.WorkersScriptSubdomain("example_workers_script_subdomain", new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
ScriptName = "this-is_my_script-01",
Enabled = true,
PreviewsEnabled = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.WorkersScriptSubdomain;
import com.pulumi.cloudflare.WorkersScriptSubdomainArgs;
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 exampleWorkersScriptSubdomain = new WorkersScriptSubdomain("exampleWorkersScriptSubdomain", WorkersScriptSubdomainArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.scriptName("this-is_my_script-01")
.enabled(true)
.previewsEnabled(true)
.build());
}
}
resources:
exampleWorkersScriptSubdomain:
type: cloudflare:WorkersScriptSubdomain
name: example_workers_script_subdomain
properties:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
scriptName: this-is_my_script-01
enabled: true
previewsEnabled: true
Create WorkersScriptSubdomain Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkersScriptSubdomain(name: string, args: WorkersScriptSubdomainArgs, opts?: CustomResourceOptions);
@overload
def WorkersScriptSubdomain(resource_name: str,
args: WorkersScriptSubdomainArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkersScriptSubdomain(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
enabled: Optional[bool] = None,
script_name: Optional[str] = None,
previews_enabled: Optional[bool] = None)
func NewWorkersScriptSubdomain(ctx *Context, name string, args WorkersScriptSubdomainArgs, opts ...ResourceOption) (*WorkersScriptSubdomain, error)
public WorkersScriptSubdomain(string name, WorkersScriptSubdomainArgs args, CustomResourceOptions? opts = null)
public WorkersScriptSubdomain(String name, WorkersScriptSubdomainArgs args)
public WorkersScriptSubdomain(String name, WorkersScriptSubdomainArgs args, CustomResourceOptions options)
type: cloudflare:WorkersScriptSubdomain
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 WorkersScriptSubdomainArgs
- 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 WorkersScriptSubdomainArgs
- 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 WorkersScriptSubdomainArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkersScriptSubdomainArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkersScriptSubdomainArgs
- 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 workersScriptSubdomainResource = new Cloudflare.WorkersScriptSubdomain("workersScriptSubdomainResource", new()
{
AccountId = "string",
Enabled = false,
ScriptName = "string",
PreviewsEnabled = false,
});
example, err := cloudflare.NewWorkersScriptSubdomain(ctx, "workersScriptSubdomainResource", &cloudflare.WorkersScriptSubdomainArgs{
AccountId: pulumi.String("string"),
Enabled: pulumi.Bool(false),
ScriptName: pulumi.String("string"),
PreviewsEnabled: pulumi.Bool(false),
})
var workersScriptSubdomainResource = new WorkersScriptSubdomain("workersScriptSubdomainResource", WorkersScriptSubdomainArgs.builder()
.accountId("string")
.enabled(false)
.scriptName("string")
.previewsEnabled(false)
.build());
workers_script_subdomain_resource = cloudflare.WorkersScriptSubdomain("workersScriptSubdomainResource",
account_id="string",
enabled=False,
script_name="string",
previews_enabled=False)
const workersScriptSubdomainResource = new cloudflare.WorkersScriptSubdomain("workersScriptSubdomainResource", {
accountId: "string",
enabled: false,
scriptName: "string",
previewsEnabled: false,
});
type: cloudflare:WorkersScriptSubdomain
properties:
accountId: string
enabled: false
previewsEnabled: false
scriptName: string
WorkersScriptSubdomain 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 WorkersScriptSubdomain resource accepts the following input properties:
- Account
Id string - Identifier.
- Enabled bool
- Whether the Worker should be available on the workers.dev subdomain.
- Script
Name string - Name of the script, used in URLs and route configuration.
- Previews
Enabled bool - Whether the Worker's Preview URLs should be available on the workers.dev subdomain.
- Account
Id string - Identifier.
- Enabled bool
- Whether the Worker should be available on the workers.dev subdomain.
- Script
Name string - Name of the script, used in URLs and route configuration.
- Previews
Enabled bool - Whether the Worker's Preview URLs should be available on the workers.dev subdomain.
- account
Id String - Identifier.
- enabled Boolean
- Whether the Worker should be available on the workers.dev subdomain.
- script
Name String - Name of the script, used in URLs and route configuration.
- previews
Enabled Boolean - Whether the Worker's Preview URLs should be available on the workers.dev subdomain.
- account
Id string - Identifier.
- enabled boolean
- Whether the Worker should be available on the workers.dev subdomain.
- script
Name string - Name of the script, used in URLs and route configuration.
- previews
Enabled boolean - Whether the Worker's Preview URLs should be available on the workers.dev subdomain.
- account_
id str - Identifier.
- enabled bool
- Whether the Worker should be available on the workers.dev subdomain.
- script_
name str - Name of the script, used in URLs and route configuration.
- previews_
enabled bool - Whether the Worker's Preview URLs should be available on the workers.dev subdomain.
- account
Id String - Identifier.
- enabled Boolean
- Whether the Worker should be available on the workers.dev subdomain.
- script
Name String - Name of the script, used in URLs and route configuration.
- previews
Enabled Boolean - Whether the Worker's Preview URLs should be available on the workers.dev subdomain.
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkersScriptSubdomain 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 WorkersScriptSubdomain Resource
Get an existing WorkersScriptSubdomain 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?: WorkersScriptSubdomainState, opts?: CustomResourceOptions): WorkersScriptSubdomain
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
enabled: Optional[bool] = None,
previews_enabled: Optional[bool] = None,
script_name: Optional[str] = None) -> WorkersScriptSubdomain
func GetWorkersScriptSubdomain(ctx *Context, name string, id IDInput, state *WorkersScriptSubdomainState, opts ...ResourceOption) (*WorkersScriptSubdomain, error)
public static WorkersScriptSubdomain Get(string name, Input<string> id, WorkersScriptSubdomainState? state, CustomResourceOptions? opts = null)
public static WorkersScriptSubdomain get(String name, Output<String> id, WorkersScriptSubdomainState state, CustomResourceOptions options)
resources: _: type: cloudflare:WorkersScriptSubdomain 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.
- Enabled bool
- Whether the Worker should be available on the workers.dev subdomain.
- Previews
Enabled bool - Whether the Worker's Preview URLs should be available on the workers.dev subdomain.
- Script
Name string - Name of the script, used in URLs and route configuration.
- Account
Id string - Identifier.
- Enabled bool
- Whether the Worker should be available on the workers.dev subdomain.
- Previews
Enabled bool - Whether the Worker's Preview URLs should be available on the workers.dev subdomain.
- Script
Name string - Name of the script, used in URLs and route configuration.
- account
Id String - Identifier.
- enabled Boolean
- Whether the Worker should be available on the workers.dev subdomain.
- previews
Enabled Boolean - Whether the Worker's Preview URLs should be available on the workers.dev subdomain.
- script
Name String - Name of the script, used in URLs and route configuration.
- account
Id string - Identifier.
- enabled boolean
- Whether the Worker should be available on the workers.dev subdomain.
- previews
Enabled boolean - Whether the Worker's Preview URLs should be available on the workers.dev subdomain.
- script
Name string - Name of the script, used in URLs and route configuration.
- account_
id str - Identifier.
- enabled bool
- Whether the Worker should be available on the workers.dev subdomain.
- previews_
enabled bool - Whether the Worker's Preview URLs should be available on the workers.dev subdomain.
- script_
name str - Name of the script, used in URLs and route configuration.
- account
Id String - Identifier.
- enabled Boolean
- Whether the Worker should be available on the workers.dev subdomain.
- previews
Enabled Boolean - Whether the Worker's Preview URLs should be available on the workers.dev subdomain.
- script
Name String - Name of the script, used in URLs and route configuration.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.