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

cloudflare.RegionalHostname

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 exampleRegionalHostname = new cloudflare.RegionalHostname("example_regional_hostname", {
        zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
        hostname: "foo.example.com",
        regionKey: "ca",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_regional_hostname = cloudflare.RegionalHostname("example_regional_hostname",
        zone_id="023e105f4ecef8ad9ca31a8372d0c353",
        hostname="foo.example.com",
        region_key="ca")
    
    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.NewRegionalHostname(ctx, "example_regional_hostname", &cloudflare.RegionalHostnameArgs{
    			ZoneId:    pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
    			Hostname:  pulumi.String("foo.example.com"),
    			RegionKey: pulumi.String("ca"),
    		})
    		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 exampleRegionalHostname = new Cloudflare.RegionalHostname("example_regional_hostname", new()
        {
            ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
            Hostname = "foo.example.com",
            RegionKey = "ca",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.RegionalHostname;
    import com.pulumi.cloudflare.RegionalHostnameArgs;
    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 exampleRegionalHostname = new RegionalHostname("exampleRegionalHostname", RegionalHostnameArgs.builder()
                .zoneId("023e105f4ecef8ad9ca31a8372d0c353")
                .hostname("foo.example.com")
                .regionKey("ca")
                .build());
    
        }
    }
    
    resources:
      exampleRegionalHostname:
        type: cloudflare:RegionalHostname
        name: example_regional_hostname
        properties:
          zoneId: 023e105f4ecef8ad9ca31a8372d0c353
          hostname: foo.example.com
          regionKey: ca
    

    Create RegionalHostname Resource

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

    Constructor syntax

    new RegionalHostname(name: string, args: RegionalHostnameArgs, opts?: CustomResourceOptions);
    @overload
    def RegionalHostname(resource_name: str,
                         args: RegionalHostnameArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def RegionalHostname(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         hostname: Optional[str] = None,
                         region_key: Optional[str] = None,
                         zone_id: Optional[str] = None)
    func NewRegionalHostname(ctx *Context, name string, args RegionalHostnameArgs, opts ...ResourceOption) (*RegionalHostname, error)
    public RegionalHostname(string name, RegionalHostnameArgs args, CustomResourceOptions? opts = null)
    public RegionalHostname(String name, RegionalHostnameArgs args)
    public RegionalHostname(String name, RegionalHostnameArgs args, CustomResourceOptions options)
    
    type: cloudflare:RegionalHostname
    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 RegionalHostnameArgs
    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 RegionalHostnameArgs
    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 RegionalHostnameArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RegionalHostnameArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RegionalHostnameArgs
    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 regionalHostnameResource = new Cloudflare.RegionalHostname("regionalHostnameResource", new()
    {
        Hostname = "string",
        RegionKey = "string",
        ZoneId = "string",
    });
    
    example, err := cloudflare.NewRegionalHostname(ctx, "regionalHostnameResource", &cloudflare.RegionalHostnameArgs{
    	Hostname:  pulumi.String("string"),
    	RegionKey: pulumi.String("string"),
    	ZoneId:    pulumi.String("string"),
    })
    
    var regionalHostnameResource = new RegionalHostname("regionalHostnameResource", RegionalHostnameArgs.builder()
        .hostname("string")
        .regionKey("string")
        .zoneId("string")
        .build());
    
    regional_hostname_resource = cloudflare.RegionalHostname("regionalHostnameResource",
        hostname="string",
        region_key="string",
        zone_id="string")
    
    const regionalHostnameResource = new cloudflare.RegionalHostname("regionalHostnameResource", {
        hostname: "string",
        regionKey: "string",
        zoneId: "string",
    });
    
    type: cloudflare:RegionalHostname
    properties:
        hostname: string
        regionKey: string
        zoneId: string
    

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

    Hostname string
    DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
    RegionKey string
    Identifying key for the region
    ZoneId string
    Identifier
    Hostname string
    DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
    RegionKey string
    Identifying key for the region
    ZoneId string
    Identifier
    hostname String
    DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
    regionKey String
    Identifying key for the region
    zoneId String
    Identifier
    hostname string
    DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
    regionKey string
    Identifying key for the region
    zoneId string
    Identifier
    hostname str
    DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
    region_key str
    Identifying key for the region
    zone_id str
    Identifier
    hostname String
    DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
    regionKey String
    Identifying key for the region
    zoneId String
    Identifier

    Outputs

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

    CreatedOn string
    When the regional hostname was created
    Id string
    The provider-assigned unique ID for this managed resource.
    CreatedOn string
    When the regional hostname was created
    Id string
    The provider-assigned unique ID for this managed resource.
    createdOn String
    When the regional hostname was created
    id String
    The provider-assigned unique ID for this managed resource.
    createdOn string
    When the regional hostname was created
    id string
    The provider-assigned unique ID for this managed resource.
    created_on str
    When the regional hostname was created
    id str
    The provider-assigned unique ID for this managed resource.
    createdOn String
    When the regional hostname was created
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RegionalHostname Resource

    Get an existing RegionalHostname 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?: RegionalHostnameState, opts?: CustomResourceOptions): RegionalHostname
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_on: Optional[str] = None,
            hostname: Optional[str] = None,
            region_key: Optional[str] = None,
            zone_id: Optional[str] = None) -> RegionalHostname
    func GetRegionalHostname(ctx *Context, name string, id IDInput, state *RegionalHostnameState, opts ...ResourceOption) (*RegionalHostname, error)
    public static RegionalHostname Get(string name, Input<string> id, RegionalHostnameState? state, CustomResourceOptions? opts = null)
    public static RegionalHostname get(String name, Output<String> id, RegionalHostnameState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:RegionalHostname    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:
    CreatedOn string
    When the regional hostname was created
    Hostname string
    DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
    RegionKey string
    Identifying key for the region
    ZoneId string
    Identifier
    CreatedOn string
    When the regional hostname was created
    Hostname string
    DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
    RegionKey string
    Identifying key for the region
    ZoneId string
    Identifier
    createdOn String
    When the regional hostname was created
    hostname String
    DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
    regionKey String
    Identifying key for the region
    zoneId String
    Identifier
    createdOn string
    When the regional hostname was created
    hostname string
    DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
    regionKey string
    Identifying key for the region
    zoneId string
    Identifier
    created_on str
    When the regional hostname was created
    hostname str
    DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
    region_key str
    Identifying key for the region
    zone_id str
    Identifier
    createdOn String
    When the regional hostname was created
    hostname String
    DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
    regionKey String
    Identifying key for the region
    zoneId String
    Identifier

    Import

    $ pulumi import cloudflare:index/regionalHostname:RegionalHostname example '<zone_id>/<hostname>'
    

    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