1. Packages
  2. Cloudflare
  3. API Docs
  4. WaitingRoomRules
Cloudflare v5.26.0 published on Wednesday, Apr 17, 2024 by Pulumi

cloudflare.WaitingRoomRules

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.26.0 published on Wednesday, Apr 17, 2024 by Pulumi

    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", {
        rules: [
            {
                action: "bypass_waiting_room",
                description: "bypass ip list",
                expression: "src.ip in {192.0.2.0 192.0.2.1}",
                status: "enabled",
            },
            {
                action: "bypass_waiting_room",
                description: "bypass query string",
                expression: "http.request.uri.query contains \"bypass=true\"",
                status: "enabled",
            },
        ],
        waitingRoomId: "d41d8cd98f00b204e9800998ecf8427e",
        zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example = cloudflare.WaitingRoomRules("example",
        rules=[
            cloudflare.WaitingRoomRulesRuleArgs(
                action="bypass_waiting_room",
                description="bypass ip list",
                expression="src.ip in {192.0.2.0 192.0.2.1}",
                status="enabled",
            ),
            cloudflare.WaitingRoomRulesRuleArgs(
                action="bypass_waiting_room",
                description="bypass query string",
                expression="http.request.uri.query contains \"bypass=true\"",
                status="enabled",
            ),
        ],
        waiting_room_id="d41d8cd98f00b204e9800998ecf8427e",
        zone_id="0da42c8d2132a9ddaf714f9e7c920711")
    
    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{
    			Rules: cloudflare.WaitingRoomRulesRuleArray{
    				&cloudflare.WaitingRoomRulesRuleArgs{
    					Action:      pulumi.String("bypass_waiting_room"),
    					Description: pulumi.String("bypass ip list"),
    					Expression:  pulumi.String("src.ip in {192.0.2.0 192.0.2.1}"),
    					Status:      pulumi.String("enabled"),
    				},
    				&cloudflare.WaitingRoomRulesRuleArgs{
    					Action:      pulumi.String("bypass_waiting_room"),
    					Description: pulumi.String("bypass query string"),
    					Expression:  pulumi.String("http.request.uri.query contains \"bypass=true\""),
    					Status:      pulumi.String("enabled"),
    				},
    			},
    			WaitingRoomId: pulumi.String("d41d8cd98f00b204e9800998ecf8427e"),
    			ZoneId:        pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
    		})
    		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()
        {
            Rules = new[]
            {
                new Cloudflare.Inputs.WaitingRoomRulesRuleArgs
                {
                    Action = "bypass_waiting_room",
                    Description = "bypass ip list",
                    Expression = "src.ip in {192.0.2.0 192.0.2.1}",
                    Status = "enabled",
                },
                new Cloudflare.Inputs.WaitingRoomRulesRuleArgs
                {
                    Action = "bypass_waiting_room",
                    Description = "bypass query string",
                    Expression = "http.request.uri.query contains \"bypass=true\"",
                    Status = "enabled",
                },
            },
            WaitingRoomId = "d41d8cd98f00b204e9800998ecf8427e",
            ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
        });
    
    });
    
    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()        
                .rules(            
                    WaitingRoomRulesRuleArgs.builder()
                        .action("bypass_waiting_room")
                        .description("bypass ip list")
                        .expression("src.ip in {192.0.2.0 192.0.2.1}")
                        .status("enabled")
                        .build(),
                    WaitingRoomRulesRuleArgs.builder()
                        .action("bypass_waiting_room")
                        .description("bypass query string")
                        .expression("http.request.uri.query contains \"bypass=true\"")
                        .status("enabled")
                        .build())
                .waitingRoomId("d41d8cd98f00b204e9800998ecf8427e")
                .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
                .build());
    
        }
    }
    
    resources:
      example:
        type: cloudflare:WaitingRoomRules
        properties:
          rules:
            - action: bypass_waiting_room
              description: bypass ip list
              expression: src.ip in {192.0.2.0 192.0.2.1}
              status: enabled
            - action: bypass_waiting_room
              description: bypass query string
              expression: http.request.uri.query contains "bypass=true"
              status: enabled
          waitingRoomId: d41d8cd98f00b204e9800998ecf8427e
          zoneId: 0da42c8d2132a9ddaf714f9e7c920711
    

    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.

    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=[cloudflare.WaitingRoomRulesRuleArgs(
            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

    The WaitingRoomRules resource accepts the following input properties:

    WaitingRoomId string
    The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    Rules List<WaitingRoomRulesRule>
    List of rules to apply to the ruleset.
    WaitingRoomId string
    The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    Rules []WaitingRoomRulesRuleArgs
    List of rules to apply to the ruleset.
    waitingRoomId String
    The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    rules List<WaitingRoomRulesRule>
    List of rules to apply to the ruleset.
    waitingRoomId string
    The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
    zoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    rules WaitingRoomRulesRule[]
    List of rules to apply to the ruleset.
    waiting_room_id str
    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[WaitingRoomRulesRuleArgs]
    List of rules to apply to the ruleset.
    waitingRoomId String
    The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
    zoneId 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.
    The following state arguments are supported:
    Rules List<WaitingRoomRulesRule>
    List of rules to apply to the ruleset.
    WaitingRoomId string
    The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    Rules []WaitingRoomRulesRuleArgs
    List of rules to apply to the ruleset.
    WaitingRoomId string
    The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    rules List<WaitingRoomRulesRule>
    List of rules to apply to the ruleset.
    waitingRoomId String
    The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    rules WaitingRoomRulesRule[]
    List of rules to apply to the ruleset.
    waitingRoomId string
    The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
    zoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    rules Sequence[WaitingRoomRulesRuleArgs]
    List of rules to apply to the ruleset.
    waiting_room_id str
    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.
    waitingRoomId String
    The Waiting Room ID the rules should apply to. Modifying this attribute will force creation of a new resource.
    zoneId 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.
    cloudflare logo
    Cloudflare v5.26.0 published on Wednesday, Apr 17, 2024 by Pulumi