fastly.NgwafThresholds
Explore with Pulumi AI
Provides a Fastly Next-Gen WAF Threshold. Operations related to managing workspace thresholds.
Example Usage
Basic usage:
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const demo = new fastly.NgwafThresholds("demo", {
action: "block",
dontNotify: false,
duration: 86400,
enabled: true,
interval: 3600,
limit: 10,
name: "%s",
signal: "SQLI",
workspaceId: example.id,
});
import pulumi
import pulumi_fastly as fastly
demo = fastly.NgwafThresholds("demo",
action="block",
dont_notify=False,
duration=86400,
enabled=True,
interval=3600,
limit=10,
name="%s",
signal="SQLI",
workspace_id=example["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.NewNgwafThresholds(ctx, "demo", &fastly.NgwafThresholdsArgs{
Action: pulumi.String("block"),
DontNotify: pulumi.Bool(false),
Duration: pulumi.Int(86400),
Enabled: pulumi.Bool(true),
Interval: pulumi.Int(3600),
Limit: pulumi.Int(10),
Name: pulumi.String("%s"),
Signal: pulumi.String("SQLI"),
WorkspaceId: pulumi.Any(example.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.NgwafThresholds("demo", new()
{
Action = "block",
DontNotify = false,
Duration = 86400,
Enabled = true,
Interval = 3600,
Limit = 10,
Name = "%s",
Signal = "SQLI",
WorkspaceId = example.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fastly.NgwafThresholds;
import com.pulumi.fastly.NgwafThresholdsArgs;
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 NgwafThresholds("demo", NgwafThresholdsArgs.builder()
.action("block")
.dontNotify(false)
.duration(86400)
.enabled(true)
.interval(3600)
.limit(10)
.name("%s")
.signal("SQLI")
.workspaceId(example.id())
.build());
}
}
resources:
demo:
type: fastly:NgwafThresholds
properties:
action: block
dontNotify: false
duration: 86400
enabled: true
interval: 3600
limit: 10
name: '%s'
signal: SQLI
workspaceId: ${example.id}
Create NgwafThresholds Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NgwafThresholds(name: string, args: NgwafThresholdsArgs, opts?: CustomResourceOptions);
@overload
def NgwafThresholds(resource_name: str,
args: NgwafThresholdsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NgwafThresholds(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
dont_notify: Optional[bool] = None,
duration: Optional[int] = None,
enabled: Optional[bool] = None,
interval: Optional[int] = None,
limit: Optional[int] = None,
signal: Optional[str] = None,
workspace_id: Optional[str] = None,
name: Optional[str] = None)
func NewNgwafThresholds(ctx *Context, name string, args NgwafThresholdsArgs, opts ...ResourceOption) (*NgwafThresholds, error)
public NgwafThresholds(string name, NgwafThresholdsArgs args, CustomResourceOptions? opts = null)
public NgwafThresholds(String name, NgwafThresholdsArgs args)
public NgwafThresholds(String name, NgwafThresholdsArgs args, CustomResourceOptions options)
type: fastly:NgwafThresholds
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 NgwafThresholdsArgs
- 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 NgwafThresholdsArgs
- 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 NgwafThresholdsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NgwafThresholdsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NgwafThresholdsArgs
- 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 ngwafThresholdsResource = new Fastly.NgwafThresholds("ngwafThresholdsResource", new()
{
Action = "string",
DontNotify = false,
Duration = 0,
Enabled = false,
Interval = 0,
Limit = 0,
Signal = "string",
WorkspaceId = "string",
Name = "string",
});
example, err := fastly.NewNgwafThresholds(ctx, "ngwafThresholdsResource", &fastly.NgwafThresholdsArgs{
Action: pulumi.String("string"),
DontNotify: pulumi.Bool(false),
Duration: pulumi.Int(0),
Enabled: pulumi.Bool(false),
Interval: pulumi.Int(0),
Limit: pulumi.Int(0),
Signal: pulumi.String("string"),
WorkspaceId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var ngwafThresholdsResource = new NgwafThresholds("ngwafThresholdsResource", NgwafThresholdsArgs.builder()
.action("string")
.dontNotify(false)
.duration(0)
.enabled(false)
.interval(0)
.limit(0)
.signal("string")
.workspaceId("string")
.name("string")
.build());
ngwaf_thresholds_resource = fastly.NgwafThresholds("ngwafThresholdsResource",
action="string",
dont_notify=False,
duration=0,
enabled=False,
interval=0,
limit=0,
signal="string",
workspace_id="string",
name="string")
const ngwafThresholdsResource = new fastly.NgwafThresholds("ngwafThresholdsResource", {
action: "string",
dontNotify: false,
duration: 0,
enabled: false,
interval: 0,
limit: 0,
signal: "string",
workspaceId: "string",
name: "string",
});
type: fastly:NgwafThresholds
properties:
action: string
dontNotify: false
duration: 0
enabled: false
interval: 0
limit: 0
name: string
signal: string
workspaceId: string
NgwafThresholds 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 NgwafThresholds resource accepts the following input properties:
- Action string
- Action to take when threshold is exceeded.
- Dont
Notify bool - Whether to silence notifications when action is taken.
- Duration int
- Duration the action is in place, in seconds. Minimum 1 and maximum 31,556,900.
- Enabled bool
- Whether this threshold is active.
- Interval int
- Threshold interval in seconds. Accepted values are
60
,600
, and3600
. - Limit int
- Threshold limit. Minimum 1 and maximum 10,000.
- Signal string
- The name of the signal this threshold is acting on.
- Workspace
Id string - The ID of the workspace.
- Name string
- The name of the threshold.
- Action string
- Action to take when threshold is exceeded.
- Dont
Notify bool - Whether to silence notifications when action is taken.
- Duration int
- Duration the action is in place, in seconds. Minimum 1 and maximum 31,556,900.
- Enabled bool
- Whether this threshold is active.
- Interval int
- Threshold interval in seconds. Accepted values are
60
,600
, and3600
. - Limit int
- Threshold limit. Minimum 1 and maximum 10,000.
- Signal string
- The name of the signal this threshold is acting on.
- Workspace
Id string - The ID of the workspace.
- Name string
- The name of the threshold.
- action String
- Action to take when threshold is exceeded.
- dont
Notify Boolean - Whether to silence notifications when action is taken.
- duration Integer
- Duration the action is in place, in seconds. Minimum 1 and maximum 31,556,900.
- enabled Boolean
- Whether this threshold is active.
- interval Integer
- Threshold interval in seconds. Accepted values are
60
,600
, and3600
. - limit Integer
- Threshold limit. Minimum 1 and maximum 10,000.
- signal String
- The name of the signal this threshold is acting on.
- workspace
Id String - The ID of the workspace.
- name String
- The name of the threshold.
- action string
- Action to take when threshold is exceeded.
- dont
Notify boolean - Whether to silence notifications when action is taken.
- duration number
- Duration the action is in place, in seconds. Minimum 1 and maximum 31,556,900.
- enabled boolean
- Whether this threshold is active.
- interval number
- Threshold interval in seconds. Accepted values are
60
,600
, and3600
. - limit number
- Threshold limit. Minimum 1 and maximum 10,000.
- signal string
- The name of the signal this threshold is acting on.
- workspace
Id string - The ID of the workspace.
- name string
- The name of the threshold.
- action str
- Action to take when threshold is exceeded.
- dont_
notify bool - Whether to silence notifications when action is taken.
- duration int
- Duration the action is in place, in seconds. Minimum 1 and maximum 31,556,900.
- enabled bool
- Whether this threshold is active.
- interval int
- Threshold interval in seconds. Accepted values are
60
,600
, and3600
. - limit int
- Threshold limit. Minimum 1 and maximum 10,000.
- signal str
- The name of the signal this threshold is acting on.
- workspace_
id str - The ID of the workspace.
- name str
- The name of the threshold.
- action String
- Action to take when threshold is exceeded.
- dont
Notify Boolean - Whether to silence notifications when action is taken.
- duration Number
- Duration the action is in place, in seconds. Minimum 1 and maximum 31,556,900.
- enabled Boolean
- Whether this threshold is active.
- interval Number
- Threshold interval in seconds. Accepted values are
60
,600
, and3600
. - limit Number
- Threshold limit. Minimum 1 and maximum 10,000.
- signal String
- The name of the signal this threshold is acting on.
- workspace
Id String - The ID of the workspace.
- name String
- The name of the threshold.
Outputs
All input properties are implicitly available as output properties. Additionally, the NgwafThresholds 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 NgwafThresholds Resource
Get an existing NgwafThresholds 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?: NgwafThresholdsState, opts?: CustomResourceOptions): NgwafThresholds
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
dont_notify: Optional[bool] = None,
duration: Optional[int] = None,
enabled: Optional[bool] = None,
interval: Optional[int] = None,
limit: Optional[int] = None,
name: Optional[str] = None,
signal: Optional[str] = None,
workspace_id: Optional[str] = None) -> NgwafThresholds
func GetNgwafThresholds(ctx *Context, name string, id IDInput, state *NgwafThresholdsState, opts ...ResourceOption) (*NgwafThresholds, error)
public static NgwafThresholds Get(string name, Input<string> id, NgwafThresholdsState? state, CustomResourceOptions? opts = null)
public static NgwafThresholds get(String name, Output<String> id, NgwafThresholdsState state, CustomResourceOptions options)
resources: _: type: fastly:NgwafThresholds 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 threshold is exceeded.
- Dont
Notify bool - Whether to silence notifications when action is taken.
- Duration int
- Duration the action is in place, in seconds. Minimum 1 and maximum 31,556,900.
- Enabled bool
- Whether this threshold is active.
- Interval int
- Threshold interval in seconds. Accepted values are
60
,600
, and3600
. - Limit int
- Threshold limit. Minimum 1 and maximum 10,000.
- Name string
- The name of the threshold.
- Signal string
- The name of the signal this threshold is acting on.
- Workspace
Id string - The ID of the workspace.
- Action string
- Action to take when threshold is exceeded.
- Dont
Notify bool - Whether to silence notifications when action is taken.
- Duration int
- Duration the action is in place, in seconds. Minimum 1 and maximum 31,556,900.
- Enabled bool
- Whether this threshold is active.
- Interval int
- Threshold interval in seconds. Accepted values are
60
,600
, and3600
. - Limit int
- Threshold limit. Minimum 1 and maximum 10,000.
- Name string
- The name of the threshold.
- Signal string
- The name of the signal this threshold is acting on.
- Workspace
Id string - The ID of the workspace.
- action String
- Action to take when threshold is exceeded.
- dont
Notify Boolean - Whether to silence notifications when action is taken.
- duration Integer
- Duration the action is in place, in seconds. Minimum 1 and maximum 31,556,900.
- enabled Boolean
- Whether this threshold is active.
- interval Integer
- Threshold interval in seconds. Accepted values are
60
,600
, and3600
. - limit Integer
- Threshold limit. Minimum 1 and maximum 10,000.
- name String
- The name of the threshold.
- signal String
- The name of the signal this threshold is acting on.
- workspace
Id String - The ID of the workspace.
- action string
- Action to take when threshold is exceeded.
- dont
Notify boolean - Whether to silence notifications when action is taken.
- duration number
- Duration the action is in place, in seconds. Minimum 1 and maximum 31,556,900.
- enabled boolean
- Whether this threshold is active.
- interval number
- Threshold interval in seconds. Accepted values are
60
,600
, and3600
. - limit number
- Threshold limit. Minimum 1 and maximum 10,000.
- name string
- The name of the threshold.
- signal string
- The name of the signal this threshold is acting on.
- workspace
Id string - The ID of the workspace.
- action str
- Action to take when threshold is exceeded.
- dont_
notify bool - Whether to silence notifications when action is taken.
- duration int
- Duration the action is in place, in seconds. Minimum 1 and maximum 31,556,900.
- enabled bool
- Whether this threshold is active.
- interval int
- Threshold interval in seconds. Accepted values are
60
,600
, and3600
. - limit int
- Threshold limit. Minimum 1 and maximum 10,000.
- name str
- The name of the threshold.
- signal str
- The name of the signal this threshold is acting on.
- workspace_
id str - The ID of the workspace.
- action String
- Action to take when threshold is exceeded.
- dont
Notify Boolean - Whether to silence notifications when action is taken.
- duration Number
- Duration the action is in place, in seconds. Minimum 1 and maximum 31,556,900.
- enabled Boolean
- Whether this threshold is active.
- interval Number
- Threshold interval in seconds. Accepted values are
60
,600
, and3600
. - limit Number
- Threshold limit. Minimum 1 and maximum 10,000.
- name String
- The name of the threshold.
- signal String
- The name of the signal this threshold is acting on.
- workspace
Id String - The ID of the workspace.
Import
Fastly Next-Gen WAF Thresholds can be imported using their workspace and Threshold ID, e.g.
$ pulumi import fastly:index/ngwafThresholds:NgwafThresholds example <workspace_id>/<threshold_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.