1. Packages
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. getCustomPageAsset
Viewing docs for Cloudflare v6.15.0
published on Saturday, May 2, 2026 by Pulumi
cloudflare logo
Viewing docs for Cloudflare v6.15.0
published on Saturday, May 2, 2026 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleCustomPageAsset = cloudflare.getCustomPageAsset({
        assetName: "my_custom_error_page",
        accountId: "account_id",
        zoneId: "zone_id",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_custom_page_asset = cloudflare.get_custom_page_asset(asset_name="my_custom_error_page",
        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.GetCustomPageAsset(ctx, &cloudflare.LookupCustomPageAssetArgs{
    			AssetName: "my_custom_error_page",
    			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 exampleCustomPageAsset = Cloudflare.Index.GetCustomPageAsset.Invoke(new()
        {
            AssetName = "my_custom_error_page",
            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.GetCustomPageAssetArgs;
    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 exampleCustomPageAsset = CloudflareFunctions.getCustomPageAsset(GetCustomPageAssetArgs.builder()
                .assetName("my_custom_error_page")
                .accountId("account_id")
                .zoneId("zone_id")
                .build());
    
        }
    }
    
    variables:
      exampleCustomPageAsset:
        fn::invoke:
          function: cloudflare:getCustomPageAsset
          arguments:
            assetName: my_custom_error_page
            accountId: account_id
            zoneId: zone_id
    

    Using getCustomPageAsset

    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 getCustomPageAsset(args: GetCustomPageAssetArgs, opts?: InvokeOptions): Promise<GetCustomPageAssetResult>
    function getCustomPageAssetOutput(args: GetCustomPageAssetOutputArgs, opts?: InvokeOptions): Output<GetCustomPageAssetResult>
    def get_custom_page_asset(account_id: Optional[str] = None,
                              asset_name: Optional[str] = None,
                              zone_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetCustomPageAssetResult
    def get_custom_page_asset_output(account_id: Optional[pulumi.Input[str]] = None,
                              asset_name: Optional[pulumi.Input[str]] = None,
                              zone_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetCustomPageAssetResult]
    func LookupCustomPageAsset(ctx *Context, args *LookupCustomPageAssetArgs, opts ...InvokeOption) (*LookupCustomPageAssetResult, error)
    func LookupCustomPageAssetOutput(ctx *Context, args *LookupCustomPageAssetOutputArgs, opts ...InvokeOption) LookupCustomPageAssetResultOutput

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

    public static class GetCustomPageAsset 
    {
        public static Task<GetCustomPageAssetResult> InvokeAsync(GetCustomPageAssetArgs args, InvokeOptions? opts = null)
        public static Output<GetCustomPageAssetResult> Invoke(GetCustomPageAssetInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCustomPageAssetResult> getCustomPageAsset(GetCustomPageAssetArgs args, InvokeOptions options)
    public static Output<GetCustomPageAssetResult> getCustomPageAsset(GetCustomPageAssetArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getCustomPageAsset:getCustomPageAsset
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AssetName string
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    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.
    AssetName string
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    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.
    assetName String
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    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.
    assetName string
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    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.
    asset_name str
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    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.
    assetName String
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    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.

    getCustomPageAsset Result

    The following output properties are available:

    AssetName string
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    Description string
    A short description of the custom asset.
    Id string
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    LastUpdated string
    Name string
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    SizeBytes int
    The size of the asset content in bytes.
    Url string
    The URL where the asset content is fetched from.
    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.
    AssetName string
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    Description string
    A short description of the custom asset.
    Id string
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    LastUpdated string
    Name string
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    SizeBytes int
    The size of the asset content in bytes.
    Url string
    The URL where the asset content is fetched from.
    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.
    assetName String
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    description String
    A short description of the custom asset.
    id String
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    lastUpdated String
    name String
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    sizeBytes Integer
    The size of the asset content in bytes.
    url String
    The URL where the asset content is fetched from.
    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.
    assetName string
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    description string
    A short description of the custom asset.
    id string
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    lastUpdated string
    name string
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    sizeBytes number
    The size of the asset content in bytes.
    url string
    The URL where the asset content is fetched from.
    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.
    asset_name str
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    description str
    A short description of the custom asset.
    id str
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    last_updated str
    name str
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    size_bytes int
    The size of the asset content in bytes.
    url str
    The URL where the asset content is fetched from.
    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.
    assetName String
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    description String
    A short description of the custom asset.
    id String
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    lastUpdated String
    name String
    The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
    sizeBytes Number
    The size of the asset content in bytes.
    url String
    The URL where the asset content is fetched from.
    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
    Viewing docs for Cloudflare v6.15.0
    published on Saturday, May 2, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.