api_op_GetHostedZone.go (3275B)
1 // Code generated by smithy-go-codegen DO NOT EDIT. 2 3 package route53 4 5 import ( 6 "context" 7 8 "github.com/aws/aws-sdk-go-v2/service/route53/types" 9 "github.com/aws/smithy-go/middleware" 10 ) 11 12 // Gets information about a specified hosted zone including the four name servers 13 // assigned to the hosted zone. 14 // 15 // returns the VPCs associated with the specified hosted zone and does not reflect 16 // the VPC associations by Route 53 Profiles. To get the associations to a Profile, 17 // call the [ListProfileAssociations]API. 18 // 19 // [ListProfileAssociations]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53profiles_ListProfileAssociations.html 20 func (c *Client) GetHostedZone(ctx context.Context, params *GetHostedZoneInput, optFns ...func(*Options)) (*GetHostedZoneOutput, error) { 21 if params == nil { 22 params = &GetHostedZoneInput{} 23 } 24 25 result, metadata, err := c.invokeOperation(ctx, "GetHostedZone", params, optFns, c.addOperationGetHostedZoneMiddlewares) 26 if err != nil { 27 return nil, err 28 } 29 30 out := result.(*GetHostedZoneOutput) 31 out.ResultMetadata = metadata 32 return out, nil 33 } 34 35 // A request to get information about a specified hosted zone. 36 type GetHostedZoneInput struct { 37 38 // The ID of the hosted zone that you want to get information about. 39 // 40 // This member is required. 41 Id *string 42 43 noSmithyDocumentSerde 44 } 45 46 // A complex type that contain the response to a GetHostedZone request. 47 type GetHostedZoneOutput struct { 48 49 // A complex type that contains general information about the specified hosted 50 // zone. 51 // 52 // This member is required. 53 HostedZone *types.HostedZone 54 55 // A complex type that lists the Amazon Route 53 name servers for the specified 56 // hosted zone. 57 DelegationSet *types.DelegationSet 58 59 // A complex type that contains information about the VPCs that are associated 60 // with the specified hosted zone. 61 VPCs []types.VPC 62 63 // Metadata pertaining to the operation's result. 64 ResultMetadata middleware.Metadata 65 66 noSmithyDocumentSerde 67 } 68 69 func (c *Client) addOperationGetHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) { 70 err = stack.Serialize.Add(&awsRestxml_serializeOpGetHostedZone{}, middleware.After) 71 if err != nil { 72 return err 73 } 74 err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHostedZone{}, middleware.After) 75 if err != nil { 76 return err 77 } 78 79 if err = addComputeContentLength(stack); err != nil { 80 return err 81 } 82 if err = addResolveEndpointMiddleware(stack, options); err != nil { 83 return err 84 } 85 if err = addComputePayloadSHA256(stack); err != nil { 86 return err 87 } 88 if err = addRecordResponseTiming(stack, options); err != nil { 89 return err 90 } 91 if err = addCredentialSource(stack, options); err != nil { 92 return err 93 } 94 if err = addOpGetHostedZoneValidationMiddleware(stack); err != nil { 95 return err 96 } 97 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 98 return err 99 } 100 if err = addResponseErrorMiddleware(stack); err != nil { 101 return err 102 } 103 if err = addSanitizeURLMiddleware(stack); err != nil { 104 return err 105 } 106 if err = addRequestResponseLogging(stack, options); err != nil { 107 return err 108 } 109 if err = addDisableHTTPSMiddleware(stack, options); err != nil { 110 return err 111 } 112 if err = addInterceptors(stack, options); err != nil { 113 return err 114 } 115 return nil 116 }