1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getWebAnalyticsSite
Cloudflare v6.1.0 published on Friday, Apr 18, 2025 by Pulumi

cloudflare.getWebAnalyticsSite

Explore with Pulumi AI

Example Usage

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

const exampleWebAnalyticsSite = cloudflare.getWebAnalyticsSite({
    accountId: "023e105f4ecef8ad9ca31a8372d0c353",
    siteId: "023e105f4ecef8ad9ca31a8372d0c353",
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_web_analytics_site = cloudflare.get_web_analytics_site(account_id="023e105f4ecef8ad9ca31a8372d0c353",
    site_id="023e105f4ecef8ad9ca31a8372d0c353")
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.LookupWebAnalyticsSite(ctx, &cloudflare.LookupWebAnalyticsSiteArgs{
			AccountId: "023e105f4ecef8ad9ca31a8372d0c353",
			SiteId:    pulumi.StringRef("023e105f4ecef8ad9ca31a8372d0c353"),
		}, 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 exampleWebAnalyticsSite = Cloudflare.GetWebAnalyticsSite.Invoke(new()
    {
        AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
        SiteId = "023e105f4ecef8ad9ca31a8372d0c353",
    });

});
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.GetWebAnalyticsSiteArgs;
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 exampleWebAnalyticsSite = CloudflareFunctions.getWebAnalyticsSite(GetWebAnalyticsSiteArgs.builder()
            .accountId("023e105f4ecef8ad9ca31a8372d0c353")
            .siteId("023e105f4ecef8ad9ca31a8372d0c353")
            .build());

    }
}
Copy
variables:
  exampleWebAnalyticsSite:
    fn::invoke:
      function: cloudflare:getWebAnalyticsSite
      arguments:
        accountId: 023e105f4ecef8ad9ca31a8372d0c353
        siteId: 023e105f4ecef8ad9ca31a8372d0c353
Copy

Using getWebAnalyticsSite

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 getWebAnalyticsSite(args: GetWebAnalyticsSiteArgs, opts?: InvokeOptions): Promise<GetWebAnalyticsSiteResult>
function getWebAnalyticsSiteOutput(args: GetWebAnalyticsSiteOutputArgs, opts?: InvokeOptions): Output<GetWebAnalyticsSiteResult>
Copy
def get_web_analytics_site(account_id: Optional[str] = None,
                           filter: Optional[GetWebAnalyticsSiteFilter] = None,
                           site_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetWebAnalyticsSiteResult
def get_web_analytics_site_output(account_id: Optional[pulumi.Input[str]] = None,
                           filter: Optional[pulumi.Input[GetWebAnalyticsSiteFilterArgs]] = None,
                           site_id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetWebAnalyticsSiteResult]
Copy
func LookupWebAnalyticsSite(ctx *Context, args *LookupWebAnalyticsSiteArgs, opts ...InvokeOption) (*LookupWebAnalyticsSiteResult, error)
func LookupWebAnalyticsSiteOutput(ctx *Context, args *LookupWebAnalyticsSiteOutputArgs, opts ...InvokeOption) LookupWebAnalyticsSiteResultOutput
Copy

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

public static class GetWebAnalyticsSite 
{
    public static Task<GetWebAnalyticsSiteResult> InvokeAsync(GetWebAnalyticsSiteArgs args, InvokeOptions? opts = null)
    public static Output<GetWebAnalyticsSiteResult> Invoke(GetWebAnalyticsSiteInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetWebAnalyticsSiteResult> getWebAnalyticsSite(GetWebAnalyticsSiteArgs args, InvokeOptions options)
public static Output<GetWebAnalyticsSiteResult> getWebAnalyticsSite(GetWebAnalyticsSiteArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: cloudflare:index/getWebAnalyticsSite:getWebAnalyticsSite
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AccountId This property is required. string
Identifier
Filter GetWebAnalyticsSiteFilter
SiteId string
Identifier
AccountId This property is required. string
Identifier
Filter GetWebAnalyticsSiteFilter
SiteId string
Identifier
accountId This property is required. String
Identifier
filter GetWebAnalyticsSiteFilter
siteId String
Identifier
accountId This property is required. string
Identifier
filter GetWebAnalyticsSiteFilter
siteId string
Identifier
account_id This property is required. str
Identifier
filter GetWebAnalyticsSiteFilter
site_id str
Identifier
accountId This property is required. String
Identifier
filter Property Map
siteId String
Identifier

getWebAnalyticsSite Result

The following output properties are available:

AccountId string
Identifier
AutoInstall bool
If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
Created string
Id string
Identifier
Rules List<GetWebAnalyticsSiteRule>
A list of rules.
Ruleset GetWebAnalyticsSiteRuleset
SiteTag string
The Web Analytics site identifier.
SiteToken string
The Web Analytics site token.
Snippet string
Encoded JavaScript snippet.
Filter GetWebAnalyticsSiteFilter
SiteId string
Identifier
AccountId string
Identifier
AutoInstall bool
If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
Created string
Id string
Identifier
Rules []GetWebAnalyticsSiteRule
A list of rules.
Ruleset GetWebAnalyticsSiteRuleset
SiteTag string
The Web Analytics site identifier.
SiteToken string
The Web Analytics site token.
Snippet string
Encoded JavaScript snippet.
Filter GetWebAnalyticsSiteFilter
SiteId string
Identifier
accountId String
Identifier
autoInstall Boolean
If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
created String
id String
Identifier
rules List<GetWebAnalyticsSiteRule>
A list of rules.
ruleset GetWebAnalyticsSiteRuleset
siteTag String
The Web Analytics site identifier.
siteToken String
The Web Analytics site token.
snippet String
Encoded JavaScript snippet.
filter GetWebAnalyticsSiteFilter
siteId String
Identifier
accountId string
Identifier
autoInstall boolean
If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
created string
id string
Identifier
rules GetWebAnalyticsSiteRule[]
A list of rules.
ruleset GetWebAnalyticsSiteRuleset
siteTag string
The Web Analytics site identifier.
siteToken string
The Web Analytics site token.
snippet string
Encoded JavaScript snippet.
filter GetWebAnalyticsSiteFilter
siteId string
Identifier
account_id str
Identifier
auto_install bool
If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
created str
id str
Identifier
rules Sequence[GetWebAnalyticsSiteRule]
A list of rules.
ruleset GetWebAnalyticsSiteRuleset
site_tag str
The Web Analytics site identifier.
site_token str
The Web Analytics site token.
snippet str
Encoded JavaScript snippet.
filter GetWebAnalyticsSiteFilter
site_id str
Identifier
accountId String
Identifier
autoInstall Boolean
If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
created String
id String
Identifier
rules List<Property Map>
A list of rules.
ruleset Property Map
siteTag String
The Web Analytics site identifier.
siteToken String
The Web Analytics site token.
snippet String
Encoded JavaScript snippet.
filter Property Map
siteId String
Identifier

Supporting Types

GetWebAnalyticsSiteFilter

OrderBy string
The property used to sort the list of results. Available values: "host", "created".
OrderBy string
The property used to sort the list of results. Available values: "host", "created".
orderBy String
The property used to sort the list of results. Available values: "host", "created".
orderBy string
The property used to sort the list of results. Available values: "host", "created".
order_by str
The property used to sort the list of results. Available values: "host", "created".
orderBy String
The property used to sort the list of results. Available values: "host", "created".

GetWebAnalyticsSiteRule

Created This property is required. string
Host This property is required. string
The hostname the rule will be applied to.
Id This property is required. string
The Web Analytics rule identifier.
Inclusive This property is required. bool
Whether the rule includes or excludes traffic from being measured.
IsPaused This property is required. bool
Whether the rule is paused or not.
Paths This property is required. List<string>
The paths the rule will be applied to.
Priority This property is required. double
Created This property is required. string
Host This property is required. string
The hostname the rule will be applied to.
Id This property is required. string
The Web Analytics rule identifier.
Inclusive This property is required. bool
Whether the rule includes or excludes traffic from being measured.
IsPaused This property is required. bool
Whether the rule is paused or not.
Paths This property is required. []string
The paths the rule will be applied to.
Priority This property is required. float64
created This property is required. String
host This property is required. String
The hostname the rule will be applied to.
id This property is required. String
The Web Analytics rule identifier.
inclusive This property is required. Boolean
Whether the rule includes or excludes traffic from being measured.
isPaused This property is required. Boolean
Whether the rule is paused or not.
paths This property is required. List<String>
The paths the rule will be applied to.
priority This property is required. Double
created This property is required. string
host This property is required. string
The hostname the rule will be applied to.
id This property is required. string
The Web Analytics rule identifier.
inclusive This property is required. boolean
Whether the rule includes or excludes traffic from being measured.
isPaused This property is required. boolean
Whether the rule is paused or not.
paths This property is required. string[]
The paths the rule will be applied to.
priority This property is required. number
created This property is required. str
host This property is required. str
The hostname the rule will be applied to.
id This property is required. str
The Web Analytics rule identifier.
inclusive This property is required. bool
Whether the rule includes or excludes traffic from being measured.
is_paused This property is required. bool
Whether the rule is paused or not.
paths This property is required. Sequence[str]
The paths the rule will be applied to.
priority This property is required. float
created This property is required. String
host This property is required. String
The hostname the rule will be applied to.
id This property is required. String
The Web Analytics rule identifier.
inclusive This property is required. Boolean
Whether the rule includes or excludes traffic from being measured.
isPaused This property is required. Boolean
Whether the rule is paused or not.
paths This property is required. List<String>
The paths the rule will be applied to.
priority This property is required. Number

GetWebAnalyticsSiteRuleset

Enabled This property is required. bool
Whether the ruleset is enabled.
Id This property is required. string
The Web Analytics ruleset identifier.
ZoneName This property is required. string
ZoneTag This property is required. string
The zone identifier.
Enabled This property is required. bool
Whether the ruleset is enabled.
Id This property is required. string
The Web Analytics ruleset identifier.
ZoneName This property is required. string
ZoneTag This property is required. string
The zone identifier.
enabled This property is required. Boolean
Whether the ruleset is enabled.
id This property is required. String
The Web Analytics ruleset identifier.
zoneName This property is required. String
zoneTag This property is required. String
The zone identifier.
enabled This property is required. boolean
Whether the ruleset is enabled.
id This property is required. string
The Web Analytics ruleset identifier.
zoneName This property is required. string
zoneTag This property is required. string
The zone identifier.
enabled This property is required. bool
Whether the ruleset is enabled.
id This property is required. str
The Web Analytics ruleset identifier.
zone_name This property is required. str
zone_tag This property is required. str
The zone identifier.
enabled This property is required. Boolean
Whether the ruleset is enabled.
id This property is required. String
The Web Analytics ruleset identifier.
zoneName This property is required. String
zoneTag This property is required. String
The zone identifier.

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.