1. Packages
  2. OVH
  3. API Docs
  4. DomainZoneDynhostRecord
OVHCloud v2.7.3 published on Thursday, Aug 28, 2025 by OVHcloud

ovh.DomainZoneDynhostRecord

Explore with Pulumi AI

ovh logo
OVHCloud v2.7.3 published on Thursday, Aug 28, 2025 by OVHcloud

    Create a dynhost record for a given domain zone.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const dynhostRecord = new ovh.DomainZoneDynhostRecord("dynhost_record", {
        zoneName: "mydomain.ovh",
        subDomain: "dynhost",
        ip: "1.2.3.4",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    dynhost_record = ovh.DomainZoneDynhostRecord("dynhost_record",
        zone_name="mydomain.ovh",
        sub_domain="dynhost",
        ip="1.2.3.4")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ovh.NewDomainZoneDynhostRecord(ctx, "dynhost_record", &ovh.DomainZoneDynhostRecordArgs{
    			ZoneName:  pulumi.String("mydomain.ovh"),
    			SubDomain: pulumi.String("dynhost"),
    			Ip:        pulumi.String("1.2.3.4"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var dynhostRecord = new Ovh.DomainZoneDynhostRecord("dynhost_record", new()
        {
            ZoneName = "mydomain.ovh",
            SubDomain = "dynhost",
            Ip = "1.2.3.4",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.ovhcloud.pulumi.ovh.DomainZoneDynhostRecord;
    import com.ovhcloud.pulumi.ovh.DomainZoneDynhostRecordArgs;
    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 dynhostRecord = new DomainZoneDynhostRecord("dynhostRecord", DomainZoneDynhostRecordArgs.builder()
                .zoneName("mydomain.ovh")
                .subDomain("dynhost")
                .ip("1.2.3.4")
                .build());
    
        }
    }
    
    resources:
      dynhostRecord:
        type: ovh:DomainZoneDynhostRecord
        name: dynhost_record
        properties:
          zoneName: mydomain.ovh
          subDomain: dynhost
          ip: 1.2.3.4
    

    Create DomainZoneDynhostRecord Resource

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

    Constructor syntax

    new DomainZoneDynhostRecord(name: string, args: DomainZoneDynhostRecordArgs, opts?: CustomResourceOptions);
    @overload
    def DomainZoneDynhostRecord(resource_name: str,
                                args: DomainZoneDynhostRecordArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def DomainZoneDynhostRecord(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                zone_name: Optional[str] = None,
                                ip: Optional[str] = None,
                                sub_domain: Optional[str] = None)
    func NewDomainZoneDynhostRecord(ctx *Context, name string, args DomainZoneDynhostRecordArgs, opts ...ResourceOption) (*DomainZoneDynhostRecord, error)
    public DomainZoneDynhostRecord(string name, DomainZoneDynhostRecordArgs args, CustomResourceOptions? opts = null)
    public DomainZoneDynhostRecord(String name, DomainZoneDynhostRecordArgs args)
    public DomainZoneDynhostRecord(String name, DomainZoneDynhostRecordArgs args, CustomResourceOptions options)
    
    type: ovh:DomainZoneDynhostRecord
    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 DomainZoneDynhostRecordArgs
    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 DomainZoneDynhostRecordArgs
    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 DomainZoneDynhostRecordArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DomainZoneDynhostRecordArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DomainZoneDynhostRecordArgs
    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 domainZoneDynhostRecordResource = new Ovh.DomainZoneDynhostRecord("domainZoneDynhostRecordResource", new()
    {
        ZoneName = "string",
        Ip = "string",
        SubDomain = "string",
    });
    
    example, err := ovh.NewDomainZoneDynhostRecord(ctx, "domainZoneDynhostRecordResource", &ovh.DomainZoneDynhostRecordArgs{
    	ZoneName:  pulumi.String("string"),
    	Ip:        pulumi.String("string"),
    	SubDomain: pulumi.String("string"),
    })
    
    var domainZoneDynhostRecordResource = new DomainZoneDynhostRecord("domainZoneDynhostRecordResource", DomainZoneDynhostRecordArgs.builder()
        .zoneName("string")
        .ip("string")
        .subDomain("string")
        .build());
    
    domain_zone_dynhost_record_resource = ovh.DomainZoneDynhostRecord("domainZoneDynhostRecordResource",
        zone_name="string",
        ip="string",
        sub_domain="string")
    
    const domainZoneDynhostRecordResource = new ovh.DomainZoneDynhostRecord("domainZoneDynhostRecordResource", {
        zoneName: "string",
        ip: "string",
        subDomain: "string",
    });
    
    type: ovh:DomainZoneDynhostRecord
    properties:
        ip: string
        subDomain: string
        zoneName: string
    

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

    ZoneName string
    Zone name
    Ip string
    Record IP
    SubDomain string
    Record sub-domain
    ZoneName string
    Zone name
    Ip string
    Record IP
    SubDomain string
    Record sub-domain
    zoneName String
    Zone name
    ip String
    Record IP
    subDomain String
    Record sub-domain
    zoneName string
    Zone name
    ip string
    Record IP
    subDomain string
    Record sub-domain
    zone_name str
    Zone name
    ip str
    Record IP
    sub_domain str
    Record sub-domain
    zoneName String
    Zone name
    ip String
    Record IP
    subDomain String
    Record sub-domain

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Ttl double
    Record TTL (Time to Live)
    Zone string
    Record zone
    Id string
    The provider-assigned unique ID for this managed resource.
    Ttl float64
    Record TTL (Time to Live)
    Zone string
    Record zone
    id String
    The provider-assigned unique ID for this managed resource.
    ttl Double
    Record TTL (Time to Live)
    zone String
    Record zone
    id string
    The provider-assigned unique ID for this managed resource.
    ttl number
    Record TTL (Time to Live)
    zone string
    Record zone
    id str
    The provider-assigned unique ID for this managed resource.
    ttl float
    Record TTL (Time to Live)
    zone str
    Record zone
    id String
    The provider-assigned unique ID for this managed resource.
    ttl Number
    Record TTL (Time to Live)
    zone String
    Record zone

    Look up Existing DomainZoneDynhostRecord Resource

    Get an existing DomainZoneDynhostRecord 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?: DomainZoneDynhostRecordState, opts?: CustomResourceOptions): DomainZoneDynhostRecord
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ip: Optional[str] = None,
            sub_domain: Optional[str] = None,
            ttl: Optional[float] = None,
            zone: Optional[str] = None,
            zone_name: Optional[str] = None) -> DomainZoneDynhostRecord
    func GetDomainZoneDynhostRecord(ctx *Context, name string, id IDInput, state *DomainZoneDynhostRecordState, opts ...ResourceOption) (*DomainZoneDynhostRecord, error)
    public static DomainZoneDynhostRecord Get(string name, Input<string> id, DomainZoneDynhostRecordState? state, CustomResourceOptions? opts = null)
    public static DomainZoneDynhostRecord get(String name, Output<String> id, DomainZoneDynhostRecordState state, CustomResourceOptions options)
    resources:  _:    type: ovh:DomainZoneDynhostRecord    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:
    Ip string
    Record IP
    SubDomain string
    Record sub-domain
    Ttl double
    Record TTL (Time to Live)
    Zone string
    Record zone
    ZoneName string
    Zone name
    Ip string
    Record IP
    SubDomain string
    Record sub-domain
    Ttl float64
    Record TTL (Time to Live)
    Zone string
    Record zone
    ZoneName string
    Zone name
    ip String
    Record IP
    subDomain String
    Record sub-domain
    ttl Double
    Record TTL (Time to Live)
    zone String
    Record zone
    zoneName String
    Zone name
    ip string
    Record IP
    subDomain string
    Record sub-domain
    ttl number
    Record TTL (Time to Live)
    zone string
    Record zone
    zoneName string
    Zone name
    ip str
    Record IP
    sub_domain str
    Record sub-domain
    ttl float
    Record TTL (Time to Live)
    zone str
    Record zone
    zone_name str
    Zone name
    ip String
    Record IP
    subDomain String
    Record sub-domain
    ttl Number
    Record TTL (Time to Live)
    zone String
    Record zone
    zoneName String
    Zone name

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v2.7.3 published on Thursday, Aug 28, 2025 by OVHcloud