1. Registry
  2. Packages
  3. Incapsula Provider
  4. API Docs
  5. getSite
Viewing docs for incapsula 3.41.1
published on Thursday, Oct 29, 2026 by imperva
incapsula
Viewing docs for incapsula 3.41.1
published on Thursday, Oct 29, 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!
    

    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
    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
    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
    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
    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
    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
    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

    getSite Result

    The following output properties are available:

    Cname string
    The CNAME record of the site.
    Id string
    Name string
    SiteId double
    The external ID of the site.
    Type string
    The type of the site.
    AccountId double
    Cname string
    The CNAME record of the site.
    Id string
    Name string
    SiteId float64
    The external ID of the site.
    Type string
    The type of the site.
    AccountId float64
    cname string
    The CNAME record of the site.
    id string
    name string
    site_id number
    The external ID of the site.
    type string
    The type of the site.
    account_id number
    cname String
    The CNAME record of the site.
    id String
    name String
    siteId Double
    The external ID of the site.
    type String
    The type of the site.
    accountId Double
    cname string
    The CNAME record of the site.
    id string
    name string
    siteId number
    The external ID of the site.
    type string
    The type of the site.
    accountId number
    cname str
    The CNAME record of the site.
    id str
    name str
    site_id float
    The external ID of the site.
    type str
    The type of the site.
    account_id float
    cname String
    The CNAME record of the site.
    id String
    name String
    siteId Number
    The external ID of the site.
    type String
    The type of the site.
    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.41.1
    published on Thursday, Oct 29, 2026 by imperva

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial