1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getFilter
Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi

cloudflare.getFilter

Explore with Pulumi AI

Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const exampleFilter = cloudflare.getFilter({
    zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
    filterId: "372e67954025e0ba6aaa6d586b9e0b61",
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_filter = cloudflare.get_filter(zone_id="023e105f4ecef8ad9ca31a8372d0c353",
    filter_id="372e67954025e0ba6aaa6d586b9e0b61")
Copy
package main

import (
	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudflare.LookupFilter(ctx, &cloudflare.LookupFilterArgs{
			ZoneId:   "023e105f4ecef8ad9ca31a8372d0c353",
			FilterId: pulumi.StringRef("372e67954025e0ba6aaa6d586b9e0b61"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

return await Deployment.RunAsync(() => 
{
    var exampleFilter = Cloudflare.GetFilter.Invoke(new()
    {
        ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
        FilterId = "372e67954025e0ba6aaa6d586b9e0b61",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.CloudflareFunctions;
import com.pulumi.cloudflare.inputs.GetFilterArgs;
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 exampleFilter = CloudflareFunctions.getFilter(GetFilterArgs.builder()
            .zoneId("023e105f4ecef8ad9ca31a8372d0c353")
            .filterId("372e67954025e0ba6aaa6d586b9e0b61")
            .build());

    }
}
Copy
variables:
  exampleFilter:
    fn::invoke:
      function: cloudflare:getFilter
      arguments:
        zoneId: 023e105f4ecef8ad9ca31a8372d0c353
        filterId: 372e67954025e0ba6aaa6d586b9e0b61
Copy

Using getFilter

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 getFilter(args: GetFilterArgs, opts?: InvokeOptions): Promise<GetFilterResult>
function getFilterOutput(args: GetFilterOutputArgs, opts?: InvokeOptions): Output<GetFilterResult>
Copy
def get_filter(filter: Optional[GetFilterFilter] = None,
               filter_id: Optional[str] = None,
               zone_id: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetFilterResult
def get_filter_output(filter: Optional[pulumi.Input[GetFilterFilterArgs]] = None,
               filter_id: Optional[pulumi.Input[str]] = None,
               zone_id: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetFilterResult]
Copy
func LookupFilter(ctx *Context, args *LookupFilterArgs, opts ...InvokeOption) (*LookupFilterResult, error)
func LookupFilterOutput(ctx *Context, args *LookupFilterOutputArgs, opts ...InvokeOption) LookupFilterResultOutput
Copy

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

public static class GetFilter 
{
    public static Task<GetFilterResult> InvokeAsync(GetFilterArgs args, InvokeOptions? opts = null)
    public static Output<GetFilterResult> Invoke(GetFilterInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetFilterResult> getFilter(GetFilterArgs args, InvokeOptions options)
public static Output<GetFilterResult> getFilter(GetFilterArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: cloudflare:index/getFilter:getFilter
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ZoneId This property is required. string
Identifier
Filter GetFilterFilter
FilterId string
The unique identifier of the filter.
ZoneId This property is required. string
Identifier
Filter GetFilterFilter
FilterId string
The unique identifier of the filter.
zoneId This property is required. String
Identifier
filter GetFilterFilter
filterId String
The unique identifier of the filter.
zoneId This property is required. string
Identifier
filter GetFilterFilter
filterId string
The unique identifier of the filter.
zone_id This property is required. str
Identifier
filter GetFilterFilter
filter_id str
The unique identifier of the filter.
zoneId This property is required. String
Identifier
filter Property Map
filterId String
The unique identifier of the filter.

getFilter Result

The following output properties are available:

Description string
An informative summary of the filter.
Expression string
The filter expression. For more information, refer to Expressions.
Id string
The unique identifier of the filter.
Paused bool
When true, indicates that the filter is currently paused.
Ref string
A short reference tag. Allows you to select related filters.
ZoneId string
Identifier
Filter GetFilterFilter
FilterId string
The unique identifier of the filter.
Description string
An informative summary of the filter.
Expression string
The filter expression. For more information, refer to Expressions.
Id string
The unique identifier of the filter.
Paused bool
When true, indicates that the filter is currently paused.
Ref string
A short reference tag. Allows you to select related filters.
ZoneId string
Identifier
Filter GetFilterFilter
FilterId string
The unique identifier of the filter.
description String
An informative summary of the filter.
expression String
The filter expression. For more information, refer to Expressions.
id String
The unique identifier of the filter.
paused Boolean
When true, indicates that the filter is currently paused.
ref String
A short reference tag. Allows you to select related filters.
zoneId String
Identifier
filter GetFilterFilter
filterId String
The unique identifier of the filter.
description string
An informative summary of the filter.
expression string
The filter expression. For more information, refer to Expressions.
id string
The unique identifier of the filter.
paused boolean
When true, indicates that the filter is currently paused.
ref string
A short reference tag. Allows you to select related filters.
zoneId string
Identifier
filter GetFilterFilter
filterId string
The unique identifier of the filter.
description str
An informative summary of the filter.
expression str
The filter expression. For more information, refer to Expressions.
id str
The unique identifier of the filter.
paused bool
When true, indicates that the filter is currently paused.
ref str
A short reference tag. Allows you to select related filters.
zone_id str
Identifier
filter GetFilterFilter
filter_id str
The unique identifier of the filter.
description String
An informative summary of the filter.
expression String
The filter expression. For more information, refer to Expressions.
id String
The unique identifier of the filter.
paused Boolean
When true, indicates that the filter is currently paused.
ref String
A short reference tag. Allows you to select related filters.
zoneId String
Identifier
filter Property Map
filterId String
The unique identifier of the filter.

Supporting Types

GetFilterFilter

Description string
A case-insensitive string to find in the description.
Expression string
A case-insensitive string to find in the expression.
Id string
The unique identifier of the filter.
Paused bool
When true, indicates that the filter is currently paused.
Ref string
The filter ref (a short reference tag) to search for. Must be an exact match.
Description string
A case-insensitive string to find in the description.
Expression string
A case-insensitive string to find in the expression.
Id string
The unique identifier of the filter.
Paused bool
When true, indicates that the filter is currently paused.
Ref string
The filter ref (a short reference tag) to search for. Must be an exact match.
description String
A case-insensitive string to find in the description.
expression String
A case-insensitive string to find in the expression.
id String
The unique identifier of the filter.
paused Boolean
When true, indicates that the filter is currently paused.
ref String
The filter ref (a short reference tag) to search for. Must be an exact match.
description string
A case-insensitive string to find in the description.
expression string
A case-insensitive string to find in the expression.
id string
The unique identifier of the filter.
paused boolean
When true, indicates that the filter is currently paused.
ref string
The filter ref (a short reference tag) to search for. Must be an exact match.
description str
A case-insensitive string to find in the description.
expression str
A case-insensitive string to find in the expression.
id str
The unique identifier of the filter.
paused bool
When true, indicates that the filter is currently paused.
ref str
The filter ref (a short reference tag) to search for. Must be an exact match.
description String
A case-insensitive string to find in the description.
expression String
A case-insensitive string to find in the expression.
id String
The unique identifier of the filter.
paused Boolean
When true, indicates that the filter is currently paused.
ref String
The filter ref (a short reference tag) to search for. Must be an exact match.

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.
Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi