1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getCustomPages
Cloudflare v6.6.0 published on Wednesday, Aug 20, 2025 by Pulumi

cloudflare.getCustomPages

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.6.0 published on Wednesday, Aug 20, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleCustomPages = cloudflare.getCustomPages({
        identifier: "ratelimit_block",
        accountId: "account_id",
        zoneId: "zone_id",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_custom_pages = cloudflare.get_custom_pages(identifier="ratelimit_block",
        account_id="account_id",
        zone_id="zone_id")
    
    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.LookupCustomPages(ctx, &cloudflare.LookupCustomPagesArgs{
    			Identifier: "ratelimit_block",
    			AccountId:  pulumi.StringRef("account_id"),
    			ZoneId:     pulumi.StringRef("zone_id"),
    		}, nil)
    		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 exampleCustomPages = Cloudflare.GetCustomPages.Invoke(new()
        {
            Identifier = "ratelimit_block",
            AccountId = "account_id",
            ZoneId = "zone_id",
        });
    
    });
    
    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.GetCustomPagesArgs;
    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 exampleCustomPages = CloudflareFunctions.getCustomPages(GetCustomPagesArgs.builder()
                .identifier("ratelimit_block")
                .accountId("account_id")
                .zoneId("zone_id")
                .build());
    
        }
    }
    
    variables:
      exampleCustomPages:
        fn::invoke:
          function: cloudflare:getCustomPages
          arguments:
            identifier: ratelimit_block
            accountId: account_id
            zoneId: zone_id
    

    Using getCustomPages

    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 getCustomPages(args: GetCustomPagesArgs, opts?: InvokeOptions): Promise<GetCustomPagesResult>
    function getCustomPagesOutput(args: GetCustomPagesOutputArgs, opts?: InvokeOptions): Output<GetCustomPagesResult>
    def get_custom_pages(account_id: Optional[str] = None,
                         identifier: Optional[str] = None,
                         zone_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetCustomPagesResult
    def get_custom_pages_output(account_id: Optional[pulumi.Input[str]] = None,
                         identifier: Optional[pulumi.Input[str]] = None,
                         zone_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetCustomPagesResult]
    func LookupCustomPages(ctx *Context, args *LookupCustomPagesArgs, opts ...InvokeOption) (*LookupCustomPagesResult, error)
    func LookupCustomPagesOutput(ctx *Context, args *LookupCustomPagesOutputArgs, opts ...InvokeOption) LookupCustomPagesResultOutput

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

    public static class GetCustomPages 
    {
        public static Task<GetCustomPagesResult> InvokeAsync(GetCustomPagesArgs args, InvokeOptions? opts = null)
        public static Output<GetCustomPagesResult> Invoke(GetCustomPagesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCustomPagesResult> getCustomPages(GetCustomPagesArgs args, InvokeOptions options)
    public static Output<GetCustomPagesResult> getCustomPages(GetCustomPagesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getCustomPages:getCustomPages
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Identifier string
    Error Page Types Available values: "wafblock", "ipblock", "countrychallenge", "500errors", "1000errors", "managedchallenge", "ratelimit_block".
    AccountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    ZoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    Identifier string
    Error Page Types Available values: "wafblock", "ipblock", "countrychallenge", "500errors", "1000errors", "managedchallenge", "ratelimit_block".
    AccountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    ZoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    identifier String
    Error Page Types Available values: "wafblock", "ipblock", "countrychallenge", "500errors", "1000errors", "managedchallenge", "ratelimit_block".
    accountId String
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zoneId String
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    identifier string
    Error Page Types Available values: "wafblock", "ipblock", "countrychallenge", "500errors", "1000errors", "managedchallenge", "ratelimit_block".
    accountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    identifier str
    Error Page Types Available values: "wafblock", "ipblock", "countrychallenge", "500errors", "1000errors", "managedchallenge", "ratelimit_block".
    account_id str
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zone_id str
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    identifier String
    Error Page Types Available values: "wafblock", "ipblock", "countrychallenge", "500errors", "1000errors", "managedchallenge", "ratelimit_block".
    accountId String
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zoneId String
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

    getCustomPages Result

    The following output properties are available:

    CreatedOn string
    Description string
    Id string
    The ID of this resource.
    Identifier string
    Error Page Types Available values: "wafblock", "ipblock", "countrychallenge", "500errors", "1000errors", "managedchallenge", "ratelimit_block".
    ModifiedOn string
    PreviewTarget string
    RequiredTokens List<string>
    State string
    The custom page state. Available values: "default", "customized".
    Url string
    The URL associated with the custom page.
    AccountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    ZoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    CreatedOn string
    Description string
    Id string
    The ID of this resource.
    Identifier string
    Error Page Types Available values: "wafblock", "ipblock", "countrychallenge", "500errors", "1000errors", "managedchallenge", "ratelimit_block".
    ModifiedOn string
    PreviewTarget string
    RequiredTokens []string
    State string
    The custom page state. Available values: "default", "customized".
    Url string
    The URL associated with the custom page.
    AccountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    ZoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    createdOn String
    description String
    id String
    The ID of this resource.
    identifier String
    Error Page Types Available values: "wafblock", "ipblock", "countrychallenge", "500errors", "1000errors", "managedchallenge", "ratelimit_block".
    modifiedOn String
    previewTarget String
    requiredTokens List<String>
    state String
    The custom page state. Available values: "default", "customized".
    url String
    The URL associated with the custom page.
    accountId String
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zoneId String
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    createdOn string
    description string
    id string
    The ID of this resource.
    identifier string
    Error Page Types Available values: "wafblock", "ipblock", "countrychallenge", "500errors", "1000errors", "managedchallenge", "ratelimit_block".
    modifiedOn string
    previewTarget string
    requiredTokens string[]
    state string
    The custom page state. Available values: "default", "customized".
    url string
    The URL associated with the custom page.
    accountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    created_on str
    description str
    id str
    The ID of this resource.
    identifier str
    Error Page Types Available values: "wafblock", "ipblock", "countrychallenge", "500errors", "1000errors", "managedchallenge", "ratelimit_block".
    modified_on str
    preview_target str
    required_tokens Sequence[str]
    state str
    The custom page state. Available values: "default", "customized".
    url str
    The URL associated with the custom page.
    account_id str
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zone_id str
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    createdOn String
    description String
    id String
    The ID of this resource.
    identifier String
    Error Page Types Available values: "wafblock", "ipblock", "countrychallenge", "500errors", "1000errors", "managedchallenge", "ratelimit_block".
    modifiedOn String
    previewTarget String
    requiredTokens List<String>
    state String
    The custom page state. Available values: "default", "customized".
    url String
    The URL associated with the custom page.
    accountId String
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zoneId String
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.6.0 published on Wednesday, Aug 20, 2025 by Pulumi