1. Packages
  2. Cloudflare
  3. API Docs
  4. RegionalHostname
Cloudflare v5.33.1 published on Wednesday, Jun 26, 2024 by Pulumi

cloudflare.RegionalHostname

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.33.1 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides a Data Localization Suite Regional Hostname.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    // Regionalized hostname record resources are managed independently from the
    // Regionalized Hostname resources.
    const example = new cloudflare.Record("example", {
        zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
        name: "example.com",
        value: "192.0.2.1",
        type: "A",
        ttl: 3600,
    });
    // The cloudflare_regional_hostname resource may exist with or without its
    // corresponding record resource.
    const exampleRegionalHostname = new cloudflare.RegionalHostname("example", {
        zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
        hostname: "example.com",
        regionKey: "eu",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    # Regionalized hostname record resources are managed independently from the
    # Regionalized Hostname resources.
    example = cloudflare.Record("example",
        zone_id="0da42c8d2132a9ddaf714f9e7c920711",
        name="example.com",
        value="192.0.2.1",
        type="A",
        ttl=3600)
    # The cloudflare_regional_hostname resource may exist with or without its
    # corresponding record resource.
    example_regional_hostname = cloudflare.RegionalHostname("example",
        zone_id="0da42c8d2132a9ddaf714f9e7c920711",
        hostname="example.com",
        region_key="eu")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Regionalized hostname record resources are managed independently from the
    		// Regionalized Hostname resources.
    		_, err := cloudflare.NewRecord(ctx, "example", &cloudflare.RecordArgs{
    			ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
    			Name:   pulumi.String("example.com"),
    			Value:  pulumi.String("192.0.2.1"),
    			Type:   pulumi.String("A"),
    			Ttl:    pulumi.Int(3600),
    		})
    		if err != nil {
    			return err
    		}
    		// The cloudflare_regional_hostname resource may exist with or without its
    		// corresponding record resource.
    		_, err = cloudflare.NewRegionalHostname(ctx, "example", &cloudflare.RegionalHostnameArgs{
    			ZoneId:    pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
    			Hostname:  pulumi.String("example.com"),
    			RegionKey: pulumi.String("eu"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        // Regionalized hostname record resources are managed independently from the
        // Regionalized Hostname resources.
        var example = new Cloudflare.Record("example", new()
        {
            ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
            Name = "example.com",
            Value = "192.0.2.1",
            Type = "A",
            Ttl = 3600,
        });
    
        // The cloudflare_regional_hostname resource may exist with or without its
        // corresponding record resource.
        var exampleRegionalHostname = new Cloudflare.RegionalHostname("example", new()
        {
            ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
            Hostname = "example.com",
            RegionKey = "eu",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.Record;
    import com.pulumi.cloudflare.RecordArgs;
    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) {
            // Regionalized hostname record resources are managed independently from the
            // Regionalized Hostname resources.
            var example = new Record("example", RecordArgs.builder()
                .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
                .name("example.com")
                .value("192.0.2.1")
                .type("A")
                .ttl(3600)
                .build());
    
            // The cloudflare_regional_hostname resource may exist with or without its
            // corresponding record resource.
            var exampleRegionalHostname = new RegionalHostname("exampleRegionalHostname", RegionalHostnameArgs.builder()
                .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
                .hostname("example.com")
                .regionKey("eu")
                .build());
    
        }
    }
    
    resources:
      # Regionalized hostname record resources are managed independently from the
      # Regionalized Hostname resources.
      example:
        type: cloudflare:Record
        properties:
          zoneId: 0da42c8d2132a9ddaf714f9e7c920711
          name: example.com
          value: 192.0.2.1
          type: A
          ttl: 3600
      # The cloudflare_regional_hostname resource may exist with or without its
      # corresponding record resource.
      exampleRegionalHostname:
        type: cloudflare:RegionalHostname
        name: example
        properties:
          zoneId: 0da42c8d2132a9ddaf714f9e7c920711
          hostname: example.com
          regionKey: eu
    

    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

    The RegionalHostname resource accepts the following input properties:

    Hostname string
    The hostname to regionalize.
    RegionKey string
    The region key. See the full region list.
    ZoneId string
    The zone identifier to target for the resource.
    Hostname string
    The hostname to regionalize.
    RegionKey string
    The region key. See the full region list.
    ZoneId string
    The zone identifier to target for the resource.
    hostname String
    The hostname to regionalize.
    regionKey String
    The region key. See the full region list.
    zoneId String
    The zone identifier to target for the resource.
    hostname string
    The hostname to regionalize.
    regionKey string
    The region key. See the full region list.
    zoneId string
    The zone identifier to target for the resource.
    hostname str
    The hostname to regionalize.
    region_key str
    The region key. See the full region list.
    zone_id str
    The zone identifier to target for the resource.
    hostname String
    The hostname to regionalize.
    regionKey String
    The region key. See the full region list.
    zoneId String
    The zone identifier to target for the resource.

    Outputs

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

    CreatedOn string
    The RFC3339 timestamp of when the hostname was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreatedOn string
    The RFC3339 timestamp of when the hostname was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    createdOn String
    The RFC3339 timestamp of when the hostname was created.
    id String
    The provider-assigned unique ID for this managed resource.
    createdOn string
    The RFC3339 timestamp of when the hostname was created.
    id string
    The provider-assigned unique ID for this managed resource.
    created_on str
    The RFC3339 timestamp of when the hostname was created.
    id str
    The provider-assigned unique ID for this managed resource.
    createdOn String
    The RFC3339 timestamp of when the 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)
    Resource lookup is not supported in YAML
    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
    The RFC3339 timestamp of when the hostname was created.
    Hostname string
    The hostname to regionalize.
    RegionKey string
    The region key. See the full region list.
    ZoneId string
    The zone identifier to target for the resource.
    CreatedOn string
    The RFC3339 timestamp of when the hostname was created.
    Hostname string
    The hostname to regionalize.
    RegionKey string
    The region key. See the full region list.
    ZoneId string
    The zone identifier to target for the resource.
    createdOn String
    The RFC3339 timestamp of when the hostname was created.
    hostname String
    The hostname to regionalize.
    regionKey String
    The region key. See the full region list.
    zoneId String
    The zone identifier to target for the resource.
    createdOn string
    The RFC3339 timestamp of when the hostname was created.
    hostname string
    The hostname to regionalize.
    regionKey string
    The region key. See the full region list.
    zoneId string
    The zone identifier to target for the resource.
    created_on str
    The RFC3339 timestamp of when the hostname was created.
    hostname str
    The hostname to regionalize.
    region_key str
    The region key. See the full region list.
    zone_id str
    The zone identifier to target for the resource.
    createdOn String
    The RFC3339 timestamp of when the hostname was created.
    hostname String
    The hostname to regionalize.
    regionKey String
    The region key. See the full region list.
    zoneId String
    The zone identifier to target for the resource.

    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 v5.33.1 published on Wednesday, Jun 26, 2024 by Pulumi