1. Packages
  2. Fastly Provider
  3. API Docs
  4. getNgwafVirtualPatches
Fastly v11.0.0 published on Thursday, Sep 4, 2025 by Pulumi

fastly.getNgwafVirtualPatches

Explore with Pulumi AI

fastly logo
Fastly v11.0.0 published on Thursday, Sep 4, 2025 by Pulumi

    Use this data source to get a list of Fastly Next-Gen WAF Virtual Patches for a given workspace.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as fastly from "@pulumi/fastly";
    
    const listPatches = fastly.getNgwafVirtualPatches({
        workspaceId: testVirtualPatchesWorkspace.id,
    });
    export const fastlyNgwafVirtualPatchesAll = listPatches;
    
    import pulumi
    import pulumi_fastly as fastly
    
    list_patches = fastly.get_ngwaf_virtual_patches(workspace_id=test_virtual_patches_workspace["id"])
    pulumi.export("fastlyNgwafVirtualPatchesAll", list_patches)
    
    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 {
    		listPatches, err := fastly.LookupNgwafVirtualPatches(ctx, &fastly.LookupNgwafVirtualPatchesArgs{
    			WorkspaceId: testVirtualPatchesWorkspace.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("fastlyNgwafVirtualPatchesAll", listPatches)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Fastly = Pulumi.Fastly;
    
    return await Deployment.RunAsync(() => 
    {
        var listPatches = Fastly.GetNgwafVirtualPatches.Invoke(new()
        {
            WorkspaceId = testVirtualPatchesWorkspace.Id,
        });
    
        return new Dictionary<string, object?>
        {
            ["fastlyNgwafVirtualPatchesAll"] = listPatches,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.fastly.FastlyFunctions;
    import com.pulumi.fastly.inputs.GetNgwafVirtualPatchesArgs;
    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 listPatches = FastlyFunctions.getNgwafVirtualPatches(GetNgwafVirtualPatchesArgs.builder()
                .workspaceId(testVirtualPatchesWorkspace.id())
                .build());
    
            ctx.export("fastlyNgwafVirtualPatchesAll", listPatches);
        }
    }
    
    variables:
      listPatches:
        fn::invoke:
          function: fastly:getNgwafVirtualPatches
          arguments:
            workspaceId: ${testVirtualPatchesWorkspace.id}
    outputs:
      fastlyNgwafVirtualPatchesAll: ${listPatches}
    

    Using getNgwafVirtualPatches

    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 getNgwafVirtualPatches(args: GetNgwafVirtualPatchesArgs, opts?: InvokeOptions): Promise<GetNgwafVirtualPatchesResult>
    function getNgwafVirtualPatchesOutput(args: GetNgwafVirtualPatchesOutputArgs, opts?: InvokeOptions): Output<GetNgwafVirtualPatchesResult>
    def get_ngwaf_virtual_patches(workspace_id: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetNgwafVirtualPatchesResult
    def get_ngwaf_virtual_patches_output(workspace_id: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetNgwafVirtualPatchesResult]
    func LookupNgwafVirtualPatches(ctx *Context, args *LookupNgwafVirtualPatchesArgs, opts ...InvokeOption) (*LookupNgwafVirtualPatchesResult, error)
    func LookupNgwafVirtualPatchesOutput(ctx *Context, args *LookupNgwafVirtualPatchesOutputArgs, opts ...InvokeOption) LookupNgwafVirtualPatchesResultOutput

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

    public static class GetNgwafVirtualPatches 
    {
        public static Task<GetNgwafVirtualPatchesResult> InvokeAsync(GetNgwafVirtualPatchesArgs args, InvokeOptions? opts = null)
        public static Output<GetNgwafVirtualPatchesResult> Invoke(GetNgwafVirtualPatchesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNgwafVirtualPatchesResult> getNgwafVirtualPatches(GetNgwafVirtualPatchesArgs args, InvokeOptions options)
    public static Output<GetNgwafVirtualPatchesResult> getNgwafVirtualPatches(GetNgwafVirtualPatchesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: fastly:index/getNgwafVirtualPatches:getNgwafVirtualPatches
      arguments:
        # arguments dictionary

    The following arguments are supported:

    WorkspaceId string
    The ID of the workspace.
    WorkspaceId string
    The ID of the workspace.
    workspaceId String
    The ID of the workspace.
    workspaceId string
    The ID of the workspace.
    workspace_id str
    The ID of the workspace.
    workspaceId String
    The ID of the workspace.

    getNgwafVirtualPatches Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    VirtualPatches List<GetNgwafVirtualPatchesVirtualPatch>
    List of all virtual patches for a given workspace.
    WorkspaceId string
    The ID of the workspace.
    Id string
    The provider-assigned unique ID for this managed resource.
    VirtualPatches []GetNgwafVirtualPatchesVirtualPatch
    List of all virtual patches for a given workspace.
    WorkspaceId string
    The ID of the workspace.
    id String
    The provider-assigned unique ID for this managed resource.
    virtualPatches List<GetNgwafVirtualPatchesVirtualPatch>
    List of all virtual patches for a given workspace.
    workspaceId String
    The ID of the workspace.
    id string
    The provider-assigned unique ID for this managed resource.
    virtualPatches GetNgwafVirtualPatchesVirtualPatch[]
    List of all virtual patches for a given workspace.
    workspaceId string
    The ID of the workspace.
    id str
    The provider-assigned unique ID for this managed resource.
    virtual_patches Sequence[GetNgwafVirtualPatchesVirtualPatch]
    List of all virtual patches for a given workspace.
    workspace_id str
    The ID of the workspace.
    id String
    The provider-assigned unique ID for this managed resource.
    virtualPatches List<Property Map>
    List of all virtual patches for a given workspace.
    workspaceId String
    The ID of the workspace.

    Supporting Types

    GetNgwafVirtualPatchesVirtualPatch

    Enabled bool
    Whether the virtual patch is enabled or disabled.
    Id string
    The ID of the virtual patch.
    Mode string
    Action to take when a signal for the virtual patch is detected. One of log or block.
    Enabled bool
    Whether the virtual patch is enabled or disabled.
    Id string
    The ID of the virtual patch.
    Mode string
    Action to take when a signal for the virtual patch is detected. One of log or block.
    enabled Boolean
    Whether the virtual patch is enabled or disabled.
    id String
    The ID of the virtual patch.
    mode String
    Action to take when a signal for the virtual patch is detected. One of log or block.
    enabled boolean
    Whether the virtual patch is enabled or disabled.
    id string
    The ID of the virtual patch.
    mode string
    Action to take when a signal for the virtual patch is detected. One of log or block.
    enabled bool
    Whether the virtual patch is enabled or disabled.
    id str
    The ID of the virtual patch.
    mode str
    Action to take when a signal for the virtual patch is detected. One of log or block.
    enabled Boolean
    Whether the virtual patch is enabled or disabled.
    id String
    The ID of the virtual patch.
    mode String
    Action to take when a signal for the virtual patch is detected. One of log or block.

    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.0.0 published on Thursday, Sep 4, 2025 by Pulumi