published on Saturday, May 2, 2026 by Pulumi
published on Saturday, May 2, 2026 by Pulumi
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleCustomPageAsset = new cloudflare.CustomPageAsset("example_custom_page_asset", {
description: "Custom 500 error page",
name: "my_custom_error_page",
url: "https://example.com/error.html",
zoneId: "zone_id",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_custom_page_asset = cloudflare.CustomPageAsset("example_custom_page_asset",
description="Custom 500 error page",
name="my_custom_error_page",
url="https://example.com/error.html",
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.NewCustomPageAsset(ctx, "example_custom_page_asset", &cloudflare.CustomPageAssetArgs{
Description: pulumi.String("Custom 500 error page"),
Name: pulumi.String("my_custom_error_page"),
Url: pulumi.String("https://example.com/error.html"),
ZoneId: pulumi.String("zone_id"),
})
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 = new Cloudflare.Index.CustomPageAsset("example_custom_page_asset", new()
{
Description = "Custom 500 error page",
Name = "my_custom_error_page",
Url = "https://example.com/error.html",
ZoneId = "zone_id",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.CustomPageAsset;
import com.pulumi.cloudflare.CustomPageAssetArgs;
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) {
var exampleCustomPageAsset = new CustomPageAsset("exampleCustomPageAsset", CustomPageAssetArgs.builder()
.description("Custom 500 error page")
.name("my_custom_error_page")
.url("https://example.com/error.html")
.zoneId("zone_id")
.build());
}
}
resources:
exampleCustomPageAsset:
type: cloudflare:CustomPageAsset
name: example_custom_page_asset
properties:
description: Custom 500 error page
name: my_custom_error_page
url: https://example.com/error.html
zoneId: zone_id
Create CustomPageAsset Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CustomPageAsset(name: string, args: CustomPageAssetArgs, opts?: CustomResourceOptions);@overload
def CustomPageAsset(resource_name: str,
args: CustomPageAssetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CustomPageAsset(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
url: Optional[str] = None,
account_id: Optional[str] = None,
zone_id: Optional[str] = None)func NewCustomPageAsset(ctx *Context, name string, args CustomPageAssetArgs, opts ...ResourceOption) (*CustomPageAsset, error)public CustomPageAsset(string name, CustomPageAssetArgs args, CustomResourceOptions? opts = null)
public CustomPageAsset(String name, CustomPageAssetArgs args)
public CustomPageAsset(String name, CustomPageAssetArgs args, CustomResourceOptions options)
type: cloudflare:CustomPageAsset
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CustomPageAssetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CustomPageAssetArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CustomPageAssetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomPageAssetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomPageAssetArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var customPageAssetResource = new Cloudflare.CustomPageAsset("customPageAssetResource", new()
{
Description = "string",
Name = "string",
Url = "string",
AccountId = "string",
ZoneId = "string",
});
example, err := cloudflare.NewCustomPageAsset(ctx, "customPageAssetResource", &cloudflare.CustomPageAssetArgs{
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Url: pulumi.String("string"),
AccountId: pulumi.String("string"),
ZoneId: pulumi.String("string"),
})
var customPageAssetResource = new CustomPageAsset("customPageAssetResource", CustomPageAssetArgs.builder()
.description("string")
.name("string")
.url("string")
.accountId("string")
.zoneId("string")
.build());
custom_page_asset_resource = cloudflare.CustomPageAsset("customPageAssetResource",
description="string",
name="string",
url="string",
account_id="string",
zone_id="string")
const customPageAssetResource = new cloudflare.CustomPageAsset("customPageAssetResource", {
description: "string",
name: "string",
url: "string",
accountId: "string",
zoneId: "string",
});
type: cloudflare:CustomPageAsset
properties:
accountId: string
description: string
name: string
url: string
zoneId: string
CustomPageAsset Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CustomPageAsset resource accepts the following input properties:
- Description string
- A short description of the custom asset.
- Name string
- The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
- Url string
- The URL where the asset content is fetched from.
- Account
Id string - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- Zone
Id string - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- Description string
- A short description of the custom asset.
- Name string
- The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
- Url string
- The URL where the asset content is fetched from.
- Account
Id string - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- Zone
Id string - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- description String
- A short description of the custom asset.
- name String
- The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
- url String
- The URL where the asset content is fetched from.
- account
Id String - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- zone
Id String - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- description string
- A short description of the custom asset.
- name string
- The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
- url string
- The URL where the asset content is fetched from.
- account
Id string - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- zone
Id string - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- description str
- A short description of the custom asset.
- name str
- The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
- 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.
- description String
- A short description of the custom asset.
- name String
- The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
- url String
- The URL where the asset content is fetched from.
- account
Id String - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- zone
Id String - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomPageAsset resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string - Size
Bytes int - The size of the asset content in bytes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string - Size
Bytes int - The size of the asset content in bytes.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String - size
Bytes Integer - The size of the asset content in bytes.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Updated string - size
Bytes number - The size of the asset content in bytes.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
updated str - size_
bytes int - The size of the asset content in bytes.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String - size
Bytes Number - The size of the asset content in bytes.
Look up Existing CustomPageAsset Resource
Get an existing CustomPageAsset resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CustomPageAssetState, opts?: CustomResourceOptions): CustomPageAsset@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
description: Optional[str] = None,
last_updated: Optional[str] = None,
name: Optional[str] = None,
size_bytes: Optional[int] = None,
url: Optional[str] = None,
zone_id: Optional[str] = None) -> CustomPageAssetfunc GetCustomPageAsset(ctx *Context, name string, id IDInput, state *CustomPageAssetState, opts ...ResourceOption) (*CustomPageAsset, error)public static CustomPageAsset Get(string name, Input<string> id, CustomPageAssetState? state, CustomResourceOptions? opts = null)public static CustomPageAsset get(String name, Output<String> id, CustomPageAssetState state, CustomResourceOptions options)resources: _: type: cloudflare:CustomPageAsset get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Id string - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- Description string
- A short description of the custom asset.
- Last
Updated string - Name string
- 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 string
- The URL where the asset content is fetched from.
- Zone
Id string - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- Account
Id string - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- Description string
- A short description of the custom asset.
- Last
Updated string - Name string
- 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 string
- The URL where the asset content is fetched from.
- Zone
Id string - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- account
Id String - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- description String
- A short description of the custom asset.
- last
Updated String - name String
- The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
- size
Bytes Integer - The size of the asset content in bytes.
- url String
- The URL where the asset content is fetched from.
- zone
Id String - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- account
Id string - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- description string
- A short description of the custom asset.
- last
Updated string - name string
- The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
- size
Bytes number - The size of the asset content in bytes.
- url string
- The URL where the asset content is fetched from.
- zone
Id string - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- account_
id str - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- description str
- A short description of the custom asset.
- 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.
- zone_
id str - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- account
Id String - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- description String
- A short description of the custom asset.
- last
Updated String - name String
- The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).
- size
Bytes Number - The size of the asset content in bytes.
- url String
- The URL where the asset content is fetched from.
- zone
Id String - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
Import
$ pulumi import cloudflare:index/customPageAsset:CustomPageAsset example '<{accounts|zones}/{account_id|zone_id}>/<asset_name>'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflareTerraform Provider.
published on Saturday, May 2, 2026 by Pulumi
