cloudflare.WorkersRoute
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleWorkersRoute = new cloudflare.WorkersRoute("example_workers_route", {
zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
pattern: "example.net/*",
script: "this-is_my_script-01",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_workers_route = cloudflare.WorkersRoute("example_workers_route",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
pattern="example.net/*",
script="this-is_my_script-01")
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.NewWorkersRoute(ctx, "example_workers_route", &cloudflare.WorkersRouteArgs{
ZoneId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
Pattern: pulumi.String("example.net/*"),
Script: pulumi.String("this-is_my_script-01"),
})
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 exampleWorkersRoute = new Cloudflare.WorkersRoute("example_workers_route", new()
{
ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
Pattern = "example.net/*",
Script = "this-is_my_script-01",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.WorkersRoute;
import com.pulumi.cloudflare.WorkersRouteArgs;
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 exampleWorkersRoute = new WorkersRoute("exampleWorkersRoute", WorkersRouteArgs.builder()
.zoneId("023e105f4ecef8ad9ca31a8372d0c353")
.pattern("example.net/*")
.script("this-is_my_script-01")
.build());
}
}
resources:
exampleWorkersRoute:
type: cloudflare:WorkersRoute
name: example_workers_route
properties:
zoneId: 023e105f4ecef8ad9ca31a8372d0c353
pattern: example.net/*
script: this-is_my_script-01
Create WorkersRoute Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkersRoute(name: string, args: WorkersRouteArgs, opts?: CustomResourceOptions);
@overload
def WorkersRoute(resource_name: str,
args: WorkersRouteArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkersRoute(resource_name: str,
opts: Optional[ResourceOptions] = None,
pattern: Optional[str] = None,
zone_id: Optional[str] = None,
route_id: Optional[str] = None,
script: Optional[str] = None)
func NewWorkersRoute(ctx *Context, name string, args WorkersRouteArgs, opts ...ResourceOption) (*WorkersRoute, error)
public WorkersRoute(string name, WorkersRouteArgs args, CustomResourceOptions? opts = null)
public WorkersRoute(String name, WorkersRouteArgs args)
public WorkersRoute(String name, WorkersRouteArgs args, CustomResourceOptions options)
type: cloudflare:WorkersRoute
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 WorkersRouteArgs
- 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 WorkersRouteArgs
- 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 WorkersRouteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkersRouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkersRouteArgs
- 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 workersRouteResource = new Cloudflare.WorkersRoute("workersRouteResource", new()
{
Pattern = "string",
ZoneId = "string",
RouteId = "string",
Script = "string",
});
example, err := cloudflare.NewWorkersRoute(ctx, "workersRouteResource", &cloudflare.WorkersRouteArgs{
Pattern: pulumi.String("string"),
ZoneId: pulumi.String("string"),
RouteId: pulumi.String("string"),
Script: pulumi.String("string"),
})
var workersRouteResource = new WorkersRoute("workersRouteResource", WorkersRouteArgs.builder()
.pattern("string")
.zoneId("string")
.routeId("string")
.script("string")
.build());
workers_route_resource = cloudflare.WorkersRoute("workersRouteResource",
pattern="string",
zone_id="string",
route_id="string",
script="string")
const workersRouteResource = new cloudflare.WorkersRoute("workersRouteResource", {
pattern: "string",
zoneId: "string",
routeId: "string",
script: "string",
});
type: cloudflare:WorkersRoute
properties:
pattern: string
routeId: string
script: string
zoneId: string
WorkersRoute 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 WorkersRoute resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkersRoute resource produces the following output properties:
- Errors
List<Workers
Route Error> - Id string
- The provider-assigned unique ID for this managed resource.
- Messages
List<Workers
Route Message> - Success bool
- Whether the API call was successful.
- Errors
[]Workers
Route Error - Id string
- The provider-assigned unique ID for this managed resource.
- Messages
[]Workers
Route Message - Success bool
- Whether the API call was successful.
- errors
List<Workers
Route Error> - id String
- The provider-assigned unique ID for this managed resource.
- messages
List<Workers
Route Message> - success Boolean
- Whether the API call was successful.
- errors
Workers
Route Error[] - id string
- The provider-assigned unique ID for this managed resource.
- messages
Workers
Route Message[] - success boolean
- Whether the API call was successful.
- errors
Sequence[Workers
Route Error] - id str
- The provider-assigned unique ID for this managed resource.
- messages
Sequence[Workers
Route Message] - success bool
- Whether the API call was successful.
- errors List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- messages List<Property Map>
- success Boolean
- Whether the API call was successful.
Look up Existing WorkersRoute Resource
Get an existing WorkersRoute 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?: WorkersRouteState, opts?: CustomResourceOptions): WorkersRoute
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
errors: Optional[Sequence[WorkersRouteErrorArgs]] = None,
messages: Optional[Sequence[WorkersRouteMessageArgs]] = None,
pattern: Optional[str] = None,
route_id: Optional[str] = None,
script: Optional[str] = None,
success: Optional[bool] = None,
zone_id: Optional[str] = None) -> WorkersRoute
func GetWorkersRoute(ctx *Context, name string, id IDInput, state *WorkersRouteState, opts ...ResourceOption) (*WorkersRoute, error)
public static WorkersRoute Get(string name, Input<string> id, WorkersRouteState? state, CustomResourceOptions? opts = null)
public static WorkersRoute get(String name, Output<String> id, WorkersRouteState state, CustomResourceOptions options)
resources: _: type: cloudflare:WorkersRoute 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.
- Errors
List<Workers
Route Error> - Messages
List<Workers
Route Message> - Pattern string
- Route
Id string - Identifier.
- Script string
- Name of the script, used in URLs and route configuration.
- Success bool
- Whether the API call was successful.
- Zone
Id string - Identifier.
- Errors
[]Workers
Route Error Args - Messages
[]Workers
Route Message Args - Pattern string
- Route
Id string - Identifier.
- Script string
- Name of the script, used in URLs and route configuration.
- Success bool
- Whether the API call was successful.
- Zone
Id string - Identifier.
- errors
List<Workers
Route Error> - messages
List<Workers
Route Message> - pattern String
- route
Id String - Identifier.
- script String
- Name of the script, used in URLs and route configuration.
- success Boolean
- Whether the API call was successful.
- zone
Id String - Identifier.
- errors
Workers
Route Error[] - messages
Workers
Route Message[] - pattern string
- route
Id string - Identifier.
- script string
- Name of the script, used in URLs and route configuration.
- success boolean
- Whether the API call was successful.
- zone
Id string - Identifier.
- errors
Sequence[Workers
Route Error Args] - messages
Sequence[Workers
Route Message Args] - pattern str
- route_
id str - Identifier.
- script str
- Name of the script, used in URLs and route configuration.
- success bool
- Whether the API call was successful.
- zone_
id str - Identifier.
- errors List<Property Map>
- messages List<Property Map>
- pattern String
- route
Id String - Identifier.
- script String
- Name of the script, used in URLs and route configuration.
- success Boolean
- Whether the API call was successful.
- zone
Id String - Identifier.
Supporting Types
WorkersRouteError, WorkersRouteErrorArgs
- Code int
- Documentation
Url string - Message string
- Source
Workers
Route Error Source
- Code int
- Documentation
Url string - Message string
- Source
Workers
Route Error Source
- code Integer
- documentation
Url String - message String
- source
Workers
Route Error Source
- code number
- documentation
Url string - message string
- source
Workers
Route Error Source
- code Number
- documentation
Url String - message String
- source Property Map
WorkersRouteErrorSource, WorkersRouteErrorSourceArgs
- Pointer string
- Pointer string
- pointer String
- pointer string
- pointer str
- pointer String
WorkersRouteMessage, WorkersRouteMessageArgs
- Code int
- Documentation
Url string - Message string
- Source
Workers
Route Message Source
- Code int
- Documentation
Url string - Message string
- Source
Workers
Route Message Source
- code Integer
- documentation
Url String - message String
- source
Workers
Route Message Source
- code number
- documentation
Url string - message string
- source
Workers
Route Message Source
- code Number
- documentation
Url String - message String
- source Property Map
WorkersRouteMessageSource, WorkersRouteMessageSourceArgs
- Pointer string
- Pointer string
- pointer String
- pointer string
- pointer str
- pointer String
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.