api_op_UpdateHostedZoneComment.go (2913B)
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 // Updates the comment for a specified hosted zone. 13 func (c *Client) UpdateHostedZoneComment(ctx context.Context, params *UpdateHostedZoneCommentInput, optFns ...func(*Options)) (*UpdateHostedZoneCommentOutput, error) { 14 if params == nil { 15 params = &UpdateHostedZoneCommentInput{} 16 } 17 18 result, metadata, err := c.invokeOperation(ctx, "UpdateHostedZoneComment", params, optFns, c.addOperationUpdateHostedZoneCommentMiddlewares) 19 if err != nil { 20 return nil, err 21 } 22 23 out := result.(*UpdateHostedZoneCommentOutput) 24 out.ResultMetadata = metadata 25 return out, nil 26 } 27 28 // A request to update the comment for a hosted zone. 29 type UpdateHostedZoneCommentInput struct { 30 31 // The ID for the hosted zone that you want to update the comment for. 32 // 33 // This member is required. 34 Id *string 35 36 // The new comment for the hosted zone. If you don't specify a value for Comment , 37 // Amazon Route 53 deletes the existing value of the Comment element, if any. 38 Comment *string 39 40 noSmithyDocumentSerde 41 } 42 43 // A complex type that contains the response to the UpdateHostedZoneComment 44 // request. 45 type UpdateHostedZoneCommentOutput struct { 46 47 // A complex type that contains the response to the UpdateHostedZoneComment 48 // request. 49 // 50 // This member is required. 51 HostedZone *types.HostedZone 52 53 // Metadata pertaining to the operation's result. 54 ResultMetadata middleware.Metadata 55 56 noSmithyDocumentSerde 57 } 58 59 func (c *Client) addOperationUpdateHostedZoneCommentMiddlewares(stack *middleware.Stack, options Options) (err error) { 60 err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateHostedZoneComment{}, middleware.After) 61 if err != nil { 62 return err 63 } 64 err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateHostedZoneComment{}, middleware.After) 65 if err != nil { 66 return err 67 } 68 69 if err = addComputeContentLength(stack); err != nil { 70 return err 71 } 72 if err = addResolveEndpointMiddleware(stack, options); err != nil { 73 return err 74 } 75 if err = addComputePayloadSHA256(stack); err != nil { 76 return err 77 } 78 if err = addRecordResponseTiming(stack, options); err != nil { 79 return err 80 } 81 if err = addCredentialSource(stack, options); err != nil { 82 return err 83 } 84 if err = addOpUpdateHostedZoneCommentValidationMiddleware(stack); err != nil { 85 return err 86 } 87 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 88 return err 89 } 90 if err = addResponseErrorMiddleware(stack); err != nil { 91 return err 92 } 93 if err = addSanitizeURLMiddleware(stack); err != nil { 94 return err 95 } 96 if err = addRequestResponseLogging(stack, options); err != nil { 97 return err 98 } 99 if err = addDisableHTTPSMiddleware(stack, options); err != nil { 100 return err 101 } 102 if err = addInterceptors(stack, options); err != nil { 103 return err 104 } 105 return nil 106 }