1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package wafregional 4 5import ( 6 "context" 7 awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" 8 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" 9 "github.com/aws/aws-sdk-go-v2/service/wafregional/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12) 13 14// This is AWS WAF Classic documentation. For more information, see AWS WAF Classic 15// (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) 16// in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API 17// and see the AWS WAF Developer Guide 18// (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). With 19// the latest version, AWS WAF has a single set of endpoints for regional and 20// global use. Returns an array of LoggingConfiguration objects. 21func (c *Client) ListLoggingConfigurations(ctx context.Context, params *ListLoggingConfigurationsInput, optFns ...func(*Options)) (*ListLoggingConfigurationsOutput, error) { 22 if params == nil { 23 params = &ListLoggingConfigurationsInput{} 24 } 25 26 result, metadata, err := c.invokeOperation(ctx, "ListLoggingConfigurations", params, optFns, c.addOperationListLoggingConfigurationsMiddlewares) 27 if err != nil { 28 return nil, err 29 } 30 31 out := result.(*ListLoggingConfigurationsOutput) 32 out.ResultMetadata = metadata 33 return out, nil 34} 35 36type ListLoggingConfigurationsInput struct { 37 38 // Specifies the number of LoggingConfigurations that you want AWS WAF to return 39 // for this request. If you have more LoggingConfigurations than the number that 40 // you specify for Limit, the response includes a NextMarker value that you can use 41 // to get another batch of LoggingConfigurations. 42 Limit int32 43 44 // If you specify a value for Limit and you have more LoggingConfigurations than 45 // the value of Limit, AWS WAF returns a NextMarker value in the response that 46 // allows you to list another group of LoggingConfigurations. For the second and 47 // subsequent ListLoggingConfigurations requests, specify the value of NextMarker 48 // from the previous response to get information about another batch of 49 // ListLoggingConfigurations. 50 NextMarker *string 51 52 noSmithyDocumentSerde 53} 54 55type ListLoggingConfigurationsOutput struct { 56 57 // An array of LoggingConfiguration objects. 58 LoggingConfigurations []types.LoggingConfiguration 59 60 // If you have more LoggingConfigurations than the number that you specified for 61 // Limit in the request, the response includes a NextMarker value. To list more 62 // LoggingConfigurations, submit another ListLoggingConfigurations request, and 63 // specify the NextMarker value from the response in the NextMarker value in the 64 // next request. 65 NextMarker *string 66 67 // Metadata pertaining to the operation's result. 68 ResultMetadata middleware.Metadata 69 70 noSmithyDocumentSerde 71} 72 73func (c *Client) addOperationListLoggingConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { 74 err = stack.Serialize.Add(&awsAwsjson11_serializeOpListLoggingConfigurations{}, middleware.After) 75 if err != nil { 76 return err 77 } 78 err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListLoggingConfigurations{}, middleware.After) 79 if err != nil { 80 return err 81 } 82 if err = addSetLoggerMiddleware(stack, options); err != nil { 83 return err 84 } 85 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 86 return err 87 } 88 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 89 return err 90 } 91 if err = addResolveEndpointMiddleware(stack, options); err != nil { 92 return err 93 } 94 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 95 return err 96 } 97 if err = addRetryMiddlewares(stack, options); err != nil { 98 return err 99 } 100 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 101 return err 102 } 103 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 104 return err 105 } 106 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 107 return err 108 } 109 if err = addClientUserAgent(stack); err != nil { 110 return err 111 } 112 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 113 return err 114 } 115 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 116 return err 117 } 118 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLoggingConfigurations(options.Region), middleware.Before); err != nil { 119 return err 120 } 121 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 122 return err 123 } 124 if err = addResponseErrorMiddleware(stack); err != nil { 125 return err 126 } 127 if err = addRequestResponseLogging(stack, options); err != nil { 128 return err 129 } 130 return nil 131} 132 133func newServiceMetadataMiddleware_opListLoggingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { 134 return &awsmiddleware.RegisterServiceMetadata{ 135 Region: region, 136 ServiceID: ServiceID, 137 SigningName: "waf-regional", 138 OperationName: "ListLoggingConfigurations", 139 } 140} 141