/
getDomain.go
108 lines (103 loc) · 3.5 KB
/
getDomain.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
// *** 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 linode
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Provides information about a Linode domain.
//
// ## Example Usage
//
// The following example shows how one might use this data source to access information about a Linode domain.
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-linode/sdk/v2/go/linode"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// opt0 := "1234567"
// _, err := linode.LookupDomain(ctx, &linode.LookupDomainArgs{
// Id: &opt0,
// }, nil)
// if err != nil {
// return err
// }
// opt1 := "bar.example.com"
// _, err = linode.LookupDomain(ctx, &linode.LookupDomainArgs{
// Domain: &opt1,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ## Attributes
//
// The Linode Domain resource exports the following attributes:
//
// * `id` - The unique ID of this Domain.
//
// * `domain` - The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain
//
// * `type` - If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave)
//
// * `group` - The group this Domain belongs to.
//
// * `status` - Used to control whether this Domain is currently being rendered.
//
// * `description` - A description for this Domain.
//
// * `masterIps` - The IP addresses representing the master DNS for this Domain.
//
// * `axfrIps` - The list of IPs that may perform a zone transfer for this Domain.
//
// * `ttlSec` - 'Time to Live'-the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers.
//
// * `retrySec` - The interval, in seconds, at which a failed refresh should be retried.
//
// * `expireSec` - The amount of time in seconds that may pass before this Domain is no longer authoritative.
//
// * `refreshSec` - The amount of time in seconds before this Domain should be refreshed.
//
// * `soaEmail` - Start of Authority email address.
//
// * `tags` - An array of tags applied to this object.
func LookupDomain(ctx *pulumi.Context, args *LookupDomainArgs, opts ...pulumi.InvokeOption) (*LookupDomainResult, error) {
var rv LookupDomainResult
err := ctx.Invoke("linode:index/getDomain:getDomain", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDomain.
type LookupDomainArgs struct {
// The unique domain name of the Domain record to query.
Domain *string `pulumi:"domain"`
// The unique numeric ID of the Domain record to query.
Id *string `pulumi:"id"`
}
// A collection of values returned by getDomain.
type LookupDomainResult struct {
AxfrIps []string `pulumi:"axfrIps"`
Description string `pulumi:"description"`
Domain *string `pulumi:"domain"`
ExpireSec int `pulumi:"expireSec"`
Group string `pulumi:"group"`
Id *string `pulumi:"id"`
MasterIps []string `pulumi:"masterIps"`
RefreshSec int `pulumi:"refreshSec"`
RetrySec int `pulumi:"retrySec"`
SoaEmail string `pulumi:"soaEmail"`
Status string `pulumi:"status"`
Tags []string `pulumi:"tags"`
TtlSec int `pulumi:"ttlSec"`
Type string `pulumi:"type"`
}