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

fastly.getNgwafAccountRules

Get Started
fastly logo
Fastly v11.1.0 published on Wednesday, Nov 5, 2025 by Pulumi

    Use this data source to get a Fastly Next-Gen WAF Account Rule.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as fastly from "@pulumi/fastly";
    
    const accountRules = fastly.getNgwafAccountRules({});
    export const fastlyNgwafAccountRulesAll = accountRules;
    
    import pulumi
    import pulumi_fastly as fastly
    
    account_rules = fastly.get_ngwaf_account_rules()
    pulumi.export("fastlyNgwafAccountRulesAll", account_rules)
    
    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 {
    		accountRules, err := fastly.GetNgwafAccountRules(ctx, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("fastlyNgwafAccountRulesAll", accountRules)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Fastly = Pulumi.Fastly;
    
    return await Deployment.RunAsync(() => 
    {
        var accountRules = Fastly.GetNgwafAccountRules.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["fastlyNgwafAccountRulesAll"] = accountRules,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.fastly.FastlyFunctions;
    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) {
            final var accountRules = FastlyFunctions.getNgwafAccountRules(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
    
            ctx.export("fastlyNgwafAccountRulesAll", accountRules);
        }
    }
    
    variables:
      accountRules:
        fn::invoke:
          function: fastly:getNgwafAccountRules
          arguments: {}
    outputs:
      fastlyNgwafAccountRulesAll: ${accountRules}
    

    Using getNgwafAccountRules

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getNgwafAccountRules(opts?: InvokeOptions): Promise<GetNgwafAccountRulesResult>
    function getNgwafAccountRulesOutput(opts?: InvokeOptions): Output<GetNgwafAccountRulesResult>
    def get_ngwaf_account_rules(opts: Optional[InvokeOptions] = None) -> GetNgwafAccountRulesResult
    def get_ngwaf_account_rules_output(opts: Optional[InvokeOptions] = None) -> Output[GetNgwafAccountRulesResult]
    func GetNgwafAccountRules(ctx *Context, opts ...InvokeOption) (*GetNgwafAccountRulesResult, error)
    func GetNgwafAccountRulesOutput(ctx *Context, opts ...InvokeOption) GetNgwafAccountRulesResultOutput

    > Note: This function is named GetNgwafAccountRules in the Go SDK.

    public static class GetNgwafAccountRules 
    {
        public static Task<GetNgwafAccountRulesResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetNgwafAccountRulesResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNgwafAccountRulesResult> getNgwafAccountRules(InvokeOptions options)
    public static Output<GetNgwafAccountRulesResult> getNgwafAccountRules(InvokeOptions options)
    
    fn::invoke:
      function: fastly:index/getNgwafAccountRules:getNgwafAccountRules
      arguments:
        # arguments dictionary

    getNgwafAccountRules Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Rules List<GetNgwafAccountRulesRule>
    The list of rules.
    Id string
    The provider-assigned unique ID for this managed resource.
    Rules []GetNgwafAccountRulesRule
    The list of rules.
    id String
    The provider-assigned unique ID for this managed resource.
    rules List<GetNgwafAccountRulesRule>
    The list of rules.
    id string
    The provider-assigned unique ID for this managed resource.
    rules GetNgwafAccountRulesRule[]
    The list of rules.
    id str
    The provider-assigned unique ID for this managed resource.
    rules Sequence[GetNgwafAccountRulesRule]
    The list of rules.
    id String
    The provider-assigned unique ID for this managed resource.
    rules List<Property Map>
    The list of rules.

    Supporting Types

    GetNgwafAccountRulesRule

    CreatedAt string
    The date and time in ISO 8601 format when the rule was created.
    Description string
    The description of the rule.
    Enabled bool
    Whether the rule is currently enabled.
    Id string
    The ID of the rule.
    Type string
    The type of the rule.
    UpdatedAt string
    The date and time in ISO 8601 format when the rule was last updated.
    CreatedAt string
    The date and time in ISO 8601 format when the rule was created.
    Description string
    The description of the rule.
    Enabled bool
    Whether the rule is currently enabled.
    Id string
    The ID of the rule.
    Type string
    The type of the rule.
    UpdatedAt string
    The date and time in ISO 8601 format when the rule was last updated.
    createdAt String
    The date and time in ISO 8601 format when the rule was created.
    description String
    The description of the rule.
    enabled Boolean
    Whether the rule is currently enabled.
    id String
    The ID of the rule.
    type String
    The type of the rule.
    updatedAt String
    The date and time in ISO 8601 format when the rule was last updated.
    createdAt string
    The date and time in ISO 8601 format when the rule was created.
    description string
    The description of the rule.
    enabled boolean
    Whether the rule is currently enabled.
    id string
    The ID of the rule.
    type string
    The type of the rule.
    updatedAt string
    The date and time in ISO 8601 format when the rule was last updated.
    created_at str
    The date and time in ISO 8601 format when the rule was created.
    description str
    The description of the rule.
    enabled bool
    Whether the rule is currently enabled.
    id str
    The ID of the rule.
    type str
    The type of the rule.
    updated_at str
    The date and time in ISO 8601 format when the rule was last updated.
    createdAt String
    The date and time in ISO 8601 format when the rule was created.
    description String
    The description of the rule.
    enabled Boolean
    Whether the rule is currently enabled.
    id String
    The ID of the rule.
    type String
    The type of the rule.
    updatedAt String
    The date and time in ISO 8601 format when the rule was last updated.

    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