Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi
cloudflare.getUserAgentBlockingRules
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleUserAgentBlockingRules = cloudflare.getUserAgentBlockingRules({
zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
description: "abusive",
descriptionSearch: "abusive",
uaSearch: "Safari",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_user_agent_blocking_rules = cloudflare.get_user_agent_blocking_rules(zone_id="023e105f4ecef8ad9ca31a8372d0c353",
description="abusive",
description_search="abusive",
ua_search="Safari")
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.LookupUserAgentBlockingRules(ctx, &cloudflare.LookupUserAgentBlockingRulesArgs{
ZoneId: "023e105f4ecef8ad9ca31a8372d0c353",
Description: pulumi.StringRef("abusive"),
DescriptionSearch: pulumi.StringRef("abusive"),
UaSearch: pulumi.StringRef("Safari"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleUserAgentBlockingRules = Cloudflare.GetUserAgentBlockingRules.Invoke(new()
{
ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
Description = "abusive",
DescriptionSearch = "abusive",
UaSearch = "Safari",
});
});
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.GetUserAgentBlockingRulesArgs;
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 exampleUserAgentBlockingRules = CloudflareFunctions.getUserAgentBlockingRules(GetUserAgentBlockingRulesArgs.builder()
.zoneId("023e105f4ecef8ad9ca31a8372d0c353")
.description("abusive")
.descriptionSearch("abusive")
.uaSearch("Safari")
.build());
}
}
variables:
exampleUserAgentBlockingRules:
fn::invoke:
function: cloudflare:getUserAgentBlockingRules
arguments:
zoneId: 023e105f4ecef8ad9ca31a8372d0c353
description: abusive
descriptionSearch: abusive
uaSearch: Safari
Using getUserAgentBlockingRules
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 getUserAgentBlockingRules(args: GetUserAgentBlockingRulesArgs, opts?: InvokeOptions): Promise<GetUserAgentBlockingRulesResult>
function getUserAgentBlockingRulesOutput(args: GetUserAgentBlockingRulesOutputArgs, opts?: InvokeOptions): Output<GetUserAgentBlockingRulesResult>
def get_user_agent_blocking_rules(description: Optional[str] = None,
description_search: Optional[str] = None,
max_items: Optional[int] = None,
ua_search: Optional[str] = None,
zone_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetUserAgentBlockingRulesResult
def get_user_agent_blocking_rules_output(description: Optional[pulumi.Input[str]] = None,
description_search: Optional[pulumi.Input[str]] = None,
max_items: Optional[pulumi.Input[int]] = None,
ua_search: Optional[pulumi.Input[str]] = None,
zone_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetUserAgentBlockingRulesResult]
func LookupUserAgentBlockingRules(ctx *Context, args *LookupUserAgentBlockingRulesArgs, opts ...InvokeOption) (*LookupUserAgentBlockingRulesResult, error)
func LookupUserAgentBlockingRulesOutput(ctx *Context, args *LookupUserAgentBlockingRulesOutputArgs, opts ...InvokeOption) LookupUserAgentBlockingRulesResultOutput
> Note: This function is named LookupUserAgentBlockingRules
in the Go SDK.
public static class GetUserAgentBlockingRules
{
public static Task<GetUserAgentBlockingRulesResult> InvokeAsync(GetUserAgentBlockingRulesArgs args, InvokeOptions? opts = null)
public static Output<GetUserAgentBlockingRulesResult> Invoke(GetUserAgentBlockingRulesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetUserAgentBlockingRulesResult> getUserAgentBlockingRules(GetUserAgentBlockingRulesArgs args, InvokeOptions options)
public static Output<GetUserAgentBlockingRulesResult> getUserAgentBlockingRules(GetUserAgentBlockingRulesArgs args, InvokeOptions options)
fn::invoke:
function: cloudflare:index/getUserAgentBlockingRules:getUserAgentBlockingRules
arguments:
# arguments dictionary
The following arguments are supported:
- Zone
Id string - Identifier
- Description string
- A string to search for in the description of existing rules.
- Description
Search string - A string to search for in the description of existing rules.
- Max
Items int - Max items to fetch, default: 1000
- Ua
Search string - A string to search for in the user agent values of existing rules.
- Zone
Id string - Identifier
- Description string
- A string to search for in the description of existing rules.
- Description
Search string - A string to search for in the description of existing rules.
- Max
Items int - Max items to fetch, default: 1000
- Ua
Search string - A string to search for in the user agent values of existing rules.
- zone
Id String - Identifier
- description String
- A string to search for in the description of existing rules.
- description
Search String - A string to search for in the description of existing rules.
- max
Items Integer - Max items to fetch, default: 1000
- ua
Search String - A string to search for in the user agent values of existing rules.
- zone
Id string - Identifier
- description string
- A string to search for in the description of existing rules.
- description
Search string - A string to search for in the description of existing rules.
- max
Items number - Max items to fetch, default: 1000
- ua
Search string - A string to search for in the user agent values of existing rules.
- zone_
id str - Identifier
- description str
- A string to search for in the description of existing rules.
- description_
search str - A string to search for in the description of existing rules.
- max_
items int - Max items to fetch, default: 1000
- ua_
search str - A string to search for in the user agent values of existing rules.
- zone
Id String - Identifier
- description String
- A string to search for in the description of existing rules.
- description
Search String - A string to search for in the description of existing rules.
- max
Items Number - Max items to fetch, default: 1000
- ua
Search String - A string to search for in the user agent values of existing rules.
getUserAgentBlockingRules Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Results
List<Get
User Agent Blocking Rules Result> - The items returned by the data source
- Zone
Id string - Identifier
- Description string
- A string to search for in the description of existing rules.
- Description
Search string - A string to search for in the description of existing rules.
- Max
Items int - Max items to fetch, default: 1000
- Ua
Search string - A string to search for in the user agent values of existing rules.
- Id string
- The provider-assigned unique ID for this managed resource.
- Results
[]Get
User Agent Blocking Rules Result - The items returned by the data source
- Zone
Id string - Identifier
- Description string
- A string to search for in the description of existing rules.
- Description
Search string - A string to search for in the description of existing rules.
- Max
Items int - Max items to fetch, default: 1000
- Ua
Search string - A string to search for in the user agent values of existing rules.
- id String
- The provider-assigned unique ID for this managed resource.
- results
List<Get
User Agent Blocking Rules Result> - The items returned by the data source
- zone
Id String - Identifier
- description String
- A string to search for in the description of existing rules.
- description
Search String - A string to search for in the description of existing rules.
- max
Items Integer - Max items to fetch, default: 1000
- ua
Search String - A string to search for in the user agent values of existing rules.
- id string
- The provider-assigned unique ID for this managed resource.
- results
Get
User Agent Blocking Rules Result[] - The items returned by the data source
- zone
Id string - Identifier
- description string
- A string to search for in the description of existing rules.
- description
Search string - A string to search for in the description of existing rules.
- max
Items number - Max items to fetch, default: 1000
- ua
Search string - A string to search for in the user agent values of existing rules.
- id str
- The provider-assigned unique ID for this managed resource.
- results
Sequence[Get
User Agent Blocking Rules Result] - The items returned by the data source
- zone_
id str - Identifier
- description str
- A string to search for in the description of existing rules.
- description_
search str - A string to search for in the description of existing rules.
- max_
items int - Max items to fetch, default: 1000
- ua_
search str - A string to search for in the user agent values of existing rules.
- id String
- The provider-assigned unique ID for this managed resource.
- results List<Property Map>
- The items returned by the data source
- zone
Id String - Identifier
- description String
- A string to search for in the description of existing rules.
- description
Search String - A string to search for in the description of existing rules.
- max
Items Number - Max items to fetch, default: 1000
- ua
Search String - A string to search for in the user agent values of existing rules.
Supporting Types
GetUserAgentBlockingRulesResult
- Configuration
Get
User Agent Blocking Rules Result Configuration - The configuration object for the current rule.
- Description string
- An informative summary of the rule.
- Id string
- The unique identifier of the User Agent Blocking rule.
- Mode string
- The action to apply to a matched request. Available values: "block", "challenge", "jschallenge", "managedchallenge".
- Paused bool
- When true, indicates that the rule is currently paused.
- Configuration
Get
User Agent Blocking Rules Result Configuration - The configuration object for the current rule.
- Description string
- An informative summary of the rule.
- Id string
- The unique identifier of the User Agent Blocking rule.
- Mode string
- The action to apply to a matched request. Available values: "block", "challenge", "jschallenge", "managedchallenge".
- Paused bool
- When true, indicates that the rule is currently paused.
- configuration
Get
User Agent Blocking Rules Result Configuration - The configuration object for the current rule.
- description String
- An informative summary of the rule.
- id String
- The unique identifier of the User Agent Blocking rule.
- mode String
- The action to apply to a matched request. Available values: "block", "challenge", "jschallenge", "managedchallenge".
- paused Boolean
- When true, indicates that the rule is currently paused.
- configuration
Get
User Agent Blocking Rules Result Configuration - The configuration object for the current rule.
- description string
- An informative summary of the rule.
- id string
- The unique identifier of the User Agent Blocking rule.
- mode string
- The action to apply to a matched request. Available values: "block", "challenge", "jschallenge", "managedchallenge".
- paused boolean
- When true, indicates that the rule is currently paused.
- configuration
Get
User Agent Blocking Rules Result Configuration - The configuration object for the current rule.
- description str
- An informative summary of the rule.
- id str
- The unique identifier of the User Agent Blocking rule.
- mode str
- The action to apply to a matched request. Available values: "block", "challenge", "jschallenge", "managedchallenge".
- paused bool
- When true, indicates that the rule is currently paused.
- configuration Property Map
- The configuration object for the current rule.
- description String
- An informative summary of the rule.
- id String
- The unique identifier of the User Agent Blocking rule.
- mode String
- The action to apply to a matched request. Available values: "block", "challenge", "jschallenge", "managedchallenge".
- paused Boolean
- When true, indicates that the rule is currently paused.
GetUserAgentBlockingRulesResultConfiguration
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.