cloudflare.WaitingRoomRules
Explore with Pulumi AI
Provides a Cloudflare Waiting Room Rules resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const example = new cloudflare.WaitingRoomRules("example", {
zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
waitingRoomId: "d41d8cd98f00b204e9800998ecf8427e",
rules: [
{
description: "bypass ip list",
expression: "src.ip in {192.0.2.0 192.0.2.1}",
action: "bypass_waiting_room",
status: "enabled",
},
{
description: "bypass query string",
expression: "http.request.uri.query contains \"bypass=true\"",
action: "bypass_waiting_room",
status: "enabled",
},
],
});
import pulumi
import pulumi_cloudflare as cloudflare
example = cloudflare.WaitingRoomRules("example",
zone_id="0da42c8d2132a9ddaf714f9e7c920711",
waiting_room_id="d41d8cd98f00b204e9800998ecf8427e",
rules=[
{
"description": "bypass ip list",
"expression": "src.ip in {192.0.2.0 192.0.2.1}",
"action": "bypass_waiting_room",
"status": "enabled",
},
{
"description": "bypass query string",
"expression": "http.request.uri.query contains \"bypass=true\"",
"action": "bypass_waiting_room",
"status": "enabled",
},
])
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewWaitingRoomRules(ctx, "example", &cloudflare.WaitingRoomRulesArgs{
ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
WaitingRoomId: pulumi.String("d41d8cd98f00b204e9800998ecf8427e"),
Rules: cloudflare.WaitingRoomRulesRuleArray{
&cloudflare.WaitingRoomRulesRuleArgs{
Description: pulumi.String("bypass ip list"),
Expression: pulumi.String("src.ip in {192.0.2.0 192.0.2.1}"),
Action: pulumi.String("bypass_waiting_room"),
Status: pulumi.String("enabled"),
},
&cloudflare.WaitingRoomRulesRuleArgs{
Description: pulumi.String("bypass query string"),
Expression: pulumi.String("http.request.uri.query contains \"bypass=true\""),
Action: pulumi.String("bypass_waiting_room"),
Status: pulumi.String("enabled"),
},
},
})
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 example = new Cloudflare.WaitingRoomRules("example", new()
{
ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
WaitingRoomId = "d41d8cd98f00b204e9800998ecf8427e",
Rules = new[]
{
new Cloudflare.Inputs.WaitingRoomRulesRuleArgs
{
Description = "bypass ip list",
Expression = "src.ip in {192.0.2.0 192.0.2.1}",
Action = "bypass_waiting_room",
Status = "enabled",
},
new Cloudflare.Inputs.WaitingRoomRulesRuleArgs
{
Description = "bypass query string",
Expression = "http.request.uri.query contains \"bypass=true\"",
Action = "bypass_waiting_room",
Status = "enabled",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.WaitingRoomRules;
import com.pulumi.cloudflare.WaitingRoomRulesArgs;
import com.pulumi.cloudflare.inputs.WaitingRoomRulesRuleArgs;
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 example = new WaitingRoomRules("example", WaitingRoomRulesArgs.builder()
.zoneId("0da42c8d2132a9ddaf714f9e7c920711")
.waitingRoomId("d41d8cd98f00b204e9800998ecf8427e")
.rules(
WaitingRoomRulesRuleArgs.builder()
.description("bypass ip list")
.expression("src.ip in {192.0.2.0 192.0.2.1}")
.action("bypass_waiting_room")
.status("enabled")
.build(),
WaitingRoomRulesRuleArgs.builder()
.description("bypass query string")
.expression("http.request.uri.query contains \"bypass=true\"")
.action("bypass_waiting_room")
.status("enabled")
.build())
.build());
}
}
resources:
example:
type: cloudflare:WaitingRoomRules
properties:
zoneId: 0da42c8d2132a9ddaf714f9e7c920711
waitingRoomId: d41d8cd98f00b204e9800998ecf8427e
rules:
- description: bypass ip list
expression: src.ip in {192.0.2.0 192.0.2.1}
action: bypass_waiting_room
status: enabled
- description: bypass query string
expression: http.request.uri.query contains "bypass=true"
action: bypass_waiting_room
status: enabled
Create WaitingRoomRules Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WaitingRoomRules(name: string, args: WaitingRoomRulesArgs, opts?: CustomResourceOptions);
@overload
def WaitingRoomRules(resource_name: str,
args: WaitingRoomRulesArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WaitingRoomRules(resource_name: str,
opts: Optional[ResourceOptions] = None,
waiting_room_id: Optional[str] = None,
zone_id: Optional[str] = None,
rules: Optional[Sequence[WaitingRoomRulesRuleArgs]] = None)
func NewWaitingRoomRules(ctx *Context, name string, args WaitingRoomRulesArgs, opts ...ResourceOption) (*WaitingRoomRules, error)
public WaitingRoomRules(string name, WaitingRoomRulesArgs args, CustomResourceOptions? opts = null)
public WaitingRoomRules(String name, WaitingRoomRulesArgs args)
public WaitingRoomRules(String name, WaitingRoomRulesArgs args, CustomResourceOptions options)
type: cloudflare:WaitingRoomRules
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 WaitingRoomRulesArgs
- 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 WaitingRoomRulesArgs
- 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 WaitingRoomRulesArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WaitingRoomRulesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WaitingRoomRulesArgs
- 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 waitingRoomRulesResource = new Cloudflare.WaitingRoomRules("waitingRoomRulesResource", new()
{
WaitingRoomId = "string",
ZoneId = "string",
Rules = new[]
{
new Cloudflare.Inputs.WaitingRoomRulesRuleArgs
{
Action = "string",
Expression = "string",
Description = "string",
Id = "string",
Status = "string",
Version = "string",
},
},
});
example, err := cloudflare.NewWaitingRoomRules(ctx, "waitingRoomRulesResource", &cloudflare.WaitingRoomRulesArgs{
WaitingRoomId: pulumi.String("string"),
ZoneId: pulumi.String("string"),
Rules: cloudflare.WaitingRoomRulesRuleArray{
&cloudflare.WaitingRoomRulesRuleArgs{
Action: pulumi.String("string"),
Expression: pulumi.String("string"),
Description: pulumi.String("string"),
Id: pulumi.String("string"),
Status: pulumi.String("string"),
Version: pulumi.String("string"),
},
},
})
var waitingRoomRulesResource = new WaitingRoomRules("waitingRoomRulesResource", WaitingRoomRulesArgs.builder()
.waitingRoomId("string")
.zoneId("string")
.rules(WaitingRoomRulesRuleArgs.builder()
.action("string")
.expression("string")
.description("string")
.id("string")
.status("string")
.version("string")
.build())
.build());
waiting_room_rules_resource = cloudflare.WaitingRoomRules("waitingRoomRulesResource",
waiting_room_id="string",
zone_id="string",
rules=[{
"action": "string",
"expression": "string",
"description": "string",
"id": "string",
"status": "string",
"version": "string",
}])
const waitingRoomRulesResource = new cloudflare.WaitingRoomRules("waitingRoomRulesResource", {
waitingRoomId: "string",
zoneId: "string",
rules: [{
action: "string",
expression: "string",
description: "string",
id: "string",
status: "string",
version: "string",
}],
});
type: cloudflare:WaitingRoomRules
properties:
rules:
- action: string
description: string
expression: string
id: string
status: string
version: string
waitingRoomId: string
zoneId: string
WaitingRoomRules 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 WaitingRoomRules resource accepts the following input properties:
- Waiting
Room stringId - The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
- Zone
Id string - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Rules
List<Waiting
Room Rules Rule> - List of rules to apply to the ruleset.
- Waiting
Room stringId - The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
- Zone
Id string - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Rules
[]Waiting
Room Rules Rule Args - List of rules to apply to the ruleset.
- waiting
Room StringId - The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
- zone
Id String - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- rules
List<Waiting
Room Rules Rule> - List of rules to apply to the ruleset.
- waiting
Room stringId - The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
- zone
Id string - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- rules
Waiting
Room Rules Rule[] - List of rules to apply to the ruleset.
- waiting_
room_ strid - The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
- zone_
id str - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- rules
Sequence[Waiting
Room Rules Rule Args] - List of rules to apply to the ruleset.
- waiting
Room StringId - The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
- zone
Id String - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- rules List<Property Map>
- List of rules to apply to the ruleset.
Outputs
All input properties are implicitly available as output properties. Additionally, the WaitingRoomRules 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 WaitingRoomRules Resource
Get an existing WaitingRoomRules 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?: WaitingRoomRulesState, opts?: CustomResourceOptions): WaitingRoomRules
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
rules: Optional[Sequence[WaitingRoomRulesRuleArgs]] = None,
waiting_room_id: Optional[str] = None,
zone_id: Optional[str] = None) -> WaitingRoomRules
func GetWaitingRoomRules(ctx *Context, name string, id IDInput, state *WaitingRoomRulesState, opts ...ResourceOption) (*WaitingRoomRules, error)
public static WaitingRoomRules Get(string name, Input<string> id, WaitingRoomRulesState? state, CustomResourceOptions? opts = null)
public static WaitingRoomRules get(String name, Output<String> id, WaitingRoomRulesState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Rules
List<Waiting
Room Rules Rule> - List of rules to apply to the ruleset.
- Waiting
Room stringId - The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
- Zone
Id string - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Rules
[]Waiting
Room Rules Rule Args - List of rules to apply to the ruleset.
- Waiting
Room stringId - The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
- Zone
Id string - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- rules
List<Waiting
Room Rules Rule> - List of rules to apply to the ruleset.
- waiting
Room StringId - The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
- zone
Id String - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- rules
Waiting
Room Rules Rule[] - List of rules to apply to the ruleset.
- waiting
Room stringId - The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
- zone
Id string - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- rules
Sequence[Waiting
Room Rules Rule Args] - List of rules to apply to the ruleset.
- waiting_
room_ strid - The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
- zone_
id str - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- rules List<Property Map>
- List of rules to apply to the ruleset.
- waiting
Room StringId - The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
- zone
Id String - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
Supporting Types
WaitingRoomRulesRule, WaitingRoomRulesRuleArgs
- Action string
- Action to perform in the ruleset rule. Available values:
bypass_waiting_room
. - Expression string
- Criteria for an HTTP request to trigger the waiting room rule action. Uses the Firewall Rules expression language based on Wireshark display filters. Refer to the Waiting Room Rules Docs.
- Description string
- Brief summary of the waiting room rule and its intended use.
- Id string
- Unique rule identifier.
- Status string
- Whether the rule is enabled or disabled. Available values:
enabled
,disabled
. - Version string
- Version of the waiting room rule.
- Action string
- Action to perform in the ruleset rule. Available values:
bypass_waiting_room
. - Expression string
- Criteria for an HTTP request to trigger the waiting room rule action. Uses the Firewall Rules expression language based on Wireshark display filters. Refer to the Waiting Room Rules Docs.
- Description string
- Brief summary of the waiting room rule and its intended use.
- Id string
- Unique rule identifier.
- Status string
- Whether the rule is enabled or disabled. Available values:
enabled
,disabled
. - Version string
- Version of the waiting room rule.
- action String
- Action to perform in the ruleset rule. Available values:
bypass_waiting_room
. - expression String
- Criteria for an HTTP request to trigger the waiting room rule action. Uses the Firewall Rules expression language based on Wireshark display filters. Refer to the Waiting Room Rules Docs.
- description String
- Brief summary of the waiting room rule and its intended use.
- id String
- Unique rule identifier.
- status String
- Whether the rule is enabled or disabled. Available values:
enabled
,disabled
. - version String
- Version of the waiting room rule.
- action string
- Action to perform in the ruleset rule. Available values:
bypass_waiting_room
. - expression string
- Criteria for an HTTP request to trigger the waiting room rule action. Uses the Firewall Rules expression language based on Wireshark display filters. Refer to the Waiting Room Rules Docs.
- description string
- Brief summary of the waiting room rule and its intended use.
- id string
- Unique rule identifier.
- status string
- Whether the rule is enabled or disabled. Available values:
enabled
,disabled
. - version string
- Version of the waiting room rule.
- action str
- Action to perform in the ruleset rule. Available values:
bypass_waiting_room
. - expression str
- Criteria for an HTTP request to trigger the waiting room rule action. Uses the Firewall Rules expression language based on Wireshark display filters. Refer to the Waiting Room Rules Docs.
- description str
- Brief summary of the waiting room rule and its intended use.
- id str
- Unique rule identifier.
- status str
- Whether the rule is enabled or disabled. Available values:
enabled
,disabled
. - version str
- Version of the waiting room rule.
- action String
- Action to perform in the ruleset rule. Available values:
bypass_waiting_room
. - expression String
- Criteria for an HTTP request to trigger the waiting room rule action. Uses the Firewall Rules expression language based on Wireshark display filters. Refer to the Waiting Room Rules Docs.
- description String
- Brief summary of the waiting room rule and its intended use.
- id String
- Unique rule identifier.
- status String
- Whether the rule is enabled or disabled. Available values:
enabled
,disabled
. - version String
- Version of the waiting room rule.
Import
$ pulumi import cloudflare:index/waitingRoomRules:WaitingRoomRules default <zone_id>/<waiting_room_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.