api_op_UpdateTrafficPolicyComment.go (3026B)
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 traffic policy version. 13 func (c *Client) UpdateTrafficPolicyComment(ctx context.Context, params *UpdateTrafficPolicyCommentInput, optFns ...func(*Options)) (*UpdateTrafficPolicyCommentOutput, error) { 14 if params == nil { 15 params = &UpdateTrafficPolicyCommentInput{} 16 } 17 18 result, metadata, err := c.invokeOperation(ctx, "UpdateTrafficPolicyComment", params, optFns, c.addOperationUpdateTrafficPolicyCommentMiddlewares) 19 if err != nil { 20 return nil, err 21 } 22 23 out := result.(*UpdateTrafficPolicyCommentOutput) 24 out.ResultMetadata = metadata 25 return out, nil 26 } 27 28 // A complex type that contains information about the traffic policy that you want 29 // to update the comment for. 30 type UpdateTrafficPolicyCommentInput struct { 31 32 // The new comment for the specified traffic policy and version. 33 // 34 // This member is required. 35 Comment *string 36 37 // The value of Id for the traffic policy that you want to update the comment for. 38 // 39 // This member is required. 40 Id *string 41 42 // The value of Version for the traffic policy that you want to update the comment 43 // for. 44 // 45 // This member is required. 46 Version *int32 47 48 noSmithyDocumentSerde 49 } 50 51 // A complex type that contains the response information for the traffic policy. 52 type UpdateTrafficPolicyCommentOutput struct { 53 54 // A complex type that contains settings for the specified traffic policy. 55 // 56 // This member is required. 57 TrafficPolicy *types.TrafficPolicy 58 59 // Metadata pertaining to the operation's result. 60 ResultMetadata middleware.Metadata 61 62 noSmithyDocumentSerde 63 } 64 65 func (c *Client) addOperationUpdateTrafficPolicyCommentMiddlewares(stack *middleware.Stack, options Options) (err error) { 66 err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateTrafficPolicyComment{}, middleware.After) 67 if err != nil { 68 return err 69 } 70 err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateTrafficPolicyComment{}, middleware.After) 71 if err != nil { 72 return err 73 } 74 75 if err = addComputeContentLength(stack); err != nil { 76 return err 77 } 78 if err = addResolveEndpointMiddleware(stack, options); err != nil { 79 return err 80 } 81 if err = addComputePayloadSHA256(stack); err != nil { 82 return err 83 } 84 if err = addRecordResponseTiming(stack, options); err != nil { 85 return err 86 } 87 if err = addCredentialSource(stack, options); err != nil { 88 return err 89 } 90 if err = addOpUpdateTrafficPolicyCommentValidationMiddleware(stack); err != nil { 91 return err 92 } 93 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 94 return err 95 } 96 if err = addResponseErrorMiddleware(stack); err != nil { 97 return err 98 } 99 if err = addRequestResponseLogging(stack, options); err != nil { 100 return err 101 } 102 if err = addDisableHTTPSMiddleware(stack, options); err != nil { 103 return err 104 } 105 if err = addInterceptors(stack, options); err != nil { 106 return err 107 } 108 return nil 109 }