1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package route53domains
4
5import (
6	"context"
7	awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
8	"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
9	"github.com/aws/aws-sdk-go-v2/service/route53domains/types"
10	"github.com/aws/smithy-go/middleware"
11	smithyhttp "github.com/aws/smithy-go/transport/http"
12	"time"
13)
14
15// This operation returns detailed information about a specified domain that is
16// associated with the current AWS account. Contact information for the domain is
17// also returned as part of the output.
18func (c *Client) GetDomainDetail(ctx context.Context, params *GetDomainDetailInput, optFns ...func(*Options)) (*GetDomainDetailOutput, error) {
19	if params == nil {
20		params = &GetDomainDetailInput{}
21	}
22
23	result, metadata, err := c.invokeOperation(ctx, "GetDomainDetail", params, optFns, addOperationGetDomainDetailMiddlewares)
24	if err != nil {
25		return nil, err
26	}
27
28	out := result.(*GetDomainDetailOutput)
29	out.ResultMetadata = metadata
30	return out, nil
31}
32
33// The GetDomainDetail request includes the following element.
34type GetDomainDetailInput struct {
35
36	// The name of the domain that you want to get detailed information about.
37	//
38	// This member is required.
39	DomainName *string
40}
41
42// The GetDomainDetail response includes the following elements.
43type GetDomainDetailOutput struct {
44
45	// Provides details about the domain administrative contact.
46	//
47	// This member is required.
48	AdminContact *types.ContactDetail
49
50	// The name of a domain.
51	//
52	// This member is required.
53	DomainName *string
54
55	// The name of the domain.
56	//
57	// This member is required.
58	Nameservers []types.Nameserver
59
60	// Provides details about the domain registrant.
61	//
62	// This member is required.
63	RegistrantContact *types.ContactDetail
64
65	// Provides details about the domain technical contact.
66	//
67	// This member is required.
68	TechContact *types.ContactDetail
69
70	// Email address to contact to report incorrect contact information for a domain,
71	// to report that the domain is being used to send spam, to report that someone is
72	// cybersquatting on a domain name, or report some other type of abuse.
73	AbuseContactEmail *string
74
75	// Phone number for reporting abuse.
76	AbuseContactPhone *string
77
78	// Specifies whether contact information is concealed from WHOIS queries. If the
79	// value is true, WHOIS ("who is") queries return contact information either for
80	// Amazon Registrar (for .com, .net, and .org domains) or for our registrar
81	// associate, Gandi (for all other TLDs). If the value is false, WHOIS queries
82	// return the information that you entered for the admin contact.
83	AdminPrivacy *bool
84
85	// Specifies whether the domain registration is set to renew automatically.
86	AutoRenew *bool
87
88	// The date when the domain was created as found in the response to a WHOIS query.
89	// The date and time is in Unix time format and Coordinated Universal time (UTC).
90	CreationDate *time.Time
91
92	// Reserved for future use.
93	DnsSec *string
94
95	// The date when the registration for the domain is set to expire. The date and
96	// time is in Unix time format and Coordinated Universal time (UTC).
97	ExpirationDate *time.Time
98
99	// Specifies whether contact information is concealed from WHOIS queries. If the
100	// value is true, WHOIS ("who is") queries return contact information either for
101	// Amazon Registrar (for .com, .net, and .org domains) or for our registrar
102	// associate, Gandi (for all other TLDs). If the value is false, WHOIS queries
103	// return the information that you entered for the registrant contact (domain
104	// owner).
105	RegistrantPrivacy *bool
106
107	// Name of the registrar of the domain as identified in the registry. Domains with
108	// a .com, .net, or .org TLD are registered by Amazon Registrar. All other domains
109	// are registered by our registrar associate, Gandi. The value for domains that are
110	// registered by Gandi is "GANDI SAS".
111	RegistrarName *string
112
113	// Web address of the registrar.
114	RegistrarUrl *string
115
116	// Reserved for future use.
117	RegistryDomainId *string
118
119	// Reseller of the domain. Domains registered or transferred using Route 53 domains
120	// will have "Amazon" as the reseller.
121	Reseller *string
122
123	// An array of domain name status codes, also known as Extensible Provisioning
124	// Protocol (EPP) status codes. ICANN, the organization that maintains a central
125	// database of domain names, has developed a set of domain name status codes that
126	// tell you the status of a variety of operations on a domain name, for example,
127	// registering a domain name, transferring a domain name to another registrar,
128	// renewing the registration for a domain name, and so on. All registrars use this
129	// same set of status codes. For a current list of domain name status codes and an
130	// explanation of what each code means, go to the ICANN website
131	// (https://www.icann.org/) and search for epp status codes. (Search on the ICANN
132	// website; web searches sometimes return an old version of the document.)
133	StatusList []string
134
135	// Specifies whether contact information is concealed from WHOIS queries. If the
136	// value is true, WHOIS ("who is") queries return contact information either for
137	// Amazon Registrar (for .com, .net, and .org domains) or for our registrar
138	// associate, Gandi (for all other TLDs). If the value is false, WHOIS queries
139	// return the information that you entered for the technical contact.
140	TechPrivacy *bool
141
142	// The last updated date of the domain as found in the response to a WHOIS query.
143	// The date and time is in Unix time format and Coordinated Universal time (UTC).
144	UpdatedDate *time.Time
145
146	// The fully qualified name of the WHOIS server that can answer the WHOIS query for
147	// the domain.
148	WhoIsServer *string
149
150	// Metadata pertaining to the operation's result.
151	ResultMetadata middleware.Metadata
152}
153
154func addOperationGetDomainDetailMiddlewares(stack *middleware.Stack, options Options) (err error) {
155	err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDomainDetail{}, middleware.After)
156	if err != nil {
157		return err
158	}
159	err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDomainDetail{}, middleware.After)
160	if err != nil {
161		return err
162	}
163	if err = addSetLoggerMiddleware(stack, options); err != nil {
164		return err
165	}
166	if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
167		return err
168	}
169	if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
170		return err
171	}
172	if err = addResolveEndpointMiddleware(stack, options); err != nil {
173		return err
174	}
175	if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
176		return err
177	}
178	if err = addRetryMiddlewares(stack, options); err != nil {
179		return err
180	}
181	if err = addHTTPSignerV4Middleware(stack, options); err != nil {
182		return err
183	}
184	if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
185		return err
186	}
187	if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
188		return err
189	}
190	if err = addClientUserAgent(stack); err != nil {
191		return err
192	}
193	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
194		return err
195	}
196	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
197		return err
198	}
199	if err = addOpGetDomainDetailValidationMiddleware(stack); err != nil {
200		return err
201	}
202	if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDomainDetail(options.Region), middleware.Before); err != nil {
203		return err
204	}
205	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
206		return err
207	}
208	if err = addResponseErrorMiddleware(stack); err != nil {
209		return err
210	}
211	if err = addRequestResponseLogging(stack, options); err != nil {
212		return err
213	}
214	return nil
215}
216
217func newServiceMetadataMiddleware_opGetDomainDetail(region string) *awsmiddleware.RegisterServiceMetadata {
218	return &awsmiddleware.RegisterServiceMetadata{
219		Region:        region,
220		ServiceID:     ServiceID,
221		SigningName:   "route53domains",
222		OperationName: "GetDomainDetail",
223	}
224}
225