api_op_DeleteQueryLoggingConfig.go (4089B)
1 // Code generated by smithy-go-codegen DO NOT EDIT. 2 3 package route53 4 5 import ( 6 "context" 7 "fmt" 8 awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" 9 "github.com/aws/smithy-go/middleware" 10 smithyhttp "github.com/aws/smithy-go/transport/http" 11 ) 12 13 // Deletes a configuration for DNS query logging. If you delete a configuration, 14 // Amazon Route 53 stops sending query logs to CloudWatch Logs. Route 53 doesn't 15 // delete any logs that are already in CloudWatch Logs. For more information about 16 // DNS query logs, see CreateQueryLoggingConfig (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateQueryLoggingConfig.html) 17 // . 18 func (c *Client) DeleteQueryLoggingConfig(ctx context.Context, params *DeleteQueryLoggingConfigInput, optFns ...func(*Options)) (*DeleteQueryLoggingConfigOutput, error) { 19 if params == nil { 20 params = &DeleteQueryLoggingConfigInput{} 21 } 22 23 result, metadata, err := c.invokeOperation(ctx, "DeleteQueryLoggingConfig", params, optFns, c.addOperationDeleteQueryLoggingConfigMiddlewares) 24 if err != nil { 25 return nil, err 26 } 27 28 out := result.(*DeleteQueryLoggingConfigOutput) 29 out.ResultMetadata = metadata 30 return out, nil 31 } 32 33 type DeleteQueryLoggingConfigInput struct { 34 35 // The ID of the configuration that you want to delete. 36 // 37 // This member is required. 38 Id *string 39 40 noSmithyDocumentSerde 41 } 42 43 type DeleteQueryLoggingConfigOutput struct { 44 // Metadata pertaining to the operation's result. 45 ResultMetadata middleware.Metadata 46 47 noSmithyDocumentSerde 48 } 49 50 func (c *Client) addOperationDeleteQueryLoggingConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { 51 if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { 52 return err 53 } 54 err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteQueryLoggingConfig{}, middleware.After) 55 if err != nil { 56 return err 57 } 58 err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteQueryLoggingConfig{}, middleware.After) 59 if err != nil { 60 return err 61 } 62 if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteQueryLoggingConfig"); err != nil { 63 return fmt.Errorf("add protocol finalizers: %v", err) 64 } 65 66 if err = addlegacyEndpointContextSetter(stack, options); err != nil { 67 return err 68 } 69 if err = addSetLoggerMiddleware(stack, options); err != nil { 70 return err 71 } 72 if err = addClientRequestID(stack); err != nil { 73 return err 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 = addRetry(stack, options); err != nil { 85 return err 86 } 87 if err = addRawResponseToMetadata(stack); err != nil { 88 return err 89 } 90 if err = addRecordResponseTiming(stack); err != nil { 91 return err 92 } 93 if err = addClientUserAgent(stack, options); err != nil { 94 return err 95 } 96 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 97 return err 98 } 99 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 100 return err 101 } 102 if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { 103 return err 104 } 105 if err = addOpDeleteQueryLoggingConfigValidationMiddleware(stack); err != nil { 106 return err 107 } 108 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteQueryLoggingConfig(options.Region), middleware.Before); err != nil { 109 return err 110 } 111 if err = addRecursionDetection(stack); err != nil { 112 return err 113 } 114 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 115 return err 116 } 117 if err = addResponseErrorMiddleware(stack); err != nil { 118 return err 119 } 120 if err = addRequestResponseLogging(stack, options); err != nil { 121 return err 122 } 123 if err = addDisableHTTPSMiddleware(stack, options); err != nil { 124 return err 125 } 126 return nil 127 } 128 129 func newServiceMetadataMiddleware_opDeleteQueryLoggingConfig(region string) *awsmiddleware.RegisterServiceMetadata { 130 return &awsmiddleware.RegisterServiceMetadata{ 131 Region: region, 132 ServiceID: ServiceID, 133 OperationName: "DeleteQueryLoggingConfig", 134 } 135 }