cloudflare.WebAnalyticsRule
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleWebAnalyticsRule = new cloudflare.WebAnalyticsRule("example_web_analytics_rule", {
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
rulesetId: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
host: "example.com",
inclusive: true,
isPaused: false,
paths: ["*"],
});
import pulumi
import pulumi_cloudflare as cloudflare
example_web_analytics_rule = cloudflare.WebAnalyticsRule("example_web_analytics_rule",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
host="example.com",
inclusive=True,
is_paused=False,
paths=["*"])
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.NewWebAnalyticsRule(ctx, "example_web_analytics_rule", &cloudflare.WebAnalyticsRuleArgs{
AccountId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
RulesetId: pulumi.String("f174e90a-fafe-4643-bbbc-4a0ed4fc8415"),
Host: pulumi.String("example.com"),
Inclusive: pulumi.Bool(true),
IsPaused: pulumi.Bool(false),
Paths: pulumi.StringArray{
pulumi.String("*"),
},
})
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 exampleWebAnalyticsRule = new Cloudflare.WebAnalyticsRule("example_web_analytics_rule", new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
RulesetId = "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
Host = "example.com",
Inclusive = true,
IsPaused = false,
Paths = new[]
{
"*",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.WebAnalyticsRule;
import com.pulumi.cloudflare.WebAnalyticsRuleArgs;
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 exampleWebAnalyticsRule = new WebAnalyticsRule("exampleWebAnalyticsRule", WebAnalyticsRuleArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.rulesetId("f174e90a-fafe-4643-bbbc-4a0ed4fc8415")
.host("example.com")
.inclusive(true)
.isPaused(false)
.paths("*")
.build());
}
}
resources:
exampleWebAnalyticsRule:
type: cloudflare:WebAnalyticsRule
name: example_web_analytics_rule
properties:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
rulesetId: f174e90a-fafe-4643-bbbc-4a0ed4fc8415
host: example.com
inclusive: true
isPaused: false
paths:
- '*'
Create WebAnalyticsRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WebAnalyticsRule(name: string, args: WebAnalyticsRuleArgs, opts?: CustomResourceOptions);
@overload
def WebAnalyticsRule(resource_name: str,
args: WebAnalyticsRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WebAnalyticsRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
ruleset_id: Optional[str] = None,
host: Optional[str] = None,
inclusive: Optional[bool] = None,
is_paused: Optional[bool] = None,
paths: Optional[Sequence[str]] = None)
func NewWebAnalyticsRule(ctx *Context, name string, args WebAnalyticsRuleArgs, opts ...ResourceOption) (*WebAnalyticsRule, error)
public WebAnalyticsRule(string name, WebAnalyticsRuleArgs args, CustomResourceOptions? opts = null)
public WebAnalyticsRule(String name, WebAnalyticsRuleArgs args)
public WebAnalyticsRule(String name, WebAnalyticsRuleArgs args, CustomResourceOptions options)
type: cloudflare:WebAnalyticsRule
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 WebAnalyticsRuleArgs
- 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 WebAnalyticsRuleArgs
- 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 WebAnalyticsRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WebAnalyticsRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WebAnalyticsRuleArgs
- 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 webAnalyticsRuleResource = new Cloudflare.WebAnalyticsRule("webAnalyticsRuleResource", new()
{
AccountId = "string",
RulesetId = "string",
Host = "string",
Inclusive = false,
IsPaused = false,
Paths = new[]
{
"string",
},
});
example, err := cloudflare.NewWebAnalyticsRule(ctx, "webAnalyticsRuleResource", &cloudflare.WebAnalyticsRuleArgs{
AccountId: pulumi.String("string"),
RulesetId: pulumi.String("string"),
Host: pulumi.String("string"),
Inclusive: pulumi.Bool(false),
IsPaused: pulumi.Bool(false),
Paths: pulumi.StringArray{
pulumi.String("string"),
},
})
var webAnalyticsRuleResource = new WebAnalyticsRule("webAnalyticsRuleResource", WebAnalyticsRuleArgs.builder()
.accountId("string")
.rulesetId("string")
.host("string")
.inclusive(false)
.isPaused(false)
.paths("string")
.build());
web_analytics_rule_resource = cloudflare.WebAnalyticsRule("webAnalyticsRuleResource",
account_id="string",
ruleset_id="string",
host="string",
inclusive=False,
is_paused=False,
paths=["string"])
const webAnalyticsRuleResource = new cloudflare.WebAnalyticsRule("webAnalyticsRuleResource", {
accountId: "string",
rulesetId: "string",
host: "string",
inclusive: false,
isPaused: false,
paths: ["string"],
});
type: cloudflare:WebAnalyticsRule
properties:
accountId: string
host: string
inclusive: false
isPaused: false
paths:
- string
rulesetId: string
WebAnalyticsRule 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 WebAnalyticsRule resource accepts the following input properties:
- account_
id str - Identifier
- ruleset_
id str - The Web Analytics ruleset identifier.
- host str
- inclusive bool
- Whether the rule includes or excludes traffic from being measured.
- is_
paused bool - Whether the rule is paused or not.
- paths Sequence[str]
Outputs
All input properties are implicitly available as output properties. Additionally, the WebAnalyticsRule resource produces the following output properties:
Look up Existing WebAnalyticsRule Resource
Get an existing WebAnalyticsRule 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?: WebAnalyticsRuleState, opts?: CustomResourceOptions): WebAnalyticsRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
created: Optional[str] = None,
host: Optional[str] = None,
inclusive: Optional[bool] = None,
is_paused: Optional[bool] = None,
paths: Optional[Sequence[str]] = None,
priority: Optional[float] = None,
ruleset_id: Optional[str] = None) -> WebAnalyticsRule
func GetWebAnalyticsRule(ctx *Context, name string, id IDInput, state *WebAnalyticsRuleState, opts ...ResourceOption) (*WebAnalyticsRule, error)
public static WebAnalyticsRule Get(string name, Input<string> id, WebAnalyticsRuleState? state, CustomResourceOptions? opts = null)
public static WebAnalyticsRule get(String name, Output<String> id, WebAnalyticsRuleState state, CustomResourceOptions options)
resources: _: type: cloudflare:WebAnalyticsRule 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.
- account_
id str - Identifier
- created str
- host str
- inclusive bool
- Whether the rule includes or excludes traffic from being measured.
- is_
paused bool - Whether the rule is paused or not.
- paths Sequence[str]
- priority float
- ruleset_
id str - The Web Analytics ruleset identifier.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.