get Ptr Record
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.dns.getPtrRecord({
name: "test",
zoneName: "test-zone",
resourceGroupName: "test-rg",
});
export const dnsPtrRecordId = example.then(example => example.id);
Content copied to clipboard
import pulumi
import pulumi_azure as azure
example = azure.dns.get_ptr_record(name="test",
zone_name="test-zone",
resource_group_name="test-rg")
pulumi.export("dnsPtrRecordId", example.id)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Dns.GetPtrRecord.Invoke(new()
{
Name = "test",
ZoneName = "test-zone",
ResourceGroupName = "test-rg",
});
return new Dictionary<string, object?>
{
["dnsPtrRecordId"] = example.Apply(getPtrRecordResult => getPtrRecordResult.Id),
};
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := dns.LookupPtrRecord(ctx, &dns.LookupPtrRecordArgs{
Name: "test",
ZoneName: "test-zone",
ResourceGroupName: "test-rg",
}, nil)
if err != nil {
return err
}
ctx.Export("dnsPtrRecordId", example.Id)
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.dns.DnsFunctions;
import com.pulumi.azure.dns.inputs.GetPtrRecordArgs;
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 example = DnsFunctions.getPtrRecord(GetPtrRecordArgs.builder()
.name("test")
.zoneName("test-zone")
.resourceGroupName("test-rg")
.build());
ctx.export("dnsPtrRecordId", example.id());
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: azure:dns:getPtrRecord
arguments:
name: test
zoneName: test-zone
resourceGroupName: test-rg
outputs:
dnsPtrRecordId: ${example.id}
Content copied to clipboard
API Providers
This data source uses the following Azure API Providers:
Microsoft.Network
: 2018-05-01
Return
A collection of values returned by getPtrRecord.
Parameters
argument
A collection of arguments for invoking getPtrRecord.
suspend fun getPtrRecord(name: String, resourceGroupName: String, zoneName: String): GetPtrRecordResult
Return
A collection of values returned by getPtrRecord.
Parameters
name
The name of the DNS PTR Record.
resource Group Name
Specifies the resource group where the DNS Zone (parent resource) exists.
zone Name
Specifies the DNS Zone where the resource exists.
See also
suspend fun getPtrRecord(argument: suspend GetPtrRecordPlainArgsBuilder.() -> Unit): GetPtrRecordResult
Return
A collection of values returned by getPtrRecord.
Parameters
argument
Builder for com.pulumi.azure.dns.kotlin.inputs.GetPtrRecordPlainArgs.