1. Registry
  2. Packages
  3. Incapsula Provider
  4. API Docs
  5. getSite
Viewing docs for incapsula 3.44.0
published on Sunday, Nov 15, 2026 by imperva
incapsula
Viewing docs for incapsula 3.44.0
published on Sunday, Nov 15, 2026 by imperva

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as incapsula from "@pulumi/incapsula";
    
    const example = incapsula.getSite({
        name: "mysite.example.com",
    });
    
    import pulumi
    import pulumi_incapsula as incapsula
    
    example = incapsula.get_site(name="mysite.example.com")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/incapsula/v3/incapsula"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := incapsula.LookupSite(ctx, &incapsula.LookupSiteArgs{
    			Name: "mysite.example.com",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Incapsula = Pulumi.Incapsula;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Incapsula.GetSite.Invoke(new()
        {
            Name = "mysite.example.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incapsula.IncapsulaFunctions;
    import com.pulumi.incapsula.inputs.GetSiteArgs;
    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 example = IncapsulaFunctions.getSite(GetSiteArgs.builder()
                .name("mysite.example.com")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: incapsula:getSite
          arguments:
            name: mysite.example.com
    
    Example coming soon!
    

    Search in Sub-Account

    import * as pulumi from "@pulumi/pulumi";
    import * as incapsula from "@pulumi/incapsula";
    
    const subaccount = incapsula.getSite({
        name: "mysite.example.com",
        accountId: 1234568,
    });
    
    import pulumi
    import pulumi_incapsula as incapsula
    
    subaccount = incapsula.get_site(name="mysite.example.com",
        account_id=1234568)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/incapsula/v3/incapsula"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := incapsula.LookupSite(ctx, &incapsula.LookupSiteArgs{
    			Name:      "mysite.example.com",
    			AccountId: pulumi.Float64Ref(1234568),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Incapsula = Pulumi.Incapsula;
    
    return await Deployment.RunAsync(() => 
    {
        var subaccount = Incapsula.GetSite.Invoke(new()
        {
            Name = "mysite.example.com",
            AccountId = 1234568,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incapsula.IncapsulaFunctions;
    import com.pulumi.incapsula.inputs.GetSiteArgs;
    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 subaccount = IncapsulaFunctions.getSite(GetSiteArgs.builder()
                .name("mysite.example.com")
                .accountId(1234568)
                .build());
    
        }
    }
    
    variables:
      subaccount:
        fn::invoke:
          function: incapsula:getSite
          arguments:
            name: mysite.example.com
            accountId: 1.234568e+06
    
    Example coming soon!
    

    Imperva for Google Cloud Load Balancer Website

    import * as pulumi from "@pulumi/pulumi";
    import * as incapsula from "@pulumi/incapsula";
    
    const lb = incapsula.getSite({
        name: "my-gcp-lb-site",
    });
    export const authorityHeader = lb.then(lb => lb.authorityHeader);
    
    import pulumi
    import pulumi_incapsula as incapsula
    
    lb = incapsula.get_site(name="my-gcp-lb-site")
    pulumi.export("authorityHeader", lb.authority_header)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/incapsula/v3/incapsula"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		lb, err := incapsula.LookupSite(ctx, &incapsula.LookupSiteArgs{
    			Name: "my-gcp-lb-site",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("authorityHeader", lb.AuthorityHeader)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Incapsula = Pulumi.Incapsula;
    
    return await Deployment.RunAsync(() => 
    {
        var lb = Incapsula.GetSite.Invoke(new()
        {
            Name = "my-gcp-lb-site",
        });
    
        return new Dictionary<string, object?>
        {
            ["authorityHeader"] = lb.Apply(getSiteResult => getSiteResult.AuthorityHeader),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incapsula.IncapsulaFunctions;
    import com.pulumi.incapsula.inputs.GetSiteArgs;
    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 lb = IncapsulaFunctions.getSite(GetSiteArgs.builder()
                .name("my-gcp-lb-site")
                .build());
    
            ctx.export("authorityHeader", lb.authorityHeader());
        }
    }
    
    variables:
      lb:
        fn::invoke:
          function: incapsula:getSite
          arguments:
            name: my-gcp-lb-site
    outputs:
      authorityHeader: ${lb.authorityHeader}
    
    Example coming soon!
    

    Using getSite

    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 getSite(args: GetSiteArgs, opts?: InvokeOptions): Promise<GetSiteResult>
    function getSiteOutput(args: GetSiteOutputArgs, opts?: InvokeOutputOptions): Output<GetSiteResult>
    def get_site(account_id: Optional[float] = None,
                 id: Optional[str] = None,
                 name: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetSiteResult
    def get_site_output(account_id: pulumi.Input[Optional[float]] = None,
                 id: pulumi.Input[Optional[str]] = None,
                 name: pulumi.Input[Optional[str]] = None,
                 opts: Optional[InvokeOutputOptions] = None) -> Output[GetSiteResult]
    func LookupSite(ctx *Context, args *LookupSiteArgs, opts ...InvokeOption) (*LookupSiteResult, error)
    func LookupSiteOutput(ctx *Context, args *LookupSiteOutputArgs, opts ...InvokeOption) LookupSiteResultOutput

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

    public static class GetSite 
    {
        public static Task<GetSiteResult> InvokeAsync(GetSiteArgs args, InvokeOptions? opts = null)
        public static Output<GetSiteResult> Invoke(GetSiteInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetSiteResult> Invoke(GetSiteInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetSiteResult> getSite(GetSiteArgs args, InvokeOptions options)
    public static Output<GetSiteResult> getSite(GetSiteArgs args, InvokeOptions options)
    public static Output<GetSiteResult> getSite(GetSiteArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: incapsula:index/getSite:getSite
      arguments:
        # arguments dictionary
    data "incapsula_get_site" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    The name of the site to look up.
    AccountId double
    ID of the subaccount to search. If omitted, searches the account associated with your Incapsula provider credentials. This value is required only when searching a subaccount.
    Id string
    The external ID of the site.
    Name string
    The name of the site to look up.
    AccountId float64
    ID of the subaccount to search. If omitted, searches the account associated with your Incapsula provider credentials. This value is required only when searching a subaccount.
    Id string
    The external ID of the site.
    name string
    The name of the site to look up.
    account_id number
    ID of the subaccount to search. If omitted, searches the account associated with your Incapsula provider credentials. This value is required only when searching a subaccount.
    id string
    The external ID of the site.
    name String
    The name of the site to look up.
    accountId Double
    ID of the subaccount to search. If omitted, searches the account associated with your Incapsula provider credentials. This value is required only when searching a subaccount.
    id String
    The external ID of the site.
    name string
    The name of the site to look up.
    accountId number
    ID of the subaccount to search. If omitted, searches the account associated with your Incapsula provider credentials. This value is required only when searching a subaccount.
    id string
    The external ID of the site.
    name str
    The name of the site to look up.
    account_id float
    ID of the subaccount to search. If omitted, searches the account associated with your Incapsula provider credentials. This value is required only when searching a subaccount.
    id str
    The external ID of the site.
    name String
    The name of the site to look up.
    accountId Number
    ID of the subaccount to search. If omitted, searches the account associated with your Incapsula provider credentials. This value is required only when searching a subaccount.
    id String
    The external ID of the site.

    getSite Result

    The following output properties are available:

    AuthorityHeader string
    CloudType string
    Cname string
    The CNAME record of the site.
    Id string
    The external ID of the site.
    IsLoadBalancerSite bool
    Name string
    SiteId double
    Type string
    AccountId double
    AuthorityHeader string
    CloudType string
    Cname string
    The CNAME record of the site.
    Id string
    The external ID of the site.
    IsLoadBalancerSite bool
    Name string
    SiteId float64
    Type string
    AccountId float64
    authority_header string
    cloud_type string
    cname string
    The CNAME record of the site.
    id string
    The external ID of the site.
    is_load_balancer_site bool
    name string
    site_id number
    type string
    account_id number
    authorityHeader String
    cloudType String
    cname String
    The CNAME record of the site.
    id String
    The external ID of the site.
    isLoadBalancerSite Boolean
    name String
    siteId Double
    type String
    accountId Double
    authorityHeader string
    cloudType string
    cname string
    The CNAME record of the site.
    id string
    The external ID of the site.
    isLoadBalancerSite boolean
    name string
    siteId number
    type string
    accountId number
    authority_header str
    cloud_type str
    cname str
    The CNAME record of the site.
    id str
    The external ID of the site.
    is_load_balancer_site bool
    name str
    site_id float
    type str
    account_id float
    authorityHeader String
    cloudType String
    cname String
    The CNAME record of the site.
    id String
    The external ID of the site.
    isLoadBalancerSite Boolean
    name String
    siteId Number
    type String
    accountId Number

    Package Details

    Repository
    incapsula imperva/terraform-provider-incapsula
    License
    Notes
    This Pulumi package is based on the incapsula Terraform Provider.
    incapsula
    Viewing docs for incapsula 3.44.0
    published on Sunday, Nov 15, 2026 by imperva

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial