1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. ZoneHold
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.ZoneHold

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleZoneHold = new cloudflare.ZoneHold("example_zone_hold", {zoneId: "023e105f4ecef8ad9ca31a8372d0c353"});
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_zone_hold = cloudflare.ZoneHold("example_zone_hold", zone_id="023e105f4ecef8ad9ca31a8372d0c353")
    
    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.NewZoneHold(ctx, "example_zone_hold", &cloudflare.ZoneHoldArgs{
    			ZoneId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
    		})
    		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 exampleZoneHold = new Cloudflare.ZoneHold("example_zone_hold", new()
        {
            ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.ZoneHold;
    import com.pulumi.cloudflare.ZoneHoldArgs;
    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 exampleZoneHold = new ZoneHold("exampleZoneHold", ZoneHoldArgs.builder()
                .zoneId("023e105f4ecef8ad9ca31a8372d0c353")
                .build());
    
        }
    }
    
    resources:
      exampleZoneHold:
        type: cloudflare:ZoneHold
        name: example_zone_hold
        properties:
          zoneId: 023e105f4ecef8ad9ca31a8372d0c353
    

    Create ZoneHold Resource

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

    Constructor syntax

    new ZoneHold(name: string, args: ZoneHoldArgs, opts?: CustomResourceOptions);
    @overload
    def ZoneHold(resource_name: str,
                 args: ZoneHoldArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def ZoneHold(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 zone_id: Optional[str] = None,
                 hold_after: Optional[str] = None,
                 include_subdomains: Optional[bool] = None)
    func NewZoneHold(ctx *Context, name string, args ZoneHoldArgs, opts ...ResourceOption) (*ZoneHold, error)
    public ZoneHold(string name, ZoneHoldArgs args, CustomResourceOptions? opts = null)
    public ZoneHold(String name, ZoneHoldArgs args)
    public ZoneHold(String name, ZoneHoldArgs args, CustomResourceOptions options)
    
    type: cloudflare:ZoneHold
    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 ZoneHoldArgs
    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 ZoneHoldArgs
    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 ZoneHoldArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ZoneHoldArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ZoneHoldArgs
    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 zoneHoldResource = new Cloudflare.ZoneHold("zoneHoldResource", new()
    {
        ZoneId = "string",
        HoldAfter = "string",
        IncludeSubdomains = false,
    });
    
    example, err := cloudflare.NewZoneHold(ctx, "zoneHoldResource", &cloudflare.ZoneHoldArgs{
    	ZoneId:            pulumi.String("string"),
    	HoldAfter:         pulumi.String("string"),
    	IncludeSubdomains: pulumi.Bool(false),
    })
    
    var zoneHoldResource = new ZoneHold("zoneHoldResource", ZoneHoldArgs.builder()
        .zoneId("string")
        .holdAfter("string")
        .includeSubdomains(false)
        .build());
    
    zone_hold_resource = cloudflare.ZoneHold("zoneHoldResource",
        zone_id="string",
        hold_after="string",
        include_subdomains=False)
    
    const zoneHoldResource = new cloudflare.ZoneHold("zoneHoldResource", {
        zoneId: "string",
        holdAfter: "string",
        includeSubdomains: false,
    });
    
    type: cloudflare:ZoneHold
    properties:
        holdAfter: string
        includeSubdomains: false
        zoneId: string
    

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

    ZoneId string
    Identifier
    HoldAfter string
    If hold_after is provided and future-dated, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. A past-dated hold_after value will have no effect on an existing, enabled hold. Providing an empty string will set its value to the current time.
    IncludeSubdomains bool
    If true, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc.
    ZoneId string
    Identifier
    HoldAfter string
    If hold_after is provided and future-dated, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. A past-dated hold_after value will have no effect on an existing, enabled hold. Providing an empty string will set its value to the current time.
    IncludeSubdomains bool
    If true, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc.
    zoneId String
    Identifier
    holdAfter String
    If hold_after is provided and future-dated, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. A past-dated hold_after value will have no effect on an existing, enabled hold. Providing an empty string will set its value to the current time.
    includeSubdomains Boolean
    If true, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc.
    zoneId string
    Identifier
    holdAfter string
    If hold_after is provided and future-dated, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. A past-dated hold_after value will have no effect on an existing, enabled hold. Providing an empty string will set its value to the current time.
    includeSubdomains boolean
    If true, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc.
    zone_id str
    Identifier
    hold_after str
    If hold_after is provided and future-dated, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. A past-dated hold_after value will have no effect on an existing, enabled hold. Providing an empty string will set its value to the current time.
    include_subdomains bool
    If true, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc.
    zoneId String
    Identifier
    holdAfter String
    If hold_after is provided and future-dated, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. A past-dated hold_after value will have no effect on an existing, enabled hold. Providing an empty string will set its value to the current time.
    includeSubdomains Boolean
    If true, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc.

    Outputs

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

    Hold bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Hold bool
    Id string
    The provider-assigned unique ID for this managed resource.
    hold Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    hold boolean
    id string
    The provider-assigned unique ID for this managed resource.
    hold bool
    id str
    The provider-assigned unique ID for this managed resource.
    hold Boolean
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ZoneHold Resource

    Get an existing ZoneHold 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?: ZoneHoldState, opts?: CustomResourceOptions): ZoneHold
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            hold: Optional[bool] = None,
            hold_after: Optional[str] = None,
            include_subdomains: Optional[bool] = None,
            zone_id: Optional[str] = None) -> ZoneHold
    func GetZoneHold(ctx *Context, name string, id IDInput, state *ZoneHoldState, opts ...ResourceOption) (*ZoneHold, error)
    public static ZoneHold Get(string name, Input<string> id, ZoneHoldState? state, CustomResourceOptions? opts = null)
    public static ZoneHold get(String name, Output<String> id, ZoneHoldState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:ZoneHold    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.
    The following state arguments are supported:
    Hold bool
    HoldAfter string
    If hold_after is provided and future-dated, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. A past-dated hold_after value will have no effect on an existing, enabled hold. Providing an empty string will set its value to the current time.
    IncludeSubdomains bool
    If true, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc.
    ZoneId string
    Identifier
    Hold bool
    HoldAfter string
    If hold_after is provided and future-dated, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. A past-dated hold_after value will have no effect on an existing, enabled hold. Providing an empty string will set its value to the current time.
    IncludeSubdomains bool
    If true, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc.
    ZoneId string
    Identifier
    hold Boolean
    holdAfter String
    If hold_after is provided and future-dated, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. A past-dated hold_after value will have no effect on an existing, enabled hold. Providing an empty string will set its value to the current time.
    includeSubdomains Boolean
    If true, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc.
    zoneId String
    Identifier
    hold boolean
    holdAfter string
    If hold_after is provided and future-dated, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. A past-dated hold_after value will have no effect on an existing, enabled hold. Providing an empty string will set its value to the current time.
    includeSubdomains boolean
    If true, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc.
    zoneId string
    Identifier
    hold bool
    hold_after str
    If hold_after is provided and future-dated, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. A past-dated hold_after value will have no effect on an existing, enabled hold. Providing an empty string will set its value to the current time.
    include_subdomains bool
    If true, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc.
    zone_id str
    Identifier
    hold Boolean
    holdAfter String
    If hold_after is provided and future-dated, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. A past-dated hold_after value will have no effect on an existing, enabled hold. Providing an empty string will set its value to the current time.
    includeSubdomains Boolean
    If true, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc.
    zoneId String
    Identifier

    Import

    $ pulumi import cloudflare:index/zoneHold:ZoneHold example '<zone_id>'
    

    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.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi