src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

api_op_DeleteQueryLoggingConfig.go (2678B)


      1 // Code generated by smithy-go-codegen DO NOT EDIT.
      2 
      3 package route53
      4 
      5 import (
      6 	"context"
      7 
      8 	"github.com/aws/smithy-go/middleware"
      9 )
     10 
     11 // Deletes a configuration for DNS query logging. If you delete a configuration,
     12 // Amazon Route 53 stops sending query logs to CloudWatch Logs. Route 53 doesn't
     13 // delete any logs that are already in CloudWatch Logs.
     14 //
     15 // For more information about DNS query logs, see [CreateQueryLoggingConfig].
     16 //
     17 // [CreateQueryLoggingConfig]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateQueryLoggingConfig.html
     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 	err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteQueryLoggingConfig{}, middleware.After)
     52 	if err != nil {
     53 		return err
     54 	}
     55 	err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteQueryLoggingConfig{}, middleware.After)
     56 	if err != nil {
     57 		return err
     58 	}
     59 
     60 	if err = addComputeContentLength(stack); err != nil {
     61 		return err
     62 	}
     63 	if err = addResolveEndpointMiddleware(stack, options); err != nil {
     64 		return err
     65 	}
     66 	if err = addComputePayloadSHA256(stack); err != nil {
     67 		return err
     68 	}
     69 	if err = addRecordResponseTiming(stack, options); err != nil {
     70 		return err
     71 	}
     72 	if err = addCredentialSource(stack, options); err != nil {
     73 		return err
     74 	}
     75 	if err = addOpDeleteQueryLoggingConfigValidationMiddleware(stack); err != nil {
     76 		return err
     77 	}
     78 	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
     79 		return err
     80 	}
     81 	if err = addResponseErrorMiddleware(stack); err != nil {
     82 		return err
     83 	}
     84 	if err = addRequestResponseLogging(stack, options); err != nil {
     85 		return err
     86 	}
     87 	if err = addDisableHTTPSMiddleware(stack, options); err != nil {
     88 		return err
     89 	}
     90 	if err = addInterceptors(stack, options); err != nil {
     91 		return err
     92 	}
     93 	return nil
     94 }