1. Packages
  2. Fastly Provider
  3. API Docs
  4. NgwafAccountRule
Fastly v11.1.0 published on Wednesday, Nov 5, 2025 by Pulumi

fastly.NgwafAccountRule

Start a Neo task
Explain and create a fastly.NgwafAccountRule resource
fastly logo
Fastly v11.1.0 published on Wednesday, Nov 5, 2025 by Pulumi

    Provides a Fastly Next-Gen WAF Account Rule.
    Account-level rules apply across one or more workspaces and are useful for defining shared or global WAF logic.

    Example Usage

    Basic usage:

    import * as pulumi from "@pulumi/pulumi";
    import * as fastly from "@pulumi/fastly";
    
    const example = new fastly.NgwafAccountRule("example", {
        appliesTos: ["*"],
        type: "request",
        description: "example",
        enabled: true,
        requestLogging: "sampled",
        groupOperator: "all",
        actions: [{
            type: "block",
        }],
        conditions: [{
            field: "ip",
            operator: "equals",
            value: "1.2.3.4",
        }],
        groupConditions: [{
            groupOperator: "all",
            conditions: [{
                field: "method",
                operator: "equals",
                value: "POST",
            }],
        }],
    });
    
    import pulumi
    import pulumi_fastly as fastly
    
    example = fastly.NgwafAccountRule("example",
        applies_tos=["*"],
        type="request",
        description="example",
        enabled=True,
        request_logging="sampled",
        group_operator="all",
        actions=[{
            "type": "block",
        }],
        conditions=[{
            "field": "ip",
            "operator": "equals",
            "value": "1.2.3.4",
        }],
        group_conditions=[{
            "group_operator": "all",
            "conditions": [{
                "field": "method",
                "operator": "equals",
                "value": "POST",
            }],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-fastly/sdk/v11/go/fastly"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := fastly.NewNgwafAccountRule(ctx, "example", &fastly.NgwafAccountRuleArgs{
    			AppliesTos: pulumi.StringArray{
    				pulumi.String("*"),
    			},
    			Type:           pulumi.String("request"),
    			Description:    pulumi.String("example"),
    			Enabled:        pulumi.Bool(true),
    			RequestLogging: pulumi.String("sampled"),
    			GroupOperator:  pulumi.String("all"),
    			Actions: fastly.NgwafAccountRuleActionArray{
    				&fastly.NgwafAccountRuleActionArgs{
    					Type: pulumi.String("block"),
    				},
    			},
    			Conditions: fastly.NgwafAccountRuleConditionArray{
    				&fastly.NgwafAccountRuleConditionArgs{
    					Field:    pulumi.String("ip"),
    					Operator: pulumi.String("equals"),
    					Value:    pulumi.String("1.2.3.4"),
    				},
    			},
    			GroupConditions: fastly.NgwafAccountRuleGroupConditionArray{
    				&fastly.NgwafAccountRuleGroupConditionArgs{
    					GroupOperator: pulumi.String("all"),
    					Conditions: fastly.NgwafAccountRuleGroupConditionConditionArray{
    						&fastly.NgwafAccountRuleGroupConditionConditionArgs{
    							Field:    pulumi.String("method"),
    							Operator: pulumi.String("equals"),
    							Value:    pulumi.String("POST"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Fastly = Pulumi.Fastly;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Fastly.NgwafAccountRule("example", new()
        {
            AppliesTos = new[]
            {
                "*",
            },
            Type = "request",
            Description = "example",
            Enabled = true,
            RequestLogging = "sampled",
            GroupOperator = "all",
            Actions = new[]
            {
                new Fastly.Inputs.NgwafAccountRuleActionArgs
                {
                    Type = "block",
                },
            },
            Conditions = new[]
            {
                new Fastly.Inputs.NgwafAccountRuleConditionArgs
                {
                    Field = "ip",
                    Operator = "equals",
                    Value = "1.2.3.4",
                },
            },
            GroupConditions = new[]
            {
                new Fastly.Inputs.NgwafAccountRuleGroupConditionArgs
                {
                    GroupOperator = "all",
                    Conditions = new[]
                    {
                        new Fastly.Inputs.NgwafAccountRuleGroupConditionConditionArgs
                        {
                            Field = "method",
                            Operator = "equals",
                            Value = "POST",
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.fastly.NgwafAccountRule;
    import com.pulumi.fastly.NgwafAccountRuleArgs;
    import com.pulumi.fastly.inputs.NgwafAccountRuleActionArgs;
    import com.pulumi.fastly.inputs.NgwafAccountRuleConditionArgs;
    import com.pulumi.fastly.inputs.NgwafAccountRuleGroupConditionArgs;
    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 NgwafAccountRule("example", NgwafAccountRuleArgs.builder()
                .appliesTos("*")
                .type("request")
                .description("example")
                .enabled(true)
                .requestLogging("sampled")
                .groupOperator("all")
                .actions(NgwafAccountRuleActionArgs.builder()
                    .type("block")
                    .build())
                .conditions(NgwafAccountRuleConditionArgs.builder()
                    .field("ip")
                    .operator("equals")
                    .value("1.2.3.4")
                    .build())
                .groupConditions(NgwafAccountRuleGroupConditionArgs.builder()
                    .groupOperator("all")
                    .conditions(NgwafAccountRuleGroupConditionConditionArgs.builder()
                        .field("method")
                        .operator("equals")
                        .value("POST")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: fastly:NgwafAccountRule
        properties:
          appliesTos:
            - '*'
          type: request
          description: example
          enabled: true
          requestLogging: sampled
          groupOperator: all
          actions:
            - type: block
          conditions:
            - field: ip
              operator: equals
              value: 1.2.3.4
          groupConditions:
            - groupOperator: all
              conditions:
                - field: method
                  operator: equals
                  value: POST
    

    Create NgwafAccountRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NgwafAccountRule(name: string, args: NgwafAccountRuleArgs, opts?: CustomResourceOptions);
    @overload
    def NgwafAccountRule(resource_name: str,
                         args: NgwafAccountRuleArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def NgwafAccountRule(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         actions: Optional[Sequence[NgwafAccountRuleActionArgs]] = None,
                         applies_tos: Optional[Sequence[str]] = None,
                         description: Optional[str] = None,
                         enabled: Optional[bool] = None,
                         type: Optional[str] = None,
                         conditions: Optional[Sequence[NgwafAccountRuleConditionArgs]] = None,
                         group_conditions: Optional[Sequence[NgwafAccountRuleGroupConditionArgs]] = None,
                         group_operator: Optional[str] = None,
                         multival_conditions: Optional[Sequence[NgwafAccountRuleMultivalConditionArgs]] = None,
                         request_logging: Optional[str] = None)
    func NewNgwafAccountRule(ctx *Context, name string, args NgwafAccountRuleArgs, opts ...ResourceOption) (*NgwafAccountRule, error)
    public NgwafAccountRule(string name, NgwafAccountRuleArgs args, CustomResourceOptions? opts = null)
    public NgwafAccountRule(String name, NgwafAccountRuleArgs args)
    public NgwafAccountRule(String name, NgwafAccountRuleArgs args, CustomResourceOptions options)
    
    type: fastly:NgwafAccountRule
    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 NgwafAccountRuleArgs
    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 NgwafAccountRuleArgs
    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 NgwafAccountRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NgwafAccountRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NgwafAccountRuleArgs
    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 ngwafAccountRuleResource = new Fastly.NgwafAccountRule("ngwafAccountRuleResource", new()
    {
        Actions = new[]
        {
            new Fastly.Inputs.NgwafAccountRuleActionArgs
            {
                Type = "string",
                Signal = "string",
            },
        },
        AppliesTos = new[]
        {
            "string",
        },
        Description = "string",
        Enabled = false,
        Type = "string",
        Conditions = new[]
        {
            new Fastly.Inputs.NgwafAccountRuleConditionArgs
            {
                Field = "string",
                Operator = "string",
                Value = "string",
            },
        },
        GroupConditions = new[]
        {
            new Fastly.Inputs.NgwafAccountRuleGroupConditionArgs
            {
                Conditions = new[]
                {
                    new Fastly.Inputs.NgwafAccountRuleGroupConditionConditionArgs
                    {
                        Field = "string",
                        Operator = "string",
                        Value = "string",
                    },
                },
                GroupOperator = "string",
            },
        },
        GroupOperator = "string",
        MultivalConditions = new[]
        {
            new Fastly.Inputs.NgwafAccountRuleMultivalConditionArgs
            {
                Conditions = new[]
                {
                    new Fastly.Inputs.NgwafAccountRuleMultivalConditionConditionArgs
                    {
                        Field = "string",
                        Operator = "string",
                        Value = "string",
                    },
                },
                Field = "string",
                GroupOperator = "string",
                Operator = "string",
            },
        },
        RequestLogging = "string",
    });
    
    example, err := fastly.NewNgwafAccountRule(ctx, "ngwafAccountRuleResource", &fastly.NgwafAccountRuleArgs{
    	Actions: fastly.NgwafAccountRuleActionArray{
    		&fastly.NgwafAccountRuleActionArgs{
    			Type:   pulumi.String("string"),
    			Signal: pulumi.String("string"),
    		},
    	},
    	AppliesTos: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Enabled:     pulumi.Bool(false),
    	Type:        pulumi.String("string"),
    	Conditions: fastly.NgwafAccountRuleConditionArray{
    		&fastly.NgwafAccountRuleConditionArgs{
    			Field:    pulumi.String("string"),
    			Operator: pulumi.String("string"),
    			Value:    pulumi.String("string"),
    		},
    	},
    	GroupConditions: fastly.NgwafAccountRuleGroupConditionArray{
    		&fastly.NgwafAccountRuleGroupConditionArgs{
    			Conditions: fastly.NgwafAccountRuleGroupConditionConditionArray{
    				&fastly.NgwafAccountRuleGroupConditionConditionArgs{
    					Field:    pulumi.String("string"),
    					Operator: pulumi.String("string"),
    					Value:    pulumi.String("string"),
    				},
    			},
    			GroupOperator: pulumi.String("string"),
    		},
    	},
    	GroupOperator: pulumi.String("string"),
    	MultivalConditions: fastly.NgwafAccountRuleMultivalConditionArray{
    		&fastly.NgwafAccountRuleMultivalConditionArgs{
    			Conditions: fastly.NgwafAccountRuleMultivalConditionConditionArray{
    				&fastly.NgwafAccountRuleMultivalConditionConditionArgs{
    					Field:    pulumi.String("string"),
    					Operator: pulumi.String("string"),
    					Value:    pulumi.String("string"),
    				},
    			},
    			Field:         pulumi.String("string"),
    			GroupOperator: pulumi.String("string"),
    			Operator:      pulumi.String("string"),
    		},
    	},
    	RequestLogging: pulumi.String("string"),
    })
    
    var ngwafAccountRuleResource = new NgwafAccountRule("ngwafAccountRuleResource", NgwafAccountRuleArgs.builder()
        .actions(NgwafAccountRuleActionArgs.builder()
            .type("string")
            .signal("string")
            .build())
        .appliesTos("string")
        .description("string")
        .enabled(false)
        .type("string")
        .conditions(NgwafAccountRuleConditionArgs.builder()
            .field("string")
            .operator("string")
            .value("string")
            .build())
        .groupConditions(NgwafAccountRuleGroupConditionArgs.builder()
            .conditions(NgwafAccountRuleGroupConditionConditionArgs.builder()
                .field("string")
                .operator("string")
                .value("string")
                .build())
            .groupOperator("string")
            .build())
        .groupOperator("string")
        .multivalConditions(NgwafAccountRuleMultivalConditionArgs.builder()
            .conditions(NgwafAccountRuleMultivalConditionConditionArgs.builder()
                .field("string")
                .operator("string")
                .value("string")
                .build())
            .field("string")
            .groupOperator("string")
            .operator("string")
            .build())
        .requestLogging("string")
        .build());
    
    ngwaf_account_rule_resource = fastly.NgwafAccountRule("ngwafAccountRuleResource",
        actions=[{
            "type": "string",
            "signal": "string",
        }],
        applies_tos=["string"],
        description="string",
        enabled=False,
        type="string",
        conditions=[{
            "field": "string",
            "operator": "string",
            "value": "string",
        }],
        group_conditions=[{
            "conditions": [{
                "field": "string",
                "operator": "string",
                "value": "string",
            }],
            "group_operator": "string",
        }],
        group_operator="string",
        multival_conditions=[{
            "conditions": [{
                "field": "string",
                "operator": "string",
                "value": "string",
            }],
            "field": "string",
            "group_operator": "string",
            "operator": "string",
        }],
        request_logging="string")
    
    const ngwafAccountRuleResource = new fastly.NgwafAccountRule("ngwafAccountRuleResource", {
        actions: [{
            type: "string",
            signal: "string",
        }],
        appliesTos: ["string"],
        description: "string",
        enabled: false,
        type: "string",
        conditions: [{
            field: "string",
            operator: "string",
            value: "string",
        }],
        groupConditions: [{
            conditions: [{
                field: "string",
                operator: "string",
                value: "string",
            }],
            groupOperator: "string",
        }],
        groupOperator: "string",
        multivalConditions: [{
            conditions: [{
                field: "string",
                operator: "string",
                value: "string",
            }],
            field: "string",
            groupOperator: "string",
            operator: "string",
        }],
        requestLogging: "string",
    });
    
    type: fastly:NgwafAccountRule
    properties:
        actions:
            - signal: string
              type: string
        appliesTos:
            - string
        conditions:
            - field: string
              operator: string
              value: string
        description: string
        enabled: false
        groupConditions:
            - conditions:
                - field: string
                  operator: string
                  value: string
              groupOperator: string
        groupOperator: string
        multivalConditions:
            - conditions:
                - field: string
                  operator: string
                  value: string
              field: string
              groupOperator: string
              operator: string
        requestLogging: string
        type: string
    

    NgwafAccountRule 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 NgwafAccountRule resource accepts the following input properties:

    Actions List<NgwafAccountRuleAction>
    List of actions to perform when the rule matches.
    AppliesTos List<string>
    The list of workspace IDs this signal applies to, or the wildcard * if it applies to all workspaces.
    Description string
    The description of the rule.
    Enabled bool
    Whether the rule is currently enabled.
    Type string
    The type of the rule. Accepted values are request and signal.
    Conditions List<NgwafAccountRuleCondition>
    Flat list of individual conditions. Each must include field, operator, and value.
    GroupConditions List<NgwafAccountRuleGroupCondition>
    List of grouped conditions with nested logic. Each group must define a group_operator and at least one condition.
    GroupOperator string
    Logical operator to apply to group conditions. Accepted values are any and all.
    MultivalConditions List<NgwafAccountRuleMultivalCondition>
    List of multival conditions with nested logic. Each multival list must define a field, operator,<span pulumi-lang-nodejs=" groupOperator" pulumi-lang-dotnet=" GroupOperator" pulumi-lang-go=" groupOperator" pulumi-lang-python=" group_operator" pulumi-lang-yaml=" groupOperator" pulumi-lang-java=" groupOperator"> group_operator and at least one condition.
    RequestLogging string
    Logging behavior for matching requests. Accepted values are sampled and none.
    Actions []NgwafAccountRuleActionArgs
    List of actions to perform when the rule matches.
    AppliesTos []string
    The list of workspace IDs this signal applies to, or the wildcard * if it applies to all workspaces.
    Description string
    The description of the rule.
    Enabled bool
    Whether the rule is currently enabled.
    Type string
    The type of the rule. Accepted values are request and signal.
    Conditions []NgwafAccountRuleConditionArgs
    Flat list of individual conditions. Each must include field, operator, and value.
    GroupConditions []NgwafAccountRuleGroupConditionArgs
    List of grouped conditions with nested logic. Each group must define a group_operator and at least one condition.
    GroupOperator string
    Logical operator to apply to group conditions. Accepted values are any and all.
    MultivalConditions []NgwafAccountRuleMultivalConditionArgs
    List of multival conditions with nested logic. Each multival list must define a field, operator,<span pulumi-lang-nodejs=" groupOperator" pulumi-lang-dotnet=" GroupOperator" pulumi-lang-go=" groupOperator" pulumi-lang-python=" group_operator" pulumi-lang-yaml=" groupOperator" pulumi-lang-java=" groupOperator"> group_operator and at least one condition.
    RequestLogging string
    Logging behavior for matching requests. Accepted values are sampled and none.
    actions List<NgwafAccountRuleAction>
    List of actions to perform when the rule matches.
    appliesTos List<String>
    The list of workspace IDs this signal applies to, or the wildcard * if it applies to all workspaces.
    description String
    The description of the rule.
    enabled Boolean
    Whether the rule is currently enabled.
    type String
    The type of the rule. Accepted values are request and signal.
    conditions List<NgwafAccountRuleCondition>
    Flat list of individual conditions. Each must include field, operator, and value.
    groupConditions List<NgwafAccountRuleGroupCondition>
    List of grouped conditions with nested logic. Each group must define a group_operator and at least one condition.
    groupOperator String
    Logical operator to apply to group conditions. Accepted values are any and all.
    multivalConditions List<NgwafAccountRuleMultivalCondition>
    List of multival conditions with nested logic. Each multival list must define a field, operator,<span pulumi-lang-nodejs=" groupOperator" pulumi-lang-dotnet=" GroupOperator" pulumi-lang-go=" groupOperator" pulumi-lang-python=" group_operator" pulumi-lang-yaml=" groupOperator" pulumi-lang-java=" groupOperator"> group_operator and at least one condition.
    requestLogging String
    Logging behavior for matching requests. Accepted values are sampled and none.
    actions NgwafAccountRuleAction[]
    List of actions to perform when the rule matches.
    appliesTos string[]
    The list of workspace IDs this signal applies to, or the wildcard * if it applies to all workspaces.
    description string
    The description of the rule.
    enabled boolean
    Whether the rule is currently enabled.
    type string
    The type of the rule. Accepted values are request and signal.
    conditions NgwafAccountRuleCondition[]
    Flat list of individual conditions. Each must include field, operator, and value.
    groupConditions NgwafAccountRuleGroupCondition[]
    List of grouped conditions with nested logic. Each group must define a group_operator and at least one condition.
    groupOperator string
    Logical operator to apply to group conditions. Accepted values are any and all.
    multivalConditions NgwafAccountRuleMultivalCondition[]
    List of multival conditions with nested logic. Each multival list must define a field, operator,<span pulumi-lang-nodejs=" groupOperator" pulumi-lang-dotnet=" GroupOperator" pulumi-lang-go=" groupOperator" pulumi-lang-python=" group_operator" pulumi-lang-yaml=" groupOperator" pulumi-lang-java=" groupOperator"> group_operator and at least one condition.
    requestLogging string
    Logging behavior for matching requests. Accepted values are sampled and none.
    actions Sequence[NgwafAccountRuleActionArgs]
    List of actions to perform when the rule matches.
    applies_tos Sequence[str]
    The list of workspace IDs this signal applies to, or the wildcard * if it applies to all workspaces.
    description str
    The description of the rule.
    enabled bool
    Whether the rule is currently enabled.
    type str
    The type of the rule. Accepted values are request and signal.
    conditions Sequence[NgwafAccountRuleConditionArgs]
    Flat list of individual conditions. Each must include field, operator, and value.
    group_conditions Sequence[NgwafAccountRuleGroupConditionArgs]
    List of grouped conditions with nested logic. Each group must define a group_operator and at least one condition.
    group_operator str
    Logical operator to apply to group conditions. Accepted values are any and all.
    multival_conditions Sequence[NgwafAccountRuleMultivalConditionArgs]
    List of multival conditions with nested logic. Each multival list must define a field, operator,<span pulumi-lang-nodejs=" groupOperator" pulumi-lang-dotnet=" GroupOperator" pulumi-lang-go=" groupOperator" pulumi-lang-python=" group_operator" pulumi-lang-yaml=" groupOperator" pulumi-lang-java=" groupOperator"> group_operator and at least one condition.
    request_logging str
    Logging behavior for matching requests. Accepted values are sampled and none.
    actions List<Property Map>
    List of actions to perform when the rule matches.
    appliesTos List<String>
    The list of workspace IDs this signal applies to, or the wildcard * if it applies to all workspaces.
    description String
    The description of the rule.
    enabled Boolean
    Whether the rule is currently enabled.
    type String
    The type of the rule. Accepted values are request and signal.
    conditions List<Property Map>
    Flat list of individual conditions. Each must include field, operator, and value.
    groupConditions List<Property Map>
    List of grouped conditions with nested logic. Each group must define a group_operator and at least one condition.
    groupOperator String
    Logical operator to apply to group conditions. Accepted values are any and all.
    multivalConditions List<Property Map>
    List of multival conditions with nested logic. Each multival list must define a field, operator,<span pulumi-lang-nodejs=" groupOperator" pulumi-lang-dotnet=" GroupOperator" pulumi-lang-go=" groupOperator" pulumi-lang-python=" group_operator" pulumi-lang-yaml=" groupOperator" pulumi-lang-java=" groupOperator"> group_operator and at least one condition.
    requestLogging String
    Logging behavior for matching requests. Accepted values are sampled and none.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NgwafAccountRule 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 NgwafAccountRule Resource

    Get an existing NgwafAccountRule 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?: NgwafAccountRuleState, opts?: CustomResourceOptions): NgwafAccountRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            actions: Optional[Sequence[NgwafAccountRuleActionArgs]] = None,
            applies_tos: Optional[Sequence[str]] = None,
            conditions: Optional[Sequence[NgwafAccountRuleConditionArgs]] = None,
            description: Optional[str] = None,
            enabled: Optional[bool] = None,
            group_conditions: Optional[Sequence[NgwafAccountRuleGroupConditionArgs]] = None,
            group_operator: Optional[str] = None,
            multival_conditions: Optional[Sequence[NgwafAccountRuleMultivalConditionArgs]] = None,
            request_logging: Optional[str] = None,
            type: Optional[str] = None) -> NgwafAccountRule
    func GetNgwafAccountRule(ctx *Context, name string, id IDInput, state *NgwafAccountRuleState, opts ...ResourceOption) (*NgwafAccountRule, error)
    public static NgwafAccountRule Get(string name, Input<string> id, NgwafAccountRuleState? state, CustomResourceOptions? opts = null)
    public static NgwafAccountRule get(String name, Output<String> id, NgwafAccountRuleState state, CustomResourceOptions options)
    resources:  _:    type: fastly:NgwafAccountRule    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.
    The following state arguments are supported:
    Actions List<NgwafAccountRuleAction>
    List of actions to perform when the rule matches.
    AppliesTos List<string>
    The list of workspace IDs this signal applies to, or the wildcard * if it applies to all workspaces.
    Conditions List<NgwafAccountRuleCondition>
    Flat list of individual conditions. Each must include field, operator, and value.
    Description string
    The description of the rule.
    Enabled bool
    Whether the rule is currently enabled.
    GroupConditions List<NgwafAccountRuleGroupCondition>
    List of grouped conditions with nested logic. Each group must define a group_operator and at least one condition.
    GroupOperator string
    Logical operator to apply to group conditions. Accepted values are any and all.
    MultivalConditions List<NgwafAccountRuleMultivalCondition>
    List of multival conditions with nested logic. Each multival list must define a field, operator,<span pulumi-lang-nodejs=" groupOperator" pulumi-lang-dotnet=" GroupOperator" pulumi-lang-go=" groupOperator" pulumi-lang-python=" group_operator" pulumi-lang-yaml=" groupOperator" pulumi-lang-java=" groupOperator"> group_operator and at least one condition.
    RequestLogging string
    Logging behavior for matching requests. Accepted values are sampled and none.
    Type string
    The type of the rule. Accepted values are request and signal.
    Actions []NgwafAccountRuleActionArgs
    List of actions to perform when the rule matches.
    AppliesTos []string
    The list of workspace IDs this signal applies to, or the wildcard * if it applies to all workspaces.
    Conditions []NgwafAccountRuleConditionArgs
    Flat list of individual conditions. Each must include field, operator, and value.
    Description string
    The description of the rule.
    Enabled bool
    Whether the rule is currently enabled.
    GroupConditions []NgwafAccountRuleGroupConditionArgs
    List of grouped conditions with nested logic. Each group must define a group_operator and at least one condition.
    GroupOperator string
    Logical operator to apply to group conditions. Accepted values are any and all.
    MultivalConditions []NgwafAccountRuleMultivalConditionArgs
    List of multival conditions with nested logic. Each multival list must define a field, operator,<span pulumi-lang-nodejs=" groupOperator" pulumi-lang-dotnet=" GroupOperator" pulumi-lang-go=" groupOperator" pulumi-lang-python=" group_operator" pulumi-lang-yaml=" groupOperator" pulumi-lang-java=" groupOperator"> group_operator and at least one condition.
    RequestLogging string
    Logging behavior for matching requests. Accepted values are sampled and none.
    Type string
    The type of the rule. Accepted values are request and signal.
    actions List<NgwafAccountRuleAction>
    List of actions to perform when the rule matches.
    appliesTos List<String>
    The list of workspace IDs this signal applies to, or the wildcard * if it applies to all workspaces.
    conditions List<NgwafAccountRuleCondition>
    Flat list of individual conditions. Each must include field, operator, and value.
    description String
    The description of the rule.
    enabled Boolean
    Whether the rule is currently enabled.
    groupConditions List<NgwafAccountRuleGroupCondition>
    List of grouped conditions with nested logic. Each group must define a group_operator and at least one condition.
    groupOperator String
    Logical operator to apply to group conditions. Accepted values are any and all.
    multivalConditions List<NgwafAccountRuleMultivalCondition>
    List of multival conditions with nested logic. Each multival list must define a field, operator,<span pulumi-lang-nodejs=" groupOperator" pulumi-lang-dotnet=" GroupOperator" pulumi-lang-go=" groupOperator" pulumi-lang-python=" group_operator" pulumi-lang-yaml=" groupOperator" pulumi-lang-java=" groupOperator"> group_operator and at least one condition.
    requestLogging String
    Logging behavior for matching requests. Accepted values are sampled and none.
    type String
    The type of the rule. Accepted values are request and signal.
    actions NgwafAccountRuleAction[]
    List of actions to perform when the rule matches.
    appliesTos string[]
    The list of workspace IDs this signal applies to, or the wildcard * if it applies to all workspaces.
    conditions NgwafAccountRuleCondition[]
    Flat list of individual conditions. Each must include field, operator, and value.
    description string
    The description of the rule.
    enabled boolean
    Whether the rule is currently enabled.
    groupConditions NgwafAccountRuleGroupCondition[]
    List of grouped conditions with nested logic. Each group must define a group_operator and at least one condition.
    groupOperator string
    Logical operator to apply to group conditions. Accepted values are any and all.
    multivalConditions NgwafAccountRuleMultivalCondition[]
    List of multival conditions with nested logic. Each multival list must define a field, operator,<span pulumi-lang-nodejs=" groupOperator" pulumi-lang-dotnet=" GroupOperator" pulumi-lang-go=" groupOperator" pulumi-lang-python=" group_operator" pulumi-lang-yaml=" groupOperator" pulumi-lang-java=" groupOperator"> group_operator and at least one condition.
    requestLogging string
    Logging behavior for matching requests. Accepted values are sampled and none.
    type string
    The type of the rule. Accepted values are request and signal.
    actions Sequence[NgwafAccountRuleActionArgs]
    List of actions to perform when the rule matches.
    applies_tos Sequence[str]
    The list of workspace IDs this signal applies to, or the wildcard * if it applies to all workspaces.
    conditions Sequence[NgwafAccountRuleConditionArgs]
    Flat list of individual conditions. Each must include field, operator, and value.
    description str
    The description of the rule.
    enabled bool
    Whether the rule is currently enabled.
    group_conditions Sequence[NgwafAccountRuleGroupConditionArgs]
    List of grouped conditions with nested logic. Each group must define a group_operator and at least one condition.
    group_operator str
    Logical operator to apply to group conditions. Accepted values are any and all.
    multival_conditions Sequence[NgwafAccountRuleMultivalConditionArgs]
    List of multival conditions with nested logic. Each multival list must define a field, operator,<span pulumi-lang-nodejs=" groupOperator" pulumi-lang-dotnet=" GroupOperator" pulumi-lang-go=" groupOperator" pulumi-lang-python=" group_operator" pulumi-lang-yaml=" groupOperator" pulumi-lang-java=" groupOperator"> group_operator and at least one condition.
    request_logging str
    Logging behavior for matching requests. Accepted values are sampled and none.
    type str
    The type of the rule. Accepted values are request and signal.
    actions List<Property Map>
    List of actions to perform when the rule matches.
    appliesTos List<String>
    The list of workspace IDs this signal applies to, or the wildcard * if it applies to all workspaces.
    conditions List<Property Map>
    Flat list of individual conditions. Each must include field, operator, and value.
    description String
    The description of the rule.
    enabled Boolean
    Whether the rule is currently enabled.
    groupConditions List<Property Map>
    List of grouped conditions with nested logic. Each group must define a group_operator and at least one condition.
    groupOperator String
    Logical operator to apply to group conditions. Accepted values are any and all.
    multivalConditions List<Property Map>
    List of multival conditions with nested logic. Each multival list must define a field, operator,<span pulumi-lang-nodejs=" groupOperator" pulumi-lang-dotnet=" GroupOperator" pulumi-lang-go=" groupOperator" pulumi-lang-python=" group_operator" pulumi-lang-yaml=" groupOperator" pulumi-lang-java=" groupOperator"> group_operator and at least one condition.
    requestLogging String
    Logging behavior for matching requests. Accepted values are sampled and none.
    type String
    The type of the rule. Accepted values are request and signal.

    Supporting Types

    NgwafAccountRuleAction, NgwafAccountRuleActionArgs

    Type string
    The action type. One of: add_signal, allow, block, browser_challenge, dynamic_challenge, exclude_signal, verify_token or for rate limit rule valid values: log_request, block_signal, browser_challenge, verify_token
    Signal string
    Signal name to exclude (used when type =<span pulumi-lang-nodejs=" excludeSignal" pulumi-lang-dotnet=" ExcludeSignal" pulumi-lang-go=" excludeSignal" pulumi-lang-python=" exclude_signal" pulumi-lang-yaml=" excludeSignal" pulumi-lang-java=" excludeSignal"> exclude_signal).
    Type string
    The action type. One of: add_signal, allow, block, browser_challenge, dynamic_challenge, exclude_signal, verify_token or for rate limit rule valid values: log_request, block_signal, browser_challenge, verify_token
    Signal string
    Signal name to exclude (used when type =<span pulumi-lang-nodejs=" excludeSignal" pulumi-lang-dotnet=" ExcludeSignal" pulumi-lang-go=" excludeSignal" pulumi-lang-python=" exclude_signal" pulumi-lang-yaml=" excludeSignal" pulumi-lang-java=" excludeSignal"> exclude_signal).
    type String
    The action type. One of: add_signal, allow, block, browser_challenge, dynamic_challenge, exclude_signal, verify_token or for rate limit rule valid values: log_request, block_signal, browser_challenge, verify_token
    signal String
    Signal name to exclude (used when type =<span pulumi-lang-nodejs=" excludeSignal" pulumi-lang-dotnet=" ExcludeSignal" pulumi-lang-go=" excludeSignal" pulumi-lang-python=" exclude_signal" pulumi-lang-yaml=" excludeSignal" pulumi-lang-java=" excludeSignal"> exclude_signal).
    type string
    The action type. One of: add_signal, allow, block, browser_challenge, dynamic_challenge, exclude_signal, verify_token or for rate limit rule valid values: log_request, block_signal, browser_challenge, verify_token
    signal string
    Signal name to exclude (used when type =<span pulumi-lang-nodejs=" excludeSignal" pulumi-lang-dotnet=" ExcludeSignal" pulumi-lang-go=" excludeSignal" pulumi-lang-python=" exclude_signal" pulumi-lang-yaml=" excludeSignal" pulumi-lang-java=" excludeSignal"> exclude_signal).
    type str
    The action type. One of: add_signal, allow, block, browser_challenge, dynamic_challenge, exclude_signal, verify_token or for rate limit rule valid values: log_request, block_signal, browser_challenge, verify_token
    signal str
    Signal name to exclude (used when type =<span pulumi-lang-nodejs=" excludeSignal" pulumi-lang-dotnet=" ExcludeSignal" pulumi-lang-go=" excludeSignal" pulumi-lang-python=" exclude_signal" pulumi-lang-yaml=" excludeSignal" pulumi-lang-java=" excludeSignal"> exclude_signal).
    type String
    The action type. One of: add_signal, allow, block, browser_challenge, dynamic_challenge, exclude_signal, verify_token or for rate limit rule valid values: log_request, block_signal, browser_challenge, verify_token
    signal String
    Signal name to exclude (used when type =<span pulumi-lang-nodejs=" excludeSignal" pulumi-lang-dotnet=" ExcludeSignal" pulumi-lang-go=" excludeSignal" pulumi-lang-python=" exclude_signal" pulumi-lang-yaml=" excludeSignal" pulumi-lang-java=" excludeSignal"> exclude_signal).

    NgwafAccountRuleCondition, NgwafAccountRuleConditionArgs

    Field string
    Field to inspect (e.g., ip, path).
    Operator string
    Operator to apply (e.g., equals, contains).
    Value string
    The value to test the field against.
    Field string
    Field to inspect (e.g., ip, path).
    Operator string
    Operator to apply (e.g., equals, contains).
    Value string
    The value to test the field against.
    field String
    Field to inspect (e.g., ip, path).
    operator String
    Operator to apply (e.g., equals, contains).
    value String
    The value to test the field against.
    field string
    Field to inspect (e.g., ip, path).
    operator string
    Operator to apply (e.g., equals, contains).
    value string
    The value to test the field against.
    field str
    Field to inspect (e.g., ip, path).
    operator str
    Operator to apply (e.g., equals, contains).
    value str
    The value to test the field against.
    field String
    Field to inspect (e.g., ip, path).
    operator String
    Operator to apply (e.g., equals, contains).
    value String
    The value to test the field against.

    NgwafAccountRuleGroupCondition, NgwafAccountRuleGroupConditionArgs

    Conditions List<NgwafAccountRuleGroupConditionCondition>
    A list of nested conditions in this group.
    GroupOperator string
    Logical operator for the group. Accepted values are any and all.
    Conditions []NgwafAccountRuleGroupConditionCondition
    A list of nested conditions in this group.
    GroupOperator string
    Logical operator for the group. Accepted values are any and all.
    conditions List<NgwafAccountRuleGroupConditionCondition>
    A list of nested conditions in this group.
    groupOperator String
    Logical operator for the group. Accepted values are any and all.
    conditions NgwafAccountRuleGroupConditionCondition[]
    A list of nested conditions in this group.
    groupOperator string
    Logical operator for the group. Accepted values are any and all.
    conditions Sequence[NgwafAccountRuleGroupConditionCondition]
    A list of nested conditions in this group.
    group_operator str
    Logical operator for the group. Accepted values are any and all.
    conditions List<Property Map>
    A list of nested conditions in this group.
    groupOperator String
    Logical operator for the group. Accepted values are any and all.

    NgwafAccountRuleGroupConditionCondition, NgwafAccountRuleGroupConditionConditionArgs

    Field string
    Field to inspect (e.g., ip, path).
    Operator string
    Operator to apply (e.g., equals, contains).
    Value string
    The value to test the field against.
    Field string
    Field to inspect (e.g., ip, path).
    Operator string
    Operator to apply (e.g., equals, contains).
    Value string
    The value to test the field against.
    field String
    Field to inspect (e.g., ip, path).
    operator String
    Operator to apply (e.g., equals, contains).
    value String
    The value to test the field against.
    field string
    Field to inspect (e.g., ip, path).
    operator string
    Operator to apply (e.g., equals, contains).
    value string
    The value to test the field against.
    field str
    Field to inspect (e.g., ip, path).
    operator str
    Operator to apply (e.g., equals, contains).
    value str
    The value to test the field against.
    field String
    Field to inspect (e.g., ip, path).
    operator String
    Operator to apply (e.g., equals, contains).
    value String
    The value to test the field against.

    NgwafAccountRuleMultivalCondition, NgwafAccountRuleMultivalConditionArgs

    Conditions List<NgwafAccountRuleMultivalConditionCondition>
    A list of nested conditions in this list.
    Field string
    Enums for multival condition field.. Accepted values are post_parameter, query_parameter, request_cookie, request_header, response_header, and signal.
    GroupOperator string
    Logical operator for the group. Accepted values are any and all.
    Operator string
    Indicates whether the supplied conditions will check for existence or non-existence of matching field values. Accepted values are exists and does_not_exist.
    Conditions []NgwafAccountRuleMultivalConditionCondition
    A list of nested conditions in this list.
    Field string
    Enums for multival condition field.. Accepted values are post_parameter, query_parameter, request_cookie, request_header, response_header, and signal.
    GroupOperator string
    Logical operator for the group. Accepted values are any and all.
    Operator string
    Indicates whether the supplied conditions will check for existence or non-existence of matching field values. Accepted values are exists and does_not_exist.
    conditions List<NgwafAccountRuleMultivalConditionCondition>
    A list of nested conditions in this list.
    field String
    Enums for multival condition field.. Accepted values are post_parameter, query_parameter, request_cookie, request_header, response_header, and signal.
    groupOperator String
    Logical operator for the group. Accepted values are any and all.
    operator String
    Indicates whether the supplied conditions will check for existence or non-existence of matching field values. Accepted values are exists and does_not_exist.
    conditions NgwafAccountRuleMultivalConditionCondition[]
    A list of nested conditions in this list.
    field string
    Enums for multival condition field.. Accepted values are post_parameter, query_parameter, request_cookie, request_header, response_header, and signal.
    groupOperator string
    Logical operator for the group. Accepted values are any and all.
    operator string
    Indicates whether the supplied conditions will check for existence or non-existence of matching field values. Accepted values are exists and does_not_exist.
    conditions Sequence[NgwafAccountRuleMultivalConditionCondition]
    A list of nested conditions in this list.
    field str
    Enums for multival condition field.. Accepted values are post_parameter, query_parameter, request_cookie, request_header, response_header, and signal.
    group_operator str
    Logical operator for the group. Accepted values are any and all.
    operator str
    Indicates whether the supplied conditions will check for existence or non-existence of matching field values. Accepted values are exists and does_not_exist.
    conditions List<Property Map>
    A list of nested conditions in this list.
    field String
    Enums for multival condition field.. Accepted values are post_parameter, query_parameter, request_cookie, request_header, response_header, and signal.
    groupOperator String
    Logical operator for the group. Accepted values are any and all.
    operator String
    Indicates whether the supplied conditions will check for existence or non-existence of matching field values. Accepted values are exists and does_not_exist.

    NgwafAccountRuleMultivalConditionCondition, NgwafAccountRuleMultivalConditionConditionArgs

    Field string
    Field to inspect (e.g., name, value, signal_id).
    Operator string
    Operator to apply (e.g., equals, contains).
    Value string
    The value to test the field against.
    Field string
    Field to inspect (e.g., name, value, signal_id).
    Operator string
    Operator to apply (e.g., equals, contains).
    Value string
    The value to test the field against.
    field String
    Field to inspect (e.g., name, value, signal_id).
    operator String
    Operator to apply (e.g., equals, contains).
    value String
    The value to test the field against.
    field string
    Field to inspect (e.g., name, value, signal_id).
    operator string
    Operator to apply (e.g., equals, contains).
    value string
    The value to test the field against.
    field str
    Field to inspect (e.g., name, value, signal_id).
    operator str
    Operator to apply (e.g., equals, contains).
    value str
    The value to test the field against.
    field String
    Field to inspect (e.g., name, value, signal_id).
    operator String
    Operator to apply (e.g., equals, contains).
    value String
    The value to test the field against.

    Import

    Fastly Next-Gen WAF account rules can be imported using just the rule ID, e.g.:

    $ pulumi import fastly:index/ngwafAccountRule:NgwafAccountRule demo <ruleID>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Fastly pulumi/pulumi-fastly
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the fastly Terraform Provider.
    fastly logo
    Fastly v11.1.0 published on Wednesday, Nov 5, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate