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

cloudflare.getWebAnalyticsSites

Explore with Pulumi AI

Example Usage

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

const exampleWebAnalyticsSites = cloudflare.getWebAnalyticsSites({
    accountId: "023e105f4ecef8ad9ca31a8372d0c353",
    orderBy: "host",
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_web_analytics_sites = cloudflare.get_web_analytics_sites(account_id="023e105f4ecef8ad9ca31a8372d0c353",
    order_by="host")
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.LookupWebAnalyticsSites(ctx, &cloudflare.LookupWebAnalyticsSitesArgs{
			AccountId: "023e105f4ecef8ad9ca31a8372d0c353",
			OrderBy:   pulumi.StringRef("host"),
		}, 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 exampleWebAnalyticsSites = Cloudflare.GetWebAnalyticsSites.Invoke(new()
    {
        AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
        OrderBy = "host",
    });

});
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.GetWebAnalyticsSitesArgs;
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 exampleWebAnalyticsSites = CloudflareFunctions.getWebAnalyticsSites(GetWebAnalyticsSitesArgs.builder()
            .accountId("023e105f4ecef8ad9ca31a8372d0c353")
            .orderBy("host")
            .build());

    }
}
Copy
variables:
  exampleWebAnalyticsSites:
    fn::invoke:
      function: cloudflare:getWebAnalyticsSites
      arguments:
        accountId: 023e105f4ecef8ad9ca31a8372d0c353
        orderBy: host
Copy

Using getWebAnalyticsSites

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 getWebAnalyticsSites(args: GetWebAnalyticsSitesArgs, opts?: InvokeOptions): Promise<GetWebAnalyticsSitesResult>
function getWebAnalyticsSitesOutput(args: GetWebAnalyticsSitesOutputArgs, opts?: InvokeOptions): Output<GetWebAnalyticsSitesResult>
Copy
def get_web_analytics_sites(account_id: Optional[str] = None,
                            max_items: Optional[int] = None,
                            order_by: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetWebAnalyticsSitesResult
def get_web_analytics_sites_output(account_id: Optional[pulumi.Input[str]] = None,
                            max_items: Optional[pulumi.Input[int]] = None,
                            order_by: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetWebAnalyticsSitesResult]
Copy
func LookupWebAnalyticsSites(ctx *Context, args *LookupWebAnalyticsSitesArgs, opts ...InvokeOption) (*LookupWebAnalyticsSitesResult, error)
func LookupWebAnalyticsSitesOutput(ctx *Context, args *LookupWebAnalyticsSitesOutputArgs, opts ...InvokeOption) LookupWebAnalyticsSitesResultOutput
Copy

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

public static class GetWebAnalyticsSites 
{
    public static Task<GetWebAnalyticsSitesResult> InvokeAsync(GetWebAnalyticsSitesArgs args, InvokeOptions? opts = null)
    public static Output<GetWebAnalyticsSitesResult> Invoke(GetWebAnalyticsSitesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetWebAnalyticsSitesResult> getWebAnalyticsSites(GetWebAnalyticsSitesArgs args, InvokeOptions options)
public static Output<GetWebAnalyticsSitesResult> getWebAnalyticsSites(GetWebAnalyticsSitesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: cloudflare:index/getWebAnalyticsSites:getWebAnalyticsSites
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AccountId This property is required. string
Identifier
MaxItems int
Max items to fetch, default: 1000
OrderBy string
The property used to sort the list of results. Available values: "host", "created".
AccountId This property is required. string
Identifier
MaxItems int
Max items to fetch, default: 1000
OrderBy string
The property used to sort the list of results. Available values: "host", "created".
accountId This property is required. String
Identifier
maxItems Integer
Max items to fetch, default: 1000
orderBy String
The property used to sort the list of results. Available values: "host", "created".
accountId This property is required. string
Identifier
maxItems number
Max items to fetch, default: 1000
orderBy string
The property used to sort the list of results. Available values: "host", "created".
account_id This property is required. str
Identifier
max_items int
Max items to fetch, default: 1000
order_by str
The property used to sort the list of results. Available values: "host", "created".
accountId This property is required. String
Identifier
maxItems Number
Max items to fetch, default: 1000
orderBy String
The property used to sort the list of results. Available values: "host", "created".

getWebAnalyticsSites Result

The following output properties are available:

AccountId string
Identifier
Id string
The provider-assigned unique ID for this managed resource.
Results List<GetWebAnalyticsSitesResult>
The items returned by the data source
MaxItems int
Max items to fetch, default: 1000
OrderBy string
The property used to sort the list of results. Available values: "host", "created".
AccountId string
Identifier
Id string
The provider-assigned unique ID for this managed resource.
Results []GetWebAnalyticsSitesResult
The items returned by the data source
MaxItems int
Max items to fetch, default: 1000
OrderBy string
The property used to sort the list of results. Available values: "host", "created".
accountId String
Identifier
id String
The provider-assigned unique ID for this managed resource.
results List<GetWebAnalyticsSitesResult>
The items returned by the data source
maxItems Integer
Max items to fetch, default: 1000
orderBy String
The property used to sort the list of results. Available values: "host", "created".
accountId string
Identifier
id string
The provider-assigned unique ID for this managed resource.
results GetWebAnalyticsSitesResult[]
The items returned by the data source
maxItems number
Max items to fetch, default: 1000
orderBy string
The property used to sort the list of results. Available values: "host", "created".
account_id str
Identifier
id str
The provider-assigned unique ID for this managed resource.
results Sequence[GetWebAnalyticsSitesResult]
The items returned by the data source
max_items int
Max items to fetch, default: 1000
order_by str
The property used to sort the list of results. Available values: "host", "created".
accountId String
Identifier
id String
The provider-assigned unique ID for this managed resource.
results List<Property Map>
The items returned by the data source
maxItems Number
Max items to fetch, default: 1000
orderBy String
The property used to sort the list of results. Available values: "host", "created".

Supporting Types

GetWebAnalyticsSitesResult

AutoInstall This property is required. bool
If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
Created This property is required. string
Rules This property is required. List<GetWebAnalyticsSitesResultRule>
A list of rules.
Ruleset This property is required. GetWebAnalyticsSitesResultRuleset
SiteTag This property is required. string
The Web Analytics site identifier.
SiteToken This property is required. string
The Web Analytics site token.
Snippet This property is required. string
Encoded JavaScript snippet.
AutoInstall This property is required. bool
If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
Created This property is required. string
Rules This property is required. []GetWebAnalyticsSitesResultRule
A list of rules.
Ruleset This property is required. GetWebAnalyticsSitesResultRuleset
SiteTag This property is required. string
The Web Analytics site identifier.
SiteToken This property is required. string
The Web Analytics site token.
Snippet This property is required. string
Encoded JavaScript snippet.
autoInstall This property is required. Boolean
If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
created This property is required. String
rules This property is required. List<GetWebAnalyticsSitesResultRule>
A list of rules.
ruleset This property is required. GetWebAnalyticsSitesResultRuleset
siteTag This property is required. String
The Web Analytics site identifier.
siteToken This property is required. String
The Web Analytics site token.
snippet This property is required. String
Encoded JavaScript snippet.
autoInstall This property is required. boolean
If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
created This property is required. string
rules This property is required. GetWebAnalyticsSitesResultRule[]
A list of rules.
ruleset This property is required. GetWebAnalyticsSitesResultRuleset
siteTag This property is required. string
The Web Analytics site identifier.
siteToken This property is required. string
The Web Analytics site token.
snippet This property is required. string
Encoded JavaScript snippet.
auto_install This property is required. bool
If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
created This property is required. str
rules This property is required. Sequence[GetWebAnalyticsSitesResultRule]
A list of rules.
ruleset This property is required. GetWebAnalyticsSitesResultRuleset
site_tag This property is required. str
The Web Analytics site identifier.
site_token This property is required. str
The Web Analytics site token.
snippet This property is required. str
Encoded JavaScript snippet.
autoInstall This property is required. Boolean
If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.
created This property is required. String
rules This property is required. List<Property Map>
A list of rules.
ruleset This property is required. Property Map
siteTag This property is required. String
The Web Analytics site identifier.
siteToken This property is required. String
The Web Analytics site token.
snippet This property is required. String
Encoded JavaScript snippet.

GetWebAnalyticsSitesResultRule

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

GetWebAnalyticsSitesResultRuleset

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.