Class Filter
Filter expressions that can be referenced across multiple features, e.g. Firewall Rule. The expression format is similar to Wireshark Display Filter.
Example Usage
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
class MyStack : Stack
{
public MyStack()
{
var wordpress = new Cloudflare.Filter("wordpress", new Cloudflare.FilterArgs
{
Description = "Wordpress break-in attempts that are outside of the office",
Expression = "(http.request.uri.path ~ \".*wp-login.php\" or http.request.uri.path ~ \".*xmlrpc.php\") and ip.src ne 192.0.2.1",
ZoneId = "d41d8cd98f00b204e9800998ecf8427e",
});
}
}
Inherited Members
Namespace: Pulumi.Cloudflare
Assembly: Pulumi.Cloudflare.dll
Syntax
public class Filter : CustomResource
Constructors
View SourceFilter(String, FilterArgs, CustomResourceOptions)
Create a Filter resource with the given unique name, arguments, and options.
Declaration
public Filter(string name, FilterArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| FilterArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDescription
A note that you can use to describe the purpose of the filter.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Expression
The filter expression to be used.
Declaration
public Output<string> Expression { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Paused
Whether this filter is currently paused. Boolean value.
Declaration
public Output<bool?> Paused { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Ref
Short reference tag to quickly select related rules.
Declaration
public Output<string> Ref { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ZoneId
The DNS zone to which the Filter should be added.
Declaration
public Output<string> ZoneId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, FilterState, CustomResourceOptions)
Get an existing Filter resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Filter Get(string name, Input<string> id, FilterState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| FilterState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Filter |