1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. CustomPages
Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi

cloudflare.CustomPages

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const exampleCustomPages = new cloudflare.CustomPages("example_custom_pages", {
    identifier: "023e105f4ecef8ad9ca31a8372d0c353",
    state: "default",
    url: "http://www.example.com",
    zoneId: "zone_id",
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_custom_pages = cloudflare.CustomPages("example_custom_pages",
    identifier="023e105f4ecef8ad9ca31a8372d0c353",
    state="default",
    url="http://www.example.com",
    zone_id="zone_id")
Copy
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.NewCustomPages(ctx, "example_custom_pages", &cloudflare.CustomPagesArgs{
			Identifier: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
			State:      pulumi.String("default"),
			Url:        pulumi.String("http://www.example.com"),
			ZoneId:     pulumi.String("zone_id"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

return await Deployment.RunAsync(() => 
{
    var exampleCustomPages = new Cloudflare.CustomPages("example_custom_pages", new()
    {
        Identifier = "023e105f4ecef8ad9ca31a8372d0c353",
        State = "default",
        Url = "http://www.example.com",
        ZoneId = "zone_id",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.CustomPages;
import com.pulumi.cloudflare.CustomPagesArgs;
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 exampleCustomPages = new CustomPages("exampleCustomPages", CustomPagesArgs.builder()
            .identifier("023e105f4ecef8ad9ca31a8372d0c353")
            .state("default")
            .url("http://www.example.com")
            .zoneId("zone_id")
            .build());

    }
}
Copy
resources:
  exampleCustomPages:
    type: cloudflare:CustomPages
    name: example_custom_pages
    properties:
      identifier: 023e105f4ecef8ad9ca31a8372d0c353
      state: default
      url: http://www.example.com
      zoneId: zone_id
Copy

Create CustomPages Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new CustomPages(name: string, args: CustomPagesArgs, opts?: CustomResourceOptions);
@overload
def CustomPages(resource_name: str,
                args: CustomPagesArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def CustomPages(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                identifier: Optional[str] = None,
                state: Optional[str] = None,
                url: Optional[str] = None,
                account_id: Optional[str] = None,
                zone_id: Optional[str] = None)
func NewCustomPages(ctx *Context, name string, args CustomPagesArgs, opts ...ResourceOption) (*CustomPages, error)
public CustomPages(string name, CustomPagesArgs args, CustomResourceOptions? opts = null)
public CustomPages(String name, CustomPagesArgs args)
public CustomPages(String name, CustomPagesArgs args, CustomResourceOptions options)
type: cloudflare:CustomPages
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CustomPagesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CustomPagesArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CustomPagesArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CustomPagesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CustomPagesArgs
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 customPagesResource = new Cloudflare.CustomPages("customPagesResource", new()
{
    Identifier = "string",
    State = "string",
    Url = "string",
    AccountId = "string",
    ZoneId = "string",
});
Copy
example, err := cloudflare.NewCustomPages(ctx, "customPagesResource", &cloudflare.CustomPagesArgs{
	Identifier: pulumi.String("string"),
	State:      pulumi.String("string"),
	Url:        pulumi.String("string"),
	AccountId:  pulumi.String("string"),
	ZoneId:     pulumi.String("string"),
})
Copy
var customPagesResource = new CustomPages("customPagesResource", CustomPagesArgs.builder()
    .identifier("string")
    .state("string")
    .url("string")
    .accountId("string")
    .zoneId("string")
    .build());
Copy
custom_pages_resource = cloudflare.CustomPages("customPagesResource",
    identifier="string",
    state="string",
    url="string",
    account_id="string",
    zone_id="string")
Copy
const customPagesResource = new cloudflare.CustomPages("customPagesResource", {
    identifier: "string",
    state: "string",
    url: "string",
    accountId: "string",
    zoneId: "string",
});
Copy
type: cloudflare:CustomPages
properties:
    accountId: string
    identifier: string
    state: string
    url: string
    zoneId: string
Copy

CustomPages 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 CustomPages resource accepts the following input properties:

Identifier This property is required. string
Identifier
State This property is required. string
The custom page state. Available values: "default", "customized".
Url This property is required. 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.
Identifier This property is required. string
Identifier
State This property is required. string
The custom page state. Available values: "default", "customized".
Url This property is required. 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.
identifier This property is required. String
Identifier
state This property is required. String
The custom page state. Available values: "default", "customized".
url This property is required. 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.
identifier This property is required. string
Identifier
state This property is required. string
The custom page state. Available values: "default", "customized".
url This property is required. 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.
identifier This property is required. str
Identifier
state This property is required. str
The custom page state. Available values: "default", "customized".
url This property is required. 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.
identifier This property is required. String
Identifier
state This property is required. String
The custom page state. Available values: "default", "customized".
url This property is required. 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.

Outputs

All input properties are implicitly available as output properties. Additionally, the CustomPages resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing CustomPages Resource

Get an existing CustomPages 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?: CustomPagesState, opts?: CustomResourceOptions): CustomPages
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        identifier: Optional[str] = None,
        state: Optional[str] = None,
        url: Optional[str] = None,
        zone_id: Optional[str] = None) -> CustomPages
func GetCustomPages(ctx *Context, name string, id IDInput, state *CustomPagesState, opts ...ResourceOption) (*CustomPages, error)
public static CustomPages Get(string name, Input<string> id, CustomPagesState? state, CustomResourceOptions? opts = null)
public static CustomPages get(String name, Output<String> id, CustomPagesState state, CustomResourceOptions options)
resources:  _:    type: cloudflare:CustomPages    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
AccountId string
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
Identifier string
Identifier
State string
The custom page state. Available values: "default", "customized".
Url string
The URL associated with the custom page.
ZoneId string
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
AccountId string
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
Identifier string
Identifier
State string
The custom page state. Available values: "default", "customized".
Url string
The URL associated with the custom page.
ZoneId string
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
accountId String
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
identifier String
Identifier
state String
The custom page state. Available values: "default", "customized".
url String
The URL associated with the custom page.
zoneId String
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
accountId string
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
identifier string
Identifier
state string
The custom page state. Available values: "default", "customized".
url string
The URL associated with the custom page.
zoneId 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.
identifier str
Identifier
state str
The custom page state. Available values: "default", "customized".
url str
The URL associated with the custom page.
zone_id str
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
accountId String
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
identifier String
Identifier
state String
The custom page state. Available values: "default", "customized".
url String
The URL associated with the custom page.
zoneId String
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

Import

$ pulumi import cloudflare:index/customPages:CustomPages example '<{accounts|zones}/{account_id|zone_id}>/<identifier>'
Copy

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 cloudflare Terraform Provider.