1. Packages
  2. OVH
  3. API Docs
  4. getDomainZoneRecord
OVHCloud v2.9.0 published on Friday, Nov 7, 2025 by OVHcloud
ovh logo
OVHCloud v2.9.0 published on Friday, Nov 7, 2025 by OVHcloud

    Get record object properties

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const record = ovh.getDomainZoneRecord({
        zoneName: "<zone_name>",
        id: "<record_id>",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    record = ovh.get_domain_zone_record(zone_name="<zone_name>",
        id="<record_id>")
    
    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.GetDomainZoneRecord(ctx, &ovh.GetDomainZoneRecordArgs{
    			ZoneName: "<zone_name>",
    			Id:       "<record_id>",
    		}, nil)
    		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 record = Ovh.GetDomainZoneRecord.Invoke(new()
        {
            ZoneName = "<zone_name>",
            Id = "<record_id>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.OvhFunctions;
    import com.pulumi.ovh.inputs.GetDomainZoneRecordArgs;
    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) {
            final var record = OvhFunctions.getDomainZoneRecord(GetDomainZoneRecordArgs.builder()
                .zoneName("<zone_name>")
                .id("<record_id>")
                .build());
    
        }
    }
    
    variables:
      record:
        fn::invoke:
          function: ovh:getDomainZoneRecord
          arguments:
            zoneName: <zone_name>
            id: <record_id>
    

    Using getDomainZoneRecord

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getDomainZoneRecord(args: GetDomainZoneRecordArgs, opts?: InvokeOptions): Promise<GetDomainZoneRecordResult>
    function getDomainZoneRecordOutput(args: GetDomainZoneRecordOutputArgs, opts?: InvokeOptions): Output<GetDomainZoneRecordResult>
    def get_domain_zone_record(id: Optional[float] = None,
                               zone_name: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetDomainZoneRecordResult
    def get_domain_zone_record_output(id: Optional[pulumi.Input[float]] = None,
                               zone_name: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetDomainZoneRecordResult]
    func GetDomainZoneRecord(ctx *Context, args *GetDomainZoneRecordArgs, opts ...InvokeOption) (*GetDomainZoneRecordResult, error)
    func GetDomainZoneRecordOutput(ctx *Context, args *GetDomainZoneRecordOutputArgs, opts ...InvokeOption) GetDomainZoneRecordResultOutput

    > Note: This function is named GetDomainZoneRecord in the Go SDK.

    public static class GetDomainZoneRecord 
    {
        public static Task<GetDomainZoneRecordResult> InvokeAsync(GetDomainZoneRecordArgs args, InvokeOptions? opts = null)
        public static Output<GetDomainZoneRecordResult> Invoke(GetDomainZoneRecordInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDomainZoneRecordResult> getDomainZoneRecord(GetDomainZoneRecordArgs args, InvokeOptions options)
    public static Output<GetDomainZoneRecordResult> getDomainZoneRecord(GetDomainZoneRecordArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:index/getDomainZoneRecord:getDomainZoneRecord
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id double
    Record ID
    ZoneName string
    Zone name
    Id float64
    Record ID
    ZoneName string
    Zone name
    id Double
    Record ID
    zoneName String
    Zone name
    id number
    Record ID
    zoneName string
    Zone name
    id float
    Record ID
    zone_name str
    Zone name
    id Number
    Record ID
    zoneName String
    Zone name

    getDomainZoneRecord Result

    The following output properties are available:

    FieldType string
    Field type
    Id double
    Record ID
    SubDomain string
    Record subDomain
    Target string
    Target of the record
    Ttl double
    TTL of the record
    Zone string
    Resource record zone
    ZoneName string
    Zone name
    FieldType string
    Field type
    Id float64
    Record ID
    SubDomain string
    Record subDomain
    Target string
    Target of the record
    Ttl float64
    TTL of the record
    Zone string
    Resource record zone
    ZoneName string
    Zone name
    fieldType String
    Field type
    id Double
    Record ID
    subDomain String
    Record subDomain
    target String
    Target of the record
    ttl Double
    TTL of the record
    zone String
    Resource record zone
    zoneName String
    Zone name
    fieldType string
    Field type
    id number
    Record ID
    subDomain string
    Record subDomain
    target string
    Target of the record
    ttl number
    TTL of the record
    zone string
    Resource record zone
    zoneName string
    Zone name
    field_type str
    Field type
    id float
    Record ID
    sub_domain str
    Record subDomain
    target str
    Target of the record
    ttl float
    TTL of the record
    zone str
    Resource record zone
    zone_name str
    Zone name
    fieldType String
    Field type
    id Number
    Record ID
    subDomain String
    Record subDomain
    target String
    Target of the record
    ttl Number
    TTL of the record
    zone String
    Resource 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.9.0 published on Friday, Nov 7, 2025 by OVHcloud
      Meet Neo: Your AI Platform Teammate