api_op_GetQueryLoggingConfig.go (5901B)
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. 15 // 16 // For more information about DNS query logs, see [CreateQueryLoggingConfig] and [Logging DNS Queries]. 17 // 18 // [CreateQueryLoggingConfig]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateQueryLoggingConfig.html 19 // [Logging DNS Queries]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html 20 func (c *Client) GetQueryLoggingConfig(ctx context.Context, params *GetQueryLoggingConfigInput, optFns ...func(*Options)) (*GetQueryLoggingConfigOutput, error) { 21 if params == nil { 22 params = &GetQueryLoggingConfigInput{} 23 } 24 25 result, metadata, err := c.invokeOperation(ctx, "GetQueryLoggingConfig", params, optFns, c.addOperationGetQueryLoggingConfigMiddlewares) 26 if err != nil { 27 return nil, err 28 } 29 30 out := result.(*GetQueryLoggingConfigOutput) 31 out.ResultMetadata = metadata 32 return out, nil 33 } 34 35 type GetQueryLoggingConfigInput struct { 36 37 // The ID of the configuration for DNS query logging that you want to get 38 // information about. 39 // 40 // This member is required. 41 Id *string 42 43 noSmithyDocumentSerde 44 } 45 46 type GetQueryLoggingConfigOutput struct { 47 48 // A complex type that contains information about the query logging configuration 49 // that you specified in a [GetQueryLoggingConfig]request. 50 // 51 // [GetQueryLoggingConfig]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetQueryLoggingConfig.html 52 // 53 // This member is required. 54 QueryLoggingConfig *types.QueryLoggingConfig 55 56 // Metadata pertaining to the operation's result. 57 ResultMetadata middleware.Metadata 58 59 noSmithyDocumentSerde 60 } 61 62 func (c *Client) addOperationGetQueryLoggingConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { 63 if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { 64 return err 65 } 66 err = stack.Serialize.Add(&awsRestxml_serializeOpGetQueryLoggingConfig{}, middleware.After) 67 if err != nil { 68 return err 69 } 70 err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetQueryLoggingConfig{}, middleware.After) 71 if err != nil { 72 return err 73 } 74 if err := addProtocolFinalizerMiddlewares(stack, options, "GetQueryLoggingConfig"); err != nil { 75 return fmt.Errorf("add protocol finalizers: %v", err) 76 } 77 78 if err = addlegacyEndpointContextSetter(stack, options); err != nil { 79 return err 80 } 81 if err = addSetLoggerMiddleware(stack, options); err != nil { 82 return err 83 } 84 if err = addClientRequestID(stack); err != nil { 85 return err 86 } 87 if err = addComputeContentLength(stack); err != nil { 88 return err 89 } 90 if err = addResolveEndpointMiddleware(stack, options); err != nil { 91 return err 92 } 93 if err = addComputePayloadSHA256(stack); err != nil { 94 return err 95 } 96 if err = addRetry(stack, options); err != nil { 97 return err 98 } 99 if err = addRawResponseToMetadata(stack); err != nil { 100 return err 101 } 102 if err = addRecordResponseTiming(stack); err != nil { 103 return err 104 } 105 if err = addSpanRetryLoop(stack, options); err != nil { 106 return err 107 } 108 if err = addClientUserAgent(stack, options); err != nil { 109 return err 110 } 111 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 112 return err 113 } 114 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 115 return err 116 } 117 if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { 118 return err 119 } 120 if err = addTimeOffsetBuild(stack, c); err != nil { 121 return err 122 } 123 if err = addUserAgentRetryMode(stack, options); err != nil { 124 return err 125 } 126 if err = addCredentialSource(stack, options); err != nil { 127 return err 128 } 129 if err = addOpGetQueryLoggingConfigValidationMiddleware(stack); err != nil { 130 return err 131 } 132 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetQueryLoggingConfig(options.Region), middleware.Before); err != nil { 133 return err 134 } 135 if err = addRecursionDetection(stack); err != nil { 136 return err 137 } 138 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 139 return err 140 } 141 if err = addResponseErrorMiddleware(stack); err != nil { 142 return err 143 } 144 if err = addRequestResponseLogging(stack, options); err != nil { 145 return err 146 } 147 if err = addDisableHTTPSMiddleware(stack, options); err != nil { 148 return err 149 } 150 if err = addInterceptBeforeRetryLoop(stack, options); err != nil { 151 return err 152 } 153 if err = addInterceptAttempt(stack, options); err != nil { 154 return err 155 } 156 if err = addInterceptExecution(stack, options); err != nil { 157 return err 158 } 159 if err = addInterceptBeforeSerialization(stack, options); err != nil { 160 return err 161 } 162 if err = addInterceptAfterSerialization(stack, options); err != nil { 163 return err 164 } 165 if err = addInterceptBeforeSigning(stack, options); err != nil { 166 return err 167 } 168 if err = addInterceptAfterSigning(stack, options); err != nil { 169 return err 170 } 171 if err = addInterceptTransmit(stack, options); err != nil { 172 return err 173 } 174 if err = addInterceptBeforeDeserialization(stack, options); err != nil { 175 return err 176 } 177 if err = addInterceptAfterDeserialization(stack, options); err != nil { 178 return err 179 } 180 if err = addSpanInitializeStart(stack); err != nil { 181 return err 182 } 183 if err = addSpanInitializeEnd(stack); err != nil { 184 return err 185 } 186 if err = addSpanBuildRequestStart(stack); err != nil { 187 return err 188 } 189 if err = addSpanBuildRequestEnd(stack); err != nil { 190 return err 191 } 192 return nil 193 } 194 195 func newServiceMetadataMiddleware_opGetQueryLoggingConfig(region string) *awsmiddleware.RegisterServiceMetadata { 196 return &awsmiddleware.RegisterServiceMetadata{ 197 Region: region, 198 ServiceID: ServiceID, 199 OperationName: "GetQueryLoggingConfig", 200 } 201 }