fastly.NgwafVirtualPatches
Explore with Pulumi AI
Provides a Fastly Next-Gen WAF Virtual Patch. Virtual patching rules block or log requests matching specific vulnerabilities.
Example Usage
Basic usage:
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const demo = new fastly.index.NgwafVirtualPatch("demo", {
action: "block",
enabled: true,
virtualPatchId: "CVE-2017-5638",
workspaceId: demoFastlyNgwafWorkspace.id,
});
import pulumi
import pulumi_fastly as fastly
demo = fastly.index.NgwafVirtualPatch("demo",
action=block,
enabled=True,
virtual_patch_id=CVE-2017-5638,
workspace_id=demo_fastly_ngwaf_workspace.id)
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.NewNgwafVirtualPatch(ctx, "demo", &fastly.NgwafVirtualPatchArgs{
Action: "block",
Enabled: true,
VirtualPatchId: "CVE-2017-5638",
WorkspaceId: demoFastlyNgwafWorkspace.Id,
})
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 demo = new Fastly.Index.NgwafVirtualPatch("demo", new()
{
Action = "block",
Enabled = true,
VirtualPatchId = "CVE-2017-5638",
WorkspaceId = demoFastlyNgwafWorkspace.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fastly.ngwafVirtualPatch;
import com.pulumi.fastly.ngwafVirtualPatchArgs;
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 demo = new NgwafVirtualPatch("demo", NgwafVirtualPatchArgs.builder()
.action("block")
.enabled(true)
.virtualPatchId("CVE-2017-5638")
.workspaceId(demoFastlyNgwafWorkspace.id())
.build());
}
}
resources:
demo:
type: fastly:ngwafVirtualPatch
properties:
action: block
enabled: true
virtualPatchId: CVE-2017-5638
workspaceId: ${demoFastlyNgwafWorkspace.id}
Create NgwafVirtualPatches Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NgwafVirtualPatches(name: string, args: NgwafVirtualPatchesArgs, opts?: CustomResourceOptions);
@overload
def NgwafVirtualPatches(resource_name: str,
args: NgwafVirtualPatchesArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NgwafVirtualPatches(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
enabled: Optional[bool] = None,
virtual_patch_id: Optional[str] = None,
workspace_id: Optional[str] = None)
func NewNgwafVirtualPatches(ctx *Context, name string, args NgwafVirtualPatchesArgs, opts ...ResourceOption) (*NgwafVirtualPatches, error)
public NgwafVirtualPatches(string name, NgwafVirtualPatchesArgs args, CustomResourceOptions? opts = null)
public NgwafVirtualPatches(String name, NgwafVirtualPatchesArgs args)
public NgwafVirtualPatches(String name, NgwafVirtualPatchesArgs args, CustomResourceOptions options)
type: fastly:NgwafVirtualPatches
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 NgwafVirtualPatchesArgs
- 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 NgwafVirtualPatchesArgs
- 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 NgwafVirtualPatchesArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NgwafVirtualPatchesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NgwafVirtualPatchesArgs
- 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 ngwafVirtualPatchesResource = new Fastly.NgwafVirtualPatches("ngwafVirtualPatchesResource", new()
{
Action = "string",
Enabled = false,
VirtualPatchId = "string",
WorkspaceId = "string",
});
example, err := fastly.NewNgwafVirtualPatches(ctx, "ngwafVirtualPatchesResource", &fastly.NgwafVirtualPatchesArgs{
Action: pulumi.String("string"),
Enabled: pulumi.Bool(false),
VirtualPatchId: pulumi.String("string"),
WorkspaceId: pulumi.String("string"),
})
var ngwafVirtualPatchesResource = new NgwafVirtualPatches("ngwafVirtualPatchesResource", NgwafVirtualPatchesArgs.builder()
.action("string")
.enabled(false)
.virtualPatchId("string")
.workspaceId("string")
.build());
ngwaf_virtual_patches_resource = fastly.NgwafVirtualPatches("ngwafVirtualPatchesResource",
action="string",
enabled=False,
virtual_patch_id="string",
workspace_id="string")
const ngwafVirtualPatchesResource = new fastly.NgwafVirtualPatches("ngwafVirtualPatchesResource", {
action: "string",
enabled: false,
virtualPatchId: "string",
workspaceId: "string",
});
type: fastly:NgwafVirtualPatches
properties:
action: string
enabled: false
virtualPatchId: string
workspaceId: string
NgwafVirtualPatches 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 NgwafVirtualPatches resource accepts the following input properties:
- Action string
- Action to take when a signal for virtual patch is detected. Accepted values are
log
andblock
. - Enabled bool
- Control for enabling and disabling a virtual patch.
- Virtual
Patch stringId - The ID of the virtual patch.
- Workspace
Id string - The ID of the workspace.
- Action string
- Action to take when a signal for virtual patch is detected. Accepted values are
log
andblock
. - Enabled bool
- Control for enabling and disabling a virtual patch.
- Virtual
Patch stringId - The ID of the virtual patch.
- Workspace
Id string - The ID of the workspace.
- action String
- Action to take when a signal for virtual patch is detected. Accepted values are
log
andblock
. - enabled Boolean
- Control for enabling and disabling a virtual patch.
- virtual
Patch StringId - The ID of the virtual patch.
- workspace
Id String - The ID of the workspace.
- action string
- Action to take when a signal for virtual patch is detected. Accepted values are
log
andblock
. - enabled boolean
- Control for enabling and disabling a virtual patch.
- virtual
Patch stringId - The ID of the virtual patch.
- workspace
Id string - The ID of the workspace.
- action str
- Action to take when a signal for virtual patch is detected. Accepted values are
log
andblock
. - enabled bool
- Control for enabling and disabling a virtual patch.
- virtual_
patch_ strid - The ID of the virtual patch.
- workspace_
id str - The ID of the workspace.
- action String
- Action to take when a signal for virtual patch is detected. Accepted values are
log
andblock
. - enabled Boolean
- Control for enabling and disabling a virtual patch.
- virtual
Patch StringId - The ID of the virtual patch.
- workspace
Id String - The ID of the workspace.
Outputs
All input properties are implicitly available as output properties. Additionally, the NgwafVirtualPatches 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 NgwafVirtualPatches Resource
Get an existing NgwafVirtualPatches 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?: NgwafVirtualPatchesState, opts?: CustomResourceOptions): NgwafVirtualPatches
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
enabled: Optional[bool] = None,
virtual_patch_id: Optional[str] = None,
workspace_id: Optional[str] = None) -> NgwafVirtualPatches
func GetNgwafVirtualPatches(ctx *Context, name string, id IDInput, state *NgwafVirtualPatchesState, opts ...ResourceOption) (*NgwafVirtualPatches, error)
public static NgwafVirtualPatches Get(string name, Input<string> id, NgwafVirtualPatchesState? state, CustomResourceOptions? opts = null)
public static NgwafVirtualPatches get(String name, Output<String> id, NgwafVirtualPatchesState state, CustomResourceOptions options)
resources: _: type: fastly:NgwafVirtualPatches 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.
- Action string
- Action to take when a signal for virtual patch is detected. Accepted values are
log
andblock
. - Enabled bool
- Control for enabling and disabling a virtual patch.
- Virtual
Patch stringId - The ID of the virtual patch.
- Workspace
Id string - The ID of the workspace.
- Action string
- Action to take when a signal for virtual patch is detected. Accepted values are
log
andblock
. - Enabled bool
- Control for enabling and disabling a virtual patch.
- Virtual
Patch stringId - The ID of the virtual patch.
- Workspace
Id string - The ID of the workspace.
- action String
- Action to take when a signal for virtual patch is detected. Accepted values are
log
andblock
. - enabled Boolean
- Control for enabling and disabling a virtual patch.
- virtual
Patch StringId - The ID of the virtual patch.
- workspace
Id String - The ID of the workspace.
- action string
- Action to take when a signal for virtual patch is detected. Accepted values are
log
andblock
. - enabled boolean
- Control for enabling and disabling a virtual patch.
- virtual
Patch stringId - The ID of the virtual patch.
- workspace
Id string - The ID of the workspace.
- action str
- Action to take when a signal for virtual patch is detected. Accepted values are
log
andblock
. - enabled bool
- Control for enabling and disabling a virtual patch.
- virtual_
patch_ strid - The ID of the virtual patch.
- workspace_
id str - The ID of the workspace.
- action String
- Action to take when a signal for virtual patch is detected. Accepted values are
log
andblock
. - enabled Boolean
- Control for enabling and disabling a virtual patch.
- virtual
Patch StringId - The ID of the virtual patch.
- workspace
Id String - The ID of the workspace.
Import
Fastly Next-Gen WAF Virtual Patches can be imported using their workspace and Virtual Patch ID, e.g.
$ pulumi import fastly:index/ngwafVirtualPatches:NgwafVirtualPatches demo <workspace_id>/<virtual_patch_id>
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.