-
Notifications
You must be signed in to change notification settings - Fork 50
/
getZone.go
70 lines (65 loc) · 2.19 KB
/
getZone.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package dns
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Use this data source to access information about an existing DNS Zone.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/dns"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// opt0 := "search-service"
// example, err := dns.LookupZone(ctx, &dns.LookupZoneArgs{
// Name: "search-eventhubns",
// ResourceGroupName: &opt0,
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("dnsZoneId", example.Id)
// return nil
// })
// }
// ```
func LookupZone(ctx *pulumi.Context, args *LookupZoneArgs, opts ...pulumi.InvokeOption) (*LookupZoneResult, error) {
var rv LookupZoneResult
err := ctx.Invoke("azure:dns/getZone:getZone", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getZone.
type LookupZoneArgs struct {
// The name of the DNS Zone.
Name string `pulumi:"name"`
// The Name of the Resource Group where the DNS Zone exists.
// If the Name of the Resource Group is not provided, the first DNS Zone from the list of DNS Zones
// in your subscription that matches `name` will be returned.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getZone.
type LookupZoneResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Maximum number of Records in the zone.
MaxNumberOfRecordSets int `pulumi:"maxNumberOfRecordSets"`
Name string `pulumi:"name"`
// A list of values that make up the NS record for the zone.
NameServers []string `pulumi:"nameServers"`
// The number of records already in the zone.
NumberOfRecordSets int `pulumi:"numberOfRecordSets"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the EventHub Namespace.
Tags map[string]string `pulumi:"tags"`
}