/
getSoaRecord.go
205 lines (177 loc) · 7.13 KB
/
getSoaRecord.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := dns.GetSoaRecord(ctx, &dns.GetSoaRecordArgs{
// ZoneName: "test-zone",
// ResourceGroupName: "test-rg",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("dnsSoaRecordId", example.Id)
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
func GetSoaRecord(ctx *pulumi.Context, args *GetSoaRecordArgs, opts ...pulumi.InvokeOption) (*GetSoaRecordResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetSoaRecordResult
err := ctx.Invoke("azure:dns/getSoaRecord:getSoaRecord", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSoaRecord.
type GetSoaRecordArgs struct {
// The name of the DNS SOA Record.
Name *string `pulumi:"name"`
// Specifies the resource group where the DNS Zone (parent resource) exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the DNS Zone where the resource exists.
ZoneName string `pulumi:"zoneName"`
}
// A collection of values returned by getSoaRecord.
type GetSoaRecordResult struct {
// The email contact for the SOA record.
Email string `pulumi:"email"`
// The expire time for the SOA record.
ExpireTime int `pulumi:"expireTime"`
// The FQDN of the DNS SOA Record.
Fqdn string `pulumi:"fqdn"`
// The domain name of the authoritative name server for the SOA record.
HostName string `pulumi:"hostName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration.
MinimumTtl int `pulumi:"minimumTtl"`
// The name of the DNS SOA Record.
Name *string `pulumi:"name"`
// The refresh time for the SOA record.
RefreshTime int `pulumi:"refreshTime"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The retry time for the SOA record.
RetryTime int `pulumi:"retryTime"`
// The serial number for the SOA record.
SerialNumber int `pulumi:"serialNumber"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl int `pulumi:"ttl"`
ZoneName string `pulumi:"zoneName"`
}
func GetSoaRecordOutput(ctx *pulumi.Context, args GetSoaRecordOutputArgs, opts ...pulumi.InvokeOption) GetSoaRecordResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetSoaRecordResult, error) {
args := v.(GetSoaRecordArgs)
r, err := GetSoaRecord(ctx, &args, opts...)
var s GetSoaRecordResult
if r != nil {
s = *r
}
return s, err
}).(GetSoaRecordResultOutput)
}
// A collection of arguments for invoking getSoaRecord.
type GetSoaRecordOutputArgs struct {
// The name of the DNS SOA Record.
Name pulumi.StringPtrInput `pulumi:"name"`
// Specifies the resource group where the DNS Zone (parent resource) exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// Specifies the DNS Zone where the resource exists.
ZoneName pulumi.StringInput `pulumi:"zoneName"`
}
func (GetSoaRecordOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetSoaRecordArgs)(nil)).Elem()
}
// A collection of values returned by getSoaRecord.
type GetSoaRecordResultOutput struct{ *pulumi.OutputState }
func (GetSoaRecordResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetSoaRecordResult)(nil)).Elem()
}
func (o GetSoaRecordResultOutput) ToGetSoaRecordResultOutput() GetSoaRecordResultOutput {
return o
}
func (o GetSoaRecordResultOutput) ToGetSoaRecordResultOutputWithContext(ctx context.Context) GetSoaRecordResultOutput {
return o
}
// The email contact for the SOA record.
func (o GetSoaRecordResultOutput) Email() pulumi.StringOutput {
return o.ApplyT(func(v GetSoaRecordResult) string { return v.Email }).(pulumi.StringOutput)
}
// The expire time for the SOA record.
func (o GetSoaRecordResultOutput) ExpireTime() pulumi.IntOutput {
return o.ApplyT(func(v GetSoaRecordResult) int { return v.ExpireTime }).(pulumi.IntOutput)
}
// The FQDN of the DNS SOA Record.
func (o GetSoaRecordResultOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v GetSoaRecordResult) string { return v.Fqdn }).(pulumi.StringOutput)
}
// The domain name of the authoritative name server for the SOA record.
func (o GetSoaRecordResultOutput) HostName() pulumi.StringOutput {
return o.ApplyT(func(v GetSoaRecordResult) string { return v.HostName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetSoaRecordResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetSoaRecordResult) string { return v.Id }).(pulumi.StringOutput)
}
// The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration.
func (o GetSoaRecordResultOutput) MinimumTtl() pulumi.IntOutput {
return o.ApplyT(func(v GetSoaRecordResult) int { return v.MinimumTtl }).(pulumi.IntOutput)
}
// The name of the DNS SOA Record.
func (o GetSoaRecordResultOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSoaRecordResult) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// The refresh time for the SOA record.
func (o GetSoaRecordResultOutput) RefreshTime() pulumi.IntOutput {
return o.ApplyT(func(v GetSoaRecordResult) int { return v.RefreshTime }).(pulumi.IntOutput)
}
func (o GetSoaRecordResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetSoaRecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The retry time for the SOA record.
func (o GetSoaRecordResultOutput) RetryTime() pulumi.IntOutput {
return o.ApplyT(func(v GetSoaRecordResult) int { return v.RetryTime }).(pulumi.IntOutput)
}
// The serial number for the SOA record.
func (o GetSoaRecordResultOutput) SerialNumber() pulumi.IntOutput {
return o.ApplyT(func(v GetSoaRecordResult) int { return v.SerialNumber }).(pulumi.IntOutput)
}
// A mapping of tags assigned to the resource.
func (o GetSoaRecordResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v GetSoaRecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The Time To Live (TTL) of the DNS record in seconds.
func (o GetSoaRecordResultOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v GetSoaRecordResult) int { return v.Ttl }).(pulumi.IntOutput)
}
func (o GetSoaRecordResultOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v GetSoaRecordResult) string { return v.ZoneName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetSoaRecordResultOutput{})
}