/
getDnsAuthorization.go
122 lines (101 loc) · 5.4 KB
/
getDnsAuthorization.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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets details of a single DnsAuthorization.
func LookupDnsAuthorization(ctx *pulumi.Context, args *LookupDnsAuthorizationArgs, opts ...pulumi.InvokeOption) (*LookupDnsAuthorizationResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDnsAuthorizationResult
err := ctx.Invoke("google-native:certificatemanager/v1:getDnsAuthorization", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupDnsAuthorizationArgs struct {
DnsAuthorizationId string `pulumi:"dnsAuthorizationId"`
Location string `pulumi:"location"`
Project *string `pulumi:"project"`
}
type LookupDnsAuthorizationResult struct {
// The creation timestamp of a DnsAuthorization.
CreateTime string `pulumi:"createTime"`
// One or more paragraphs of text description of a DnsAuthorization.
Description string `pulumi:"description"`
// DNS Resource Record that needs to be added to DNS configuration.
DnsResourceRecord DnsResourceRecordResponse `pulumi:"dnsResourceRecord"`
// Immutable. A domain that is being authorized. A DnsAuthorization resource covers a single domain and its wildcard, e.g. authorization for `example.com` can be used to issue certificates for `example.com` and `*.example.com`.
Domain string `pulumi:"domain"`
// Set of labels associated with a DnsAuthorization.
Labels map[string]string `pulumi:"labels"`
// A user-defined name of the dns authorization. DnsAuthorization names must be unique globally and match pattern `projects/*/locations/*/dnsAuthorizations/*`.
Name string `pulumi:"name"`
// The last update timestamp of a DnsAuthorization.
UpdateTime string `pulumi:"updateTime"`
}
func LookupDnsAuthorizationOutput(ctx *pulumi.Context, args LookupDnsAuthorizationOutputArgs, opts ...pulumi.InvokeOption) LookupDnsAuthorizationResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupDnsAuthorizationResult, error) {
args := v.(LookupDnsAuthorizationArgs)
r, err := LookupDnsAuthorization(ctx, &args, opts...)
var s LookupDnsAuthorizationResult
if r != nil {
s = *r
}
return s, err
}).(LookupDnsAuthorizationResultOutput)
}
type LookupDnsAuthorizationOutputArgs struct {
DnsAuthorizationId pulumi.StringInput `pulumi:"dnsAuthorizationId"`
Location pulumi.StringInput `pulumi:"location"`
Project pulumi.StringPtrInput `pulumi:"project"`
}
func (LookupDnsAuthorizationOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDnsAuthorizationArgs)(nil)).Elem()
}
type LookupDnsAuthorizationResultOutput struct{ *pulumi.OutputState }
func (LookupDnsAuthorizationResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDnsAuthorizationResult)(nil)).Elem()
}
func (o LookupDnsAuthorizationResultOutput) ToLookupDnsAuthorizationResultOutput() LookupDnsAuthorizationResultOutput {
return o
}
func (o LookupDnsAuthorizationResultOutput) ToLookupDnsAuthorizationResultOutputWithContext(ctx context.Context) LookupDnsAuthorizationResultOutput {
return o
}
// The creation timestamp of a DnsAuthorization.
func (o LookupDnsAuthorizationResultOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupDnsAuthorizationResult) string { return v.CreateTime }).(pulumi.StringOutput)
}
// One or more paragraphs of text description of a DnsAuthorization.
func (o LookupDnsAuthorizationResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupDnsAuthorizationResult) string { return v.Description }).(pulumi.StringOutput)
}
// DNS Resource Record that needs to be added to DNS configuration.
func (o LookupDnsAuthorizationResultOutput) DnsResourceRecord() DnsResourceRecordResponseOutput {
return o.ApplyT(func(v LookupDnsAuthorizationResult) DnsResourceRecordResponse { return v.DnsResourceRecord }).(DnsResourceRecordResponseOutput)
}
// Immutable. A domain that is being authorized. A DnsAuthorization resource covers a single domain and its wildcard, e.g. authorization for `example.com` can be used to issue certificates for `example.com` and `*.example.com`.
func (o LookupDnsAuthorizationResultOutput) Domain() pulumi.StringOutput {
return o.ApplyT(func(v LookupDnsAuthorizationResult) string { return v.Domain }).(pulumi.StringOutput)
}
// Set of labels associated with a DnsAuthorization.
func (o LookupDnsAuthorizationResultOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupDnsAuthorizationResult) map[string]string { return v.Labels }).(pulumi.StringMapOutput)
}
// A user-defined name of the dns authorization. DnsAuthorization names must be unique globally and match pattern `projects/*/locations/*/dnsAuthorizations/*`.
func (o LookupDnsAuthorizationResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDnsAuthorizationResult) string { return v.Name }).(pulumi.StringOutput)
}
// The last update timestamp of a DnsAuthorization.
func (o LookupDnsAuthorizationResultOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupDnsAuthorizationResult) string { return v.UpdateTime }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDnsAuthorizationResultOutput{})
}