cloudflare.WebAnalyticsSite
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleWebAnalyticsSite = new cloudflare.WebAnalyticsSite("example_web_analytics_site", {
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
autoInstall: true,
host: "example.com",
zoneTag: "023e105f4ecef8ad9ca31a8372d0c353",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_web_analytics_site = cloudflare.WebAnalyticsSite("example_web_analytics_site",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
auto_install=True,
host="example.com",
zone_tag="023e105f4ecef8ad9ca31a8372d0c353")
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.NewWebAnalyticsSite(ctx, "example_web_analytics_site", &cloudflare.WebAnalyticsSiteArgs{
AccountId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
AutoInstall: pulumi.Bool(true),
Host: pulumi.String("example.com"),
ZoneTag: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
})
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 exampleWebAnalyticsSite = new Cloudflare.WebAnalyticsSite("example_web_analytics_site", new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
AutoInstall = true,
Host = "example.com",
ZoneTag = "023e105f4ecef8ad9ca31a8372d0c353",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.WebAnalyticsSite;
import com.pulumi.cloudflare.WebAnalyticsSiteArgs;
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 exampleWebAnalyticsSite = new WebAnalyticsSite("exampleWebAnalyticsSite", WebAnalyticsSiteArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.autoInstall(true)
.host("example.com")
.zoneTag("023e105f4ecef8ad9ca31a8372d0c353")
.build());
}
}
resources:
exampleWebAnalyticsSite:
type: cloudflare:WebAnalyticsSite
name: example_web_analytics_site
properties:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
autoInstall: true
host: example.com
zoneTag: 023e105f4ecef8ad9ca31a8372d0c353
Create WebAnalyticsSite Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WebAnalyticsSite(name: string, args: WebAnalyticsSiteArgs, opts?: CustomResourceOptions);
@overload
def WebAnalyticsSite(resource_name: str,
args: WebAnalyticsSiteArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WebAnalyticsSite(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
auto_install: Optional[bool] = None,
enabled: Optional[bool] = None,
host: Optional[str] = None,
lite: Optional[bool] = None,
zone_tag: Optional[str] = None)
func NewWebAnalyticsSite(ctx *Context, name string, args WebAnalyticsSiteArgs, opts ...ResourceOption) (*WebAnalyticsSite, error)
public WebAnalyticsSite(string name, WebAnalyticsSiteArgs args, CustomResourceOptions? opts = null)
public WebAnalyticsSite(String name, WebAnalyticsSiteArgs args)
public WebAnalyticsSite(String name, WebAnalyticsSiteArgs args, CustomResourceOptions options)
type: cloudflare:WebAnalyticsSite
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 WebAnalyticsSiteArgs
- 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 WebAnalyticsSiteArgs
- 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 WebAnalyticsSiteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WebAnalyticsSiteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WebAnalyticsSiteArgs
- 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 webAnalyticsSiteResource = new Cloudflare.WebAnalyticsSite("webAnalyticsSiteResource", new()
{
AccountId = "string",
AutoInstall = false,
Enabled = false,
Host = "string",
Lite = false,
ZoneTag = "string",
});
example, err := cloudflare.NewWebAnalyticsSite(ctx, "webAnalyticsSiteResource", &cloudflare.WebAnalyticsSiteArgs{
AccountId: pulumi.String("string"),
AutoInstall: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
Host: pulumi.String("string"),
Lite: pulumi.Bool(false),
ZoneTag: pulumi.String("string"),
})
var webAnalyticsSiteResource = new WebAnalyticsSite("webAnalyticsSiteResource", WebAnalyticsSiteArgs.builder()
.accountId("string")
.autoInstall(false)
.enabled(false)
.host("string")
.lite(false)
.zoneTag("string")
.build());
web_analytics_site_resource = cloudflare.WebAnalyticsSite("webAnalyticsSiteResource",
account_id="string",
auto_install=False,
enabled=False,
host="string",
lite=False,
zone_tag="string")
const webAnalyticsSiteResource = new cloudflare.WebAnalyticsSite("webAnalyticsSiteResource", {
accountId: "string",
autoInstall: false,
enabled: false,
host: "string",
lite: false,
zoneTag: "string",
});
type: cloudflare:WebAnalyticsSite
properties:
accountId: string
autoInstall: false
enabled: false
host: string
lite: false
zoneTag: string
WebAnalyticsSite 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 WebAnalyticsSite resource accepts the following input properties:
- Account
Id string - Identifier
- Auto
Install bool - If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
- Enabled bool
- Enables or disables RUM. This option can be used only when auto_install is set to true.
- Host string
- The hostname to use for gray-clouded sites.
- Lite bool
- If enabled, the JavaScript snippet will not be injected for visitors from the EU.
- Zone
Tag string - The zone identifier.
- Account
Id string - Identifier
- Auto
Install bool - If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
- Enabled bool
- Enables or disables RUM. This option can be used only when auto_install is set to true.
- Host string
- The hostname to use for gray-clouded sites.
- Lite bool
- If enabled, the JavaScript snippet will not be injected for visitors from the EU.
- Zone
Tag string - The zone identifier.
- account
Id String - Identifier
- auto
Install Boolean - If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
- enabled Boolean
- Enables or disables RUM. This option can be used only when auto_install is set to true.
- host String
- The hostname to use for gray-clouded sites.
- lite Boolean
- If enabled, the JavaScript snippet will not be injected for visitors from the EU.
- zone
Tag String - The zone identifier.
- account
Id string - Identifier
- auto
Install boolean - If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
- enabled boolean
- Enables or disables RUM. This option can be used only when auto_install is set to true.
- host string
- The hostname to use for gray-clouded sites.
- lite boolean
- If enabled, the JavaScript snippet will not be injected for visitors from the EU.
- zone
Tag string - The zone identifier.
- account_
id str - Identifier
- auto_
install bool - If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
- enabled bool
- Enables or disables RUM. This option can be used only when auto_install is set to true.
- host str
- The hostname to use for gray-clouded sites.
- lite bool
- If enabled, the JavaScript snippet will not be injected for visitors from the EU.
- zone_
tag str - The zone identifier.
- account
Id String - Identifier
- auto
Install Boolean - If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
- enabled Boolean
- Enables or disables RUM. This option can be used only when auto_install is set to true.
- host String
- The hostname to use for gray-clouded sites.
- lite Boolean
- If enabled, the JavaScript snippet will not be injected for visitors from the EU.
- zone
Tag String - The zone identifier.
Outputs
All input properties are implicitly available as output properties. Additionally, the WebAnalyticsSite resource produces the following output properties:
- Created string
- Id string
- The provider-assigned unique ID for this managed resource.
- Rules
List<Web
Analytics Site Rule> - A list of rules.
- Ruleset
Web
Analytics Site Ruleset - Site
Tag string - The Web Analytics site identifier.
- Site
Token string - The Web Analytics site token.
- Snippet string
- Encoded JavaScript snippet.
- Created string
- Id string
- The provider-assigned unique ID for this managed resource.
- Rules
[]Web
Analytics Site Rule - A list of rules.
- Ruleset
Web
Analytics Site Ruleset - Site
Tag string - The Web Analytics site identifier.
- Site
Token string - The Web Analytics site token.
- Snippet string
- Encoded JavaScript snippet.
- created String
- id String
- The provider-assigned unique ID for this managed resource.
- rules
List<Web
Analytics Site Rule> - A list of rules.
- ruleset
Web
Analytics Site Ruleset - site
Tag String - The Web Analytics site identifier.
- site
Token String - The Web Analytics site token.
- snippet String
- Encoded JavaScript snippet.
- created string
- id string
- The provider-assigned unique ID for this managed resource.
- rules
Web
Analytics Site Rule[] - A list of rules.
- ruleset
Web
Analytics Site Ruleset - site
Tag string - The Web Analytics site identifier.
- site
Token string - The Web Analytics site token.
- snippet string
- Encoded JavaScript snippet.
- created str
- id str
- The provider-assigned unique ID for this managed resource.
- rules
Sequence[Web
Analytics Site Rule] - A list of rules.
- ruleset
Web
Analytics Site Ruleset - site_
tag str - The Web Analytics site identifier.
- site_
token str - The Web Analytics site token.
- snippet str
- Encoded JavaScript snippet.
- created String
- id String
- The provider-assigned unique ID for this managed resource.
- rules List<Property Map>
- A list of rules.
- ruleset Property Map
- site
Tag String - The Web Analytics site identifier.
- site
Token String - The Web Analytics site token.
- snippet String
- Encoded JavaScript snippet.
Look up Existing WebAnalyticsSite Resource
Get an existing WebAnalyticsSite 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?: WebAnalyticsSiteState, opts?: CustomResourceOptions): WebAnalyticsSite
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
auto_install: Optional[bool] = None,
created: Optional[str] = None,
enabled: Optional[bool] = None,
host: Optional[str] = None,
lite: Optional[bool] = None,
rules: Optional[Sequence[WebAnalyticsSiteRuleArgs]] = None,
ruleset: Optional[WebAnalyticsSiteRulesetArgs] = None,
site_tag: Optional[str] = None,
site_token: Optional[str] = None,
snippet: Optional[str] = None,
zone_tag: Optional[str] = None) -> WebAnalyticsSite
func GetWebAnalyticsSite(ctx *Context, name string, id IDInput, state *WebAnalyticsSiteState, opts ...ResourceOption) (*WebAnalyticsSite, error)
public static WebAnalyticsSite Get(string name, Input<string> id, WebAnalyticsSiteState? state, CustomResourceOptions? opts = null)
public static WebAnalyticsSite get(String name, Output<String> id, WebAnalyticsSiteState state, CustomResourceOptions options)
resources: _: type: cloudflare:WebAnalyticsSite 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 string - Identifier
- Auto
Install bool - If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
- Created string
- Enabled bool
- Enables or disables RUM. This option can be used only when auto_install is set to true.
- Host string
- The hostname to use for gray-clouded sites.
- Lite bool
- If enabled, the JavaScript snippet will not be injected for visitors from the EU.
- Rules
List<Web
Analytics Site Rule> - A list of rules.
- Ruleset
Web
Analytics Site Ruleset - Site
Tag string - The Web Analytics site identifier.
- Site
Token string - The Web Analytics site token.
- Snippet string
- Encoded JavaScript snippet.
- Zone
Tag string - The zone identifier.
- Account
Id string - Identifier
- Auto
Install bool - If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
- Created string
- Enabled bool
- Enables or disables RUM. This option can be used only when auto_install is set to true.
- Host string
- The hostname to use for gray-clouded sites.
- Lite bool
- If enabled, the JavaScript snippet will not be injected for visitors from the EU.
- Rules
[]Web
Analytics Site Rule Args - A list of rules.
- Ruleset
Web
Analytics Site Ruleset Args - Site
Tag string - The Web Analytics site identifier.
- Site
Token string - The Web Analytics site token.
- Snippet string
- Encoded JavaScript snippet.
- Zone
Tag string - The zone identifier.
- account
Id String - Identifier
- auto
Install Boolean - If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
- created String
- enabled Boolean
- Enables or disables RUM. This option can be used only when auto_install is set to true.
- host String
- The hostname to use for gray-clouded sites.
- lite Boolean
- If enabled, the JavaScript snippet will not be injected for visitors from the EU.
- rules
List<Web
Analytics Site Rule> - A list of rules.
- ruleset
Web
Analytics Site Ruleset - site
Tag String - The Web Analytics site identifier.
- site
Token String - The Web Analytics site token.
- snippet String
- Encoded JavaScript snippet.
- zone
Tag String - The zone identifier.
- account
Id string - Identifier
- auto
Install boolean - If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
- created string
- enabled boolean
- Enables or disables RUM. This option can be used only when auto_install is set to true.
- host string
- The hostname to use for gray-clouded sites.
- lite boolean
- If enabled, the JavaScript snippet will not be injected for visitors from the EU.
- rules
Web
Analytics Site Rule[] - A list of rules.
- ruleset
Web
Analytics Site Ruleset - site
Tag string - The Web Analytics site identifier.
- site
Token string - The Web Analytics site token.
- snippet string
- Encoded JavaScript snippet.
- zone
Tag string - The zone identifier.
- account_
id str - Identifier
- auto_
install bool - If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
- created str
- enabled bool
- Enables or disables RUM. This option can be used only when auto_install is set to true.
- host str
- The hostname to use for gray-clouded sites.
- lite bool
- If enabled, the JavaScript snippet will not be injected for visitors from the EU.
- rules
Sequence[Web
Analytics Site Rule Args] - A list of rules.
- ruleset
Web
Analytics Site Ruleset Args - site_
tag str - The Web Analytics site identifier.
- site_
token str - The Web Analytics site token.
- snippet str
- Encoded JavaScript snippet.
- zone_
tag str - The zone identifier.
- account
Id String - Identifier
- auto
Install Boolean - If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
- created String
- enabled Boolean
- Enables or disables RUM. This option can be used only when auto_install is set to true.
- host String
- The hostname to use for gray-clouded sites.
- lite Boolean
- If enabled, the JavaScript snippet will not be injected for visitors from the EU.
- rules List<Property Map>
- A list of rules.
- ruleset Property Map
- site
Tag String - The Web Analytics site identifier.
- site
Token String - The Web Analytics site token.
- snippet String
- Encoded JavaScript snippet.
- zone
Tag String - The zone identifier.
Supporting Types
WebAnalyticsSiteRule, WebAnalyticsSiteRuleArgs
- Created string
- Host string
- The hostname the rule will be applied to.
- Id string
- The Web Analytics rule identifier.
- Inclusive bool
- Whether the rule includes or excludes traffic from being measured.
- Is
Paused bool - Whether the rule is paused or not.
- Paths List<string>
- The paths the rule will be applied to.
- Priority double
- Created string
- Host string
- The hostname the rule will be applied to.
- Id string
- The Web Analytics rule identifier.
- Inclusive bool
- Whether the rule includes or excludes traffic from being measured.
- Is
Paused bool - Whether the rule is paused or not.
- Paths []string
- The paths the rule will be applied to.
- Priority float64
- created String
- host String
- The hostname the rule will be applied to.
- id String
- The Web Analytics rule identifier.
- inclusive Boolean
- Whether the rule includes or excludes traffic from being measured.
- is
Paused Boolean - Whether the rule is paused or not.
- paths List<String>
- The paths the rule will be applied to.
- priority Double
- created string
- host string
- The hostname the rule will be applied to.
- id string
- The Web Analytics rule identifier.
- inclusive boolean
- Whether the rule includes or excludes traffic from being measured.
- is
Paused boolean - Whether the rule is paused or not.
- paths string[]
- The paths the rule will be applied to.
- priority number
- created String
- host String
- The hostname the rule will be applied to.
- id String
- The Web Analytics rule identifier.
- inclusive Boolean
- Whether the rule includes or excludes traffic from being measured.
- is
Paused Boolean - Whether the rule is paused or not.
- paths List<String>
- The paths the rule will be applied to.
- priority Number
WebAnalyticsSiteRuleset, WebAnalyticsSiteRulesetArgs
Import
$ pulumi import cloudflare:index/webAnalyticsSite:WebAnalyticsSite example '<account_id>/<site_id>'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.