api_op_GetQueryLoggingConfig.go (4409B)
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/aws-sdk-go-v2/service/route53/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12 ) 13 14 // Gets information about a specified configuration for DNS query logging. For 15 // more information about DNS query logs, see CreateQueryLoggingConfig (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateQueryLoggingConfig.html) 16 // and Logging DNS Queries (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html) 17 // . 18 func (c *Client) GetQueryLoggingConfig(ctx context.Context, params *GetQueryLoggingConfigInput, optFns ...func(*Options)) (*GetQueryLoggingConfigOutput, error) { 19 if params == nil { 20 params = &GetQueryLoggingConfigInput{} 21 } 22 23 result, metadata, err := c.invokeOperation(ctx, "GetQueryLoggingConfig", params, optFns, c.addOperationGetQueryLoggingConfigMiddlewares) 24 if err != nil { 25 return nil, err 26 } 27 28 out := result.(*GetQueryLoggingConfigOutput) 29 out.ResultMetadata = metadata 30 return out, nil 31 } 32 33 type GetQueryLoggingConfigInput struct { 34 35 // The ID of the configuration for DNS query logging that you want to get 36 // information about. 37 // 38 // This member is required. 39 Id *string 40 41 noSmithyDocumentSerde 42 } 43 44 type GetQueryLoggingConfigOutput struct { 45 46 // A complex type that contains information about the query logging configuration 47 // that you specified in a GetQueryLoggingConfig (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetQueryLoggingConfig.html) 48 // request. 49 // 50 // This member is required. 51 QueryLoggingConfig *types.QueryLoggingConfig 52 53 // Metadata pertaining to the operation's result. 54 ResultMetadata middleware.Metadata 55 56 noSmithyDocumentSerde 57 } 58 59 func (c *Client) addOperationGetQueryLoggingConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { 60 if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { 61 return err 62 } 63 err = stack.Serialize.Add(&awsRestxml_serializeOpGetQueryLoggingConfig{}, middleware.After) 64 if err != nil { 65 return err 66 } 67 err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetQueryLoggingConfig{}, middleware.After) 68 if err != nil { 69 return err 70 } 71 if err := addProtocolFinalizerMiddlewares(stack, options, "GetQueryLoggingConfig"); err != nil { 72 return fmt.Errorf("add protocol finalizers: %v", err) 73 } 74 75 if err = addlegacyEndpointContextSetter(stack, options); err != nil { 76 return err 77 } 78 if err = addSetLoggerMiddleware(stack, options); err != nil { 79 return err 80 } 81 if err = addClientRequestID(stack); err != nil { 82 return err 83 } 84 if err = addComputeContentLength(stack); err != nil { 85 return err 86 } 87 if err = addResolveEndpointMiddleware(stack, options); err != nil { 88 return err 89 } 90 if err = addComputePayloadSHA256(stack); err != nil { 91 return err 92 } 93 if err = addRetry(stack, options); err != nil { 94 return err 95 } 96 if err = addRawResponseToMetadata(stack); err != nil { 97 return err 98 } 99 if err = addRecordResponseTiming(stack); err != nil { 100 return err 101 } 102 if err = addClientUserAgent(stack, options); err != nil { 103 return err 104 } 105 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 106 return err 107 } 108 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 109 return err 110 } 111 if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { 112 return err 113 } 114 if err = addOpGetQueryLoggingConfigValidationMiddleware(stack); err != nil { 115 return err 116 } 117 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetQueryLoggingConfig(options.Region), middleware.Before); err != nil { 118 return err 119 } 120 if err = addRecursionDetection(stack); err != nil { 121 return err 122 } 123 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 124 return err 125 } 126 if err = addResponseErrorMiddleware(stack); err != nil { 127 return err 128 } 129 if err = addRequestResponseLogging(stack, options); err != nil { 130 return err 131 } 132 if err = addDisableHTTPSMiddleware(stack, options); err != nil { 133 return err 134 } 135 return nil 136 } 137 138 func newServiceMetadataMiddleware_opGetQueryLoggingConfig(region string) *awsmiddleware.RegisterServiceMetadata { 139 return &awsmiddleware.RegisterServiceMetadata{ 140 Region: region, 141 ServiceID: ServiceID, 142 OperationName: "GetQueryLoggingConfig", 143 } 144 }