/
getRegistration.go
175 lines (147 loc) · 10 KB
/
getRegistration.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
// 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 the details of a `Registration` resource.
func LookupRegistration(ctx *pulumi.Context, args *LookupRegistrationArgs, opts ...pulumi.InvokeOption) (*LookupRegistrationResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupRegistrationResult
err := ctx.Invoke("google-native:domains/v1:getRegistration", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupRegistrationArgs struct {
Location string `pulumi:"location"`
Project *string `pulumi:"project"`
RegistrationId string `pulumi:"registrationId"`
}
type LookupRegistrationResult struct {
// Settings for contact information linked to the `Registration`. You cannot update these with the `UpdateRegistration` method. To update these settings, use the `ConfigureContactSettings` method.
ContactSettings ContactSettingsResponse `pulumi:"contactSettings"`
// The creation timestamp of the `Registration` resource.
CreateTime string `pulumi:"createTime"`
// Settings controlling the DNS configuration of the `Registration`. You cannot update these with the `UpdateRegistration` method. To update these settings, use the `ConfigureDnsSettings` method.
DnsSettings DnsSettingsResponse `pulumi:"dnsSettings"`
// Immutable. The domain name. Unicode domain names must be expressed in Punycode format.
DomainName string `pulumi:"domainName"`
// The expiration timestamp of the `Registration`.
ExpireTime string `pulumi:"expireTime"`
// The set of issues with the `Registration` that require attention.
Issues []string `pulumi:"issues"`
// Set of labels associated with the `Registration`.
Labels map[string]string `pulumi:"labels"`
// Settings for management of the `Registration`, including renewal, billing, and transfer. You cannot update these with the `UpdateRegistration` method. To update these settings, use the `ConfigureManagementSettings` method.
ManagementSettings ManagementSettingsResponse `pulumi:"managementSettings"`
// Name of the `Registration` resource, in the format `projects/*/locations/*/registrations/`.
Name string `pulumi:"name"`
// Pending contact settings for the `Registration`. Updates to the `contact_settings` field that change its `registrant_contact` or `privacy` fields require email confirmation by the `registrant_contact` before taking effect. This field is set only if there are pending updates to the `contact_settings` that have not been confirmed. To confirm the changes, the `registrant_contact` must follow the instructions in the email they receive.
PendingContactSettings ContactSettingsResponse `pulumi:"pendingContactSettings"`
// The reason the domain registration failed. Only set for domains in REGISTRATION_FAILED state.
RegisterFailureReason string `pulumi:"registerFailureReason"`
// The state of the `Registration`
State string `pulumi:"state"`
// Set of options for the `contact_settings.privacy` field that this `Registration` supports.
SupportedPrivacy []string `pulumi:"supportedPrivacy"`
// Deprecated: For more information, see [Cloud Domains feature deprecation](https://cloud.google.com/domains/docs/deprecations/feature-deprecations) The reason the domain transfer failed. Only set for domains in TRANSFER_FAILED state.
//
// Deprecated: Output only. Deprecated: For more information, see [Cloud Domains feature deprecation](https://cloud.google.com/domains/docs/deprecations/feature-deprecations) The reason the domain transfer failed. Only set for domains in TRANSFER_FAILED state.
TransferFailureReason string `pulumi:"transferFailureReason"`
}
func LookupRegistrationOutput(ctx *pulumi.Context, args LookupRegistrationOutputArgs, opts ...pulumi.InvokeOption) LookupRegistrationResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupRegistrationResult, error) {
args := v.(LookupRegistrationArgs)
r, err := LookupRegistration(ctx, &args, opts...)
var s LookupRegistrationResult
if r != nil {
s = *r
}
return s, err
}).(LookupRegistrationResultOutput)
}
type LookupRegistrationOutputArgs struct {
Location pulumi.StringInput `pulumi:"location"`
Project pulumi.StringPtrInput `pulumi:"project"`
RegistrationId pulumi.StringInput `pulumi:"registrationId"`
}
func (LookupRegistrationOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupRegistrationArgs)(nil)).Elem()
}
type LookupRegistrationResultOutput struct{ *pulumi.OutputState }
func (LookupRegistrationResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupRegistrationResult)(nil)).Elem()
}
func (o LookupRegistrationResultOutput) ToLookupRegistrationResultOutput() LookupRegistrationResultOutput {
return o
}
func (o LookupRegistrationResultOutput) ToLookupRegistrationResultOutputWithContext(ctx context.Context) LookupRegistrationResultOutput {
return o
}
// Settings for contact information linked to the `Registration`. You cannot update these with the `UpdateRegistration` method. To update these settings, use the `ConfigureContactSettings` method.
func (o LookupRegistrationResultOutput) ContactSettings() ContactSettingsResponseOutput {
return o.ApplyT(func(v LookupRegistrationResult) ContactSettingsResponse { return v.ContactSettings }).(ContactSettingsResponseOutput)
}
// The creation timestamp of the `Registration` resource.
func (o LookupRegistrationResultOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupRegistrationResult) string { return v.CreateTime }).(pulumi.StringOutput)
}
// Settings controlling the DNS configuration of the `Registration`. You cannot update these with the `UpdateRegistration` method. To update these settings, use the `ConfigureDnsSettings` method.
func (o LookupRegistrationResultOutput) DnsSettings() DnsSettingsResponseOutput {
return o.ApplyT(func(v LookupRegistrationResult) DnsSettingsResponse { return v.DnsSettings }).(DnsSettingsResponseOutput)
}
// Immutable. The domain name. Unicode domain names must be expressed in Punycode format.
func (o LookupRegistrationResultOutput) DomainName() pulumi.StringOutput {
return o.ApplyT(func(v LookupRegistrationResult) string { return v.DomainName }).(pulumi.StringOutput)
}
// The expiration timestamp of the `Registration`.
func (o LookupRegistrationResultOutput) ExpireTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupRegistrationResult) string { return v.ExpireTime }).(pulumi.StringOutput)
}
// The set of issues with the `Registration` that require attention.
func (o LookupRegistrationResultOutput) Issues() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupRegistrationResult) []string { return v.Issues }).(pulumi.StringArrayOutput)
}
// Set of labels associated with the `Registration`.
func (o LookupRegistrationResultOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupRegistrationResult) map[string]string { return v.Labels }).(pulumi.StringMapOutput)
}
// Settings for management of the `Registration`, including renewal, billing, and transfer. You cannot update these with the `UpdateRegistration` method. To update these settings, use the `ConfigureManagementSettings` method.
func (o LookupRegistrationResultOutput) ManagementSettings() ManagementSettingsResponseOutput {
return o.ApplyT(func(v LookupRegistrationResult) ManagementSettingsResponse { return v.ManagementSettings }).(ManagementSettingsResponseOutput)
}
// Name of the `Registration` resource, in the format `projects/*/locations/*/registrations/`.
func (o LookupRegistrationResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupRegistrationResult) string { return v.Name }).(pulumi.StringOutput)
}
// Pending contact settings for the `Registration`. Updates to the `contact_settings` field that change its `registrant_contact` or `privacy` fields require email confirmation by the `registrant_contact` before taking effect. This field is set only if there are pending updates to the `contact_settings` that have not been confirmed. To confirm the changes, the `registrant_contact` must follow the instructions in the email they receive.
func (o LookupRegistrationResultOutput) PendingContactSettings() ContactSettingsResponseOutput {
return o.ApplyT(func(v LookupRegistrationResult) ContactSettingsResponse { return v.PendingContactSettings }).(ContactSettingsResponseOutput)
}
// The reason the domain registration failed. Only set for domains in REGISTRATION_FAILED state.
func (o LookupRegistrationResultOutput) RegisterFailureReason() pulumi.StringOutput {
return o.ApplyT(func(v LookupRegistrationResult) string { return v.RegisterFailureReason }).(pulumi.StringOutput)
}
// The state of the `Registration`
func (o LookupRegistrationResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupRegistrationResult) string { return v.State }).(pulumi.StringOutput)
}
// Set of options for the `contact_settings.privacy` field that this `Registration` supports.
func (o LookupRegistrationResultOutput) SupportedPrivacy() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupRegistrationResult) []string { return v.SupportedPrivacy }).(pulumi.StringArrayOutput)
}
// Deprecated: For more information, see [Cloud Domains feature deprecation](https://cloud.google.com/domains/docs/deprecations/feature-deprecations) The reason the domain transfer failed. Only set for domains in TRANSFER_FAILED state.
//
// Deprecated: Output only. Deprecated: For more information, see [Cloud Domains feature deprecation](https://cloud.google.com/domains/docs/deprecations/feature-deprecations) The reason the domain transfer failed. Only set for domains in TRANSFER_FAILED state.
func (o LookupRegistrationResultOutput) TransferFailureReason() pulumi.StringOutput {
return o.ApplyT(func(v LookupRegistrationResult) string { return v.TransferFailureReason }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupRegistrationResultOutput{})
}